Document detail
ID

oai:arXiv.org:2406.02536

Topic
Computer Science - Computation and... Computer Science - Machine Learnin...
Author
Yu, Yijiong Jiang, Huiqiang Luo, Xufang Wu, Qianhui Lin, Chin-Yew Li, Dongsheng Yang, Yuqing Huang, Yongfeng Qiu, Lili
Category

Computer Science

Year

2024

listing date

10/23/2024

Keywords
language hidden models position
Metrics

Abstract

Large Language Models (LLMs) are increasingly applied in various real-world scenarios due to their excellent generalization capabilities and robust generative abilities.

However, they exhibit position bias, also known as "lost in the middle", a phenomenon that is especially pronounced in long-context scenarios, which indicates the placement of the key information in different positions of a prompt can significantly affect accuracy.

This paper first explores the micro-level manifestations of position bias, concluding that attention weights are a micro-level expression of position bias.

It further identifies that, in addition to position embeddings, causal attention mask also contributes to position bias by creating position-specific hidden states.

Based on these insights, we propose a method to mitigate position bias by scaling this positional hidden states.

Experiments on the NaturalQuestions Multi-document QA, KV retrieval, LongBench and timeline reorder tasks, using various models including RoPE models, context windowextended models, and Alibi models, demonstrate the effectiveness and generalizability of our approach.

Our method can improve performance by up to 15.2% by modifying just one dimension of hidden states.

Our code is available at https://aka.ms/PositionalHidden.

Yu, Yijiong,Jiang, Huiqiang,Luo, Xufang,Wu, Qianhui,Lin, Chin-Yew,Li, Dongsheng,Yang, Yuqing,Huang, Yongfeng,Qiu, Lili, 2024, Mitigate Position Bias in Large Language Models via Scaling a Single Dimension

Document

Open

Share

Source

Articles recommended by ES/IODE AI

High-Frequency Repetitive Magnetic Stimulation at the Sacrum Alleviates Chronic Constipation in Parkinson’s Patients
magnetic stimulation parkinson’s significant patients scale sacrum pd hf-rms chronic constipation scores
The mechanism of PFK-1 in the occurrence and development of bladder cancer by regulating ZEB1 lactylation
bladder cancer pfk-1 zeb1 lactylation glycolysis inhibits lactate glucose bc pfk-1 cancer lactylation cells bladder