Understanding and Patching Compositional Reasoning in LLMs

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Li, Zhaoyi, Jiang, Gangwei, Xie, Hong, Song, Linqi, Lian, Defu, Wei, Ying
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866914826471604224
author Li, Zhaoyi
Jiang, Gangwei
Xie, Hong
Song, Linqi
Lian, Defu
Wei, Ying
author_facet Li, Zhaoyi
Jiang, Gangwei
Xie, Hong
Song, Linqi
Lian, Defu
Wei, Ying
contents LLMs have marked a revolutonary shift, yet they falter when faced with compositional reasoning tasks. Our research embarks on a quest to uncover the root causes of compositional reasoning failures of LLMs, uncovering that most of them stem from the improperly generated or leveraged implicit reasoning results. Inspired by our empirical findings, we resort to Logit Lens and an intervention experiment to dissect the inner hidden states of LLMs. This deep dive reveals that implicit reasoning results indeed surface within middle layers and play a causative role in shaping the final explicit reasoning results. Our exploration further locates multi-head self-attention (MHSA) modules within these layers, which emerge as the linchpins in accurate generation and leveraing of implicit reasoning results. Grounded on the above findings, we develop CREME, a lightweight method to patch errors in compositional reasoning via editing the located MHSA modules. Our empirical evidence stands testament to CREME's effectiveness, paving the way for autonomously and continuously enhancing compositional reasoning capabilities in language models.
format Preprint
id arxiv_https___arxiv_org_abs_2402_14328
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Understanding and Patching Compositional Reasoning in LLMs
Li, Zhaoyi
Jiang, Gangwei
Xie, Hong
Song, Linqi
Lian, Defu
Wei, Ying
Computation and Language
LLMs have marked a revolutonary shift, yet they falter when faced with compositional reasoning tasks. Our research embarks on a quest to uncover the root causes of compositional reasoning failures of LLMs, uncovering that most of them stem from the improperly generated or leveraged implicit reasoning results. Inspired by our empirical findings, we resort to Logit Lens and an intervention experiment to dissect the inner hidden states of LLMs. This deep dive reveals that implicit reasoning results indeed surface within middle layers and play a causative role in shaping the final explicit reasoning results. Our exploration further locates multi-head self-attention (MHSA) modules within these layers, which emerge as the linchpins in accurate generation and leveraing of implicit reasoning results. Grounded on the above findings, we develop CREME, a lightweight method to patch errors in compositional reasoning via editing the located MHSA modules. Our empirical evidence stands testament to CREME's effectiveness, paving the way for autonomously and continuously enhancing compositional reasoning capabilities in language models.
title Understanding and Patching Compositional Reasoning in LLMs
topic Computation and Language
url https://arxiv.org/abs/2402.14328