[Paper Review] ADAPT: Hybrid Prompt Optimization for LLM Feature Visualization
ADAPT integrates beam-search initialization with adaptive gradient-guided mutation to optimize prompts for visualizing LLM latent activations, outperforming prior methods on Gemma SAE latents. It analyzes fluency penalties and initialization/trajectory effects on optimization reliability.
Understanding what features are encoded by learned directions in LLM activation space requires identifying inputs that strongly activate them. Feature visualization, which optimizes inputs to maximally activate a target direction, offers an alternative to costly dataset search approaches, but remains underexplored for LLMs due to the discrete nature of text. Furthermore, existing prompt optimization techniques are poorly suited to this domain, which is highly prone to local minima. To overcome these limitations, we introduce ADAPT, a hybrid method combining beam search initialization with adaptive gradient-guided mutation, designed around these failure modes. We evaluate on Sparse Autoencoder latents from Gemma 2 2B, proposing metrics grounded in dataset activation statistics to enable rigorous comparison, and show that ADAPT consistently outperforms prior methods across layers and latent types. Our results establish that feature visualization for LLMs is tractable, but requires design assumptions tailored to the domain.
Motivation & Objective
- Understand how to identify input patterns that maximally activate target SAE latent directions in LLMs.
- Develop a practical, self-contained prompt optimization method for discrete text inputs.
- Evaluate ADAPT against baseline methods on Gemma 2 2B SAE latents using dataset-activation metrics.
- Investigate the role of initialization, trajectory, and fluency penalties in feature visualization for LLMs.
Proposed method
- Introduce ADAPT, a three-component method: beam-search initialization, adaptive mutation combining GCG-style swaps and logit-swaps, and diversity-preserving evaluation/selection.
- Initialization uses multiple independent beams with right-appending and middle-inserts to explore prompt space.
- Candidate generation uses an adaptively sized population with mutations and a bilingual approach to token changes.
- Evaluation includes a fluency penalty schedule and group-slot management to maintain diversity while selecting high-improvement prompts.

Experimental results
Research questions
- RQ1Can ADAPT consistently achieve higher latent activation than existing methods across layers and SAE latent types?
- RQ2How do initialization, trajectory, and fluency penalties affect the reliability and quality of feature visualization in LLMs?
- RQ3What are the comparative strengths and failure modes of GCG, BEAST, EPO, and ADAPT for SAE latents in Gemma 2 2B?
- RQ4Does combining gradient-based mutations with beam-search initialization yield more robust prompts than gradient-only or search-only approaches?
Key findings
- ADAPT outperforms prior methods across layers and latent types in activation strength.
- ADAPT achieves higher activation than GCG on 70.4% of features (Wilcoxon p < 1e-28).
- GCG and BEAST exhibit complementary failure modes, while ADAPT provides a more consistent performance profile.
- EPO underperforms relative to ADAPT and other baselines in this setting.
- GCG’s gradient estimate shows a noisy signal-to-noise ratio, meaning many good candidates are undervalued by the gradient, whereas logit-based mutations can recover such improvements.
- Initialization and trajectory heavily influence GCG performance, with autoregressive starts typically giving an edge but substantial intra-prompt variability remain.

Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.