Backtracking search underlies classical constraint solvers, planners, and theorem provers. Recent transformer-based reasoning systems explore search trees over their own intermediate steps. A common training recipe fits an autoregressive next-token loss on offline solver traces. The model's input at each step is a cumulative trace of all prior decisions. The optimal continue-or-backtrack predictor depends only on the current search state, since two trajectories reaching the same state admit the same viable continuations. We show that decoder-only transformers trained on cumulative traces fail this requirement in two ways: the trace can scatter state features across many positions (scattered retrieval), and the predictor can condition on the trajectory rather than the state (history entanglement). We address scattered retrieval with localization, a trace-level fix that rewrites each decision block to expose state features locally. We address history entanglement with Selective State Attention (SSA), a fixed attention mask that enforces state-based decisions structurally without modifying training data, objective, or parameters. We focus on reactive verification, after propagation has exposed a contradiction. We test SSA on 3-SAT, graph coloring, Blocks World, and backtracking parsing. On same-state pairs that differ only in prior history, SSA emits identical decisions while a cumulative-trained causal baseline does not. Our contribution is a diagnostic of transformer behavior on serialized trajectory data, paired with a structural fix. Pretrained language models that search over their own reasoning steps may face the same failure. Our analysis opens up inference-time context clearing as a candidate way to apply the same isolation without retraining.


翻译:回溯搜索是经典约束求解器、规划器和定理证明器的基础。近年来基于Transformer的推理系统通过探索自身中间步骤的搜索树来解决问题。常见的训练方法是在离线求解器轨迹上拟合自回归下一个token的损失函数。模型每一步的输入是此前所有决策的累积轨迹。由于到达相同状态的两条轨迹可产生相同的可行后续步骤,最优的继续/回溯预测器应仅取决于当前搜索状态。我们发现,基于累计轨迹训练的仅解码器Transformer在两方面未能满足这一要求:轨迹可能将状态特征分散到多个位置(分散检索),且预测器可能根据轨迹而非状态进行条件判断(历史纠缠)。针对分散检索问题,我们提出局部化方法——通过重写每个决策块以在局部暴露状态特征的轨迹级修正;针对历史纠缠问题,我们提出选择性状态注意机制(SSA)——一种固定的注意力掩码,在不修改训练数据、目标函数或参数的前提下从结构上强制基于状态的决策。我们聚焦传播暴露矛盾后的反应式验证环节,在3-SAT、图着色、积木世界和回溯解析等任务上测试SSA。对于仅历史轨迹不同但状态相同的配对样本,SSA能输出相同的决策,而基于累计轨迹的因果基线模型则不能。本文的贡献在于:对序列化轨迹数据上的Transformer行为进行诊断,并配以结构性修正方案。在自身推理步骤上进行搜索的预训练语言模型可能面临相同的缺陷。我们的分析表明,推理阶段的上下文清除技术可作为无需重新训练的隔离方案候选手段。

0
下载
关闭预览

相关内容

【Google】高效Transformer综述,Efficient Transformers: A Survey
专知会员服务
66+阅读 · 2022年3月17日
Stabilizing Transformers for Reinforcement Learning
专知会员服务
60+阅读 · 2019年10月17日
Transferring Knowledge across Learning Processes
CreateAMind
29+阅读 · 2019年5月18日
百闻不如一码!手把手教你用Python搭一个Transformer
大数据文摘
18+阅读 · 2019年4月22日
国家自然科学基金
43+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
31+阅读 · 2015年12月31日
Arxiv
0+阅读 · 5月12日
Arxiv
0+阅读 · 5月5日
Arxiv
0+阅读 · 3月25日
VIP会员
最新内容
学习数据的几何:形状空间分析数学综述
专知会员服务
1+阅读 · 今天14:45
定向能反无人机系统最新发展动态
专知会员服务
4+阅读 · 今天13:50
从燃煤战舰到算法战争:水面指挥的永恒要求
专知会员服务
3+阅读 · 今天13:33
相关基金
国家自然科学基金
43+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
31+阅读 · 2015年12月31日
Top
微信扫码咨询专知VIP会员