表示同构性预测并改进变换器语言模型的组合泛化能力
Representational Homomorphism Predicts and Improves Compositional Generalization In Transformer Language Model
AI总结:
本文提出同构误差(HE)作为衡量模型组合泛化能力的指标,并通过实验表明在训练中降低HE能提升模型在噪声下的泛化性能。
摘要:
组合泛化能力——即解释新组合的熟悉组件的能力——仍然是神经网络的持续挑战。行为评估揭示了模型何时失败,但对失败的原因了解有限。我们引入同构误差(HE),一个结构度量,衡量已建立的规则(语言语法)与模型学习的规则(语义语法)之间的不一致。我们将这种不一致表征为语言表达代数与模型隐藏状态空间之间的近似同构偏差。我们设计了实验测试i)HE是否预测组合泛化性能,以及ii)在训练中调节低HE是否能提高此类性能。为了避免数据污染的影响,我们使用改进的SCAN数据集从头训练小型解码器-only变换器进行测试。在受控实验中,HE在噪声注入下预测出分布外(OOD)组合泛化能力,HE与OOD准确率之间的相关性达到R²=0.73。消融实验显示,模型深度对HE或OOD准确率影响最小,训练数据覆盖度表现出阈值效应,随机插入噪声标记会增加HE。干预实验表明,HE调节训练显著降低HE(p=1.1×10⁻⁴)并产生统计上显著的OOD准确率提升(p=0.023)。这些结果表明HE有潜力成为诊断和可操作的训练信号,以改进组合泛化能力。
英文摘要:
Compositional generalization-the ability to interpret novel combinations of familiar components-remains a persistent challenge for neural networks. Behavioral evaluations reveal \emph{when} models fail but offer limited insight into \emph{why} failures arise at the representational level. We introduce \textit{Homomorphism Error} (HE), a structural metric that measures the inconsistency between a set of established rules for which words combine to form new meaning (linguistic syntax) and model's learned rules for which hidden states combine to form new states (semantic syntax). We formulate this inconsistency as deviations from approximate homomorphisms between the linguistic expression algebra and a model's hidden-state space. We designed experiments to test if i) HE predicts compositional generalization performance, and ii) will regularizing for low HE during training improve such performance. To avoid the effect of data spoilage, we train small decoder-only Transformers from scratch using an adapted version of established dataset, SCAN, for testing compositional generalization. Across controlled experiments, HE predicts out-of-distribution (OOD) compositional generalization under noise injection, achieving $R^2=0.73$ correlation between HE and OOD accuracy. Ablations show that model depth has minimal effect on either HE or OOD accuracy, training data coverage exhibits threshold effects, and randomly inserted noise tokens increase HE. Intervention experiment shows that HE-regularized training significantly reduces HE ($p=1.1\times10^{-4}$) and yields a statistically significant improvement in OOD accuracy ($p=0.023$). Together, these results indicate the potential of HE to be both a diagnostic and an actionable training signal for improving compositional generalization.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。