ADAPT: Hybrid Prompt Optimization for LLM Feature Visualization
João N. Cardoso, Arlindo L Oliveira, Bruno Martins
NeurIPS page · OpenReview · Open on the map
Category: LLM Reasoning, Memory & RAG › Activation Steering for LLM Control · Type: new method · Keywords: LLM feature visualization, prompt optimization, gradient-guided mutation, beam search, language model interpretability
Areas: Interpretability › Mechanistic Interpretability › Sparse Autoencoder Interpretability
Summary
ADAPT is a hybrid prompt optimization method that combines beam search initialization with adaptive gradient-guided mutation to visualize LLM feature directions.
Explained to a 5-year-old
We want to see what a computer brain (LLM) is thinking. It stores ideas in directions, and we need to find words that make those directions strong. Existing ways are slow or get stuck. This new method tries many word combinations and then tweaks them step by step to find the best words that light up those directions. It helps us understand the computer brain better.
Explained to a 5-year-old, longer
A big computer brain called a language model learns how words are used. Inside it, there are special directions that point to certain ideas. To understand those ideas, we need to find words that make those directions strong. Doing this by searching through a big list of words is hard because the space is huge. Old methods often get stuck in places that are not the best. The new idea uses two steps to help find good words. First, it makes a bunch of possible word groups using a simple search. Then it slowly changes those groups based on how they affect the directions. This way it avoids getting stuck and finds better words. The found words are easier for people to read and understand. This helps researchers see what the model is thinking. In the end, it makes it possible to look inside big language models more easily.
For a technical reader
The paper addresses the challenge of visualizing which concepts a language model has learned by finding text inputs that strongly activate specific internal directions. Traditional optimization for text inputs often fails because the token space is discrete and full of local minima. The proposed solution uses an initial broad search (beam search) to generate diverse candidate prompts, then refines them with gradient-based updates that adapt the tokens to increase activation. This hybrid approach improves both the quality of the generated prompts and the interpretability of the model’s latent directions compared to earlier methods. The evaluation shows consistent gains across different layers and types of auto-encoded features, indicating that the technique can be reliably used for model debugging and alignment.
Problem
Understanding which features are encoded by learned directions in language model activation space typically requires finding inputs that strongly activate those directions. Optimizing inputs for discrete text tokens often gets stuck in local minima, and existing prompt optimization techniques are not well suited for this task.
Method
The approach initializes candidate prompts using beam search to explore diverse token sequences, then refines them with adaptive gradient-guided mutations that adjust tokens based on activation gradients. This hybrid search balances exploration and exploitation to avoid local minima common in discrete optimization for text.
Results
The approach consistently outperforms prior methods across layers and latent types and yields significantly more interpretable prompts in human evaluation, demonstrating that feature visualization for LLMs is tractable with appropriate design choices.
Contributions
A hybrid optimization framework that combines beam search initialization with adaptive gradient-guided mutation for discrete prompt optimization, tailored to the challenges of feature visualization in language models. The paper also introduces metrics based on dataset activation statistics to rigorously compare visualization methods.
Limitations and assumptions
Evaluated only on Sparse Autoencoder latents from the Gemma 2 2B model, which may limit generalizability. The approach relies on design assumptions specific to discrete text optimization.
Practical relevance
Enables more interpretable and efficient feature visualization for large language models, supporting model debugging and alignment.
Research questions this paper is counted under
This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. Suggest a correction