Noiser: Bounded Input Perturbations for Attributing Large Language Models

Mohammad Reza Ghasemi Madani, Aryo Pradipta Gema, Yu Zhao, Gabriele Sarti, Pasquale Minervini, Andrea Passerini

TL;DR

This paper introduces NOISER, a novel perturbation-based method for explaining how Large Language Models (LLMs) make predictions. By adding carefully bounded noise to input embeddings and observing model robustness, NOISER generates more faithful attributions than existing methods. They also propose "answerability," a new metric to assess if these attributions are sufficient for prediction, showing NOISER excels here too.

What Problem Does This Paper Address?

Explaining the decisions of Large Language Models (LLMs) is crucial for trust and debugging. Feature attribution (FA) methods aim to do this by assigning importance scores to input tokens. However, many existing FA methods struggle with the discrete nature of text, leading to "out-of-distribution" (OOD) issues when perturbing inputs, which can distort explanations. The authors address this by developing a perturbation-based FA method that uses bounded noise to keep perturbed inputs within a reasonable range, ensuring more reliable explanations that reflect the model's actual behavior. They also tackle the challenge of evaluating how well these attributions actually explain the prediction, introducing a new metric called "answerability."

Methods

The core of NOISER is a perturbation-based approach. Instead of simply removing or altering tokens, NOISER injects small, bounded noise into the embeddings of input tokens. The key idea is to find a "sweet spot" where the input is perturbed just enough to potentially flip the model's prediction, but not so much that it becomes completely nonsensical (OOD). This is achieved by:

  1. Finding the Maximum Scaling Factor (k): For each token, they find the largest scaling factor k such that adding k * noise to its embedding does not change the model's original prediction.
  2. Determining the Minimum Scaling Factor (k_min): They then find the minimum k across all tokens (k_min). This k_min represents the smallest perturbation that could cause a prediction flip, indicating the most sensitive tokens.
  3. Calculating Attribution Scores: The importance score for each token is then calculated based on the change in the model's output probability when this k_min noise is applied.

To evaluate the quality of these attributions, the authors introduce Answerability. This metric uses a separate "judge" LLM. The judge is given a subset of the original prompt (selected based on the FA scores) and asked to predict the completion. The "answerability rate" measures how often the judge gets the correct prediction, and the "answerability score" quantifies how much importance mass is concentrated on the tokens needed for the correct prediction.

Datasets

The paper evaluates NOISER on three datasets:

  • KNOWN: A dataset for text classification.
  • LONGRA (Long-Range Agreement): A dataset focusing on word pair relationships, including distractor sentences to test robustness.
  • WIKIBIO: A dataset for text generation, where models continue biographies.

Key Insights and Ideas

  • Bounded Perturbations are Key for NLP: Unlike in computer vision where noise can be more easily managed, text requires careful bounding to avoid OOD issues. NOISER's approach of finding a "prediction flip point" with bounded noise is crucial for faithful attribution in NLP.
  • Answerability as a Proxy for Human Judgment: The proposed "answerability" metric offers a scalable way to assess if an attribution is not just statistically correlated with the prediction, but if the attributed tokens are semantically sufficient to arrive at that prediction, mimicking human intuition.
  • NOISER's Robustness: The method is designed to be robust to the inherent noise and variability in LLM predictions, making it more reliable than methods that might be sensitive to minor fluctuations.

Key Results

  • Faithfulness: NOISER consistently outperformed nine other popular FA methods (gradient-based, attention-based, and perturbation-based) across six LLMs and three tasks in terms of faithfulness. For example, on the KNOWN dataset, NOISER achieved an average faithfulness score of 1.8103, significantly higher than other methods.
  • Answerability: NOISER also achieved the highest answerability score on the KNOWN dataset, indicating that its attributions are more concentrated on the truly important tokens. While Occlusion had a higher answerability rate (meaning more samples were deemed answerable), NOISER's score suggests its answerable attributions were more precise.
  • Efficiency: While perturbation-based methods are generally more computationally demanding, NOISER's runtime can be sped up by reducing binary search steps with a minimal trade-off in faithfulness.

Limitations and Future Work

  • Model-Dependent Bounding: The k_min parameter is model-dependent. The paper explores norm-bounding as a more flexible alternative, but k_min remains the most reliable configuration.
  • Answerability Rate vs. Score: While NOISER excels in answerability score, it slightly trails Occlusion in answerability rate. Future work could explore bridging this gap.
  • Computational Cost: Perturbation-based methods, including NOISER, are inherently more computationally intensive than gradient or attention-based methods. Further optimization for speed is a potential area for future research.

Summary updated

BibTeX
@inproceedings{madani2025noiser,
  author = {Mohammad Reza Ghasemi Madani and Aryo Pradipta Gema and Yu Zhao and Gabriele Sarti and Pasquale Minervini and Andrea Passerini},
  title = {{Noiser: Bounded Input Perturbations for Attributing Large Language Models}},
  booktitle = {COLM},
  year = {2025},
  url = {https://openreview.net/forum?id=17yFbHmblo},
}
Figure