Controlled generation imposes sequence-level constraints (syntax, style, safety) that depend on future tokens, making exact conditioning of an autoregressive LM intractable. Tractable surrogates such as HMMs can approximate continuation distributions and steer decoding, but standard surrogates are often weakly context-aware. We propose Learning to Look Ahead (LTLA), a hybrid method that uses base-LM embeddings to condition a globally learned tractable surrogate: a neural head predicts only a prefix-dependent latent prior, while a shared HMM answers continuation queries exactly. LTLA is designed to avoid two common efficiency traps when adding neural context. First, it avoids vocabulary-sized prefix rescoring (V extra LM evaluations) by scoring all next-token candidates via a single batched HMM forward update. Second, it avoids predicting a new HMM per prefix by learning one shared HMM and conditioning only the latent prior, which enables reuse of cached future-likelihood (backward) messages across decoding steps. Empirically, LTLA improves continuation likelihood over standard HMM surrogates, enables lookahead control for vision--language models by incorporating continuous context, achieves 100% syntactic constraint satisfaction, and improves detoxification while adding only a 14% decoding-time overhead.


翻译:受控生成施加了依赖于未来标记的序列级约束(语法、风格、安全性),使得自回归语言模型的精确条件化变得难以处理。隐马尔可夫模型等可处理替代模型可以近似延续分布并引导解码,但标准替代模型通常上下文感知能力较弱。我们提出“学习前瞻”(LTLA),一种混合方法,它利用基础语言模型的嵌入来条件化一个全局学习的可处理替代模型:神经头仅预测前缀相关的潜在先验,而共享的隐马尔可夫模型则精确地回答延续查询。LTLA的设计旨在避免在增加神经上下文时常见的两种效率陷阱。首先,它通过单个批处理的隐马尔可夫模型前向更新对所有下一个标记候选进行评分,从而避免了词汇表大小的前缀重评分(需要V次额外的语言模型评估)。其次,它通过学习一个共享的隐马尔可夫模型并仅条件化潜在先验,避免了为每个前缀预测一个新的隐马尔可夫模型,这使得缓存的未来似然(后向)消息能够在解码步骤间重复使用。实验表明,LTLA在延续似然性上优于标准的隐马尔可夫模型替代模型,通过融入连续上下文实现了视觉-语言模型的前瞻控制,达到了100%的句法约束满足率,并在仅增加14%解码时间开销的同时改善了去毒性效果。

0
下载
关闭预览

相关内容

大语言模型持续学习:方法、挑战与机遇
专知会员服务
20+阅读 · 3月16日
《语言模型的推理时间学习算法》162页博士论文
专知会员服务
14+阅读 · 2025年11月23日
当持续学习遇上多模态大型语言模型:综述
专知会员服务
32+阅读 · 2025年3月5日
Llama-3-SynE:实现有效且高效的大语言模型持续预训练
专知会员服务
36+阅读 · 2024年7月30日
《大型语言模型持续学习》综述
专知会员服务
93+阅读 · 2024年4月26日
【CVPR2024】卷积提示"遇见了语言模型的持续学习
专知会员服务
18+阅读 · 2024年4月1日
专知会员服务
81+阅读 · 2021年5月30日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
自然语言处理(NLP)知识结构总结
AI100
51+阅读 · 2018年8月17日
【NLP】十分钟快览自然语言处理学习总结
专知
17+阅读 · 2017年11月21日
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
VIP会员
最新内容
人工智能赋能无人机:俄乌战争(万字长文)
专知会员服务
4+阅读 · 今天6:56
国外海军作战管理系统与作战训练系统
专知会员服务
2+阅读 · 今天4:16
美军条令《海军陆战队规划流程(2026版)》
专知会员服务
9+阅读 · 今天3:36
《压缩式分布式交互仿真标准》120页
专知会员服务
4+阅读 · 今天3:21
《电子战数据交换模型研究报告》
专知会员服务
6+阅读 · 今天3:13
《基于Transformer的异常舰船导航识别与跟踪》80页
《低数据领域军事目标检测模型研究》
专知会员服务
6+阅读 · 今天2:37
【CMU博士论文】物理世界的视觉感知与深度理解
伊朗战争停火期间美军关键弹药状况分析
专知会员服务
8+阅读 · 4月22日
电子战革命:塑造战场的十年突破(2015–2025)
相关基金
国家自然科学基金
4+阅读 · 2015年12月31日
国家自然科学基金
17+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员