Grammar-constrained generation is often combined with local vocabulary masking and speculative decoding, but the resulting sampling law is not the grammar-conditional distribution users usually intend. We show that any speculative decoder with local mask access, Leviathan rejection, and rollback soundness samples from the locally projected distribution $μ^{\mathrm{proj}}$ rather than the grammar-conditional distribution $μ^\star$. This extends the GAD impossibility result to speculative decoding; on Dyck grammars with Qwen3-8B, the total-variation gap can reach 0.996. We identify the future-validity function $Φ_t(y)=\Pr_p[\mathrm{valid\ completion}\mid y]$ as the missing correction statistic. The target distribution is a Doob transform of the base model with $h=Φ$, while local masking corresponds to setting $h$ to one. With exact $Φ$, our oracle decoder FVO-Spec samples exactly from $μ^\star$; with approximate $Φ$, we bound the resulting total-variation error. Because exact future validity is hard for general context-free grammars, we evaluate estimator hierarchies on tractable Dyck and finite JSON languages. OneStep reduces Dyck TV by 14% with under 1% throughput overhead, exact dynamic programming reduces it by 97%, and finite-language correction closes JSON gaps to numerical precision. All fidelity claims are scoped to enumerable grammars and token tries.


翻译:语法约束生成通常结合局部词汇掩码与推测解码,但由此产生的采样分布并非用户通常期望的语法条件分布。我们证明,任何使用局部掩码访问、莱维坦拒绝和回滚健全性的推测解码器,实际采样的是局部投影分布$\mu^{\mathrm{proj}}$而非语法条件分布$\mu^\star$。这一结论将GAD不可能性结果扩展至推测解码领域;在Dyck文法配合Qwen3-8B模型时,总变差距离可达0.996。我们识别出未来有效性函数$\Phi_t(y)=\Pr_p[\mathrm{有效补全}\mid y]$为缺失的校正统计量。目标分布是基座模型以$h=\Phi$进行的Doob变换,而局部掩码对应于将$h$设为1。在精确$\Phi$条件下,我们的预言解码器FVO-Spec能精确采样$\mu^\star$;在近似$\Phi$条件下,我们给出了总变差误差的上界。由于对通用上下文无关文法计算精确未来有效性具有难度,我们在可处理的Dyck文法和有限JSON语言上评估了估计器层次结构。OneStep方法在吞吐量开销低于1%的情况下将Dyck文法的总变差降低了14%,精确动态规划方法降低了97%,有限语言校正器将JSON语言的总变差降低至数值精度。所有保真性结论均适用于可枚举的文法和令牌前缀树。

0
下载
关闭预览

相关内容

【AAAI2023】不确定性感知的图像描述生成
专知会员服务
26+阅读 · 2022年12月4日
少即是多?非参数语言模型,68页ppt
专知会员服务
24+阅读 · 2020年11月22日
浅析Faiss在推荐系统中的应用及原理
凡人机器学习
11+阅读 · 2020年5月5日
您可以相信模型的不确定性吗?
TensorFlow
14+阅读 · 2020年1月31日
「PPT」深度学习中的不确定性估计
专知
27+阅读 · 2019年7月20日
一文读懂依存句法分析
AINLP
16+阅读 · 2019年4月28日
你的算法可靠吗? 神经网络不确定性度量
专知
40+阅读 · 2019年4月27日
从信息论的角度来理解损失函数
深度学习每日摘要
17+阅读 · 2019年4月7日
用模型不确定性理解模型
论智
11+阅读 · 2018年9月5日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
VIP会员
最新内容
战力倍增器:自主武器系统与乌克兰及加沙冲突
人工智能赋能战场情报:提速决策进程
专知会员服务
2+阅读 · 7月17日
《拥抱新兴技术:面向未来军官的教育革新》
专知会员服务
6+阅读 · 7月17日
《无人地面战车(UGV)的崛起》报告
专知会员服务
8+阅读 · 7月16日
相关VIP内容
【AAAI2023】不确定性感知的图像描述生成
专知会员服务
26+阅读 · 2022年12月4日
少即是多?非参数语言模型,68页ppt
专知会员服务
24+阅读 · 2020年11月22日
相关资讯
浅析Faiss在推荐系统中的应用及原理
凡人机器学习
11+阅读 · 2020年5月5日
您可以相信模型的不确定性吗?
TensorFlow
14+阅读 · 2020年1月31日
「PPT」深度学习中的不确定性估计
专知
27+阅读 · 2019年7月20日
一文读懂依存句法分析
AINLP
16+阅读 · 2019年4月28日
你的算法可靠吗? 神经网络不确定性度量
专知
40+阅读 · 2019年4月27日
从信息论的角度来理解损失函数
深度学习每日摘要
17+阅读 · 2019年4月7日
用模型不确定性理解模型
论智
11+阅读 · 2018年9月5日
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
国家自然科学基金
5+阅读 · 2014年12月31日
国家自然科学基金
18+阅读 · 2012年12月31日
Top
微信扫码咨询专知VIP会员