ML Applications
The AI behind unconnected content recommendations on Facebook and Instagram
June 29, 2023
4 minute read

Delivering great content recommendations is an important part of what makes Facebook and Instagram valuable for people around the globe. Our systems show people the most relevant content from their particular connections — the friends, accounts, Groups, and Pages they’ve chosen to follow. But we also use AI to deliver highly personalized recommendations from the tens of billions of pieces of content that are outside of a person’s network of Facebook or Instagram connections. AI-driven recommendations help people dive deeper into their interests and discover new things while also supporting creators in finding new audiences for their work. As Mark Zuckerberg noted on Meta’s most recent earnings call, more than 20 percent of content in a person’s Facebook and Instagram feeds is now recommended by AI from people, groups, or accounts they don’t follow.

Showing people these sorts of unconnected content recommendations enhances their experience on Facebook and Instagram. A person might regularly like posts about mountain biking, for example, or perhaps they’re part of a community that shares popular biking trails. Our recommendations could show them a post about a unique biking trail from a Page or a Group that they don’t happen to follow. Or we could suggest stories about record-breaking races or creators’ Reels of their cycling adventures. We could also show something else — such as easy trail mix recipes — that other mountain biking fans found valuable, with the hypothesis that this person, too, might find it interesting.

To do this effectively at scale, our recommendation system needs to understand people’s interests as they evolve over time, and it must work effectively with the nuances that distinguish different pieces of content. Someone may be an avid runner for a while but then develop a passion for mountain biking, for example. And when sorting through millions of biking posts, the system should be able to tell whether a particular Reel is about road biking or mountain biking — even when the caption doesn’t specify. These functions need to work in real time and need to work well for new people on our platforms, even when there is not yet enough signal for our systems to predict what they're interested in.

In this blog post, we share details on how we’ve built these AI-powered discovery features for Facebook and Instagram.


How recommendations work

We aim to show people the most relevant posts out of tens of billions of possibilities. That is much more challenging than merely surfacing the right recommendations from a person’s network of Facebook friends or from the accounts they follow on Instagram. This requires a deep analysis of each piece of content and each person’s interests. Is someone interested in mountain biking or road biking? Do they care about local races or professional cyclists, or do they just ride for fun with friends? We need to learn nuances like this to find the best content for the people on our platforms.

At a high level, our system takes the following steps to achieve this at scale:

  • Content understanding: Meta AI has focused on cutting-edge research work, including MViT, XLM-R/XLM-V, and FLAVA/Omnivore, to understand semantic meanings of content holistically across different modalities (such as image, text, audio, or videos). We have applied some of what we learned in our research efforts to develop better production models. These production models provide capabilities such as visual recognition, object detection, text extraction, and audio recognition. They also enable us to do more application-specific tasks, such as topic/genre classification, hashtag prediction, similarity matching, and clustering. These systems are also important to our efforts to remove content that violates our Community Standards and to reduce the spread of content that is problematic and that does not align with our Recommendations Guidelines or Content Distribution Guidelines.

  • Preference understanding, retrieval, and ranking: We built retrieval systems that take just hundredths of a second to narrow billions of pieces of content down to thousands and then to a few hundred that are relevant to a particular person’s interests. Our ranking systems then select the final items based on pointwise and listwise predictions. They also adjust recommendations to deliver a balanced, engaging mix, so that people can enjoy content on a variety of interests, and a mix of popular and niche posts can appear in people’s feeds.

These systems understand people’s behavior preferences utilizing very large-scale attention models, graph neural networks, few-shot learning, and other techniques. Recent key innovations include a novel hierarchical deep neural retrieval architecture, which allowed us to significantly outperform various state-of-the-art baselines without regressing inference latency; and a new ensemble architecture that leverages heterogeneous interaction modules to better model factors relevant to people’s interests. We believe our various AI algorithm advancements contributed to the 15 percent increase in watch time in the Reels video player on Facebook last fall, while at the same time enabling more people to connect with creators they love and reducing dissatisfaction, as measured by reduced skip rates and hide rates.

  • Incorporating people’s feedback: We believe it is important that people have the ability to guide the types of content they see. After a recommendation is delivered, our AI systems respond to feedback and refine how they model each person’s preferences — if a person watched an entire video or liked a post, for example. They also weigh additional signals that show someone is not interested, such as watching a recommended video for just a few seconds before stopping it or clicking away. We further incorporate explicit feedback through our Show More / Show Less feature, which lets people indicate whether they want to see more content like what they just saw. Our systems take these signals into account and tailor future recommendations closer to a person’s preferences. They can also use other options, such as explicitly hiding or snoozing posts, if they choose.

It is a complex engineering challenge to intelligently match tens of billions of pieces of content with the interests of nearly 3 billion people. To do it effectively, we pushed the envelope and built a system that delivered:

  • Scalability: In order to deeply understand and model people’s preferences, our recommendation models can have tens of trillions of parameters — orders of magnitude larger than even the biggest language models used today. We have built training superclusters, advanced model parallelism libraries in PyTorch, a new 4D model parallelism approach for efficient training of models with a massive amount of parameters, and low-precision/quantization techniques to significantly reduce model size and computational needs. These and other algorithmic and system optimizations ensure that these very large models can be trained and deployed efficiently at scale.

  • Real-time responsiveness: People expect our platforms to adapt to their changing preferences in real time, which is challenging given the massive size of our systems and models. We’ve built asynchronous update protocols into our training and serving stacks on top of PyTorch so these terabyte-scale models can be incrementally updated with minute-level freshness. These changes have helped us significantly increase meaningful engagements on our platforms.

  • Cold start: New people and new content enter our platforms every single day. This poses what are known as cold start problems, where there isn’t much data to learn from yet. To address this challenge, we developed a few-shot learning system called Meta Interest Learner to accurately match new content to prospective audiences based on their interests, even when there are very few engagements. We also leverage various online learning algorithms to help better distribute new content so that every new piece of high-quality content has a chance to be exposed to a large, relevant audience. This incentivizes creators to share great engaging and useful posts so they can find their audience and potentially get their big break.

  • Discovery: While we want Facebook and Instagram recommendations to enable people to deepen their existing interests, we also want to help them discover new things to enjoy. To learn how different interests are related, we use cutting-edge embedding learning and graph learning methods, and we leverage uncertainty modeling combined with reinforcement learning. Our recent work includes the development of a personalized methodology for delivery frequency control to optimize for long-term user value, and policy learning using large sequential models to help content discovery while reducing the prevalence of clickbait content on our platforms.

AI systems like these offer experiences tailored to each person at a massive scale. Significant research and engineering efforts went into developing them, yet such systems are ultimately empowered by and dedicated to those who use them. We're also sharing additional details about how our AI systems work with the release of 22 system cards that explain how people can customize and control the experiences they have on Facebook and Instagram. People teach our algorithms — through interactions and feedback — what they want to see. We hold this close to heart as we design our systems, so that they truly serve people’s needs and help further our mission to bring the world closer together.


Our latest updates delivered to your inbox

Subscribe to our newsletter to keep up with Meta AI news, events, research breakthroughs, and more.

Join us in the pursuit of what’s possible with AI.

Related Posts
Computer Vision
Introducing Segment Anything: Working toward the first foundation model for image segmentation
April 5, 2023
FEATURED
Research
MultiRay: Optimizing efficiency for large-scale AI models
November 18, 2022
FEATURED
ML Applications
MuAViC: The first audio-video speech translation benchmark
March 8, 2023