ChatPaper.aiChatPaper

Positiebias van Taalmodellen Elimineren: Een Mechanistische Aanpak

Eliminating Position Bias of Language Models: A Mechanistic Approach

July 1, 2024
Auteurs: Ziqi Wang, Hanlin Zhang, Xiner Li, Kuan-Hao Huang, Chi Han, Shuiwang Ji, Sham M. Kakade, Hao Peng, Heng Ji
cs.AI

Samenvatting

Positiebias is een veelvoorkomend probleem gebleken bij moderne taalmmodellen (LMs), waarbij de modellen inhoud prioriteren op basis van de positie ervan binnen de gegeven context. Deze bias leidt vaak tot onverwachte modelfouten en schaadt de prestaties, robuustheid en betrouwbaarheid in diverse toepassingen. Onze mechanistische analyse schrijft de positiebias toe aan twee componenten die in bijna alle state-of-the-art LMs worden gebruikt: causale aandacht en relatieve positionele coderingen. Specifiek ontdekken we dat causale aandacht modellen over het algemeen doet neigen naar inhoud die verder weg staat, terwijl relatieve positionele coderingen zoals RoPE juist voorkeur geven aan nabije inhoud, gebaseerd op de analyse van retrieval-augmented vraag-antwoord (QA) taken. Verder toont ons empirisch onderzoek naar objectdetectie aan dat positiebias ook aanwezig is in visie-taalmmodellen (VLMs). Op basis van bovenstaande analyses stellen we voor om positiebias veroorzaakt door verschillende invoersegmentvolgordes (bijv. opties in LM-as-a-judge, opgehaalde documenten in QA) te ELIMINEREN op een TRAINING-FREE ZERO-SHOT manier. Onze methode verandert de causale aandacht in bidirectionele aandacht tussen segmenten en gebruikt modelaandachtswaarden om de relatieve volgorde van segmenten te bepalen in plaats van de volgorde die in de invoerprompts wordt gegeven, waardoor Position-INvariant inferencE (PINE) op segmentniveau mogelijk wordt. Door positiebias te elimineren, behalen modellen betere prestaties en betrouwbaarheid in downstream taken waar positiebias veel voorkomt, zoals LM-as-a-judge en retrieval-augmented QA. Opmerkelijk is dat PINE vooral nuttig is bij het aanpassen van LMs voor het evalueren van redeneerparen: het levert in de meeste gevallen consistent 8 tot 10 procentpunt prestatieverbetering op, en zorgt ervoor dat Llama-3-70B-Instruct zelfs beter presteert dan GPT-4-0125-preview op de RewardBench redeneersubset.
English
Position bias has proven to be a prevalent issue of modern language models (LMs), where the models prioritize content based on its position within the given context. This bias often leads to unexpected model failures and hurts performance, robustness, and reliability across various applications. Our mechanistic analysis attributes the position bias to two components employed in nearly all state-of-the-art LMs: causal attention and relative positional encodings. Specifically, we find that causal attention generally causes models to favor distant content, while relative positional encodings like RoPE prefer nearby ones based on the analysis of retrieval-augmented question answering (QA). Further, our empirical study on object detection reveals that position bias is also present in vision-language models (VLMs). Based on the above analyses, we propose to ELIMINATE position bias caused by different input segment orders (e.g., options in LM-as-a-judge, retrieved documents in QA) in a TRAINING-FREE ZERO-SHOT manner. Our method changes the causal attention to bidirectional attention between segments and utilizes model attention values to decide the relative orders of segments instead of using the order provided in input prompts, therefore enabling Position-INvariant inferencE (PINE) at the segment level. By eliminating position bias, models achieve better performance and reliability in downstream tasks where position bias widely exists, such as LM-as-a-judge and retrieval-augmented QA. Notably, PINE is especially useful when adapting LMs for evaluating reasoning pairs: it consistently provides 8 to 10 percentage points performance gains in most cases, and makes Llama-3-70B-Instruct perform even better than GPT-4-0125-preview on the RewardBench reasoning subset.
PDF91November 28, 2024