<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Atharva Raut on Medium]]></title>
        <description><![CDATA[Stories by Atharva Raut on Medium]]></description>
        <link>https://medium.com/@atharva.raut21?source=rss-f4ad415bca96------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*WieurWP70Wsrupa0</url>
            <title>Stories by Atharva Raut on Medium</title>
            <link>https://medium.com/@atharva.raut21?source=rss-f4ad415bca96------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 05:50:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@atharva.raut21/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Netflix Recommendation Engine]]></title>
            <link>https://medium.com/@atharva.raut21/netflix-recommendation-engine-9060aa1f86f4?source=rss-f4ad415bca96------2</link>
            <guid isPermaLink="false">https://medium.com/p/9060aa1f86f4</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[algorithms]]></category>
            <category><![CDATA[netflix]]></category>
            <category><![CDATA[aritificial-intelligence]]></category>
            <dc:creator><![CDATA[Atharva Raut]]></dc:creator>
            <pubDate>Thu, 25 Apr 2024 07:18:36 GMT</pubDate>
            <atom:updated>2024-04-25T07:31:45.760Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3bmOFjNi3ZVBEMck.jpg" /></figure><p>In this blog post, we’ll look deeper into Netflix’s recommendation Engine. The Internet has transformed how we watch television through Over-the-Top (OTT) content streaming services such as Netflix, Amazon Prime, Disney, and HBO.</p><h3><strong>Introduction</strong></h3><p>With over 220 million subscribers, Netflix is one of the most popular streaming platforms featuring hundreds of movies, animations, and TV shows. What’s the secret behind their success? Netflix’s users value this platform for its wide selection, high-quality subtitles, and yes, accurate, personalized recommendations. Netflix exploits an advanced machine-learning-based recommendation system that analyzes users’ viewing choices to suggest new movies and TV shows tailored to their interests.</p><p>Netflix began in 1997 as a movie rental service via mail delivery. In 2000, they started using data science and analytics to recommend videos for users to rent. Recognizing the value of improving recommendations, Netflix organized a $1 million challenge in 2006 to enhance their system. While the winning solutions proved difficult to implement, this sparked huge innovations in smart product recommendations, including demonstrating for the first time that matrix factorization could be an effective approach. The company’s focus on recommendations has paid off. Remarkably, around 80% of what people watch on Netflix comes from their recommendation algorithms — a testament to their efficiency. As Netflix continues acquiring new subscribers (nearly 222 million as of Q4 2021), their ability to understand viewers’ entertainment needs and provide personalized suggestions is clearly a key driver of their success.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*eDAZjKfPRQF-DFJU.png" /><figcaption><strong>Figure 1:</strong> The Quaterly growth of Netflix after focusing on the recommendation system</figcaption></figure><h3>Objectives of Netflix Recommendations</h3><p>The Netflix recommendation problem is multi-dimensional in that it tries to optimize for several objectives along with accuracy.</p><p><strong><em>Diversity</em></strong></p><p>Individuals have many interests, which can further depend on their mood. Thus, the recommendations should appeal to their range of interests and moods.</p><p><strong><em>Awareness</em></strong></p><p>The recommendations should convey that the system is adapting to their taste. In addition, conveying the reason for a recommendation promotes trust by encouraging members to provide feedback, resulting in better recommendations. To ensure awareness, Netflix provides explanations (as row titles) as to why it recommends a movie or a show.</p><p><strong><em>Freshness</em></strong></p><p>The recommendations should be fresh. The system should recommend new items if a user isn’t interested in a particular recommendation for long.</p><p><strong><em>Ranking</em></strong></p><p>The order in which items are recommended is critical in providing a personalized experience. Netflix recommendation systems provide the best possible ordering in real-time and within a specific context. The ranking algorithm is decomposed into scoring, sorting, and filtering.</p><h3>Approaches of Netflix Recommendation Engine</h3><h4>Rule- and Ranking-Based Approaches</h4><p>For a long time, Netflix employed rule-based approaches to populate members’ home pages. This approach relied on templates that defined the types of rows and their order on the page. For instance, a rule could specify that the first row would be “Continue Watching,” followed by “New Releases,” “Top 10,” and then four to five genre-specific rows. The only personalization possible was selecting relevant videos for each genre row based on the user’s previously watched or liked content (e.g., “Because you watched X”).</p><p>While simple and effective, this rule-based approach had its limitations. It could lead to suboptimal performance since the rows were not personalized to individual members’ interests. Additionally, as time passed, the template grew increasingly complex, making it challenging to manage. To address these issues, Netflix proposed a more advanced approach known as row-ranking. This method treated each row as an item in a ranking problem, using existing recommendation techniques (e.g., content-based) to develop a utility function that measured the usefulness of a row for a particular member. All candidate rows were then sorted based on their utilities, and the top rows were selected to generate the home page. However, content-based and scoring-based approaches alone could result in over-specialization, leading to a lack of diversity in recommendations. To mitigate this, Netflix adopted a stage-wise approach where each row was picked greedily, maximizing both utility and dissimilarity from previously selected rows, thereby promoting a more diverse and engaging experience.</p><h4>Contextual Bandits Approach</h4><p>A traditional ML approach to personalize the artworks will involve collecting a batch of historical data on how users have previously interacted with various artworks and then training an ML model to estimate the utility of an artwork for a member.</p><p>Next, it involves A/B testing this new model with the current production model to see if the new algorithm performs better than the current one in real life.</p><p><strong>A/B testing</strong>, also known as split testing, is a method used to compare two or more versions of a product, feature, or algorithm. A/B testing involves randomly dividing the user base into Control and Treatment groups.</p><p>The Control group is exposed to the current production model or feature, while the Treatment group is exposed to the new algorithm or feature being tested. The two groups are randomly assigned to ensure unbiased results.</p><p>The system then analyzes user interactions and behaviors (e.g., click-through rates, engagement metrics, conversion rates, or other relevant key performance indicators (KPIs)).</p><p>By comparing the performance metrics between the Control and Treatment groups, one can conclude whether the new algorithm or feature improves interaction. If yes, the new algorithm or feature is available to the whole population. On the other hand, if the results are inconclusive, then the new feature is retained from moving into production.</p><p>Even though these batch-based ML algorithms are widely used, they still suffer from regret as many members over a long period did not benefit from the better experience (<strong>Figure 2</strong>). Thus, it is important to use algorithms that can work online and update themselves with changing user behavior and interests.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/587/0*CROPXXe9OYlwA5YC" /><figcaption><strong>Figure 2:</strong> Regret in batch-based machine learning. By the time model gets deployed, user interests and behavior can change.</figcaption></figure><p>Contextual bandits (<strong>Figure 3</strong>) solve this regret problem by rapidly figuring out the optimal personalized artwork for each member and a given context.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*fr8fMVsSiGBmIgQf" /><figcaption><strong>Figure 3:</strong> How contextual bandits work</figcaption></figure><p>These algorithms are a class of online algorithms that use a context (e.g., member profile, interests, and mood), choose an action (e.g., personalized artwork), and observe a cost or reward for the selected action only (whether the member interacted with the personalized artwork). Based on the cost or reward, contextual bandits align themselves with changing user behavior (<strong>Figure 4</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*T2OyR6VhIGIHKrTU" /><figcaption><strong>Figure 4:</strong> Contextual bandits for Netflix artwork personalization</figcaption></figure><p>One key property of contextual bandits is that they don’t suffer from overspecialization. Using data exploration techniques (e.g., epsilon greedy approach), we can add randomness in the recommendations (i.e., instead of suggesting personalized artwork, suggest a random one) to explore more about the user behavior.</p><p>Usually, this is controlled so that the regret incurred by exploration is typically very small, and the cost of exploration per member is negligible.</p><p>For a given title, Netflix stores a few dozen candidate artwork images. Furthermore, it records how different members have interacted with these candidate artworks (e.g., if a member presented with an artwork did not engage, while other members presented with the same artwork did).</p><p>This data is then fed to contextual bandits to model the probability or utility that a member will enjoy a given artwork. Then, based on the predicted probabilities of each candidate artwork, we can pick the one with the highest probability (<strong>Figure 5</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*gqiyBRL3205CnH9J" /><figcaption><strong>Figure 5:</strong> Selecting the optimal personalized artwork for a user</figcaption></figure><h4><strong><em>Performance Evaluation</em></strong></h4><p>To evaluate the contextual bandits offline, Netflix uses an offline technique called “replay.” This replay allows us to measure how users would have engaged with the titles if they were hypothetically presented with the images selected by the new algorithm.</p><p>One way to quantify replay is through <strong>take fraction</strong>. As shown in <strong>Figure 6,</strong> take fraction measures the fraction of members that played the title in profiles where the production model and the new model assignment are the same.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*8fdcNCfbZ5DEKCfP" /><figcaption><strong>Figure 6:</strong> Take fraction measures the fraction of members that played the title in profiles where the production model and the new model assignment are the same</figcaption></figure><p><strong>Figure 7</strong> compares the performance of contextual bandits to a random assignment algorithm using the take fraction metric.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*PIdJNWnzGERhzsIL" /><figcaption><strong>Figure 7:</strong> Performance of contextual bandits when evaluated using take fraction</figcaption></figure><h3>Recent Trends in Personalization at Netflix</h3><p>Besides using advanced ML algorithms like contextual bandits to provide personalization, Netflix has been exploring the field of causal inference to improve the quality of their recommendations.</p><p>Causality is the phenomenon when one thing causes another thing to happen. Causal inference is the process where we determine if one thing did cause another thing to happen by looking at all the evidence available. For example, causal inference can help Netflix understand whether a user watched a title because it was recommended or simply because he wanted to (<strong>Figure 8</strong>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/0*gYBC9p7CtXRPUERY" /><figcaption><strong>Figure 8:</strong> Causal Inference at Netflix</figcaption></figure><p><strong>Correlation and Causation</strong> are two distinct concepts. Correlation is when two things happen together. Causation refers to the phenomenon where one event causes another event to happen.</p><p>For example, ice cream demand and crime rates might seem correlated because they rise and fall together. However, ice cream sales do not cause crime rates to rise or fall. Instead, both of these might be influenced by a third variable: temperature.</p><p>Machine learning algorithms used in recommendations learn from the correlations between features and targets. Hence, they don’t understand the causal relationship between the feature and the target.</p><p>However, using causal inference techniques on top of ML recommendations can refine them by identifying the exact titles users want to watch instead of just identifying which titles they are likely to engage with.</p><p>To this end, Netflix created a framework that applies a light, causal adaptive layer on top of the base recommendation system called the Causal Ranker Framework. This framework consists of several components: an impression (treatment) to play (outcome) attribution, true negative label collection, causal estimation, offline evaluation, and model serving.</p><h3>Conclusion</h3><p>In conclusion, Netflix has pioneered advanced machine learning techniques like contextual bandits and causal inference to power its highly effective recommendation engine. By continually adapting its algorithms to rapidly changing user interests and behaviours, Netflix can provide a personalized experience that suggests fresh, diverse content tailored to each individual’s taste. The company’s focus on recommendations as a key driver of engagement has been a major factor behind its tremendous growth and success in the streaming video market. As machine learning and AI continue to evolve, Netflix is well-positioned to further refine its recommendation capabilities, cementing its leadership in delivering a premier entertainment experience to its global user base.</p><p><strong><em>References</em></strong><br><a href="https://medium.com/@springboard_ind/how-netflixs-recommendation-engine-works-bd1ee381bf81"><em>https://medium.com/@springboard_ind/how-netflixs-recommendation-engine-works-bd1ee381bf81</em></a><em><br></em><a href="https://en.wikipedia.org/wiki/Netflix_Prize"><em>https://en.wikipedia.org/wiki/Netflix_Prize</em></a><em><br></em><a href="https://datajobs.com/data-science-repo/Recommender-Systems-[Netflix].pdf"><em>https://datajobs.com/data-science-repo/Recommender-Systems-[Netflix].pdf</em></a><em><br></em><a href="https://www.youtube.com/watch?v=f8OK1HBEgn0"><em>https://www.youtube.com/watch?v=f8OK1HBEgn0</em></a><em><br></em><a href="https://www.statista.com/statistics/250934/quarterly-number-of-netflix-streaming-subscribers-worldwide/"><em>https://www.statista.com/statistics/250934/quarterly-number-of-netflix-streaming-subscribers-worldwide/</em></a><em><br></em><a href="https://help.netflix.com/en/node/100639/us"><em>https://help.netflix.com/en/node/100639/us</em></a><em><br></em><a href="https://netflixtechblog.com/learning-a-personalized-homepage-aa8ec670359a"><em>https://netflixtechblog.com/learning-a-personalized-homepage-aa8ec670359a</em></a><em><br></em><a href="https://medium.com/@springboard_ind/how-netflixs-recommendation-engine-works-bd1ee381bf81"><em>https://medium.com/@springboard_ind/how-netflixs-recommendation-engine-works-bd1ee381bf81</em></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9060aa1f86f4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>