Master LLMs with our FREE course in collaboration with Activeloop & Intel Disruptor Initiative. Join now!

Publication

How is YouTube using AI to recommend videos?
Latest

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?

From nerdschalk via Pinterest

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!

▹ Collaborative Filtering

Matrix Factorization

▹ 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:

  1. Help viewers find the videos they’re interested in.
  2. 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.

YouTube Homepage

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.

Suggested Videos section

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

Search Tab

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

“Trending” Section

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!

Photo by Jungwoo Hong on Unsplash

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:

Architecture for YouTube recommendation system, Source
  • 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.
Architecture for Candidate Generation phase, Source

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.
Ranking phase architecture, Source

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

YouTube algorithm workflow, Designed by Daksh Trehan, All Rights Reserved

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

[7] YouTube Usage Statistics

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

Feedback ↓