Learning to Focus: Causal Attention Distillation via Gradient-Guided Token Pruning

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Guo, Yiju, Yang, Wenkai, Sun, Zexu, Ding, Ning, Liu, Zhiyuan, Lin, Yankai
Format: Preprint
Published: 2025
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866908608427458560
author Guo, Yiju
Yang, Wenkai
Sun, Zexu
Ding, Ning
Liu, Zhiyuan
Lin, Yankai
author_facet Guo, Yiju
Yang, Wenkai
Sun, Zexu
Ding, Ning
Liu, Zhiyuan
Lin, Yankai
contents Large language models (LLMs) have demonstrated significant improvements in contextual understanding. However, their ability to attend to truly critical information during long-context reasoning and generation still falls behind the pace. Specifically, our preliminary experiments reveal that certain distracting patterns can misdirect the model's attention during inference, and removing these patterns substantially improves reasoning accuracy and generation quality. We attribute this phenomenon to spurious correlations in the training data, which obstruct the model's capacity to infer authentic causal instruction-response relationships. This phenomenon may induce redundant reasoning processes, potentially resulting in significant inference overhead and, more critically, the generation of erroneous or suboptimal responses. To mitigate this, we introduce a two-stage framework called Learning to Focus (LeaF) leveraging intervention-based inference to disentangle confounding factors. In the first stage, LeaF employs gradient-based comparisons with an advanced teacher to automatically identify confounding tokens based on causal relationships in the training corpus. Then, in the second stage, it prunes these tokens during distillation to enact intervention, aligning the student's attention with the teacher's focus distribution on truly critical context tokens. Experimental results demonstrate that LeaF not only achieves an absolute improvement in various mathematical reasoning, code generation and multi-hop question answering benchmarks but also effectively suppresses attention to confounding tokens during inference, yielding a more interpretable and reliable reasoning model.
format Preprint
id arxiv_https___arxiv_org_abs_2506_07851
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Learning to Focus: Causal Attention Distillation via Gradient-Guided Token Pruning
Guo, Yiju
Yang, Wenkai
Sun, Zexu
Ding, Ning
Liu, Zhiyuan
Lin, Yankai
Computation and Language
Large language models (LLMs) have demonstrated significant improvements in contextual understanding. However, their ability to attend to truly critical information during long-context reasoning and generation still falls behind the pace. Specifically, our preliminary experiments reveal that certain distracting patterns can misdirect the model's attention during inference, and removing these patterns substantially improves reasoning accuracy and generation quality. We attribute this phenomenon to spurious correlations in the training data, which obstruct the model's capacity to infer authentic causal instruction-response relationships. This phenomenon may induce redundant reasoning processes, potentially resulting in significant inference overhead and, more critically, the generation of erroneous or suboptimal responses. To mitigate this, we introduce a two-stage framework called Learning to Focus (LeaF) leveraging intervention-based inference to disentangle confounding factors. In the first stage, LeaF employs gradient-based comparisons with an advanced teacher to automatically identify confounding tokens based on causal relationships in the training corpus. Then, in the second stage, it prunes these tokens during distillation to enact intervention, aligning the student's attention with the teacher's focus distribution on truly critical context tokens. Experimental results demonstrate that LeaF not only achieves an absolute improvement in various mathematical reasoning, code generation and multi-hop question answering benchmarks but also effectively suppresses attention to confounding tokens during inference, yielding a more interpretable and reliable reasoning model.
title Learning to Focus: Causal Attention Distillation via Gradient-Guided Token Pruning
topic Computation and Language
url https://arxiv.org/abs/2506.07851