Understanding how Large Language Models (LLMs) process information from prompts remains a significant challenge. To shed light on this "black box," attention visualization techniques have been developed to capture neuron-level perceptions and interpret how models focus on different parts of input data. However, many existing techniques are tailored to specific model architectures, particularly within the Transformer family, and often require backpropagation, resulting in nearly double the GPU memory usage and increased computational cost. A lightweight, model-agnostic approach for attention visualization remains lacking. In this paper, we introduce a model-agnostic token importance visualization technique to better understand how generative AI systems perceive and prioritize information from input text, without incurring additional computational cost. Our method leverages perturbation-based strategies combined with a three-matrix analytical framework to generate relevance maps that illustrate token-level contributions to model predictions. The framework comprises: (1) the Angular Deviation Matrix, which captures shifts in semantic direction; (2) the Magnitude Deviation Matrix, which measures changes in semantic intensity; and (3) the Dimensional Importance Matrix, which evaluates contributions across individual vector dimensions. By systematically removing each token and measuring the resulting impact across these three complementary dimensions, we derive a composite importance score that provides a nuanced and mathematically grounded measure of token significance. To support reproducibility and foster wider adoption, we provide open-source implementations of all proposed and utilized explainability techniques, with code and resources publicly available at https://github.com/Infosys/Infosys-Responsible-AI-Toolkit
CLT-Forge: A Scalable Library for Cross-Layer Transcoders and Attribution Graphs
Max Planck Institute for Intelligent Systems(马克斯·普朗克智能系统研究所);Jinesis AI Lab(Jinesis人工智能实验室);University of Toronto(多伦多大学);Vector Institute(向量研究所);CMU(卡内基梅隆大学);EuroSafeAI;ELLIS Institute Tübingen(图宾根ELLIS研究所)
Human Interpretation of Saliency-based Explanation Over Text
Bosch Center for Artificial Intelligence(博世人工智能中心);University of Stuttgart(斯图加特大学);Bar Ilan University(巴伊兰大学);Allen Institute for Artificial Intelligence(艾伦人工智能研究所)