Yandex Sona:单生成式推荐模型替代全链路
Yandex Introduces Sona: A Single Generative Recommender That Replaces Entire Recommendation Cascade
这是一份极具参考价值的工业界落地实践,展示了如何用单一生成式模型彻底重构传统推荐级联架构,并给出了详实的线上收益数据与对比分析,值得推荐系统工程师深入研读。
Most production recommenders are cascades. Candidate generators feed a pre-ranker, which feeds a heavy ranker built on hundreds of engineered features. Yandex’s Sona Technical Report describes a different design. Sona is a generative AI model that brings candidate generation and ranking into a single system, replacing the multiple stages typically used in recommendation pipelines. Yandex tested the model in a seven-day live production experiment on its smart speakers. In an online A/B test, it replaced more than 15 candidate generators, the pre-ranking stage, and the ranking stage with one served transformer.
大多数生产环境中的推荐系统采用级联架构。候选生成器为预排序器提供输入,预排序器再为基于数百个工程特征构建的重型排序器提供输入。Yandex 的 Sona 技术报告描述了一种不同的设计。Sona 是一个生成式 AI 模型,它将候选生成和排名整合到一个系统中,取代了推荐管道中通常使用的多个阶段。Yandex 在其智能音箱上对该模型进行了为期七天的在线生产实验。在在线 A/B 测试中,它用一个服务的 Transformer 替换了超过 15 个候选生成器、预排序阶段和排序阶段。
What Problem Does Sona Solve?
Sona 解决了什么问题?
Cascades split one decision across separately trained models. Each stage optimizes its own objective, and the ranker only sees what upstream stages let through. Yandex’s previous stack on the Yandex Music surface consumed hundreds of features, including signals from Argus, Yandex’s earlier recommender transformer. Sona puts candidate generation and ranking around one shared user representation. The encoder reads the listener’s history once per request. A decoder generates candidates. A Ranking Module scores them against the same encoder states. No component uses hand-engineered features. Inputs are logged event fields (track ID, artist ID, duration, likes, played time, surface flags) and learned Semantic IDs.
级联架构将一个决策分散到单独训练的模型中。每个阶段都优化其自身的目标,而排序器只能看到上游阶段允许通过的内容。Yandex 之前在 Yandex Music 界面上的堆栈消耗了数百个特征,包括来自 Argus(Yandex 早期的推荐器 Transformer)的信号。Sona 将候选生成和排名围绕一个共享的用户表示进行构建。编码器在每个请求中读取一次听众的历史记录。解码器生成候选项。排名模块使用相同的编码器状态对这些候选项进行评分。没有任何组件使用手工设计的特征。输入是日志事件字段(曲目 ID、艺术家 ID、时长、点赞、播放时间、界面标志)和学习到的语义 ID。
On Yandex smart speakers, playback can begin without the user first selecting an artist, genre, or mood. The research team describes this as a pure-recommendation setting.
在 Yandex 智能音箱上,播放可以在用户未先选择艺术家、流派或情绪的情况下开始。研究团队将此描述为纯推荐设置。
How Sona’s Architecture Works
Sona 的架构如何工作
1. Semantic tokenizer
1. 语义分词器
Following the Semantic ID formulation of Rajput et al., every track becomes a tuple of 3 discrete codes. A frozen multimodal LLM reads the mel-spectrogram of the first 90 seconds along with title, artists, and tags. It runs in prefill-only mode. A 4-layer refinement transformer then aligns those features with listening behavior, using InfoNCE on collaborative track pairs. Residual K-means quantizes the result into 3 codebooks of 32,000 entries each. This beat a CLMR audio baseline: Recall@1000 rose from 0.8111 to 0.8524.
遵循 Rajput 等人提出的语义 ID 公式,每首曲目变成一个包含 3 个离散代码的元组。一个冻结的多模态大语言模型读取前 90 秒的梅尔频谱图以及标题、艺术家和标签。它以仅预填充模式运行。随后,一个 4 层的精炼 Transformer 利用协作曲目对上的 InfoNCE 损失将这些特征与收听行为对齐。残差 K-means 将结果量化为 3 个码本,每个码本包含 32,000 个条目。这优于 CLMR 音频基线:Recall@1000 从 0.8111 提升至 0.8524。
2. Encoder with History Compression
2. 带有历史压缩的编码器
Sona attends to 8,192 past events. Full attention over that length is expensive, so the encoder spends depth unevenly. The recent 2,048 events get a 7-layer self-attention stack. Older events pass through cross-attention and 1 full-history layer only. The paper reports this keeps most of the quality of full attention at about half the inference cost.
Sona 关注过去 8,192 个事件。对该长度进行全注意力计算成本高昂,因此编码器不均匀地分配深度。最近的 2,048 个事件获得一个 7 层自注意力堆栈。较旧的事件仅通过交叉注意力和 1 个全历史层。论文报告称,这使得在大约一半的推理成本下保持了大部分全注意力的质量。
3. Decoder and Ranking Module
3. 解码器与排序模块
A 2-layer decoder emits Semantic ID tuples through constrained beam search with width 1,024. A catalog trie blocks invalid prefixes. Each tuple expands to every track sharing it. The Ranking Module, which consists of four cross-attention layers, then scores those tracks against the shared encoder memory.
一个2层解码器通过宽度为1,024的受限束搜索(constrained beam search)输出语义ID元组。目录前缀树(catalog trie)会拦截无效的前缀。每个元组都会扩展为所有共享该元组的曲目。随后,由四个交叉注意力层组成的排序模块(Ranking Module)针对共享编码器记忆对这些曲目进行评分。
Training: A Teacher That Never Ships
训练:一个永不上线的教师模型
The Ranking Module learns from a frozen Teacher Ranker. The teacher is a 0.6B-parameter transformer, also without hand-engineered features. It is trained on a year of engagement events in 2 stages: next-item-prediction pre-training, then multi-head ranking fine-tuning. Removing pre-training dropped weighted pair accuracy from 0.6215 to 0.6153.
排序模块从冻结的教师排序器(Teacher Ranker)中学习。该教师模型是一个参数量为0.6B的Transformer,同样不包含手工设计的特征。它分两个阶段在一年内的互动事件数据上进行训练:首先是下一项预测(next-item-prediction)预训练,然后是多头排序微调。移除预训练步骤会导致加权成对准确率从0.6215下降至0.6153。
The team calls its distillation method Rollout Distillation. During training, the current decoder generates beam candidates. The teacher scores them, together with logged impressions. The Ranking Module regresses onto those scores with mean absolute error. The joint loss is L = L_NTP + L_rollout + L_impression. Both losses update the shared encoder. At serving time, the teacher is removed.
团队将其蒸馏方法称为 rollout 蒸馏(Rollout Distillation)。在训练期间,当前解码器生成束候选项。教师模型对其以及日志记录的曝光(impressions)进行评分。排序模块使用平均绝对误差(mean absolute error)对这些分数进行回归。联合损失函数为 L = L_NTP + L_rollout + L_impression。这两个损失共同更新共享编码器。在服务部署时,教师模型会被移除。
Training stays online. Events aggregate into sessions over a 15-minute window, feed a GPU trainer, and new weights reach serving every 10 minutes. End-to-end latency is 45 minutes at the median and 60 minutes at p99. Serving runs on NVIDIA Triton Inference Server with CUDA graphs and reaches 41% model FLOPs utilization.
训练保持在线运行。事件在15分钟的时间窗口内聚合为会话,输入GPU训练器,新权重每10分钟更新至服务节点。中位数端到端延迟为45分钟,p99延迟为60分钟。服务部署基于NVIDIA Triton推理服务器,结合CUDA图技术,实现了41%的模型FLOPs利用率。
Results: Online A/B Test on Live Traffic
结果:实时流量的在线A/B测试
The final experiment ran for 7 days on 15% of randomly selected users per split. Every change below is statistically significant and relative to the production control:
最终实验在7天内进行,按分割随机选取15%的用户。以下每一项变化均具有统计显著性,且相对于生产环境对照组而言:
- Active Users (primary metric): +4.53%
- Total Listening Time: +6.30%
- Likes: +11.42%
- “Repeat” Commands: +17.99%
- Deeply Engaged Users: +7.37%
- 活跃用户数(主要指标):+4.53%
- 总收听时长:+6.30%
- 点赞数:+11.42%
- “重复播放”指令:+17.99%
- 深度参与用户:+7.37%
These gains stack on top of improvements retained from earlier deployments. On Active Users, Sona’s uplift is 2.35x the +1.93% increment Argus previously delivered on this surface.
这些增益叠加自早期部署中保留的改进成果。在活跃用户数方面,Sona带来的提升幅度是Argus此前在该场景下实现的+1.93%增量的2.35倍。
Sona vs OneRec vs HSTU: Feature Comparison
Sona vs OneRec vs HSTU:特性对比
Sona is not the first end-to-end generative recommender in production. Kuaishou’s OneRec already serves a single encoder-decoder model. Meta’s HSTU Generative Recommenders reframed recommendation as sequential transduction over user actions in 2024. What Sona combines is a full cascade replacement, no hand-engineered features, and a distilled ranker, validated online.
Sona并非首个投入生产环境的端到端生成式推荐系统。快手(Kuaishou)的OneRec已部署单一的编码器-解码器模型。Meta的HSTU生成式推荐系统在2024年将推荐任务重构为用户动作上的序列转导。Sona的创新之处在于实现了完整的级联替换、无需手工设计特征,并采用了经过蒸馏的排序器,且已通过线上验证。
| Feature | Sona (Yandex) | OneRec (Kuaishou) | HSTU GR (Meta) |
|---|---|---|---|
| Domain | Music streaming | Short video | Large internet platform, multiple surfaces |
| One served model replaces the cascade | Yes, in A/B test | Yes, about 25% of total QPS | No, reported as a new architecture for recommendation models |
| User inputs | Logged event fields only, no hand-engineered features | “Multi-scale feature engineering” pathways, including uid, age, gender | User action sequences (sequential transduction) |
| Item output | 3-level Semantic IDs, 3 x 32,000 | 3-level Semantic IDs via RQ-Kmeans | Item IDs |
| Ranking signal | Produced from frozen 0.6B Teacher Ranker | RL with P-Score reward model (ECPO) | HSTU ranking model |
| Reinforcement learning | No, fully supervised | Yes (ECPO) | Not reported |
| Scale reported | 8,192-event history, 0.6B teacher | 10x FLOPs of prior ranking model | 1.5 trillion parameters |
| Reported online gain | +4.53% Active Users, +6.30% listening time, +11.42% likes | +0.54% and +1.24% App Stay Time | +12.4% in online A/B tests |
| Public code or weights | No | Not in the report | Yes, GitHub |
| 特性 | Sona(Yandex) | OneRec(快手) | HSTU GR(Meta) |
|---|---|---|---|
| 领域 | 音乐流媒体 | 短视频 | 大型互联网平台,多触点 |
| 单一服务模型替代级联 | 是,在 A/B 测试中 | 是,约占总 QPS 的 25% | 否,报告为推荐模型的新架构 |
| 用户输入 | 仅登录事件字段,无手工工程特征 | “多尺度特征工程”路径,包括 uid、年龄、性别 | 用户行为序列(顺序转导) |
| 物品输出 | 3 层语义 ID,3 x 32,000 | 通过 RQ-Kmeans 的 3 层语义 ID | 物品 ID |
| 排序信号 | 由冻结的 0.6B 教师排序器生成 | 带 P-Score 奖励模型的强化学习(ECPO) | HSTU 排序模型 |
| 强化学习 | 否,完全监督 | 是(ECPO) | 未报告 |
| 报告的规模 | 8,192 条历史事件,0.6B 教师 | 先前排序模型的 10 倍 FLOPs | 1.5 万亿参数 |
| 报告的在线收益 | +4.53% 活跃用户,+6.30% 收听时长,+11.42% 点赞 | +0.54% 和 +1.24% App 停留时间 | 在线 A/B 测试中 +12.4% |
| 公开代码或权重 | 否 | 报告中未提及 | 是,GitHub |
Sources: Sona, OneRec, HSTU. Online gains come from different platforms and metrics, so they are not directly comparable.
来源:Sona、OneRec、HSTU。在线收益来自不同平台和指标,因此不可直接比较。
Key Takeaways
关键要点
- Sona replaced 15+ generators, pre-ranking, and ranking with 1 served model.
- No hand-engineered features: only logged events and learned Semantic IDs.
- A 0.6B teacher trains the ranker, then stays out of serving.
- A/B test: +4.53% Active Users, 2.35x Argus’s prior gain.
- Not deployable externally: no code or weights, not on full traffic.
- Sona 用一个服务模型取代了 15 多个生成器、预排序和排序。
- 无需手工工程特征:仅使用登录事件和学习到的语义 ID。
- 一个 0.6B 的教师训练排序器,随后不再参与服务。
- A/B 测试:活跃用户增加 4.53%,Argus 此前收益的 2.35 倍。
- 无法外部部署:无代码或权重,未在全部流量上运行。
FAQ
常见问题
What is Yandex Sona?
什么是 Yandex Sona?
Sona is a generative AI model that combines candidate generation and ranking within a single system. Yandex tested it in a seven-day live production experiment on its smart speakers, where it replaced the existing multi-stage recommendation pipeline for the test group.
Sona 是一个生成式 AI 模型,将候选项生成和排序结合在一个系统中。Yandex 在其智能音箱上对其进行了为期七天的实时生产实验,在该实验中,它取代了测试组的现有多级推荐流水线。
How is Sona different from OneRec?
Sona 与 OneRec 有何不同?
OneRec uses engineered user feature pathways and RL with a reward model. Sona uses only logged event fields and distills ranking from a frozen teacher.
OneRec 使用人工设计的用户特征路径和带有奖励模型的强化学习。Sona 仅使用登录事件字段,并从冻结的教师中蒸馏排序逻辑。
Check out the Paper for full details.
查阅论文以获取完整详情。
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力