{"id":471157,"date":"2025-08-18T21:00:07","date_gmt":"2025-08-18T21:00:07","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=471157"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=471157","title":{"rendered":"<span>Semantic Retrieval-Augmented Contrastive Learning (SRA-CL) \u0434\u043b\u044f sequential \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c: \u043e\u0431\u0437\u043e\u0440<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\ud83d\udc4b \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041d\u0438\u043a\u0438\u0442\u0430 \u0413\u043e\u0440\u044f\u0447\u0435\u0432, \u044f <strong>Research Engineer \u0432 WB<\/strong>, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u043d\u0430 \u0441\u0442\u044b\u043a\u0435 <strong>RecSys, LLM \u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u043c\u043e\u0434\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/strong>. \u041a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c \u043c\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u044b \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0430 \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u043c, \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 CTR, \u0443\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u044e, \u043f\u0440\u0438\u043d\u043e\u0441\u044f \u043d\u0435\u043c\u0430\u043b\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u044b\u0440\u0443\u0447\u043a\u0438.<\/p>\n<p>\u0414\u043e \u044d\u0442\u043e\u0433\u043e \u044f \u0443\u0441\u043f\u0435\u043b \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 <strong>AI-\u0441\u0442\u0430\u0440\u0442\u0430\u043f\u0435 \u0432 Palo Alto<\/strong>, \u0433\u0434\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u043c\u0438 \u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438 (ASR\/TTS), \u0438 \u0432 <strong>\u041c\u0422\u0421<\/strong>, \u0433\u0434\u0435 \u043c\u044b \u0441\u0442\u0440\u043e\u0438\u043b\u0438 AI-\u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u0420\u0430\u043d\u0435\u0435 \u0432 <strong>\u0421\u0431\u0435\u0440\u0435<\/strong> \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0435\u0434\u0438\u043d\u043e\u0433\u043e RecSys SDK \u0434\u043b\u044f \u0432\u0441\u0435\u0439 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b (\u043e\u0442 SberMegaMarket \u0434\u043e Okko \u0438 Zvuk), \u0430 \u0435\u0449\u0451 \u0440\u0430\u043d\u044c\u0448\u0435 \u2014 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u043b \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438 ML \u0432 \u0440\u0438\u0442\u0435\u0439\u043b\u0435.<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 <strong>\u043f\u043e\u0447\u0438\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u0438\u0432\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435<\/strong> \u0432 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445. \u041a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u0430\u0432\u043d\u043e \u0441\u0442\u0430\u043b\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0432 NLP \u0438 CV, \u043d\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u0445 \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e: \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0435\u0436\u0435\u043d\u044b, \u0430 \u0430\u0443\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043a\u0430\u0436\u0430\u044e\u0442 \u0441\u043c\u044b\u0441\u043b \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c. \u0410\u0432\u0442\u043e\u0440\u044b \u0441\u0432\u0435\u0436\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441 arXiv \u2014 <em>\u201cSemantic Retrieval Augmented Contrastive Learning for Sequential Recommendation (SRA-CL)\u201d<\/em> \u2014 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c LLM \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 <strong>\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0430\u0440<\/strong>. \u0417\u0432\u0443\u0447\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u043e, \u043d\u043e \u0434\u0430\u0451\u0442 \u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0439 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u2014 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<hr\/>\n<h3>\ud83d\udcc9 \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e contrastive learning \u0432 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u0445<\/h3>\n<h4>1. \u0420\u0430\u0437\u0440\u0435\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u0432\u0438\u0434\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 (\u043e\u0431\u044b\u0447\u043d\u043e 5\u201350 \u0441\u043e\u0431\u044b\u0442\u0438\u0439). \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u0442\u043e\u0432\u0430\u0440\u043e\u0432) \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435. \u041f\u0440\u043e\u0441\u0442\u0430\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u043b\u0438 \u0441\u043e\u0441\u0435\u0434\u0441\u0442\u0432\u043e \u043f\u043e ID \u0434\u0430\u0451\u0442 \u0448\u0443\u043c\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0434\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043c\u043e\u0433\u0443\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437-\u0437\u0430 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0442\u043e\u0432\u0430\u0440\u0443.<\/p>\n<h4>2. \u041d\u0435\u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0430\u0443\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/h4>\n<p>\u0412 NLP\/vision \u0430\u0443\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0443 (masking, cropping, dropout). \u0412 RS \u2014 \u043d\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0442\u043e\u0432\u0430\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043c\u044b\u0441\u043b.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043b\u043e\u043c\u0430\u0435\u0442 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<\/ul>\n<h4>3. \u0421\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0430\u0437\u0440\u044b\u0432<\/h4>\n<p>\u0414\u0432\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443, \u043d\u043e \u043d\u0435 \u0438\u043c\u0435\u0442\u044c \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u043e ID.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440: \u043e\u0434\u0438\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u043a\u0443\u043f\u0430\u0435\u0442 \u00abiPhone \u2192 AirPods \u2192 MacBook\u00bb, \u0434\u0440\u0443\u0433\u043e\u0439 \u2014 \u00abSamsung Galaxy \u2192 Galaxy Buds \u2192 Windows Laptop\u00bb. \u041d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 ID \u044d\u0442\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u2014 \u043e\u0431\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u00ab\u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0441\u0442, \u043f\u043e\u043a\u0443\u043f\u0430\u044e\u0449\u0438\u0439 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0431\u0440\u0435\u043d\u0434\u0430\u00bb.<\/p>\n<p>\ud83d\udc49 \u0418\u0442\u043e\u0433: \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u0430\u0440\u044b \u0432 contrastive loss \u043d\u0435 \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0442 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u0430 \u2192 \u043c\u043e\u0434\u0435\u043b\u044c \u0443\u0447\u0438\u0442\u0441\u044f \u043d\u0430 \u0448\u0443\u043c\u043d\u044b\u0445 \u0441\u0438\u0433\u043d\u0430\u043b\u0430\u0445.<\/p>\n<hr\/>\n<h3>\ud83d\udca1 \u0418\u0434\u0435\u044f SRA-CL<\/h3>\n<p>SRA-CL \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0437\u0430 \u0441\u0447\u0451\u0442 <strong>\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0435\u0442\u0440\u0438\u0432\u0430\u043b\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 LLM<\/strong>. \u0412\u043c\u0435\u0441\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0430\u0443\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0439 \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 ID, \u043c\u0435\u0442\u043e\u0434 \u0441\u0442\u0440\u043e\u0438\u0442 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u0430\u0440\u044b, \u043e\u043f\u0438\u0440\u0430\u044f\u0441\u044c \u043d\u0430 <strong>\u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/strong>.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0434\u0432\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430:<\/p>\n<p>1\ufe0f\u20e3 Cross-sequence Semantic Contrast<\/p>\n<ul>\n<li>\n<p>\u041a\u0430\u0436\u0434\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u0432 <strong>\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u0440\u0435\u0437\u044e\u043c\u0435<\/strong> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LLM (<em>\u0432 \u0441\u0442\u0430\u0442\u044c\u0435: DeepSeek-V3, temp=0, top-p=0.001<\/em>).<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u043a\u0441\u0442\u044b \u043a\u043e\u0434\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c\u044e <strong>SimCSE-RoBERTa<\/strong>, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u0449\u0443\u0442\u0441\u044f <strong>k \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439<\/strong> \u043f\u043e \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u043c\u0443 \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u0443 (\u0447\u0435\u0440\u0435\u0437 FAISS \u0438\u043b\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b).<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f <strong>\u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u044b\u0439 attention-\u0430\u0433\u0440\u0435\u0433\u0430\u0442<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043b\u0443\u0436\u0438\u0442 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u0440\u043e\u0439 \u0434\u043b\u044f contrastive learning.<\/p>\n<\/li>\n<\/ul>\n<h4>2\ufe0f\u20e3 Intra-sequence Semantic Contrast<\/h4>\n<ul>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u043e\u0432\u0430\u0440\u0430 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u0449\u0435\u0442\u0441\u044f <strong>\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u043b\u0438\u0437\u043a\u0438\u0439 \u0442\u043e\u0432\u0430\u0440<\/strong> (\u0447\u0435\u0440\u0435\u0437 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0439\/\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432).<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0433\u0434\u0435 \u0447\u0430\u0441\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u0430\u043c\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00abNike running shoes\u00bb \u2192 \u00abAdidas sports shoes\u00bb).<\/p>\n<\/li>\n<li>\n<p>\u0414\u0432\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0442 <em>\u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/em>, \u043d\u043e \u0441 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0435\u0439 \u0432 \u0434\u0435\u0442\u0430\u043b\u044f\u0445.<\/p>\n<\/li>\n<\/ul>\n<h4>3\ufe0f\u20e3 \u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u043b\u043e\u0441\u0441<\/h4>\n<p>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044c \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430:<\/p>\n<p><img decoding=\"async\" class=\"formula inline\" source=\"\\mathcal{L} = \\mathcal{L}{rec} + \\alpha \\cdot \\mathcal{L}{cross} + \\beta \\cdot \\mathcal{L}_{intra}\" alt=\"\\mathcal{L} = \\mathcal{L}{rec} + \\alpha \\cdot \\mathcal{L}{cross} + \\beta \\cdot \\mathcal{L}_{intra}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/56a\/706\/ccf\/56a706ccfc4f2b71649a3d1a15acb435.svg\" width=\"285\" height=\"20\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/56a\/706\/ccf\/56a706ccfc4f2b71649a3d1a15acb435.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/56a\/706\/ccf\/56a706ccfc4f2b71649a3d1a15acb435.svg 781w\" loading=\"lazy\" decode=\"async\"\/><\/p>\n<ul>\n<li>\n<p><img decoding=\"async\" class=\"formula inline\" source=\"\\mathcal{L}_{rec} \" alt=\"\\mathcal{L}_{rec} \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/362\/0e3\/59c\/3620e359c51b26442062e657e7908f6c.svg\" width=\"34\" height=\"20\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/362\/0e3\/59c\/3620e359c51b26442062e657e7908f6c.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/362\/0e3\/59c\/3620e359c51b26442062e657e7908f6c.svg 781w\" loading=\"lazy\" decode=\"async\"\/>\u2014 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043b\u043e\u0441\u0441 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p><img decoding=\"async\" class=\"formula inline\" source=\"\\mathcal{L}_{cross}\" alt=\"\\mathcal{L}_{cross}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b80\/a83\/701\/b80a83701ad8ad0338a7682a27155991.svg\" width=\"47\" height=\"20\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b80\/a83\/701\/b80a83701ad8ad0338a7682a27155991.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b80\/a83\/701\/b80a83701ad8ad0338a7682a27155991.svg 781w\" loading=\"lazy\" decode=\"async\"\/> \u2014 \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u0438\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0434\u043b\u044f \u043c\u0435\u0436\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><img decoding=\"async\" class=\"formula inline\" source=\"\\mathcal{L}_{intra} \" alt=\"\\mathcal{L}_{intra} \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/462\/cf1\/474\/462cf14742d4100e7c325755b8f50ea0.svg\" width=\"47\" height=\"20\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/462\/cf1\/474\/462cf14742d4100e7c325755b8f50ea0.svg 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/462\/cf1\/474\/462cf14742d4100e7c325755b8f50ea0.svg 781w\" loading=\"lazy\" decode=\"async\"\/>\u2014 \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u0438\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0438-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0413\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \\alpha, \\beta \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u044e\u0442 \u0432\u043a\u043b\u0430\u0434 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e CL.<\/p>\n<hr\/>\n<h3>\ud83d\udcca \u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b<\/h3>\n<h4>\u0414\u0430\u0442\u0430\u0441\u0435\u0442\u044b<\/h4>\n<ul>\n<li>\n<p>Yelp<\/p>\n<\/li>\n<li>\n<p>Sports (Amazon)<\/p>\n<\/li>\n<li>\n<p>Beauty (Amazon)<\/p>\n<\/li>\n<li>\n<p>Office (Amazon)<\/p>\n<\/li>\n<\/ul>\n<h4>\u0411\u0435\u0439\u0437\u043b\u0430\u0439\u043d\u044b (12 \u043c\u043e\u0434\u0435\u043b\u0435\u0439)<\/h4>\n<p>GRU4Rec, BERT4Rec, SASRec, DuoRec \u0438 \u0434\u0440.<\/p>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h4>\n<ul>\n<li>\n<p><strong>\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435: +11.82%<\/strong> \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e SOTA (p &lt; 0.01).<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0432 SASRec:<\/p>\n<ul>\n<li>\n<p>HR@20: <strong>+8.3% \u2192 +27.3%<\/strong><\/p>\n<\/li>\n<li>\n<p>NDCG@20: <strong>+9.7% \u2192 +25.5%<\/strong><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u0412\u0430\u0436\u043d\u043e: <strong>\u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441 \u043d\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442\u0441\u044f<\/strong> \u2014 LLM \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u2699\ufe0f \u041a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c SRA-CL<\/h3>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h4>\n<pre><code>pip install faiss-cpu transformers sentence-transformers torch<\/code><\/pre>\n<h4>1. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/h4>\n<pre><code class=\"python\">from sentence_transformers import SentenceTransformer import faiss  # \u041c\u043e\u0434\u0435\u043b\u044c SimCSE model = SentenceTransformer(\"princeton-nlp\/sup-simcse-roberta-base\")  user_summaries = [     \"User buys Apple ecosystem products (iPhone, MacBook, AirPods)\",     \"User prefers Samsung Galaxy devices and accessories\",     \"User frequently purchases fitness and sports equipment\" ]  embeddings = model.encode(user_summaries)  # FAISS \u0438\u043d\u0434\u0435\u043a\u0441 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 index = faiss.IndexFlatL2(embeddings.shape[1]) index.add(embeddings)  # \u0418\u0449\u0435\u043c top-k \u0441\u043e\u0441\u0435\u0434\u0435\u0439 D, I = index.search(embeddings[:1], k=3) print(\"Top semantic neighbors:\", I[0])<\/code><\/pre>\n<h4>2. \u0421\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u043c\u0435\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h4>\n<pre><code class=\"python\">item_texts = [     \"iPhone 14 Pro smartphone\",     \"Samsung Galaxy S23 smartphone\",     \"Nike running shoes\",     \"Adidas sports shoes\" ]  item_embeddings = model.encode(item_texts) index_items = faiss.IndexFlatL2(item_embeddings.shape[1]) index_items.add(item_embeddings)  # \u041d\u0430\u0439\u0434\u0451\u043c \u0430\u043d\u0430\u043b\u043e\u0433\u0438 \u0434\u043b\u044f iPhone D, I = index_items.search(item_embeddings[:1], k=2) print(\"Semantically similar items:\", [item_texts[j] for j in I[0]])<\/code><\/pre>\n<h4>3. \u041a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u0438\u0432\u043d\u044b\u0439 \u043b\u043e\u0441\u0441<\/h4>\n<pre><code class=\"python\">import torch import torch.nn as nn  class NTXentLoss(nn.Module):     def __init__(self, temperature=0.1):         super().__init__()         self.temperature = temperature      def forward(self, z_i, z_j):         # z_i, z_j \u2014 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0430\u0440         sim_matrix = torch.mm(z_i, z_j.T) \/ self.temperature         labels = torch.arange(z_i.size(0)).long()         loss = nn.CrossEntropyLoss()(sim_matrix, labels)         return loss  # \u041f\u0440\u0438\u043c\u0435\u0440 z_i = torch.randn(32, 128)  # \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 z_j = torch.randn(32, 128)  # \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 loss_fn = NTXentLoss() print(\"Loss:\", loss_fn(z_i, z_j).item())<\/code><\/pre>\n<hr\/>\n<h3>\ud83d\udccc \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b<\/h3>\n<ol>\n<li>\n<p><strong>SRA-CL \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 contrastive learning<\/strong> \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0440\u0430\u0437\u0440\u0435\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u044b\u0432\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434 <strong>\u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u0435\u043d<\/strong>: \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432 \u043b\u044e\u0431\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e RS (GRU4Rec, SASRec, DuoRec).<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f<\/strong>: LLM \u0438 SimCSE \u043d\u0443\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043e\u0432 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u0438\u0440\u043e\u0441\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0437\u043d\u0430\u0447\u0438\u043c<\/strong>: \u0434\u043e +11.82% HR@20\/NDCG@20 \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0432<\/strong>: \u0435\u0441\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441 long-tail, cold-start \u0438\u043b\u0438 sparse \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u2014 SRA-CL \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0431\u0443\u0441\u0442.<\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<h3>\ud83d\udcd6 \u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u043d\u0430\u0434 SRA-CL \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u0438\u0439 \u0442\u0440\u0435\u043d\u0434: <strong>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 LLM \u043d\u0435 \u043d\u0430 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0435, \u0430 \u043a\u0430\u043a \u00ab\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0447\u0438\u0442\u0435\u043b\u0435\u0439\u00bb \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/strong>. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0431\u043e\u0433\u0430\u0442\u0443\u044e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0443 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440.<\/p>\n<p>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0441\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432, \u0433\u0434\u0435 LLM \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u00ab\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00bb \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0430 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0434\u043e\u0440\u043e\u0433\u0438\u0435 \u043e\u043d\u043b\u0430\u0439\u043d-\u0437\u0430\u043f\u0440\u043e\u0441\u044b.<\/p>\n<hr\/>\n<p>\ud83d\udcc4 \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f: <em>Semantic Retrieval Augmented Contrastive Learning for Sequential Recommendation (SRA-CL)<\/em><\/p>\n<p>\ud83d\udd17 <a href=\"https:\/\/arxiv.org\/pdf\/2503.04162\" rel=\"noopener noreferrer nofollow\">arXiv:2503.04162<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/938350\/\"> https:\/\/habr.com\/ru\/articles\/938350\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\ud83d\udc4b \u041f\u0440\u0438\u0432\u0435\u0442, \u0425\u0430\u0431\u0440!<\/p>\n<p>\u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u041d\u0438\u043a\u0438\u0442\u0430 \u0413\u043e\u0440\u044f\u0447\u0435\u0432, \u044f <strong>Research Engineer \u0432 WB<\/strong>, \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043b\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u044e \u043d\u0430 \u0441\u0442\u044b\u043a\u0435 <strong>RecSys, LLM \u0438 \u043c\u0443\u043b\u044c\u0442\u0438\u043c\u043e\u0434\u0430\u043b\u044c\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/strong>. \u041a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c \u043c\u044b \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u043c \u043c\u0438\u043b\u043b\u0438\u0430\u0440\u0434\u044b \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u0430 \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0432\u043d\u0435\u0434\u0440\u044f\u0435\u043c, \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0432\u043b\u0438\u044f\u044e\u0442 \u043d\u0430 CTR, \u0443\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u0435 \u0438 \u043a\u043e\u043d\u0432\u0435\u0440\u0441\u0438\u044e, \u043f\u0440\u0438\u043d\u043e\u0441\u044f \u043d\u0435\u043c\u0430\u043b\u043e \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0432\u044b\u0440\u0443\u0447\u043a\u0438.<\/p>\n<p>\u0414\u043e \u044d\u0442\u043e\u0433\u043e \u044f \u0443\u0441\u043f\u0435\u043b \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 <strong>AI-\u0441\u0442\u0430\u0440\u0442\u0430\u043f\u0435 \u0432 Palo Alto<\/strong>, \u0433\u0434\u0435 \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u044b\u043c\u0438 \u0430\u0433\u0435\u043d\u0442\u0430\u043c\u0438 (ASR\/TTS), \u0438 \u0432 <strong>\u041c\u0422\u0421<\/strong>, \u0433\u0434\u0435 \u043c\u044b \u0441\u0442\u0440\u043e\u0438\u043b\u0438 AI-\u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443. \u0420\u0430\u043d\u0435\u0435 \u0432 <strong>\u0421\u0431\u0435\u0440\u0435<\/strong> \u044f \u0437\u0430\u043d\u0438\u043c\u0430\u043b\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435\u043c \u0435\u0434\u0438\u043d\u043e\u0433\u043e RecSys SDK \u0434\u043b\u044f \u0432\u0441\u0435\u0439 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u044b (\u043e\u0442 SberMegaMarket \u0434\u043e Okko \u0438 Zvuk), \u0430 \u0435\u0449\u0451 \u0440\u0430\u043d\u044c\u0448\u0435 \u2014 \u0440\u0430\u0437\u0432\u0438\u0432\u0430\u043b \u043f\u0435\u0440\u0441\u043e\u043d\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0438 ML \u0432 \u0440\u0438\u0442\u0435\u0439\u043b\u0435.<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u0442\u044c \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u0431\u043e\u043b\u044c\u0448\u0438\u0435 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 <strong>\u043f\u043e\u0447\u0438\u043d\u0438\u0442\u044c \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u0438\u0432\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435<\/strong> \u0432 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u0445. \u041a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u0438\u0432\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0434\u0430\u0432\u043d\u043e \u0441\u0442\u0430\u043b\u0438 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u043c \u0432 NLP \u0438 CV, \u043d\u043e \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u0445 \u043e\u043d\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u0434\u0430\u043b\u0435\u043a\u043e \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e: \u0434\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0437\u0440\u0435\u0436\u0435\u043d\u044b, \u0430 \u0430\u0443\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043a\u0430\u0436\u0430\u044e\u0442 \u0441\u043c\u044b\u0441\u043b \u0432\u043c\u0435\u0441\u0442\u043e \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0435\u0433\u043e \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u0442\u044c. \u0410\u0432\u0442\u043e\u0440\u044b \u0441\u0432\u0435\u0436\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0438 \u0441 arXiv \u2014 <em>\u201cSemantic Retrieval Augmented Contrastive Learning for Sequential Recommendation (SRA-CL)\u201d<\/em> \u2014 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442 \u044d\u043b\u0435\u0433\u0430\u043d\u0442\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435: \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c LLM \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0430\u0446\u0438\u0438 <strong>\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u0445 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0430\u0440<\/strong>. \u0417\u0432\u0443\u0447\u0438\u0442 \u043f\u0440\u043e\u0441\u0442\u043e, \u043d\u043e \u0434\u0430\u0451\u0442 \u0437\u0430\u043c\u0435\u0442\u043d\u044b\u0439 \u043f\u0440\u0438\u0440\u043e\u0441\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u2014 \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u0440\u0430\u0437\u0431\u0435\u0440\u0451\u043c\u0441\u044f, \u043a\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442.<\/p>\n<hr\/>\n<h3>\ud83d\udcc9 \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e contrastive learning \u0432 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u0445<\/h3>\n<h4>1. \u0420\u0430\u0437\u0440\u0435\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>\u041f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u0432\u0438\u0434\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0435\u0439 \u0438\u0437 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0432\u0437\u0430\u0438\u043c\u043e\u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0439 (\u043e\u0431\u044b\u0447\u043d\u043e 5\u201350 \u0441\u043e\u0431\u044b\u0442\u0438\u0439). \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432 (\u0442\u043e\u0432\u0430\u0440\u043e\u0432) \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u0435. \u041f\u0440\u043e\u0441\u0442\u0430\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u044f \u0438\u043b\u0438 \u0441\u043e\u0441\u0435\u0434\u0441\u0442\u0432\u043e \u043f\u043e ID \u0434\u0430\u0451\u0442 \u0448\u0443\u043c\u043d\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b: \u0434\u0432\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043c\u043e\u0433\u0443\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0432 \u043e\u0434\u043d\u043e\u043c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437-\u0437\u0430 \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043e\u0434\u043d\u043e\u043c\u0443 \u0442\u043e\u0432\u0430\u0440\u0443.<\/p>\n<h4>2. \u041d\u0435\u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0435 \u0430\u0443\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/h4>\n<p>\u0412 NLP\/vision \u0430\u0443\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0443 (masking, cropping, dropout). \u0412 RS \u2014 \u043d\u0435\u0442:<\/p>\n<ul>\n<li>\n<p>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e\u0433\u043e \u0442\u043e\u0432\u0430\u0440\u0430 \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0441\u043c\u044b\u0441\u043b.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043b\u043e\u043c\u0430\u0435\u0442 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<\/li>\n<\/ul>\n<h4>3. \u0421\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0440\u0430\u0437\u0440\u044b\u0432<\/h4>\n<p>\u0414\u0432\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u044d\u043a\u0432\u0438\u0432\u0430\u043b\u0435\u043d\u0442\u043d\u044b \u043f\u043e \u0441\u043c\u044b\u0441\u043b\u0443, \u043d\u043e \u043d\u0435 \u0438\u043c\u0435\u0442\u044c \u043f\u0435\u0440\u0435\u0441\u0435\u0447\u0435\u043d\u0438\u044f \u043f\u043e ID.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440: \u043e\u0434\u0438\u043d \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043f\u043e\u043a\u0443\u043f\u0430\u0435\u0442 \u00abiPhone \u2192 AirPods \u2192 MacBook\u00bb, \u0434\u0440\u0443\u0433\u043e\u0439 \u2014 \u00abSamsung Galaxy \u2192 Galaxy Buds \u2192 Windows Laptop\u00bb. \u041d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 ID \u044d\u0442\u043e \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u043d\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u043d\u043e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u2014 \u043e\u0431\u0435 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u00ab\u0442\u0435\u0445\u043d\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0441\u0442, \u043f\u043e\u043a\u0443\u043f\u0430\u044e\u0449\u0438\u0439 \u044d\u043a\u043e\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0431\u0440\u0435\u043d\u0434\u0430\u00bb.<\/p>\n<p>\ud83d\udc49 \u0418\u0442\u043e\u0433: \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u0430\u0440\u044b \u0432 contrastive loss \u043d\u0435 \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0442 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0433\u043e \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u0430 \u2192 \u043c\u043e\u0434\u0435\u043b\u044c \u0443\u0447\u0438\u0442\u0441\u044f \u043d\u0430 \u0448\u0443\u043c\u043d\u044b\u0445 \u0441\u0438\u0433\u043d\u0430\u043b\u0430\u0445.<\/p>\n<hr\/>\n<h3>\ud83d\udca1 \u0418\u0434\u0435\u044f SRA-CL<\/h3>\n<p>SRA-CL \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u0437\u0430 \u0441\u0447\u0451\u0442 <strong>\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0435\u0442\u0440\u0438\u0432\u0430\u043b\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 LLM<\/strong>. \u0412\u043c\u0435\u0441\u0442\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0445 \u0430\u0443\u0433\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0439 \u0438 \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 ID, \u043c\u0435\u0442\u043e\u0434 \u0441\u0442\u0440\u043e\u0438\u0442 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0435 \u043f\u0430\u0440\u044b, \u043e\u043f\u0438\u0440\u0430\u044f\u0441\u044c \u043d\u0430 <strong>\u043e\u0441\u043c\u044b\u0441\u043b\u0435\u043d\u043d\u044b\u0435 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f<\/strong>.<\/p>\n<p>\u041c\u0435\u0442\u043e\u0434 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0434\u0432\u0430 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430:<\/p>\n<p>1\ufe0f\u20e3 Cross-sequence Semantic Contrast<\/p>\n<ul>\n<li>\n<p>\u041a\u0430\u0436\u0434\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442 \u0432 <strong>\u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u0440\u0435\u0437\u044e\u043c\u0435<\/strong> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e LLM (<em>\u0432 \u0441\u0442\u0430\u0442\u044c\u0435: DeepSeek-V3, temp=0, top-p=0.001<\/em>).<\/p>\n<\/li>\n<li>\n<p>\u0422\u0435\u043a\u0441\u0442\u044b \u043a\u043e\u0434\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c\u044e <strong>SimCSE-RoBERTa<\/strong>, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438.<\/p>\n<\/li>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f \u0438\u0449\u0443\u0442\u0441\u044f <strong>k \u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439<\/strong> \u043f\u043e \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u043c\u0443 \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u0443 (\u0447\u0435\u0440\u0435\u0437 FAISS \u0438\u043b\u0438 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0435 \u0438\u043d\u0434\u0435\u043a\u0441\u044b).<\/p>\n<\/li>\n<li>\n<p>\u0418\u0437 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0441\u0442\u0440\u043e\u0438\u0442\u0441\u044f <strong>\u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u044b\u0439 attention-\u0430\u0433\u0440\u0435\u0433\u0430\u0442<\/strong>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043b\u0443\u0436\u0438\u0442 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u043e\u0439 \u043f\u0430\u0440\u043e\u0439 \u0434\u043b\u044f contrastive learning.<\/p>\n<\/li>\n<\/ul>\n<h4>2\ufe0f\u20e3 Intra-sequence Semantic Contrast<\/h4>\n<ul>\n<li>\n<p>\u0414\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0442\u043e\u0432\u0430\u0440\u0430 \u0432 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0438\u0449\u0435\u0442\u0441\u044f <strong>\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u043b\u0438\u0437\u043a\u0438\u0439 \u0442\u043e\u0432\u0430\u0440<\/strong> (\u0447\u0435\u0440\u0435\u0437 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0439\/\u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432).<\/p>\n<\/li>\n<li>\n<p>\u0421\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u043e\u0432\u044b\u0435 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0433\u0434\u0435 \u0447\u0430\u0441\u0442\u044c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0437\u0430\u043c\u0435\u043d\u0435\u043d\u0430 \u0430\u043d\u0430\u043b\u043e\u0433\u0430\u043c\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00abNike running shoes\u00bb \u2192 \u00abAdidas sports shoes\u00bb).<\/p>\n<\/li>\n<li>\n<p>\u0414\u0432\u0435 \u0432\u0435\u0440\u0441\u0438\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0442\u0435\u043f\u0435\u0440\u044c \u043e\u0442\u0440\u0430\u0436\u0430\u044e\u0442 <em>\u043e\u0434\u043d\u043e\u0433\u043e \u0438 \u0442\u043e\u0433\u043e \u0436\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f<\/em>, \u043d\u043e \u0441 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0435\u0439 \u0432 \u0434\u0435\u0442\u0430\u043b\u044f\u0445.<\/p>\n<\/li>\n<\/ul>\n<h4>3\ufe0f\u20e3 \u0418\u0442\u043e\u0433\u043e\u0432\u044b\u0439 \u043b\u043e\u0441\u0441<\/h4>\n<p>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0442\u0435\u0440\u044c \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0442\u0440\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430:<\/p>\n<\/p>\n<ul>\n<li>\n<p>\u2014 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0439 \u043b\u043e\u0441\u0441 \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430.<\/p>\n<\/li>\n<li>\n<p> \u2014 \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u0438\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0434\u043b\u044f \u043c\u0435\u0436\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u2014 \u043a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u0438\u0432\u043d\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0434\u043b\u044f \u0432\u043d\u0443\u0442\u0440\u0438-\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u0413\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \\alpha, \\beta \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u0438\u0440\u0443\u044e\u0442 \u0432\u043a\u043b\u0430\u0434 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e CL.<\/p>\n<hr\/>\n<h3>\ud83d\udcca \u042d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b<\/h3>\n<h4>\u0414\u0430\u0442\u0430\u0441\u0435\u0442\u044b<\/h4>\n<ul>\n<li>\n<p>Yelp<\/p>\n<\/li>\n<li>\n<p>Sports (Amazon)<\/p>\n<\/li>\n<li>\n<p>Beauty (Amazon)<\/p>\n<\/li>\n<li>\n<p>Office (Amazon)<\/p>\n<\/li>\n<\/ul>\n<h4>\u0411\u0435\u0439\u0437\u043b\u0430\u0439\u043d\u044b (12 \u043c\u043e\u0434\u0435\u043b\u0435\u0439)<\/h4>\n<p>GRU4Rec, BERT4Rec, SASRec, DuoRec \u0438 \u0434\u0440.<\/p>\n<h4>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h4>\n<ul>\n<li>\n<p><strong>\u041c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u0435: +11.82%<\/strong> \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e SOTA (p &lt; 0.01).<\/p>\n<\/li>\n<li>\n<p>\u041f\u0440\u0438 \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u0446\u0438\u0438 \u0432 SASRec:<\/p>\n<ul>\n<li>\n<p>HR@20: <strong>+8.3% \u2192 +27.3%<\/strong><\/p>\n<\/li>\n<li>\n<p>NDCG@20: <strong>+9.7% \u2192 +25.5%<\/strong><\/p>\n<\/li>\n<\/ul>\n<\/li>\n<li>\n<p>\u0412\u0430\u0436\u043d\u043e: <strong>\u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441 \u043d\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u0435\u0442\u0441\u044f<\/strong> \u2014 LLM \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<hr\/>\n<h3>\u2699\ufe0f \u041a\u0430\u043a \u0440\u0435\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c SRA-CL<\/h3>\n<h4>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430<\/h4>\n<pre><code>pip install faiss-cpu transformers sentence-transformers torch<\/code><\/pre>\n<h4>1. \u041f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u043e\u0432 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439<\/h4>\n<pre><code class=\"python\">from sentence_transformers import SentenceTransformer import faiss  # \u041c\u043e\u0434\u0435\u043b\u044c SimCSE model = SentenceTransformer(\"princeton-nlp\/sup-simcse-roberta-base\")  user_summaries = [     \"User buys Apple ecosystem products (iPhone, MacBook, AirPods)\",     \"User prefers Samsung Galaxy devices and accessories\",     \"User frequently purchases fitness and sports equipment\" ]  embeddings = model.encode(user_summaries)  # FAISS \u0438\u043d\u0434\u0435\u043a\u0441 \u0434\u043b\u044f \u043f\u043e\u0438\u0441\u043a\u0430 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 index = faiss.IndexFlatL2(embeddings.shape[1]) index.add(embeddings)  # \u0418\u0449\u0435\u043c top-k \u0441\u043e\u0441\u0435\u0434\u0435\u0439 D, I = index.search(embeddings[:1], k=3) print(\"Top semantic neighbors:\", I[0])<\/code><\/pre>\n<h4>2. \u0421\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0437\u0430\u043c\u0435\u043d\u044b \u0432\u043d\u0443\u0442\u0440\u0438 \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438<\/h4>\n<pre><code class=\"python\">item_texts = [     \"iPhone 14 Pro smartphone\",     \"Samsung Galaxy S23 smartphone\",     \"Nike running shoes\",     \"Adidas sports shoes\" ]  item_embeddings = model.encode(item_texts) index_items = faiss.IndexFlatL2(item_embeddings.shape[1]) index_items.add(item_embeddings)  # \u041d\u0430\u0439\u0434\u0451\u043c \u0430\u043d\u0430\u043b\u043e\u0433\u0438 \u0434\u043b\u044f iPhone D, I = index_items.search(item_embeddings[:1], k=2) print(\"Semantically similar items:\", [item_texts[j] for j in I[0]])<\/code><\/pre>\n<h4>3. \u041a\u043e\u043d\u0442\u0440\u0430\u0441\u0442\u0438\u0432\u043d\u044b\u0439 \u043b\u043e\u0441\u0441<\/h4>\n<pre><code class=\"python\">import torch import torch.nn as nn  class NTXentLoss(nn.Module):     def __init__(self, temperature=0.1):         super().__init__()         self.temperature = temperature      def forward(self, z_i, z_j):         # z_i, z_j \u2014 \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043d\u044b\u0445 \u043f\u0430\u0440         sim_matrix = torch.mm(z_i, z_j.T) \/ self.temperature         labels = torch.arange(z_i.size(0)).long()         loss = nn.CrossEntropyLoss()(sim_matrix, labels)         return loss  # \u041f\u0440\u0438\u043c\u0435\u0440 z_i = torch.randn(32, 128)  # \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u044b\u0445 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439 z_j = torch.randn(32, 128)  # \u044d\u043c\u0431\u0435\u0434\u0434\u0438\u043d\u0433\u0438 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 loss_fn = NTXentLoss() print(\"Loss:\", loss_fn(z_i, z_j).item())<\/code><\/pre>\n<hr\/>\n<h3>\ud83d\udccc \u041f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u0432\u044b\u0432\u043e\u0434\u044b<\/h3>\n<ol>\n<li>\n<p><strong>SRA-CL \u0443\u043b\u0443\u0447\u0448\u0430\u0435\u0442 contrastive learning<\/strong> \u0432 \u0443\u0441\u043b\u043e\u0432\u0438\u044f\u0445 \u0440\u0430\u0437\u0440\u0435\u0436\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0438 \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0440\u0430\u0437\u0440\u044b\u0432\u0430.<\/p>\n<\/li>\n<li>\n<p>\u041c\u0435\u0442\u043e\u0434 <strong>\u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u0435\u043d<\/strong>: \u043c\u043e\u0436\u043d\u043e \u0432\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0432 \u043b\u044e\u0431\u0443\u044e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e RS (GRU4Rec, SASRec, DuoRec).<\/p>\n<\/li>\n<li>\n<p><strong>\u0421\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0430 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f<\/strong>: LLM \u0438 SimCSE \u043d\u0443\u0436\u043d\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u043f\u043e\u0437\u0438\u0442\u0438\u0432\u043e\u0432 \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p><strong>\u041f\u0440\u0438\u0440\u043e\u0441\u0442 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430 \u0437\u043d\u0430\u0447\u0438\u043c<\/strong>: \u0434\u043e +11.82% HR@20\/NDCG@20 \u043d\u0430 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p><strong>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f \u0434\u043b\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u043e\u0432<\/strong>: \u0435\u0441\u043b\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442\u0435 \u0441 long-tail, cold-start \u0438\u043b\u0438 sparse \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u2014 SRA-CL \u043c\u043e\u0436\u0435\u0442 \u0434\u0430\u0442\u044c \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0431\u0443\u0441\u0442.<\/p>\n<\/li>\n<\/ol>\n<hr\/>\n<h3>\ud83d\udcd6 \u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0420\u0430\u0431\u043e\u0442\u0430 \u043d\u0430\u0434 SRA-CL \u0432\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0431\u043e\u043b\u0435\u0435 \u0448\u0438\u0440\u043e\u043a\u0438\u0439 \u0442\u0440\u0435\u043d\u0434: <strong>\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 LLM \u043d\u0435 \u043d\u0430 \u0438\u043d\u0444\u0435\u0440\u0435\u043d\u0441\u0435, \u0430 \u043a\u0430\u043a \u00ab\u0441\u0435\u043c\u0430\u043d\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0443\u0447\u0438\u0442\u0435\u043b\u0435\u0439\u00bb \u043f\u0440\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439<\/strong>. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0431\u043e\u0433\u0430\u0442\u0443\u044e \u0441\u0435\u043c\u0430\u043d\u0442\u0438\u043a\u0443 \u044f\u0437\u044b\u043a\u043e\u0432\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440.<\/p>\n<p>\u0421\u043a\u043e\u0440\u0435\u0435 \u0432\u0441\u0435\u0433\u043e, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0432\u0438\u0434\u0435\u0442\u044c \u0432\u0441\u0451 \u0431\u043e\u043b\u044c\u0448\u0435 \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043f\u043e\u0434\u0445\u043e\u0434\u043e\u0432, \u0433\u0434\u0435 LLM \u043f\u043e\u043c\u043e\u0433\u0430\u044e\u0442 \u00ab\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c\u00bb \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u044d\u0442\u0430\u043f\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0430 \u043d\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u044e\u0442 \u0434\u043e\u0440\u043e\u0433\u0438\u0435 \u043e\u043d\u043b\u0430\u0439\u043d-\u0437\u0430\u043f\u0440\u043e\u0441\u044b.<\/p>\n<hr\/>\n<p>\ud83d\udcc4 \u041e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f: <em>Semantic Retrieval Augmented Contrastive Learning for Sequential Recommendation (SRA-CL)<\/em><\/p>\n<p>\ud83d\udd17 <a href=\"https:\/\/arxiv.org\/pdf\/2503.04162\" rel=\"noopener noreferrer nofollow\">arXiv:2503.04162<\/a><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/938350\/\"> https:\/\/habr.com\/ru\/articles\/938350\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-471157","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/471157","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=471157"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/471157\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=471157"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=471157"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=471157"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}