arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2512.09275stat.MLcs.LG
收藏

位置编码的影响:基于上下文回归的Transformer清洁与对抗Rademacher复杂性

Impact of Positional Encoding: Clean and Adversarial Rademacher Complexity for Transformers under In-Context Regression

Michigan State University(密歇根州立大学)

Weiyi He, Yue Xing

AI总结:

本文分析了位置编码对Transformer在上下文回归中的泛化能力的影响,提出清洁和对抗Rademacher复杂性的理论框架,证明位置编码扩大了泛化差距,并通过实验验证了其在对抗攻击下的脆弱性。

摘要:

位置编码(PE)是Transformer架构的核心组成部分,但其对Transformer泛化能力和鲁棒性的影响仍不清楚。本文首次为单层Transformer在上下文回归中提供了泛化分析,明确考虑了完全可训练的PE模块。我们的结果表明,PE系统地扩大了泛化差距。在对抗设置下,我们推导了对抗Rademacher泛化界。我们发现,在攻击下,有无PE模型之间的差距被放大,表明PE放大了模型的脆弱性。我们的界通过模拟研究得到实证验证。共同,本文建立了一个新的框架,用于理解PE在ICL中的清洁和对抗泛化。

英文摘要:

Positional encoding (PE) is a core architectural component of Transformers, yet its impact on the Transformer's generalization and robustness remains unclear. In this work, we provide the first generalization analysis for a single-layer Transformer under in-context regression that explicitly accounts for a completely trainable PE module. Our result shows that PE systematically enlarges the generalization gap. Extending to the adversarial setting, we derive the adversarial Rademacher generalization bound. We find that the gap between models with and without PE is magnified under attack, demonstrating that PE amplifies the vulnerability of models. Our bounds are empirically validated by a simulation study. Together, this work establishes a new framework for understanding the clean and adversarial generalization in ICL with PE.

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

↑