[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-detail-84568-en":3,"doc-seo-84568-105":29,"detail-sidebar-cat-0-en-105":91},{"code":4,"msg":5,"data":6},0,"success",{"doc_id":7,"user_id":8,"nickname":9,"user_avatar":10,"doc_module":4,"category_id":11,"category_name":12,"doc_title":13,"doc_description":14,"doc_content":15,"file_id":16,"file_url":17,"file_type":18,"file_size":19,"view_count":20,"is_deleted":4,"is_public":20,"is_downloadable":20,"audit_status":20,"page_count":21,"language":22,"language_code":23,"site_id":24,"html_lang":23,"table_of_contents":25,"faqs":26,"seo_title":13,"seo_description":14,"update_tm":27,"read_time":28},84568,8796095360427,"Lucas Martin","https://ap-avatar.wpscdn.com/davatar_994ba38a5ba835b3df7d355c54d3ed8d",8,"Research & Report","Real-Time Hard Negative Sampling via LLM-based Clustering for Large-Scale Two-Tower Retrieval","Two-tower models are widely used in the retrieval stage of large-scale recommendation systems, yet standard in-batch and out-of-batch negative sampling often generates easy negatives and leaves models under-challenged. The paper proposes a self-supervised hard negative sampling method that uses an LLM-driven clustering to generate negatives from the same cluster during training. A real-time, low-complexity sampling framework enables billion-scale training integration. Experiments and industrial deployment show improved retrieval performance, higher CTR, and mitigation of popularity bias via feedback-loop breaking.","arXiv :2607 .00448v2 [ cs .IR] 6 Jul 2026  \nReal-Time Hard Negative Sampling via LLM-based Clustering for Large-Scale Two-Tower Retrieval  \nIvan Ji 1 ,∗ , Liuyi Hu 1 ,∗ , Harrison (Zihao) Zhao 1 ,∗ , Lei Huang 1 , Qunshu Zhang 1 , Max (Xiangjun) Fan 1 , Aameek Singh 1  \n1 Meta  \n∗ Three authors contributed equally to this research.  \nThe two-tower model has been widely used for large-scale recommendation systems, particularly in the retrieval stage. Industry standards for training two-tower models typically involve in-batch and/or out-of-batch negative sampling. However, these methods often produce easy negatives that models can quickly learn, failing to sufficiently challenge the model. To address this issue, a novel self-supervised hard negative sampling technique is proposed that leverages a large language model (LLM) to generate hard negatives from the same cluster during model training. By utilizing the LLM to learn media representations, the proposed approach ensures that the generated negatives are more challenging and informative. This real-time sampling framework is designed for seamless integration into production models, capable of handling billions of training data points with minimal computational complexity. Experiments on public datasets, along with deployment to a large-scale online system, demonstrate that the proposed negative sampling technique outperforms widely used industry methods. Furthermore, analysis in industrial applications reveals that this sampling method can help break inherent feedback loops in recommendations and significantly reduce popularity bias.  \nDate: July 7, 2026  \nCorrespondence: Harrison (Zihao) Zhao [at](at harrisonzhao@meta.com)[ harrisonzhao@meta.com](at harrisonzhao@meta.com)  \n1 Introduction  \nIn the era of big data, large-scale recommendation systems have become increasingly important in various applications, including e-commerce, social media, and entertainment. These systems aim to provide users with personalized recommendations that cater to their interests and preferences. However, designing an efficient and effective recommendation system is a challenging task due to the vast number of candidates eligible for selection. To address this challenge, modern recommendation systems typically adopt a multi-stage design, consisting of retrieval and ranking stages Covington et al. (2016); Liu et al. (2017); Chen et al. (2017) . The retrieval stage aims to retrieve a small subset of relevant candidates from a large corpus, while the ranking stages further refine the selection to provide the most relevant recommendations. The two-tower model design is widely used as retrieval models in large scale applications due to its serving efficiency Covington et al.(2016); Huang et al. (2020) .  \nRetrieval model training is often formulated as an extreme classification problem where negative samples are playing a critical role. Various sampling-based techniques have been proposed to enhance training efficiency Bengio and Senécal (2008, 2003); Covington et al. (2016) . The widely used sampling techniques are in-batch negative sampling Hidasi (2015); Gillick et al. (2019) and out-of-batch (OOB) negative sampling and also mixed negative sampling Yang et al. (2020); Hidasi and Karatzoglou (2018) . However, in-batch negatives are constrained by the mini-batch size, which can result in models experiencing recommendation bias and limited exposure to diverse corpus during training. And OOB negative samples are too easy for model to learn especially when the OOB item pool is very large and diverse.  \nBesides, retrieval models typically use user engagement such as click as positives. However, whether user clicks or not depends on what item we surface to the user which is controlled by the multi-stage system. The strong feedback loop can result in popularity bias in the recommendation Chen et al. (2020); Cañamares and Castells (2018); Morik et al. (2020); Oosterhuis (2021) .  \nTo solve the problems of ne","cbCaip06CE8m0C2M","https://ap.wps.com/l/cbCaip06CE8m0C2M","pdf",639322,1,13,"English","en",105,"# Introduction\n# Related Work\n## Multi-stage System","[{\"question\":\"What problem does the paper address in two-tower retrieval training?\",\"answer\":\"The paper targets two key issues: negative sampling often produces overly easy negatives, and feedback loops from engagement-based positives can introduce popularity bias.\"},{\"question\":\"How does the proposed hard negative sampling method work?\",\"answer\":\"It leverages item clusters learned via a large language model to generate hard negatives on the fly from the same cluster during training.\"},{\"question\":\"What evidence supports the approach’s effectiveness and scalability?\",\"answer\":\"Experiments on public datasets and deployment to a large-scale online system show that the method outperforms common industry negative sampling and improves CTR, while also reducing popularity bias.\"}]",1784196862,33,{"code":4,"msg":30,"data":31},"ok",{"site_id":24,"language":23,"slug":32,"title":13,"keywords":33,"description":14,"schema_data":34,"social_meta":86,"head_meta":88,"extra_data":90,"updated_unix":27},"real-time-hard-negative-sampling-via-llm-based-clustering-for-large-scale-two-tower-retrieval","",{"@graph":35,"@context":85},[36,53,68],{"@type":37,"itemListElement":38},"BreadcrumbList",[39,43,47,50],{"item":40,"name":41,"@type":42,"position":20},"https://docshare.wps.com","Home","ListItem",{"item":44,"name":45,"@type":42,"position":46},"https://docshare.wps.com/document/","Document",2,{"item":48,"name":12,"@type":42,"position":49},"https://docshare.wps.com/document/research-report/",3,{"item":51,"name":13,"@type":42,"position":52},"https://docshare.wps.com/document/real-time-hard-negative-sampling-via-llm-based-clustering-for-large-scale-two-tower-retrieval/84568/",4,{"url":51,"name":13,"@type":54,"author":55,"headline":13,"publisher":57,"fileFormat":60,"inLanguage":23,"description":14,"dateModified":61,"datePublished":62,"encodingFormat":60,"isAccessibleForFree":63,"interactionStatistic":64},"DigitalDocument",{"name":9,"@type":56},"Person",{"url":40,"name":58,"@type":59},"DocShare","Organization","application/pdf","2026-07-17","2026-07-16",true,{"@type":65,"interactionType":66,"userInteractionCount":20},"InteractionCounter",{"@type":67},"ViewAction",{"@type":69,"mainEntity":70},"FAQPage",[71,77,81],{"name":72,"@type":73,"acceptedAnswer":74},"What problem does the paper address in two-tower retrieval training?","Question",{"text":75,"@type":76},"The paper targets two key issues: negative sampling often produces overly easy negatives, and feedback loops from engagement-based positives can introduce popularity bias.","Answer",{"name":78,"@type":73,"acceptedAnswer":79},"How does the proposed hard negative sampling method work?",{"text":80,"@type":76},"It leverages item clusters learned via a large language model to generate hard negatives on the fly from the same cluster during training.",{"name":82,"@type":73,"acceptedAnswer":83},"What evidence supports the approach’s effectiveness and scalability?",{"text":84,"@type":76},"Experiments on public datasets and deployment to a large-scale online system show that the method outperforms common industry negative sampling and improves CTR, while also reducing popularity bias.","https://schema.org",{"og:url":51,"og:type":87,"og:title":13,"og:site_name":58,"og:description":14},"article",{"robots":89,"canonical":51},"index,follow",{"doc_id":7,"site_id":24},{"code":4,"msg":5,"data":92},[93,97,101,105,110,115,120,123,128,131,135],{"id":20,"doc_module":4,"doc_module_name":45,"category_name":94,"show_sort_weight":95,"slug":96},"Story & Novel",90,"story-novel",{"id":46,"doc_module":4,"doc_module_name":45,"category_name":98,"show_sort_weight":99,"slug":100},"Literature",80,"literature",{"id":52,"doc_module":4,"doc_module_name":45,"category_name":102,"show_sort_weight":103,"slug":104},"Exam",70,"exam",{"id":106,"doc_module":4,"doc_module_name":45,"category_name":107,"show_sort_weight":108,"slug":109},5,"Comic",60,"comic",{"id":111,"doc_module":4,"doc_module_name":45,"category_name":112,"show_sort_weight":113,"slug":114},6,"Technology",50,"technology",{"id":116,"doc_module":4,"doc_module_name":45,"category_name":117,"show_sort_weight":118,"slug":119},7,"Healthcare",40,"healthcare",{"id":11,"doc_module":4,"doc_module_name":45,"category_name":12,"show_sort_weight":121,"slug":122},30,"research-report",{"id":124,"doc_module":4,"doc_module_name":45,"category_name":125,"show_sort_weight":126,"slug":127},9,"Religion & Spirituality",20,"religion-spirituality",{"id":126,"doc_module":4,"doc_module_name":45,"category_name":129,"show_sort_weight":126,"slug":130},"World Cup","world-cup",{"id":132,"doc_module":4,"doc_module_name":45,"category_name":133,"show_sort_weight":132,"slug":134},10,"Lifestyle","lifestyle",{"id":136,"doc_module":4,"doc_module_name":45,"category_name":137,"show_sort_weight":106,"slug":138},19,"General","general"]