DoPE : Encodage de position rotative par débruitage
DoPE: Denoising Rotary Position Embedding
November 12, 2025
papers.authors: Jing Xiong, Liyang Fan, Hui Shen, Zunhai Su, Min Yang, Lingpeng Kong, Ngai Wong
cs.AI
papers.abstract
L'Embedding de Position Rotatif (RoPE) dans les modèles Transformer présente des limites inhérentes qui affaiblissent l'extrapolation en longueur. Nous réinterprétons la carte d'attention avec l'encodage positionnel comme une carte de caractéristiques bruitée, et proposons l'Encodage Positionnel de Dénuisation (DoPE), une méthode sans apprentissage basée sur l'entropie matricielle tronquée pour détecter les bandes de fréquence aberrantes dans la carte de caractéristiques. En exploitant les caractéristiques de bruit de la carte de caractéristiques, nous la reparamétrons ensuite avec une distribution gaussienne sans paramètre pour atteindre une extrapolation robuste. Notre méthode révèle théoriquement la cause sous-jacente du phénomène de puits d'attention et sa connexion à l'entropie matricielle tronquée. Les expériences sur des tâches d'apprentissage en contexte de type "aiguille dans une botte de foin" et d'apprentissage en contexte à nombreux exemples démontrent que DoPE améliore significativement la précision de récupération et la stabilité du raisonnement dans des contextes étendus (jusqu'à 64K tokens). Les résultats montrent que la stratégie de dénuisation pour les embeddings positionnels atténue efficacement les puits d'attention et restaure des schémas d'attention équilibrés, offrant une solution simple mais puissante pour améliorer la généralisation en longueur. Notre page de projet est disponible à l'adresse : https://The-physical-picture-of-LLMs.github.io
English
Rotary Position Embedding (RoPE) in Transformer models has inherent limits that weaken length extrapolation. We reinterpret the attention map with positional encoding as a noisy feature map, and propose Denoising Positional Encoding (DoPE), a training-free method based on truncated matrix entropy to detect outlier frequency bands in the feature map. Leveraging the noise characteristics of the feature map, we further reparameterize it with a parameter-free Gaussian distribution to achieve robust extrapolation. Our method theoretically reveals the underlying cause of the attention sink phenomenon and its connection to truncated matrix entropy. Experiments on needle-in-a-haystack and many-shot in-context learning tasks demonstrate that DoPE significantly improves retrieval accuracy and reasoning stability across extended contexts (up to 64K tokens). The results show that the denoising strategy for positional embeddings effectively mitigates attention sinks and restores balanced attention patterns, providing a simple yet powerful solution for improving length generalization. Our project page is Project: https://The-physical-picture-of-LLMs.github.io