arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2606.00124cs.CVcs.LG
收藏

位置编码锚定视觉Transformer中的空间结构:基于几何视角的鲁棒性研究

Positional Encodings Anchor Spatial Structure in Vision Transformers: A Geometric Perspective on Robustness

ESSTHS

Mahmoud Mannes

AI总结:

本文通过引入空间相似性距离相关性(SSDC)度量,研究不同位置编码对视觉Transformer内部空间表示几何结构的影响,发现位置编码通过建立索引锚定的空间组织来提升模型在内容破坏性分布偏移下的鲁棒性。

摘要:

视觉Transformer中的位置嵌入(PEs)已知会影响性能和鲁棒性,但它们在塑造内部空间表示中的作用尚不明确。本文研究了不同形式的PEs如何影响ViT的表示几何结构,以及这些变化如何与内容破坏性分布偏移下的鲁棒性相关。我们引入了一个度量——空间相似性距离相关性(SSDC),用于量化token表示中的空间结构。利用该度量,我们发现未使用PEs训练的ViT仍会发展出非平凡的空间结构,但这种结构由视觉内容驱动,并在token置换下崩溃。相反,所有考虑的PEs(可学习绝对位置编码、正弦位置编码和旋转位置编码)都与向索引锚定空间组织的一致转变相关。这些模型中的表示在破坏内容的扰动下保持稳定,并对这类分布偏移表现出显著增强的鲁棒性。我们进一步表明,尽管不同的PEs产生不同的空间结构深度轨迹,但其鲁棒性属性大致相似(编码方案间存在次要差异),这表明鲁棒性似乎更依赖于稳定的位置参考框架的存在,而非特定的编码机制。这些结果为位置编码如何塑造内部表示提供了几何解释,并对未来编码方案的原则性设计具有启示意义。

英文摘要:

Positional embeddings (PEs) in Vision Transformers (ViTs) are known to impact performance and robustness, but their role in shaping internal spatial representations is not well understood. In this work, we study how different forms of PEs influence the representational geometry of ViTs and how these changes relate to robustness under content-disrupting distribution shifts. We introduce a metric, the Spatial Similarity Distance Correlation (SSDC), to quantify spatial structure in token representations. Using this metric, we show that ViTs trained without PEs still develop non-trivial spatial structure, but this structure is driven by visual content and collapses under token permutation. In contrast, we find that all PEs considered (learned absolute, sinusoidal, and rotary) are associated with a consistent shift toward an index-anchored spatial organization. Representations in these models remain stable under perturbations that disrupt content, and exhibit substantially improved robustness to such distributional shifts. We further show that while different PEs produce distinct depth-wise trajectories of spatial structure, their robustness properties are largely similar (with secondary variation across encoding schemes), suggesting that robustness appears to depend on the presence of a stable positional reference frame more than it depends on the specific encoding mechanism. These results offer a geometric account of how positional encodings shape internal representations, with implications for the principled design of future encoding schemes.

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

↑