paper-with-me

Papers

From Interpolation to Extrapolation: Complete Length Generalization for Arithmetic Transformers

2023-10-18 · Shaoxiong Duan, Yining Shi, Wei Xu

In this paper, we investigate the inherent capabilities of transformer models in learning arithmetic algorithms, such as addition and parity. Through experiments and attention analysis, we identify a number of crucial factors for achieving optimal length generalization. We show that transformer models are able to generalize to long lengths with the help of targeted attention biasing. In particular, our solution solves the Parity task, a well-known and theoretically proven failure mode for Transformers. We then introduce Attention Bias Calibration (ABC), a calibration stage that enables the model to automatically learn the proper attention biases, which we show to be connected to mechanisms in relative position encoding. We demonstrate that using ABC, the transformer model can achieve unprecedented near-perfect length generalization on certain arithmetic tasks. In addition, we show that ABC bears remarkable similarities to RPE and LoRA, which may indicate the potential for applications to more complex tasks.

📄 PDF Abstract BibTeX arXiv:2310.11984

Code (1)

shaoxiongduan/attentionbiascalibration 공식 구현 pytorch

Tasks

Position

Methods 이 논문이 사용한 방법론

ABC Class of methods in Bayesian Statistics where the posterior distribution is approximated over a rejection scheme on simulations because the likelihood function is…

Similar Papers 제목 키워드 기반

DynaGen: Unifying Temporal Knowledge Graph Reasoning with Dynamic Subgraphs and Generative Regularization

2025-12-14 · Jiawei Shen, Jia Zhu, Hanghui Guo, Weijie Shi 외 arxiv

Temporal Knowledge Graph Reasoning (TKGR) aims to complete missing factual elements along the timeline. Depending on the temporal position of the query, the task is categorized into interpolation and extrapolation. Exist…

Position Interpolation Improves ALiBi Extrapolation

2023-10-18 · Faisal Al-Khateeb, Nolan Dey, Daria Soboleva, Joel Hestness

Linear position interpolation helps pre-trained models using rotary position embeddings (RoPE) to extrapolate to longer sequence lengths. We propose using linear position interpolation to extend the extrapolation range o…

Language ModellingPositionRetrieval

Learning in High Dimension Always Amounts to Extrapolation

2021-10-18 · Randall Balestriero, Jerome Pesenti, Yann Lecun

The notion of interpolation and extrapolation is fundamental in various fields from deep learning to function approximation. Interpolation occurs for a sample $x$ whenever this sample falls inside or on the boundary of t…

Vocal Bursts Intensity Prediction

A Minimalist Dataset for Systematic Generalization of Perception, Syntax, and Semantics

2021-03-02 · Qing Li, Siyuan Huang, Yining Hong, Yixin Zhu 외

Inspired by humans' exceptional ability to master arithmetic and generalize to new problems, we present a new dataset, Handwritten arithmetic with INTegers (HINT), to examine machines' capability of learning generalizabl…

Few-Shot LearningProgram SynthesisSystematic Generalization

Extending Context Window of Large Language Models via Positional Interpolation

2023-06-27 · Shouyuan Chen, Sherman Wong, Liangjian Chen, Yuandong Tian

We present Position Interpolation (PI) that extends the context window sizes of RoPE-based pretrained LLMs such as LLaMA models to up to 32768 with minimal fine-tuning (within 1000 steps), while demonstrating strong empi…

Document SummarizationLanguage ModelingLanguage ModellingPosition+1