Introduction
Large Language Models (LLMs) are increasingly adapted to specific tasks through "prompt tuning," where a sequence of continuous "soft prompt" tokens is prepended to the input. Unlike discrete text prompts, these soft prompts consist of learned vectors optimized via backpropagation. While highly efficient—requiring no updates to the underlying model's billions of parameters—these prompts are essentially "black boxes." They lack human-readable semantics, making it difficult for developers to understand the model's logic or identify potential biases.
This paper introduces InSPEcT (Inspecting Soft Prompts by Eliciting Task descriptions), a novel framework designed to bridge this interpretability gap. By leveraging the model's own internal representations, InSPEcT generates natural language descriptions of the task a soft prompt is performing.
The InSPEcT Framework
The core innovation of InSPEcT lies in its use of Patchscopes, a technique that treats the LLM as its own interpreter. Rather than attempting to map individual prompt vectors to the closest vocabulary words—a method that often yields incoherent results—InSPEcT analyzes the collective "hidden state" generated by the prompt.
The process involves four key steps:
- Source Pass: The model processes the continuous prompt, and hidden representations are captured at a specific layer.
- Target Pass: A separate "target prompt" is constructed to elicit task descriptions (e.g., using few-shot examples of task labeling).
- Patching: The captured vectors from the source pass are injected into the target pass.
- Generation: The model generates a description, steered by the injected task-specific information.
Experimental Setup and Datasets
The researchers evaluated InSPEcT across a diverse set of NLP classification benchmarks to test its robustness, including sentiment analysis (SST-2, SST-5), topic classification (AGNews), and subjectivity detection (Subj). They also utilized the SNLI dataset specifically to investigate whether InSPEcT could reveal spurious correlations and model bias.
Results and Key Insights
The study revealed several critical properties of soft prompt interpretability. Most notably, the researchers found a strong positive correlation between a prompt's task performance and its "articulateness."
Interpretability Scales with Performance
As shown in the experimental results, prompts with higher accuracy yielded descriptions with higher ROUGE-1 scores (reaching 0.8 to 0.9 in some cases) and better Class Rate (the ability to identify all possible output labels). This suggests that as a model learns a task more effectively, its internal representation of that task becomes more coherent and easier to decode into natural language.
The Compression Hypothesis
The authors observed that longer prompts (e.g., 56 tokens vs. 7 tokens) generally led to more accurate descriptions. They propose a "compression hypothesis": shorter prompts force the model to pack multiple task features into a limited number of vectors, leading to "muffled" signals. Longer prompts allow these features to be distributed, making them more accessible for elicitation.
Debugging Model Bias
InSPEcT proved to be a powerful tool for detecting "shortcut learning." When trained on the biased SNLI dataset, the elicited descriptions often explicitly mentioned biased features. The presence of these "biased words" in a description was a statistically significant predictor of the model's likelihood to make biased errors on new data ($p < 10^{-10}$).
Conclusion and Future Directions
InSPEcT demonstrates that the "black box" of soft prompts is not impenetrable. By using the model's own internal logic, developers can gain a high-fidelity view of what a prompt has learned. While currently focused on classification, future work could extend this to generative tasks and move toward "causal intervention," where descriptions are used to actively edit and improve prompt behavior.
Summary updated