YouTube's Secret Algorithm - Computerphile
Key Takeaways
YouTube's algorithm and systems design for video recommendation, featuring Cristos Goodrow from YouTube, and exploring the signals used to decide video appeal
Full Transcript
I would say it's easily in a million lines a million lines of code absolutely the algorithm is meant to indicate all of the different methods we use to decide which search results we're going to show you and in what order or which recommendations we're going to choose for you I think people when they refer to the algorithm they mean all the all the code that we've written to do those things I don't think of it as one thing I think of it as um lots of little pieces that are trying to accomplish the overall goal of connecting you with what you're looking for or what we think you might want want to watch there's not like a piece of code hidden in a safe or something um there's no piece of code hidden in a safe there's a lot of code and it's scattered all over the place in our code base if you look closely at it it'll resemble much more accounting than any sort of dark sophisticated thing there is whether it's the algorithm or whatever it is there is a degree of secrecy isn't there for for good or bad reasons I mean you you can't be completely open about all of this can you or you're not open about all of it it seems can you is that a fair comment um well I mean I think we're quite open about what we're trying to achieve and I think we're open about um the instances where we know it's not working and we think it could be better I tend to be a little bit more reticent to discuss exactly how we're doing it um and there's a few reasons first of all all we don't want people to try to game what we're doing and sadly we do see that on YouTube and so everything we do we have to think about the opportunities for gaming it I mean we're using certain kinds of um information to help people find the videos they're looking for that depends on on that being that information coming from sincere viewers who were actually looking for things now if instead it came from a robot that wasn't really looking for anything it was just trying to make sure that a particular video showed up at the top of some search results or you know had a tremendous number of views then then we can't use that anymore and so it's not just that there's a few more instances of poor search results or inflated view counts but but it's worse than that because actually that's that means that that we can't use the thing that we were using anymore and so now we have to you know we have to take that away as a possibility for helping associate the viewers with the videos they want to watch and then move on to the next thing and then of course that thing may also be um abused and so uh you know we have to try to protect these these signals as we call them so that um so that we don't lose them and uh you know and then we're left with with very little to actually go on I don't want to um lock us into a particular way of doing things you know say for instance that uh 5 years ago ranking the search results by The View count may have been a great thing to do and that was because at that time view count was one of the best signals that you could find for what are the quality of the video well since then we've found other things that are um that are even better and uh we don't want people to become upset when they say hey wait a minute these videos aren't ranked in the order of the view count that's wrong what's not wrong because we like I said we would have done an experiment to find that there was actually a better way to do it yes we take vew count into account but there's some other thing that we might want to do um for instance uh a very good example is if it were just ranked by view count you'd never see any new videos so you type plane crash after a plane crashes and you'd see the oldest plane crash footage we have if we want to have some video of the new incident we can't rank everything by view count we don't want to commit ourselves in a way to people thinking that this is the way it has to be and that we can't make any changes because we're we have to we have to make changes you mentioned view I mean view count is a very transparent signal because of the design of YouTube can you mention some of the other signals you're using sure um one one of those that we started using a couple of years ago now I guess was watch time so what we noticed was that um was that when people looked for videos uh it was often the case that they would see one that looked like the video they wanted to watch but then once they got on that watch page it wasn't actually the video they were wanting to watch um maybe it had a thumbnail that um was you know very misleading or a title that was particularly misleading now fortunately in most of those cases eventually they got to the one they were looking for and often that was because that would be somewhere on the related videos but in looking that situation we thought well gee that's kind of crummy because why should I have to click two or three times in order to finally get to a video that I was looking for we tried to figure out how to fix that we thought well um people tend to know fairly quickly whether or not the the video they've landed on is the one they're looking for uh the best example I remember of This was um uh we saw one where there were several videos that had titles about a particular boxing match and one of them especially had a thumbnail of a guy like he was just about to be hit and his you know his fist was right up in the other guy's face and everybody was going to click on that one what turned out that um the video behind that was a person talking about the fight and it had no footage of the fight and eventually the viewers would finally get to the one that had some footage of the fight when we looked into that situation we realized that one way to detect the difference between these was one of these videos wasn't getting watched very much and the other one was or watch for very long or watch for very long exactly one of them wasn't getting watched very long and the the other one was and so uh instead of just um ranking the videos by how often they were clicked in response to a query we ranked them for how much they they were watched in response for aquery and so that helped that situation quite a bit how often are you twiddling the dials and refining this and tweaking this is this like a daily thing with little things that can change or is it like a once a year big implementation we've we've always got at least I don't know 10 different changes that we're working on and um they may take somewhere between a few weeks to several months to finally launch and um there's usually some some analysis and intuition and then there's some implementation some changes that you're going to make to the code and then there's lots of experimentation and evaluation in order to confirm that this change actually benefits the viewers and so um how many times do we do it a year maybe 50 times a year or 100 times a year are there things that levers that can be pulled like okay today we're going to put 21% emphasis on watch time and no no it needs to be 19% is it is it like that or not um it's not really like that because all of those settings or levers or or um all the code that we've written to make those kinds of decisions uh has been has been tuned based on um evaluation and Analysis of some kinds of uh experiments or other ways we have of rating uh changes and so um it wouldn't make sense for us to walk in and say I you know I'm feeling like we ought to put a higher weight on something even if I were to feel that we ought to put a higher weight in on watch time for instance what that would amount to is some of the engineers doing several weeks worth of experiments to see whether or not putting a higher weight on watch time resulted in uh more people getting to the videos they watch faster we can see the data that we've got now the data that we get back is completely random it depends where when the server received that message it put it in its own computer's memory so this time when we've run it it's actually given us some useful information because you've demonstrated some evidence in in the broader subject another way that we might find to recommend things
Original Description
YouTube's algorithm connects you with videos you might like. What signals do they use to decide if a video will appeal? More from this interview soon.
Why the view counter freezes at 301: http://youtu.be/oIkhgagvrjI
Featuring Cristos Goodrow from YouTube.
Heartbleed, Running the Code: http://youtu.be/1dOCHwf8zVQ
http://www.facebook.com/computerphile
https://twitter.com/computer_phile
This video by Brady Haran & Sean Riley.
Computer Science at the University of Nottingham: http://bit.ly/nottscomputer
Computerphile is a sister project to Brady Haran's Numberphile.
See the full list of Brady's video projects at: http://bit.ly/bradychannels
Watch on YouTube ↗
(saves to browser)
Sign in to unlock AI tutor explanation · ⚡30
Playlist
Uploads from Computerphile · Computerphile · 59 of 60
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
▶
60
Follow the Cookie Trail - Computerphile
Computerphile
EXTRA BITS - Follow the Cookie Trail - Computerphile
Computerphile
Musical Floppy Drives - Computerphile
Computerphile
The Hair Algorithm - Computerphile
Computerphile
Getting Sorted & Big O Notation - Computerphile
Computerphile
Quick Sort - Computerphile
Computerphile
Hyper History and Cyber War - Computerphile
Computerphile
Entropy in Compression - Computerphile
Computerphile
Original Elite on the BBC B - Computerphile
Computerphile
IP Addresses and the Internet - Computerphile
Computerphile
A Career in Video Games - Computerphile
Computerphile
Error Detection and Flipping the Bits - Computerphile
Computerphile
Programming BASIC and Sorting - Computerphile
Computerphile
Birthplace of the World Wide Web - Computerphile
Computerphile
Punch Card Programming - Computerphile
Computerphile
Programming Paradigms - Computerphile
Computerphile
CERN Computing Centre (and mouse farm) - Computerphile
Computerphile
Error Correction - Computerphile
Computerphile
Home-Made Code - Computerphile
Computerphile
Security of Data on Disk - Computerphile
Computerphile
Gesture Controls - Computerphile
Computerphile
How Intelligent is Artificial Intelligence? - Computerphile
Computerphile
Encryption and Security Agencies - Computerphile
Computerphile
Virtual Machines Power the Cloud - Computerphile
Computerphile
Hacking Websites with SQL Injection - Computerphile
Computerphile
How Huffman Trees Work - Computerphile
Computerphile
Cracking Websites with Cross Site Scripting - Computerphile
Computerphile
Cloud Computing (Cloudy with a Chance of Pizza) - Computerphile
Computerphile
Texting Cabbage with a Recorder - Computerphile
Computerphile
Hashing Algorithms and Security - Computerphile
Computerphile
How YouTube Works - Computerphile
Computerphile
How NOT to Store Passwords! - Computerphile
Computerphile
A New Golden Age of Video Games - Computerphile
Computerphile
A Universe of Triangles - Computerphile
Computerphile
Cross Site Request Forgery - Computerphile
Computerphile
The True Power of the Matrix (Transformations in Graphics) - Computerphile
Computerphile
The Great 202 Jailbreak - Computerphile
Computerphile
EXTRA BITS - Printing and Typesetting History - Computerphile
Computerphile
Triangles to Pixels - Computerphile
Computerphile
The Problem with Time & Timezones - Computerphile
Computerphile
The Visibility Problem - Computerphile
Computerphile
Lights and Shadows in Graphics - Computerphile
Computerphile
The Penguin Barcode - Computerphile
Computerphile
Typesetters in the '80s - Computerphile
Computerphile
The Font Magicians - Computerphile
Computerphile
The Little Mac with the Big Bite - Computerphile
Computerphile
EXTRA BITS - More on the Original Mac at 30 - Computerphile
Computerphile
XP to Ubuntu with an 8yr old Hacktop - Computerphile
Computerphile
EXTRA BITS - Hacktop Real-Time Boot Comparison - Computerphile
Computerphile
EXTRA BITS - Making a Bootable USB in Linux - Computerphile
Computerphile
EXTRA BITS - Installing Ubuntu Permanently - Computerphile
Computerphile
The Dawn of Desktop Publishing - Computerphile
Computerphile
What is Bootstrapping? - Computerphile
Computerphile
Reverse Polish Notation and The Stack - Computerphile
Computerphile
Home-Made Z80 Retro Computer - Computerphile
Computerphile
Should Everybody Learn to Code? - Computerphile
Computerphile
Programming in PostScript - Computerphile
Computerphile
Heartbleed, Running the Code - Computerphile
Computerphile
YouTube's Secret Algorithm - Computerphile
Computerphile
YouTube Search & Discovery - Computerphile
Computerphile
More on: Systems Design Basics
View skill →Related Reads
📰
📰
📰
📰
Google Onsite Interview Question #14: Design a High-Throughput Thread-Safe LRU Cache with TTL
Medium · Programming
The Problem With “Best Practices” in .NET Development
Medium · Programming
1.30 bytes/key: a compact string→id index in Rust
Medium · Python
La mentalidad para programar sistemas
Dev.to · Carlos Arturo Castaño G.
🎓
Tutor Explanation
DeepCamp AI