Cognitive Mirrors: Exploring the Diverse Functional Roles of Attention Heads in LLM Reasoning

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Ma, Xueqi, Wang, Jun, Jiang, Yanbei, Erfani, Sarah Monazam, Liu, Tongliang, Bailey, James
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866911315519340544
author Ma, Xueqi
Wang, Jun
Jiang, Yanbei
Erfani, Sarah Monazam
Liu, Tongliang
Bailey, James
author_facet Ma, Xueqi
Wang, Jun
Jiang, Yanbei
Erfani, Sarah Monazam
Liu, Tongliang
Bailey, James
contents Large language models (LLMs) have achieved state-of-the-art performance in a variety of tasks, but remain largely opaque in terms of their internal mechanisms. Understanding these mechanisms is crucial to improve their reasoning abilities. Drawing inspiration from the interplay between neural processes and human cognition, we propose a novel interpretability framework to systematically analyze the roles and behaviors of attention heads, which are key components of LLMs. We introduce CogQA, a dataset that decomposes complex questions into step-by-step subquestions with a chain-of-thought design, each associated with specific cognitive functions such as retrieval or logical reasoning. By applying a multi-class probing method, we identify the attention heads responsible for these functions. Our analysis across multiple LLM families reveals that attention heads exhibit functional specialization, characterized as cognitive heads. These cognitive heads exhibit several key properties: they are universally sparse, vary in number and distribution across different cognitive functions, and display interactive and hierarchical structures. We further show that cognitive heads play a vital role in reasoning tasks - removing them leads to performance degradation, while augmenting them enhances reasoning accuracy. These insights offer a deeper understanding of LLM reasoning and suggest important implications for model design, training, and fine-tuning strategies.
format Preprint
id arxiv_https___arxiv_org_abs_2512_10978
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Cognitive Mirrors: Exploring the Diverse Functional Roles of Attention Heads in LLM Reasoning
Ma, Xueqi
Wang, Jun
Jiang, Yanbei
Erfani, Sarah Monazam
Liu, Tongliang
Bailey, James
Neurons and Cognition
Artificial Intelligence
Large language models (LLMs) have achieved state-of-the-art performance in a variety of tasks, but remain largely opaque in terms of their internal mechanisms. Understanding these mechanisms is crucial to improve their reasoning abilities. Drawing inspiration from the interplay between neural processes and human cognition, we propose a novel interpretability framework to systematically analyze the roles and behaviors of attention heads, which are key components of LLMs. We introduce CogQA, a dataset that decomposes complex questions into step-by-step subquestions with a chain-of-thought design, each associated with specific cognitive functions such as retrieval or logical reasoning. By applying a multi-class probing method, we identify the attention heads responsible for these functions. Our analysis across multiple LLM families reveals that attention heads exhibit functional specialization, characterized as cognitive heads. These cognitive heads exhibit several key properties: they are universally sparse, vary in number and distribution across different cognitive functions, and display interactive and hierarchical structures. We further show that cognitive heads play a vital role in reasoning tasks - removing them leads to performance degradation, while augmenting them enhances reasoning accuracy. These insights offer a deeper understanding of LLM reasoning and suggest important implications for model design, training, and fine-tuning strategies.
title Cognitive Mirrors: Exploring the Diverse Functional Roles of Attention Heads in LLM Reasoning
topic Neurons and Cognition
Artificial Intelligence
url https://arxiv.org/abs/2512.10978