cs.LGFeb 19, 2026

ADAPT: Hybrid Prompt Optimization for LLM Feature Visualization

Authors: João N. Cardoso, Arlindo L. Oliveira, Bruno Martins

Organizations: Instituto Superior T´ecnico · INESC-ID

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.

Figures & tables

Appendix figures & tables2 assets

Supplementary material from the paper’s appendix.

Appendix

Explore similar work

CardsList
  1. Not All Drift Is a Mechanism: Tracing Prompt Adaptation in LLMs

    Oct 13, 2026Mikhail Aleksandrov, Nail Bashirov, Maksim Ivanov +6Prefix TuningLLM Prompting

  2. Adaptive Prompt Structure Factorization: A Framework for Self-Discovering and Optimizing Compositional Prompt Programs

    Apr 8, 2026Haoyue Liu, Zhichao Wang, Yongxin Guo +2LLM Input OptimizationLLM Prompting

  3. Adaptive Depth Sparse Framework: Similarity-Driven Resource Allocation for Pre-Trained LLMs

    Jul 23, 2026Yidu Wu, Xiang Wang, Kejie Zhao +3LLM PruningLLM Inference Acceleration