Paper Reading AI Learner

Grad-ELLM: Gradient-based Explanations for Decoder-only LLMs

2026-01-06 15:22:39
Xin Huang, Antoni B. Chan

Abstract

Large Language Models (LLMs) have demonstrated remarkable capabilities across diverse tasks, yet their black-box nature raises concerns about transparency and faithfulness. Input attribution methods aim to highlight each input token's contributions to the model's output, but existing approaches are typically model-agnostic, and do not focus on transformer-specific architectures, leading to limited faithfulness. To address this, we propose Grad-ELLM, a gradient-based attribution method for decoder-only transformer-based LLMs. By aggregating channel importance from gradients of the output logit with respect to attention layers and spatial importance from attention maps, Grad-ELLM generates heatmaps at each generation step without requiring architectural modifications. Additionally, we introduce two faithfulneses metrics $\pi$-Soft-NC and $\pi$-Soft-NS, which are modifications of Soft-NC/NS that provide fairer comparisons by controlling the amount of information kept when perturbing the text. We evaluate Grad-ELLM on sentiment classification, question answering, and open-generation tasks using different models. Experiment results show that Grad-ELLM consistently achieves superior faithfulness than other attribution methods.

Abstract (translated)

大型语言模型(LLMs)在各种任务上展现了卓越的能力,但其黑盒特性引发了关于透明度和忠实性的担忧。输入归因方法旨在突出每个输入标记对模型输出的贡献,然而现有的方法通常是无模型特定的,不专注于变压器架构特有的属性,导致了忠实性方面的限制。为了解决这些问题,我们提出了Grad-ELLM,这是一种基于梯度的针对解码器独立的Transformer基础LLM的归因方法。通过聚合输出逻辑与注意力层相关的梯度所计算出的通道重要性和从注意力图谱中得出的空间重要性,Grad-ELLM能够在不进行架构修改的情况下,在每次生成步骤时产生热力图。 此外,我们还引入了两种忠实性衡量标准$\pi$-Soft-NC和$\pi$-Soft-NS,它们是对Soft-NC/NS的改进版本,通过控制在扰动文本时保留的信息量,提供了更公平的比较方式。我们在不同的模型上使用情感分类、问答和开放生成任务来评估Grad-ELLM的表现。 实验结果显示,与其它归因方法相比,Grad-ELLM在忠实性方面始终表现得更为优秀。

URL

https://arxiv.org/abs/2601.03089

PDF

https://arxiv.org/pdf/2601.03089.pdf


Tags
3D Action Action_Localization Action_Recognition Activity Adversarial Agent Attention Autonomous Bert Boundary_Detection Caption Chat Classification CNN Compressive_Sensing Contour Contrastive_Learning Deep_Learning Denoising Detection Dialog Diffusion Drone Dynamic_Memory_Network Edge_Detection Embedding Embodied Emotion Enhancement Face Face_Detection Face_Recognition Facial_Landmark Few-Shot Gait_Recognition GAN Gaze_Estimation Gesture Gradient_Descent Handwriting Human_Parsing Image_Caption Image_Classification Image_Compression Image_Enhancement Image_Generation Image_Matting Image_Retrieval Inference Inpainting Intelligent_Chip Knowledge Knowledge_Graph Language_Model LLM Matching Medical Memory_Networks Multi_Modal Multi_Task NAS NMT Object_Detection Object_Tracking OCR Ontology Optical_Character Optical_Flow Optimization Person_Re-identification Point_Cloud Portrait_Generation Pose Pose_Estimation Prediction QA Quantitative Quantitative_Finance Quantization Re-identification Recognition Recommendation Reconstruction Regularization Reinforcement_Learning Relation Relation_Extraction Represenation Represenation_Learning Restoration Review RNN Robot Salient Scene_Classification Scene_Generation Scene_Parsing Scene_Text Segmentation Self-Supervised Semantic_Instance_Segmentation Semantic_Segmentation Semi_Global Semi_Supervised Sence_graph Sentiment Sentiment_Classification Sketch SLAM Sparse Speech Speech_Recognition Style_Transfer Summarization Super_Resolution Surveillance Survey Text_Classification Text_Generation Time_Series Tracking Transfer_Learning Transformer Unsupervised Video_Caption Video_Classification Video_Indexing Video_Prediction Video_Retrieval Visual_Relation VQA Weakly_Supervised Zero-Shot