How is YouTube using AI to recommend videos?
Last Updated on May 28, 2021 by Editorial Team
Author(s): Daksh Trehan
Machine Learning
Whoβs the boss? The algorithm orΒ users?
With a high user base comes a mighty recommendation system.
You know me guys, I love to decode interesting algorithms. You can check out my articles on TikTok, Tinder, GPT-3, GoogleΒ Hum!
Table ofΒ Content:
- What is YouTube? How popular isΒ it?
- Decoding elements ofΒ YouTube
βΉ HomepageβββGive suggestions without any query/navigation.
βΉ Watch NextβββDrive higher engagement to similarΒ content.
βΉ Search TabβββShow content matching theΒ query
βΉ TrendingβββThe most controversial section ofΒ YouTube
βΉ A Creatorβs way toΒ Success!
- Deep Learning Architecture for YouTubeβs Recommender System
βΉ Collaborative Filtering
βΉ Deep NeuralΒ Networks
βΉ Work Flow in theΒ nutshell
What is YouTube? How popular isΒ it?
YouTube is a video-sharing website launched back in 2007 by three PayPal employees: Chad Hurley, Steve Chen, and JawedΒ Karim.
Once started above the small restaurant at California City, YouTube has detonated the market with its simplicity and a wide range of audiences. YouTube has something for everyone. Be it gaming channels, beauty tutorials, life hacks, product reviews, or hours of Live NewsβββYouTube got it all. Creators upload 500 hours of content every minute, and with this sort of high content-to-user ratio, I am pretty sure, something would be there to strike your choice everyΒ minute.
YouTube is now the worldβs second-largest search engine and second most visited website after Google with a daily watch time of 1 Billion hours, which is greater than Netflix and Facebook combined. Once logged in, it can hook the user for 40 freakingΒ minutes.
I bet we all have been at this place, where we enter the YouTube world to gain some knowledge or insights and end up watching music videos for hours. This is the magic of the YouTube recommender system.
The YouTube algorithm is an integral part of its success, it decides 70% of the time what users have to watch, and about 80% of people in the USA follow the suggestion.
Decoding elements ofΒ YouTube
The ultimate goal of YouTubeβs recommendation systemΒ are:
- Help viewers find the videos theyβre interested in.
- Hook users to keep watching the videos thus increasing the popularity of the app and attract more creators.
The recommendation system in YouTube takes various things into account. It analyzes userβs history, their activities, geographical attributes, for videos, they analyze its genre, thumbnails, content, description, aiming audience, subscribers, satisfaction count(likes, comments, shares), user surveys,Β etc.
There are several different recommendation systems on YouTube that are employed in segregated sections.
HomepageβββGive suggestions without any query/navigation.
It acts as a one-stop destination for the users, no queries searched, not peeking into other tabs like subscriptions/explore and you got your match right after opening the app. This helps to hook the user withΒ ease.
Which videos are shown on your homepage?
- Recent videos from your subscribed channels.
- Videos that have been watched by users matching yourΒ taste.
- Few videos from channels that youβve never watched enabling your discovery of new content and channelΒ growth.
- Content from an unsubscribed channel that is familiar to the content youΒ watch.
Watch Next(Suggested Videos)βββDrive higher engagement to similarΒ content.
It tries to show content similar to the video youβre watching. It can be from the same creator or a different one but having the same genre/matching context.
In the visual above, I am watching βChokerβ by Twenty One Pilots that are from their latest album which is scheduled to release on 21st May. The recommendation system is asking me to watch another song βShy Awayβ from the same album, a video explaining βChokersβ(Twenty One Pilot songs are hard to decode), and a song named βSave your Tearsβ which share the same genre as βChokerβ.
Unlike at homepage, where videos suggested are personalized and content revolves around your taste, the videos suggested here are to increase your engagement on the platform and get familiar with the content of the same creator or relatedΒ content.
In easy words, the content shown hereΒ is:
related stuff to viewing videos + relevant videos forΒ you
Search TabβββShow content matching theΒ query
The recommendation system employed here serves the purpose of providing relevant stuff. YouTube has a lot of greater advantage here because youβre providing some raw input in form ofΒ queries.
The search recommendation system tries to find a video with the same query as mentioned in the search box. It checks for the title of the video, tags in it, description of videos. That doesnβt necessarily mean that if I search for βData Scienceβ it will show me a video titled βData Scienceβ with tags and descriptions as βData Scienceβ but no relevantΒ content.
YouTube also looks for the βFeedback Loopβ i.e. it doesnβt only look for the metadata but rather also looks at the performance of the video, how much satisfaction rate(Views, Likes, Comments, Shares) it have, what people searching the same query tend to watch, the taste of audience of the contentΒ creator.
The output generated here is dependent on:
Relevance + FeedbackΒ Loop
TrendingβββThe most controversial section ofΒ YouTube
This is the most controversial and confusing section of YouTube, often the least expected creator and content are here with not so manyΒ views.
As mentioned by Tom[2], βTrending is like watercooler of YouTube.β
It is the section that takes into account most of the factors, the goal is to promote videos that are widely appreciated by the audience of various tastes. It tends to feature broadly appealing videos and the videos people are conversing about even out of YouTube. They check the velocity and increase in views and the appeal of the video. All it focuses upon is the Ranking and geography of users. Different regions have different trending videos based on the taste of people residingΒ there.
In addition, there is a βCreator on the riseβ option that features various rising channels and promotes them free of cost. This is done by YouTube to promote small creators and provide them with free publicity to grow based on the performance of their videos and the content they areΒ making.
A Creatorβs way toΒ Success!
To grow as a creator, some points are needed to be taken careΒ of.
YouTube is a creator-friendly platform, but if you create sensible content and are loyal toΒ YouTube.
Creating a video on βHow to tie laces?β wonβt work as YouTube already has 1000s of such videos. Try to create a video that is relevant and sensible that can help someone. Iβm 21 years old and have been tying lace similarly as I did when I was 10 years old, so that technique doesnβtΒ change.
Try to stand out in the competition and once youβve achieved popularity you can use the same concept to expand and boost yourΒ channel.
Always remember: if it works, donβt touchΒ it!
Make sure to try something new, but donβt go out of the league by trying new concepts and loosing the audience.
YouTube also looks at your channelβs performance. It analyzes how much time you took to hit 100k subscribers and 100k hours of watch time. So, try to accelerate your statistics as early as possible, make correct use of your popularity at rightΒ time.
Some statistics measure forΒ success:
- 50% of Watch Time[4]: at least 50% of your viewers watch your content with high watchΒ time.
- 5% of click rate[4]: at least 5% of viewers click and watch your video when suggested.
- Check stats for your video at least for the first 24 hours as it is the time when your content can get maximum attention.
- Check the geography of your users and create content accordingly.
Deep Learning Architecture for YouTubeβs Recommender System
The recommender system is one of the most powerful use cases of ML that is encountered by every one of us many times aΒ day.
There are multiple ways to build a recommendation system:
Collaborative Filtering: This is a type where we tend to build collaborations between various users and items(videos).
- User-User Collaborative FilteringβββHere, we try to match the taste of different users. It tends to check if βparticular user will like the particular video?β
e.g. Letβs take a recommendation system with just 10 users and 10 videos, we try to match the interests of different users and try to create a correlation betweenΒ them.
But this technique doesnβt scale well and canβt be used for such a large corpus ofΒ data.
- Item-Item Collaborative FilteringβββThe technique is the same as above but we try to correlate different items i.e. videos. It tends to suggest βsimilar videos based on the videos users likedβ. This performs better as we can segregate videos better as compared to segregating humans on their interests because they can have multiple interests. This way is computationally expensive and thus not employed.
Matrix Factorization: It tries to dissolve both user and item vectors together thus decomposing them and providing us with better comparison metrics. Unlike Item-Item collaborative filtering it isnβt computationally expensive but it lacks interpretability, it lacks the answer to βwhy we are recommending this video?β thus leading to low accuracies.
Deep Learning Architecture: In 2016, Google publicized Deep Learning architecture for YouTube recommendation and became one of the first companies to deploy production-level deep neural networks for recommender systems.
According to the paper, there are two stages to get personalized yet relevantΒ output:
- Candidate Generation: It takes every information it could, the information is fed in form of embeddings and the output expected is the probability of any particular user watching aΒ video.
Pondering over YouTube statistics, the traditional architecture could provide us the probability for at least 1β2 billion videos every instant and thatβs not what we expect. To ease the computation, we sample around 100β200 videos that are relevant to theΒ user.
- Ranking: This serves the purpose of ranking videos based on the userβs relevance. A higher relevance score denotes video is broadly appealing and hence more push to the video. The relevance score changes very frequently and closely depend on the userβs activity.
The relevance scores are closely equivalent to the expected watch time for videos. Videos of higher duration will have higher watch time and thatβs why they are often able to fool algorithm and get high ranking/relevance score.
Feature denoting Userβs context and Content attributes are merged and inputted to Logistic Weighted Regression where it spits out the relevance score for eachΒ video.
Recommendation workflow in aΒ Nutshell
At YouTube, there are millions of content uploaded by users daily. The recommendation system tends to classify videos first based on the userβs characteristics and then based on the videoβs metadata.
The algorithm analyzes the userβs attributes like Watch History, Search History, Userβs taste, Age, Location, Time and then samples out few videos and sends them for the nextΒ phase.
The next phase typically includes filtering the sampled videos based on Video metadata, it includes Satisfaction rate for video, Genre, Thumbnail, Description, Tags, Total Views, Last watched,Β etc.
Concatenating the results of both the Candidate Generation and Ranking of Videos phase we get the probability of user watching sampled videos. The higher probability means the user is more interested in that kind of kinds ofΒ stuff.
This loop continues and the algorithm monitors the userβs interaction with each kind of video and dynamically keeps altering the ranking of videos thus delivering personalized and yet sufficient videos.
If you like this article, please consider subscribing to my newsletter: Daksh Trehanβs Weekly Newsletter.
Conclusion
Hopefully, this article has given you an insight into the YouTube recommendation system.
But, the information portrayed in this article is solely based on some theories that are experienced by users or publicized by YouTube developers. There can be a lot more to the algorithm that weβre missing out and I will try to add it in my future articles.
References:
[1] Deep Neural Networks for YouTube Recommendations
[2] YouTube Search & Discovery: Tips forΒ Success
[3] How does YouTube recommend videos?βββAI EXPLAINED!
[4] How the YouTube Algorithm Works inΒ 2021
[5] YouTubeβs Recommendation Engine: Explained
[6] How YouTube is Recommending Your Next VideoβββKDnuggets
Feel free toΒ connect:
Portfolio ~ https://www.dakshtrehan.com
LinkedIn ~ https://www.linkedin.com/in/dakshtrehan
Follow for further Machine Learning/ Deep LearningΒ blogs.
Medium ~ https://medium.com/@dakshtrehan
Want to learnΒ more?
Detecting COVID-19 Using Deep Learning
The Inescapable AI Algorithm: TikTok
GPT-3 Explained to a 5-year old.
Tinder+AI: A perfect Matchmaking?
An insiderβs guide to Cartoonization using Machine Learning
Reinforcing the Science Behind Reinforcement Learning
Decoding science behind Generative Adversarial Networks
Understanding LSTMβs and GRUβs
Recurrent Neural Network for Dummies
Convolution Neural Network forΒ Dummies
Cheers
How is YouTube using AI to recommend videos? was originally published in Towards AI on Medium, where people are continuing the conversation by highlighting and responding to this story.
Published via Towards AI