preprint · arXiv (Cornell University) · 2026

ADAPT: Hybrid Prompt Optimization for LLM Feature Visualization

João N. Cardoso, Arlindo L. Oliveira, Bruno Martins · 0 citations

View original publication

Summary AI-generated

TL;DR
Researchers have developed a new method called ADAPT that automatically generates text prompts to reveal exactly what concepts or features Large Language Models are paying attention to internally.
Problem
To make Large Language Models safer and more reliable, we need to understand what concepts their internal activations represent. While searching through massive datasets can find text that triggers these activations, it is computationally expensive, and existing automated text-generation methods often fail by getting stuck in local minima.
Method
The authors introduce ADAPT, a hybrid optimization technique that first uses beam search to find a strong starting text, and then applies adaptive, gradient-guided mutations to refine the text. This approach is specifically designed to overcome the discrete nature of text and find inputs that maximally activate targeted internal features.
Results
When tested on the Gemma 2 2B model, ADAPT consistently outperformed prior optimization methods across different model layers and feature types. The study also introduced new evaluation metrics based on real dataset statistics to ensure rigorous and reliable comparisons.
Takeaways
Feature visualization for language models is highly practical when optimization algorithms are tailored to the unique properties of text. ADAPT provides a robust framework for generating text that triggers specific internal model states, reducing the need for costly dataset searches.
For industry
For companies deploying AI, this research offers a practical tool to audit and understand the internal decision-making of language models. Instead of guessing why a model behaves a certain way, businesses can use this method to automatically generate the exact phrases that trigger specific concepts, safety concerns, or biases inside the AI.
Why it matters
This work advances AI safety and interpretability by making it easier to inspect the inner workings of language models without relying on massive, expensive datasets. By enabling precise visualization of internal features, it paves the way for more reliable, transparent, and steerable AI systems in high-stakes applications.

Abstract

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.

← All publications