Word Importance Explains How Prompts Affect Language Model Outputs
Stefan HackmannHaniyeh MahmoudianMark SteadmanMichael Schmidt
Stefan Hackmann
Haniyeh Mahmoudian
Mark Steadman
Michael Schmidt
+4
This paper introduces a method to explain how individual prompt words affect LLM outputs by masking each word and measuring the statistical change in an arbitrary text score (e.g., bias, readability, verbosity). Inspired by permutation importance, the approach aggregates scores over multiple user inputs, works even when attention weights are unavailable, and decomposes word importance into specific evaluation metrics. Experiments confirm that the resulting importance scores align with expected suffix effects across different models and scoring functions.

arXiv ·
· March 5, 2024