๐ค AI Summary
This work addresses the limited interpretability of large language models (LLMs) in classification tasks by introducing dynamic mode decomposition (DMD)โa physics-inspired techniqueโinto the domain of LLM explanation. The proposed method decomposes hidden states via DMD to extract salient dynamic patterns and ranks input tokens based on their projections onto these critical modes, thereby yielding interpretable attributions for model predictions. Evaluated across three benchmark datasets and three prominent LLM architectures, the approach consistently outperforms established attribution methods such as principal component analysis (PCA), integrated gradients, and SHAP, demonstrating superior explanatory power and generalization capability.
๐ Abstract
In this work, we introduce DMDIntel which uses dynamic mode decomposition (DMD) to make the predictions made by LLMs in a classification task interpretable. It develops an input attribution pipeline, that first decomposes the hidden states of an LLM into prominent patterns, also known as modes, and then associates ranks to the input tokens based on the projection values on those modes. Rigorous experiments across three datasets and three model families consistently show that the ranked attribution of input tokens obtained using DMDIntel by far outperforms state-of-the-art techniques such as principal component analysis, integrated gradients and SHAP.