Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

Position IDs Matter: An Enhanced Position Layout for Efficient Context Compression in Large Language Models

About

Using special tokens (e.g., gist, memory, or compressed tokens) to compress context information is a common practice for large language models (LLMs). However, existing approaches often neglect that position encodings inherently induce local inductive biases in models, causing the compression process to ignore holistic contextual dependencies. We propose \textbf{Enhanced Position Layout (EPL)}, a simple yet effective method that improves the context compression capability of LLMs by only adjusting position IDs, the numerical identifiers that specify token positions. EPL minimizes the distance between context tokens and their corresponding special tokens and at the same time maintains the sequence order in position IDs between context tokens, special tokens, and the subsequent tokens. Integrating EPL into our best performing context compression model results in a 1.9 ROUGE-1 F1 improvement on out-of-domain question answering datasets on average. When extended to multimodal scenarios, EPL leads to an average accuracy gain of 2.6 points for vision compression LLMs.

Runsong Zhao, Xin Liu, Xinyu Liu, Pengcheng Huang, Chunyang Xiao, Tong Xiao, Jingbo Zhu• 2024

Related benchmarks

TaskDatasetResultRank
Question AnsweringTextbookQA MRQA out-of-domain evaluation
EM25.42
37
Question AnsweringRelExt MRQA out-of-domain evaluation
EM46.34
37
Question AnsweringMRQA 2019 (dev)--
32
Question AnsweringDuoRC MRQA out-of-domain evaluation
EM16.39
23
Question AnsweringMRQA Average across 6 domains
EM23.83
23
Question AnsweringRACE MRQA out-of-domain evaluation
EM4.01
23
Question AnsweringDROP MRQA out-of-domain evaluation
EM22.29
23
Long-context SummarizationGovReport
ROUGE-1 Score20.4
12
Question AnsweringMRQA In-domain
F1 Score62.9
12
Question AnsweringMRQA Out-of-domain
F1 Score46.95
12
Showing 10 of 14 rows

Other info

Follow for update