你的算法:让人们有更多方式个性化 Facebook 推荐
原题Your Algorithm: Giving People More Ways to Personalize Facebook Recommendations
读前速览
你的算法是一套由 AI 驱动的工具,让 Facebook 推荐更加透明、可控,并通过一个可编辑的界面集中展示影响动态消息和 Reels 推荐的兴趣。
你的算法系统架构概览
「你的算法」页面由三部分组成(见图 1):顶部是一句话的「近期摘要」,概述用户最近的浏览活动;下方有两个列表:「感兴趣」和「不感兴趣」。用户可以通过界面用自然语言添加兴趣、在两个列表间移动兴趣,或将其删除。每次更改都会即时应用于动态消息和 Reels,并会根据用户对单条帖子的反馈进一步更新。
将偏好转化为推荐
将用户明确表达的偏好转化为推荐,需要解决三个不同的问题。添加到「感兴趣」中的兴趣需要快速带来相关内容,同时不能挤掉其他所有内容。添加到「不感兴趣」中的兴趣则需要可靠生效,尽管话题的边界往往模糊,单一过滤器也无法覆盖所有匹配内容。此外,即使下一批推荐内容在偏好变更前就已缓存,这两类偏好也都需要即时生效。你的算法通过推荐流程各环节的专门逻辑来解决这些问题,涵盖内容检索、重新排序直至设备端(见图 3)。
贯穿偏好生命周期的 LLM:从用户画像到最终检查
在「你的算法」中,LLM 会在用户偏好的多个关键阶段发挥作用:首次访问时生成用户看到的初始画像;在每次更改时进行验证;并在最终推荐生成前,依据「不感兴趣」列表中的兴趣进行最后检查(见图 2)。每种用法都有自身限制,包括延迟、服务容量和安全性;要评估这些用法,也需要采用新的方法。
完整摘要
传统上,Facebook 内容推荐系统会根据用户隐性的互动信号进行学习。虽然这种方式易于扩展,但系统调整较慢,也难以捕捉细微差异。如果人们能够直接与算法互动,影响内容的排序和推荐,就能即时让推荐更贴合个人喜好、更加个性化呢?
你的算法是一套端到端系统,旨在解决推荐系统在适应性和细致程度上的局限。这套由 AI 驱动的新工具让 Facebook 用户能够用自己的话说明想在动态消息和 Reels 中看到什么。我们让一组大语言模型(LLM)理解、存储并追踪用户明确表达的偏好,同时结合用户行为,从而打造出能够响应用户偏好、调整其所见内容的推荐系统。
目录 · 8 节
- 你的算法是一套由 AI 驱动的工具,让 Facebook 推荐机制更加透明、可控,并通过一个可编辑的视图展示影响动态消息和 Reels 的兴趣。Your algorithm is a suite of AI-powered tools that makes Facebook recommendations more transparent and steerable, with a single editable view of the interests that shape Feed and Reels.
- 我们将介绍你的算法如何将人们以自然语言表达的偏好转化为响应式推荐,以及系统中的大语言模型如何针对特定任务进行定制。We’re sharing how Your algorithm turns people’s natural language preferences into responsive recommendations, and how LLMs are tailored to specific tasks within the system.
传统上,Facebook 内容推荐系统会根据用户的隐式互动信号进行学习。虽然这让系统能够很好地扩展,但也意味着它们适应得较慢,难以捕捉细微差异。但如果用户可以直接与对内容进行排序和推荐的算法互动,立即让推荐内容更贴合个人喜好、更加个性化呢?“你的算法”是一个端到端系统,旨在解决推荐系统在适应能力和细腻度方面的局限。这个由 AI 驱动的新工具套件让 Facebook 用户可以用自己的话表达希望在动态消息和 Reels 中看到什么。我们让一系列大型语言模型(LLM)理解、存储并追踪用户明确表达的偏好以及他们的使用行为,从而打造出一个能够回应用户偏好、调整其所见内容的推荐系统。Traditionally, the recommendation systems behind what people see on Facebook have learned from implicit engagement signals. While this allows them to scale well, it also means they adapt slowly and capture little nuance. But what if people could interact directly with the algorithms that rank and recommend what they see to instantly make their recommendations more personal and customized?
Your algorithm is an end-to-end system that addresses the limitations of adaptability and nuance in recommendations. This new suite of AI-powered tools lets people on Facebook state, in their own words, what they want to see in their Feed and Reels. By tasking a collection of large language models (LLMs) with understanding, storing, and tracking people’s stated preferences along with their user behavior, we’ve created a recommendation system that responds to people’s preferences and adjusts the content they see.
您的算法系统架构概览An Overview of the Your Algorithm System Architecture
“你的算法”页面由三个部分组成(图 1):The Your algorithm page has three parts (Figure 1):
- 顶部显示一句话的“近期摘要”,用于描述最近的观看活动。At the top, a one-sentence Lately Summary that describes recent viewing activity.
- Below it are two lists:
- “Interested In,” prefilled with interests inferred from past activity.
- “Not Interested In,” capturing topics the user has explicitly marked as not interested, or has X-ed out or hidden on Facebook.
用户可以通过该界面添加兴趣(使用自然语言)、在列表之间移动兴趣,或将其删除。每项更改都会同步应用到 Feed 和 Reels,并会随着用户对单条帖子提供反馈而进一步更新。People can use the interface to add interests (using natural language), move them between lists, or remove them. Every change applies responsively to both Feed and Reels, and will further update as the person gives feedback on individual posts.
你的算法系统包含多个组件,涵盖偏好的完整生命周期:从推断和验证偏好,到在排序和交付中应用偏好(图 2)。Your algorithm system has several components that cover the full lifecycle of a preference, from inferring and validating it to applying it in ranking and delivery (Figure 2).
- 个人资料生成会构建初始兴趣档案。Profile generation builds the initial interest profile.
- 偏好管理会验证每项更改,补充排序所需的信号,并将其保存到 Feed 和 Reels 共用的单一存储中,确保页面上显示的偏好设置与排序所使用的设置一致。Preference management validates each change, enriches it with the signals ranking needs, and saves it to a single store that both Feed and Reels read, ensuring that the preferences shown on the page are the same ones used in ranking.
- 排名会在整个转化漏斗中应用“感兴趣”和“不感兴趣”列表。Ranking applies the “Interested In” and “Not Interested In” lists throughout the funnel.
- 交付优化有助于让每项变更更及时地生效。Delivery optimization helps each change take effect more responsively.
从偏好到推荐From Preferences Into Recommendations
将明确表达的偏好转化为推荐内容,会带来三个不同的问题。添加到「感兴趣」中的兴趣,需要迅速带来相关内容,同时不能挤占其他所有内容。添加到「不感兴趣」中的兴趣,则需要持续可靠地生效,尽管主题边界模糊,任何单一过滤条件都难免漏掉一些匹配项。此外,两者都需要及时生效,即使下一批推荐内容在偏好变更前就已缓存。Turning a stated preference into recommendations poses three distinct problems. An interest added to Interested In needs to deliver relevant content quickly, without crowding out everything else. An interest added to Not Interested In needs to hold reliably, even though topics are fuzzy and any single filter misses some matches. And both need to take effect responsively, even when the next recommendations were cached before the change.
你的算法针对推荐漏斗中的每个问题都采用专门逻辑,覆盖从召回、重排序到设备端的整个流程(图 3)。Your algorithm addresses each problem with dedicated logic across the recommendation funnel, from retrieval through reranking to the device (Figure 3).
感兴趣:展示新兴趣,避免信息过载Interested In: Surfacing New Interests Without Flooding
“感兴趣”中的每项兴趣都会驱动四个专用检索源。其中两个直接查找匹配内容(通过搜索以及紧密相关主题的聚类),另外两个则借助内容图谱和条目间相似度扩大覆盖范围。针对每项兴趣进行显式检索,可确保为下游排序提供足够的相关候选内容。Each interest in Interested In drives four dedicated retrieval sources. Two find matching content directly (through search and through clusters of closely related topics), and two extend reach through the content graph and item-to-item similarity. Retrieving explicitly for each interest ensures enough relevant candidates for downstream ranking.
这一点很重要,因为如果没有这一步,与全新兴趣相关的内容可能根本不会进入排序流程。通过相关性检查的候选内容会在后期排序中获得提升,从而能够与其他内容一同参与竞争。重排序中的控制层随后会决定它们出现的位置。This is important because, without it, content about a brand-new interest might never enter the ranking pipeline at all. Candidates that pass a relevance check, which compares the meaning of the interest with each candidate, receive a promotion in late-stage ranking so they can compete alongside other content. A control layer in reranking then determines where they appear.
仅仅做到及时响应并非目标。我们的方法更注重平衡,而非数量:新的兴趣应当得到体现,而不是占据主导。控制层会拉开针对同一兴趣的推荐间隔,并限制每种兴趣每天所占的比例。检索环节每次请求也只会为一种兴趣获取候选内容,从而让每种兴趣都有机会得到推荐。在有限时间内,系统会赋予新兴趣更高的权重。此后,推荐系统会根据人们与相关内容的互动情况进行学习。Responsiveness alone is not the goal. Our approach emphasizes balance over volume: A new interest should show up, not take over. The control layer spaces out recommendations for the same interest and caps each interest’s daily contribution. Retrieval also fetches candidates for only one interest per request, so every interest gets a turn. New interests receive extra weight for a limited period. After that, the recommendation system learns from how people engage with that content.
不感兴趣:每个阶段的分层筛选Not Interested In: Layered Filtering at Every Stage
“不感兴趣”中的兴趣项会在多个阶段依据不同信号进行处理,以实现较高的精确率和召回率。在排序过程中,相关性检查中使用的同一套基于嵌入的比较机制会移除与“不感兴趣”中的兴趣项过于相似的候选内容,降权规则也会将相近匹配项排到更靠后的位置。排序完成后,LLM 重排器会检查最终列表。在设备端,下文所述的缓存失效机制会移除已加入显示队列且与这些兴趣项匹配的候选内容。Interests in Not Interested In are enforced at several stages based on different signals to achieve high precision and recall. During ranking, the same embedding-based comparison used in the relevance check removes candidates too close to an interest in Not Interested In, and demotion rules push down near matches. After ranking, the LLM reranker reviews the final list. On the device, cache invalidation, described below, removes matching candidates that are already queued for display.
“不感兴趣”中的条目并非都与主题有关。与质量相关的请求(例如减少 AI 生成内容或带有性暗示的内容)会映射到专门的降权信号,而不是进行主题匹配。如果请求中提到了某位创作者,则会直接过滤掉该创作者的内容。Not every entry in Not Interested In is about a topic. Quality-related requests, such as reducing AI-generated or sexually suggestive content, map to dedicated demotion signals rather than topic matching. When a request names a creator, that creator’s content is filtered out directly.
响应性优化Responsiveness Optimization
即使排名机制已经调整为响应用户偏好,偏好变更对用户所见内容的影响速度仍有提升空间。只有在下一次获取请求时,系统才会纳入符合新偏好的内容;而设备上已缓存的内容,则是在偏好设置之前完成排名的。Even with ranking tuned to respond to preferences, there is still room to improve how responsively a change reaches what people see. Content for a new preference is not picked up until the next fetch request, and content already cached on the device was ranked before the preference was set.
我们新增了两种交付机制来弥补这些缺口。将新的兴趣添加到“感兴趣”后,系统会在常规获取周期之外额外发送一次获取请求,称为补充尾部加载,以检索最新推荐内容,让匹配的内容尽快显示。将新的兴趣添加到“不感兴趣”后,缓存失效机制会处理变更前排名靠前的候选内容。客户端会获取该兴趣对应的聚类,并在缓存内容显示前丢弃所有与这些聚类匹配的内容。We added two delivery mechanisms to close these gaps. When a new interest is added to Interested In, the system sends an extra fetch request outside the normal fetch cycle, called a supplementary tail load, to retrieve fresh recommendations so matching content appears quickly. When an interest is added to Not Interested In, cache invalidation handles candidates ranked before the change. The client obtains the new interest’s clusters and drops any cached content that matches them before it is displayed.
贯穿偏好生命周期的大语言模型:从用户画像到最终检查LLMs Across the Preference Lifecycle: From Profile to Final Check
大语言模型在偏好于 Your algorithm 中的生命周期的几个关键节点发挥作用。它们会生成用户首次访问时看到的初始档案,在每次更改时进行验证,并在最终推荐生成前,依据“不感兴趣”(Not Interested In)中的兴趣偏好做最后检查(图 2)。每种用途都有各自的约束,包括延迟、服务承载能力和安全性,而评估它们也需要采用一种新方法。LLMs play a role at several key points in a preference’s life in Your algorithm. They generate the initial profile that people see on a first visit, validate each change as it is made, and give the final recommendations a last check against interests in Not Interested In (Figure 2). Each use comes with its own constraints, including latency, serving capacity, and safety, and evaluating them requires a new approach as well.
个人资料生成会为首次访问提供初始内容:推断出的兴趣和“近期摘要”。LLM 会将定期刷新的兴趣信号转化为一组推断出的兴趣,并为其命名清晰易懂的主题。这些内容会预先填入“感兴趣的内容”列表,反映用户过去在 Facebook 动态和 Reels 上观看的内容。LLM 还会撰写“近期摘要”,用一句话概括用户持续关注的兴趣。两者共同构成一个易于识别、方便查看和更正的起点。Profile generation provides the starting content for a first visit: the inferred interests and the Lately Summary. An LLM turns interest signals, which are refreshed regularly, into a set of inferred interests with clear, readable topic names. These are prefilled in the Interested In list and reflect past viewing across Facebook Feed and Reels. The LLM also writes the Lately Summary, a sentence that highlights ongoing interests. Together, they provide a recognizable starting point that is easy to review and correct.
“你的算法”页面上的每次编辑都会经过偏好管理。当添加或移动某项兴趣时,LLM 会检查该短语是否构成连贯的主题、检测重复项,并将其映射为规范的主题名称。此步骤由一个规模较小、适合大规模部署的模型执行。随后,系统会为经过验证的兴趣补充排序所需的信号,例如嵌入向量和搜索关键词,并将其保存到共享偏好存储中。LLM 只是验证流程中的一环。系统还设有专门的组件,用于执行完整性和安全检查。Every edit on the Your algorithm page passes through preference management. When an interest is added or moved, an LLM checks that the phrase is a coherent topic, detects duplicates, and maps it to a clean topic name. This step runs on a smaller model that is efficient to serve at scale. The validated interest is then enriched with the signals ranking needs, such as an embedding and search keywords, and saved to the shared preference store. The LLM is only one layer of validation. The system also has a dedicated component that performs integrity and safety checks.
推荐内容完成排序后,LLM 重排序会针对“不感兴趣”列表中的兴趣进行最后一轮检查。排序漏斗利用嵌入将兴趣与候选内容匹配,速度快,但粒度较粗。为了捕捉它们遗漏的内容,经过微调的 LLM 会检查已排序列表,并移除它判定与最近添加到“不感兴趣”列表中的某项兴趣相关的内容。一个关键发现是,微调一个只返回待移除项目的小模型,比让通用模型逐项判断更快、更可靠。Once recommendations are ranked, LLM reranking provides a last check against interests in Not Interested In. The ranking funnel matches interests to candidates using embeddings, which are fast but coarse. To catch what they miss, a fine-tuned LLM reviews the ranked list and removes content it judges to be related to an interest recently added to Not Interested In. A key insight was that a small model fine-tuned to return only the items to remove was faster and more reliable than a general-purpose model judging each item individually.
评估这些 LLM 调用需要采用专门的方法。标准离线指标无法判断 Lately Summary 是否准确,也无法判断重排器是否移除了正确的候选项,因此会使用一个单独的 LLM 充当裁判,根据预期行为对每次调用的输出进行评分。这样一来,就能在上线前以客观、可重复的方式比较提示词和模型。Evaluating these LLM calls required its own approach. Standard offline metrics cannot tell whether a Lately Summary is accurate or whether the reranker removed the right candidates, so a separate LLM acts as a judge, grading each call’s output against expected behavior. This provides an objective, repeatable way to compare prompts and models before launch.
你的算法的未来The Future of Your Algorithm
你的算法打造了更透明、更个性化的推荐体验,同时结合用户行为和明确表达的意图。不过,仍有重要的改进空间,例如更好地解读模糊输入,并让推荐更精准地响应每项请求。我们也在探索更多入口,让用户可以在更多地方调整偏好。Your algorithm creates a more transparent and personalized recommendation experience, informed by both behavior and stated intent. But there are important opportunities remaining, such as better interpreting ambiguous input and making recommendations respond even more precisely to each request. We are also exploring additional entry points so that preferences can be shaped from more places.
致谢Acknowledgments
这项工作体现了 Meta 跨职能 v-team 的重要贡献(按字母顺序排列):This work reflects critical contributions from a cross-functional v-team across Meta (in alphabetical order):
Adi Gupta、Aryan Porwal、Bernabe Soto、Chao Yang、Chen Chen、Chen Kovacs、Chengxi Li、Chih-Wei Chang、Clare Yip、Cuong Nguyen、Dahni Ma、Daniel Thiyagu、Danny Kanoff、David Yuan、Devin Ding、Devon Pan、Eric Landgrebe、Feng Zhang、George Lu、Grace Yang、Hai-Son Dang、Haisen Hong、Hongyi Shi、Hongyi Wu、Howard Lu、Huijun Qian、Igor Vodov、Iordanis Fostiropoulos、Jakara Mato、Jasmine Neisser、Jason Liu、Jason Song、Jean-Pascal Billaud、Jeffrey Lin、Jeffrey Santelli、Jian Chen、Jianyu Wang、Jiaye Pan、Jinho Hwang、Joe Sena、Jordan Reich、Kanghua Wu、Khoi Pham、Kim Trang Leaf、Kris Katsanevas、Kuo-Feng Hsu、Kushal Adhvaryu、Liyu Wang、Manish Khettry、Matthew Miao、Mayoor Rai、Momo Jiao、Nakul Tirumalai、Patrick Boocock、Patrick Cullen、Qi Guo、Qichao Que、Queenie Li、Ratish Nair、Sanyogeeta Lawande、Satvik Eltepu、Sean Chen、Shijie Xie、Shuai Zhang、Shuoyan Yin、Smruthi Gowtham、Tsung-Yi Huang、Tyler Pell、Wanting Jiang、Wanyu Li、Weiwei Jiang、Xiangyu Xu、Xin Wang、Xinyang Feng、Yanchen Wang、Yibo Zhu、Yihao Li、Yihui Saw、Yinjie Huang、Yu-Wei Wu、Yuchen Shao、Yue Wang、Yue Zhang、Yuhan Yang、Yuqi Shen、Zhen Hang Jiang、Zhiyu Liu、Zhongwei Teng、Zijiang Yang、Zoe ZuAdi Gupta, Aryan Porwal, Bernabe Soto, Chao Yang, Chen Chen, Chen Kovacs, Chengxi Li, Chih-Wei Chang, Clare Yip, Cuong Nguyen, Dahni Ma, Daniel Thiyagu, Danny Kanoff, David Yuan, Devin Ding, Devon Pan, Eric Landgrebe, Feng Zhang, George Lu, Grace Yang, Hai-Son Dang, Haisen Hong, Hongyi Shi, Hongyi Wu, Howard Lu, Huijun Qian, Igor Vodov, Iordanis Fostiropoulos, Jakara Mato, Jasmine Neisser, Jason Liu, Jason Song, Jean-Pascal Billaud, Jeffrey Lin, Jeffrey Santelli, Jian Chen, Jianyu Wang, Jiaye Pan, Jinho Hwang, Joe Sena, Jordan Reich, Kanghua Wu, Khoi Pham, Kim Trang Leaf, Kris Katsanevas, Kuo-Feng Hsu, Kushal Adhvaryu, Liyu Wang, Manish Khettry, Matthew Miao, Mayoor Rai, Momo Jiao, Nakul Tirumalai, Patrick Boocock, Patrick Cullen, Qi Guo, Qichao Que, Queenie Li, Ratish Nair, Sanyogeeta Lawande, Satvik Eltepu, Sean Chen, Shijie Xie, Shuai Zhang, Shuoyan Yin, Smruthi Gowtham, Tsung-Yi Huang, Tyler Pell, Wanting Jiang, Wanyu Li, Weiwei Jiang, Xiangyu Xu, Xin Wang, Xinyang Feng, Yanchen Wang, Yibo Zhu, Yihao Li, Yihui Saw, Yinjie Huang, Yu-Wei Wu, Yuchen Shao, Yue Wang, Yue Zhang, Yuhan Yang, Yuqi Shen, Zhen Hang Jiang, Zhiyu Liu, Zhongwei Teng, Zijiang Yang, Zoe Zu
我们还要感谢以下领导者提供赞助并给予大力支持(按字母顺序排列):We also thank the following leaders for their sponsorship and strong leadership support (in alphabetical order):
Ashish Gandhe、Helen Kong、Hongjie Bai、Meng Wu、Yaping Zhang、Yisong Song、Zellux Wang、Zhe WangAshish Gandhe, Helen Kong, Hongjie Bai, Meng Wu, Yaping Zhang, Yisong Song, Zellux Wang, Zhe Wang