<?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 Fatih Sunor on Medium]]></title>
        <description><![CDATA[Stories by Fatih Sunor on Medium]]></description>
        <link>https://medium.com/@fsunor?source=rss-d04cb8111a7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*18yj4LugyIx2EB9ty5i-HA.png</url>
            <title>Stories by Fatih Sunor on Medium</title>
            <link>https://medium.com/@fsunor?source=rss-d04cb8111a7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 09:44:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@fsunor/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[Tubi Recommendations: Modeling video watch sequences with LSTM]]></title>
            <link>https://code.tubitv.com/tubi-recommendations-modeling-video-watch-sequences-with-lstm-a4c9466ec8f8?source=rss-d04cb8111a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/a4c9466ec8f8</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[recurrent-neural-network]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[recommendation-system]]></category>
            <dc:creator><![CDATA[Fatih Sunor]]></dc:creator>
            <pubDate>Wed, 03 Oct 2018 00:06:02 GMT</pubDate>
            <atom:updated>2018-10-03T00:06:02.095Z</atom:updated>
            <content:encoded><![CDATA[<p>As a video streaming service, with recommendations at the heart of our product, early October is the time of year when we look forward to the leaves changing colors, the upcoming harvest and most importantly, <a href="https://recsys.acm.org/">RecSys</a>, the Recommender Systems conference. In honor of this auspicious event, we wanted to share some details from one of our recent recommendation experiments at <a href="https://tubitv.com/">Tubi</a>. LSTMs work miracles in speech recognition, translations and several time series prediction tasks, so we decided to see if they might deliver equally impressive results in the content recommendation arena. In this article, we demonstrate a basic LSTM based recommender. For brevity, we omit a number of Tubi-specific implementation details.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Pv2KReh2dtXMXB3jh0P-rQ.png" /></figure><h3>Model</h3><p><a href="https://www.researchgate.net/publication/13853244_Long_Short-term_Memory">The Long Short-term Memory</a> (LSTM) algorithm, a variant of Recurrent Neural Nets (RNN), was proposed in 1997 by Sepp Hochreiter and Jürgen Schmidhuber to tackle the vanishing gradients problem typically observed in RNN training. LSTMs perform very well with time series data or with records that are sequential in nature such as user activity or other events. In this blog we won’t cover the additional gates and the gradient updates that made LSTMs successful, we’ll focus on how we attempted to harness their power for our objectives.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EAUYf6wPtGyshmcBki6q4A.png" /><figcaption>Image is modified from the slides referred in the next part</figcaption></figure><p>In our experiment, we used implicit feedback from our users — what they watch and how much time they spend watching — to predict what video they would most likely watch next. Although we posed the problem as an item prediction problem, the output log-likelihood value allows us to rank the whole library based on user watch history of different lengths and different recency criteria. We used one hot encoding for each video in user history.</p><h3>Inspiration</h3><p>Our training setup is inspired from Andrej Karpathy’s Convolutional Neural Networks for Visual Recognition —<a href="http://cs231n.stanford.edu/slides/2018/cs231n_2018_lecture10.pdf"> Lecture 10</a>, where he discusses a character-level language model to predict the next character based on previous input of character sequences of certain length.</p><p>We don’t expect similar accuracy as the next character prediction problem. Languages impose grammar, punctuation and, of course, vocabularies of words with common structures. Video sequences, only rarely, impose precise order of watching. However, while the network is trying to learn the sequence of videos, it nicely captures user interest (or related videos, if you prefer the item-space perspective) based on past videos watched.</p><h3>Training the model</h3><p>We experimented with several choices of length of user history, and selecting from different tiers of our library. The network has LSTM, dense and soft max layers. We chose categorical cross entropy as the loss function and used RMS prop optimizer.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/711b2d497872207340a161b09738d128/href">https://medium.com/media/711b2d497872207340a161b09738d128/href</a></iframe><p>In our setup, categorical cross entropy means how many times was the most likely predicted video exactly the next one in the watch sequence. However, obviously, a very high level of this accuracy is not absolutely necessary to enable video ranking. Using accuracy as a metric simply constraints the learning process to push related video representations closer together.</p><h3>Model Performance</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QkKhpbW1JvTN-rjYVfaaPw.png" /></figure><h3>Recommendation Performance</h3><p>We improved offline recommendation metrics such as Mean Average Precision (MAP), Mean Reciprocal Rank (MRR), Precision@n, NDCG@n for n being 6, the number of most visible video assets that we display on most Tubi platforms. More interesting than the offline metrics, we found that LSTMs help with two cases of recommendations particularly well:</p><p>1. Our catalog does not have a great deal of sequential content (not to be confused with episodic TV series — for the purposes of model training, all episodes of a TV series are merged into one entity). A prime example of such content is the famous teenage comedy, Fred. If we supply the first movie from the Fred franchise as the history, LSTM nicely ranks Fred 2 and Fred 3 consecutively as the top two recommendations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mtk88kQ3ogdkjvQ1ehuOwg.png" /></figure><p>2. Another interesting case is when fairly disparate genres are both present in a user’s history, the LSTM seems to pick up the interest shift… sort of.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EqFU5vE5hGsQMaM52lvEvg.png" /></figure><p>In this example, the user had seen a western/thriller movie followed by an action/sci-fi/thriller movie. She is then recommended a series of some sort of modern times western, followed by a blended thriller/action flick, then finally with a straight horror film.</p><p>In summary, our experiments with using LSTMs as a recommender led to some interesting insights and lessons learned. We see potential with this and other methods in the burgeoning field of machine learning and strive to keep our fingers on the pulse of this exciting field. Stay-tuned for future explorations, or better yet <a href="https://tubitv.com/static/careers">come and join us</a> in this brave new world.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a4c9466ec8f8" width="1" height="1" alt=""><hr><p><a href="https://code.tubitv.com/tubi-recommendations-modeling-video-watch-sequences-with-lstm-a4c9466ec8f8">Tubi Recommendations: Modeling video watch sequences with LSTM</a> was originally published in <a href="https://code.tubitv.com/">Tubi Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>