A Language Model’s Guide Through Latent Space

Dimitri von Rütte, Sotiris Anagnostidis, Gregor Bachmann, Thomas Hofmann

Introduction

Large Language Models (LLMs) are powerful but notoriously difficult to steer. While standard alignment techniques like Reinforcement Learning from Human Feedback (RLHF) are effective, they are computationally intensive. Researchers from ETH Zurich have explored a more efficient alternative: "concept guidance." This technique involves identifying linear directions in a model's latent space that correspond to specific traits—such as truthfulness, humor, or creativity—and nudging internal activations along these vectors during inference.

The Read-Then-Edit Pipeline

The core methodology follows a two-stage "read-then-edit" process. First, the model's internal representations are "read" using linear probes—such as Logistic Regression, Difference-in-Means (DiM), or PCA—to identify the direction of a concept within the normalized residuals of various layers. Second, during generation, the model's hidden states are "edited" by adding the learned concept vector, scaled by a strength parameter $\alpha$.

Overview of the concept guidance pipeline, showing the detection of concepts via probing and subsequent guidance via activation perturbation.

Balancing Control and Fluency

A major challenge in concept guidance is preventing the model from "breaking." Strong guidance can lead to a collapse in language fluency, where the model begins generating gibberish. To address this, the authors introduced the Perplexity-Normalized Effect Size (PNES). This metric identifies the "sweet spot" where the desired behavioral change is maximized before the model's perplexity (PPL), a measure of language degradation, spikes.

Trade-off between trait probability and perplexity (PPL) across different layer counts (k). The yellow star represents the unguided baseline.

Key Findings and the Detection-Guidance Gap

The study reveals a significant "Detection-Guidance Gap." While models can be highly accurate at detecting concepts internally (e.g., Logistic Regression reaching ~90% accuracy for appropriateness), this does not always translate to effective guidance. Truthfulness remains a unique outlier—it is both highly detectable and easily steerable. In contrast, subjective traits like humor and creativity proved far more difficult to control across all tested models.

Furthermore, the researchers identified "concept confusion." For instance, attempting to steer a model toward "appropriateness" (refusing toxic prompts) often inadvertently affected its general "compliance." Instead of becoming more discerning, the model simply became more likely to refuse any prompt, regardless of its content.

Conclusion

This work highlights that while LLMs possess internal "understandings" of complex concepts, translating that understanding into controlled generation is non-trivial. The most effective guidance typically occurs in the middle-to-late layers (layers 16–24). Future research will need to explore whether non-linear steering or multi-vector guidance can overcome the current limitations in navigating the latent space for subjective and complex traits.

Summary updated

BibTeX
@inproceedings{rutte2024language,
  author = {Dimitri von Rütte and Sotiris Anagnostidis and Gregor Bachmann and Thomas Hofmann},
  title = {{A Language Model’s Guide Through Latent Space}},
  booktitle = {International Conference on Machine Learning},
  year = {2024},
  url = {https://openreview.net/forum?id=c0LoolDFw4},
}
Figure