paper-with-me

Papers

Information Entropy Invariance: Enhancing Length Extrapolation in Attention Mechanisms

2025-01-15 · Kewei Li, Yanwen Kong, Yiping Xu, Jianlin Su, Lan Huang, Ruochi Zhang, Fengfeng Zhou

Since the emergence of research on improving the length extrapolation capabilities of large language models in 2021, some studies have made modifications to the scaling factor in the scaled dot-product attention mechanism as part of their proposed methods without rigorous theoretical justifications. To fill this gap, we propose two new scaled temperatures based on information entropy invariance to enhance length extrapolation. First, a training-free method InfoScale is designed for dotproduct attention, and preserves focus on original tokens during length extrapolation by ensuring consistent entropy. Second, we theoretically analyze the impact of scaling (CosScale) on cosine attention. Experimental data demonstrates that combining InfoScale and CosScale achieves state-ofthe-art performance on the GAU-{\alpha} model with a context window extended to 64 times the training length, and outperforms seven existing methods. Our analysis reveals that significantly increasing CosScale approximates the Windowed Attention, and highlights the significance of attention score dilution as a key challenge in long-range context handling. The code and data are available at https://github.com/HT-NEKO/ Information-Entropy-Invariance.

📄 PDF Abstract BibTeX arXiv:2501.08570

Code (1)

ht-neko/information-entropy-invariance 공식 구현 pytorch

Methods 이 논문이 사용한 방법론

Attention 설명 없음
Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Focus 설명 없음

Similar Papers 제목 키워드 기반

Softplus Attention with Re-weighting Boosts Length Extrapolation in Large Language Models

2025-01-23 · Bo Gao, Michael W. Spratling

Large language models have achieved remarkable success in recent years, primarily due to the implementation of self-attention mechanisms. However, traditional Softmax attention suffers from numerical instability and redu…

Measuring Grammatical Diversity from Small Corpora: Derivational Entropy Rates, Mean Length of Utterances, and Annotation Invariance

2024-12-08 · Fermin Moscoso del Prado Martin

In many fields, such as language acquisition, neuropsychology of language, the study of aging, and historical linguistics, corpora are used for estimating the diversity of grammatical structures that are produced during …

DiversityLanguage Acquisition

Upper Bound of Entropy Rate Revisited ---A New Extrapolation of Compressed Large-Scale Corpora---

2016-12-01 · WS 2016 12 · Ryosuke Takahira, Kumiko Tanaka-Ishii, {\L}ukasz D{\k{e}}bowski

The article presents results of entropy rate estimation for human languages across six languages by using large, state-of-the-art corpora of up to 7.8 gigabytes. To obtain the estimates for data length tending to infinit…

LEDiT: Your Length-Extrapolatable Diffusion Transformer without Positional Encoding

2025-03-06 · Shen Zhang, Yaning Tan, Siyuan Liang, Linze Li 외

Diffusion transformers(DiTs) struggle to generate images at resolutions higher than their training resolutions. The primary obstacle is that the explicit positional encodings(PE), such as RoPE, need extrapolation which d…

BEE-RAG: Balanced Entropy Engineering for Retrieval-Augmented Generation

2025-08-07 · Yuhao Wang, Ruiyang Ren, Yucheng Wang, Jing Liu 외 arxiv

With the rapid advancement of large language models (LLMs), retrieval-augmented generation (RAG) has emerged as a critical approach to supplement the inherent knowledge limitations of LLMs. However, due to the typically …