arXiv:2604.21632cs.AI2026-04

Transformer在符号推理中难以处理未见变量,因词向量会坍缩。

To See the Unseen: on the Generalization Ability of Transformers in Symbolic Reasoning

论文配图:To See the Unseen: on the Generalization Ability of Transformers in Symbolic Reasoning
图 1 · 摘自论文原文
  • 发现未见符号的嵌入与解嵌入向量会坍缩为同一方向
  • 通过调整架构与重置嵌入,实现对未见变量的泛化能力
  • 适用于需要强符号推理的模型改进场景

我们研究仅解码器的Transformer模型在抽象符号推理中的表现,聚焦于以上下文方式给出的命题逻辑推理问题。先前研究显示,模型在训练中未见过的变量名上无法泛化,原因之一是难以复制或生成未见标记。本文从理论和实证两方面表明,另一种表征坍缩也起关键作用:未见标记的解嵌入(最后一层权重)在训练过程中坍缩至几乎相同的向量。这使得模型难以区分多个未见变量(尤其当嵌入与解嵌入参数共享时),并为现有启发式方法如“主动遗忘”(周期性重置标记(解)嵌入)提供了机制解释。基于此,我们设计了一组技术组合,包括微小架构调整以促进复制、数据多样性以及冻结或重置(解)嵌入,在命题逻辑推理任务上实现了对未见标记的泛化。实验在受控环境下广泛验证了上述结论。此外,我们在Gemma 3系列的开源模型中观察到(解)嵌入坍缩现象,该系列保留了99个未使用标记供下游应用。实证发现,这些标记的关联嵌入作为微调初始化效果很差。

原文摘要 · Abstract (English)

We investigate the ability of decoder-only transformer models to perform abstract symbolic reasoning; specifically solving propositional logic reasoning problems given in-context. Previous work demonstrated that models fail to generalize to problems involving variable names that were not observed during training, and it was shown that one reason behind this is the difficulty of copying (or generating) unseen tokens. We show both theoretically and empirically that a particular representational collapse also has a crucial role: the unembeddings (last-layer weights) of unseen tokens collapse to nearly the same vector during training. The collapse makes distinguishing multiple unseen variables difficult for the model (especially when the embedding and unembedding parameters are shared), and provides a mechanistic explanation for the effectiveness of existing heuristic interventions like "active forgetting", which periodically reset the token (un)embeddings. Based on these observations, we devise a combination of techniques, involving a small architecture change facilitating copying, data diversity, and freezing or resetting (un)embeddings, that achieves generalization to unseen tokens. We support our claims with extensive controlled experiments on propositional logic reasoning problems. Beyond synthetic experiments, we also observe evidence of (un)embedding collapse in the open-weight models in the Gemma 3 family, which includes 99 unused tokens reserved for downstream use. Empirically we find that the correlated embeddings of these tokens are a poor initialization for finetuning applications.

Transformer符号推理泛化能力嵌入坍缩

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。