Latent Attribution Regularization: Cross-Domain Attribution-Consistency Training for Stable NLP Explanations
This paper introduces Latent Attribution Regularization (LAR), a training-time method that enforces attribution consistency under semantically preserving synonym substitutions, demonstrating that it significantly improves the stability of gradient-based explanations in fine-tuned Transformers without compromising model accuracy, while also establishing that proper token alignment is essential for accurately measuring such stability.
Original paper licensed under CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
In the world of artificial intelligence, a common way to understand how a computer makes a decision is to look at which parts of the input it paid the most attention to. Imagine a machine reading a sentence and deciding if it is happy or sad; researchers can generate a map showing which words the model considered most important for that judgment. These maps, known as feature attributions, are increasingly used to explain AI decisions to people. However, a troubling pattern has emerged: if you slightly change the sentence by swapping a word for a synonym that means the same thing, the map often changes completely. The computer might suddenly point to a different word as the reason for its decision, even though the meaning of the sentence and the final answer have not changed. This makes the explanation feel untrustworthy, as if the AI is unreliable or confused, when in reality, the change might be an illusion created by how the computer reads the text.
A new study by independent researcher Junaid Hassan investigates this problem, revealing that much of the apparent instability is actually a measurement error caused by how computers break down words. Modern language models do not read whole words like humans do; instead, they chop text into smaller pieces called subword tokens. When a single word is replaced with a synonym, the number of these small pieces can change, shifting the position of every single token that follows. If researchers compare the importance scores of words based on their position in the list, they are often comparing the wrong things entirely, like matching the first page of one book to the second page of another. The researcher developed a method to fix this by matching words based on their actual identity rather than their position, and found that the stability of these explanations was far better than previously thought.
Building on this corrected way of measuring, the study introduces a new training technique called Latent Attribution Regularization. This method teaches the AI model to keep its explanation maps consistent, even when the input text is slightly altered with synonyms. During the training process, the model is shown a sentence and a slightly changed version of that sentence, and it is rewarded if the importance scores for the unchanged words remain similar in both versions. This is done alongside the standard task of learning to classify the sentiment of the text correctly. The goal is not just to get the right answer, but to ensure the reasoning behind that answer stays steady when the wording shifts.
The researcher tested this approach using a model called DistilBERT on a dataset of movie reviews. The experiments were run at two different scales: a smaller test with 1,500 examples and a larger, more realistic test with 20,000 examples. In both cases, the model was trained with and without the new consistency technique. The results showed that the models trained with the consistency technique produced significantly more stable explanations. When the text was altered with light, medium, or heavy amounts of synonym substitutions, the explanations remained consistent far more often than those from models trained without the technique. For instance, in the larger test, the stability improvement grew as the text changes became more difficult, showing a clear benefit under harder conditions.
Crucially, this improvement in stability did not come at the cost of the model's ability to understand the text. The models trained with the new technique achieved the same high accuracy in classifying movie reviews as the models trained without it. In the larger experiment, both groups reached an accuracy of around 82 percent, proving that the model could learn to be more consistent without forgetting how to do its main job. The study also confirmed that the initial finding of extreme instability was indeed an artifact of the measurement method; once the alignment was corrected, the baseline stability was already high, but the new training method pushed it even higher.
The findings suggest that for developers building AI systems that explain their decisions to users, there is a practical way to make those explanations more reliable. By adding this consistency check during the training phase, the AI can learn to ignore the noise caused by minor wording changes and focus on the true meaning. The researcher notes that while this work was done on a specific type of model and a single task, the method offers a low-risk addition to standard training that could make AI explanations more trustworthy for real-world applications. The study concludes that the instability often blamed on the AI models themselves may have been a trick of the measurement, and that with the right tools and training, we can build systems that explain themselves with greater steadiness.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.