arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2605.22221cs.LGcs.AIcs.LO
收藏

Transformer能否在回溯搜索中学习验证?

Can Transformers Learn to Verify During Backtracking Search?

Yin Jun Phua (corresponding author) Institute of Science Tokyo, 2-12-1 Ookayama, Meguro-ku, Tokyo 152-8550, Japan Tony Ribeiro Centrale Nantes, CNRS, Laboratoire des Sciences du Num\'erique de Nantes, LS2N, UMR 6004, F-44000 Nantes, France National Institute of Informatics, 2-1-2 Hitotsubashi, Chiyoda-ku, Tokyo 101-8430, Japan Steelous Protocol, 8-20-32, Ginza, Chuo-ku, Tokyo 104-0061, Japan Tuan Nguyen Hanoi University of Science;Technology, No. 1 Dai Co Viet, Hai Ba Trung, Ha Noi, Vietnam Katsumi Inoue National Institute of Informatics, 2-1-2 Hitotsubashi, Chiyoda-ku, Tokyo 101-8430, Japan

Yin Jun Phua, Tony Ribeiro, Tuan Nguyen, Katsumi Inoue

AI总结:

本文研究了Transformer在回溯搜索中的验证能力,指出传统方法在处理轨迹数据时存在散列检索和历史纠缠问题,并提出局部化和选择性状态注意力(SSA)来解决这些问题,通过实验验证了SSA在3-SAT、图着色、Blocks World和回溯解析等任务中的有效性。

摘要:

回溯搜索是经典约束求解器、规划器和定理证明器的基础。最近的基于Transformer的推理系统探索其自身中间步骤的搜索树。一种常见的训练方法是在离线求解器轨迹上拟合自回归的下一个令牌损失。模型的输入在每一步都是所有先前决策的累积轨迹。最优的继续或回溯预测器仅依赖于当前搜索状态,因为到达相同状态的两条轨迹允许相同的延续。我们证明,仅使用累积轨迹训练的解码器Transformer在两种方式上未能满足这一要求:轨迹可以将状态特征散列到许多位置(散列检索),并且预测器可以基于轨迹而非状态(历史纠缠)。我们通过局部化解决散列检索问题,这是一种轨迹级的修复方法,将每个决策块重写以局部化状态特征。我们通过选择性状态注意力(SSA)解决历史纠缠问题,这是一种固定注意力掩码,可以在不修改训练数据、目标或参数的情况下强制结构化基于状态的决策。我们专注于矛盾传播后发生的反应验证。我们在3-SAT、图着色、Blocks World和回溯解析中测试SSA。在仅在先前历史上不同的相同状态对中,SSA发出相同的决定,而自回归训练的因果基线则不会。我们的贡献是针对序列轨迹数据的Transformer行为诊断,配以结构化修复。预训练语言模型在搜索其自身推理步骤时可能面临相同的失败。我们的分析为推理时的上下文清除作为不重新训练的情况下应用相同隔离的方法提供了候选方案。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑