Table of Contents
Fetching ...

Concept Attractors in LLMs and their Applications

Sotirios Panagiotis Chytas, Vikas Singh

TL;DR

This paper reframes how latent representations in LLMs organize semantically related prompts by modeling layers as Iterated Function Systems that contract toward concept-specific Attractors. It proposes training-free, Attractor-based interventions for diverse tasks, including guardrailing, translation, toxicity reduction in vision-language models, and synthetic data generation, achieving competitive or superior performance relative to domain-specific baselines. The key contributions include a formal IFS perspective with concept Attractors, practical detection and steering methods, and data-generation techniques that operate without retraining or retention data. The findings demonstrate that Attractor manipulations can robustly influence model behavior across multiple modalities and tasks, offering an efficient alternative to heavy fine-tuning while highlighting limitations around access to hidden activations and generalization to larger models.

Abstract

Large language models (LLMs) often map semantically related prompts to similar internal representations at specific layers, even when their surface forms differ widely. We show that this behavior can be explained through Iterated Function Systems (IFS), where layers act as contractive mappings toward concept-specific Attractors. We leverage this insight and develop simple, training-free methods that operate directly on these Attractors to solve a wide range of practical tasks, including language translation, hallucination reduction, guardrailing, and synthetic data generation. Despite their simplicity, these Attractor-based interventions match or exceed specialized baselines, offering an efficient alternative to heavy fine-tuning, generalizable in scenarios where baselines underperform.

Concept Attractors in LLMs and their Applications

TL;DR

This paper reframes how latent representations in LLMs organize semantically related prompts by modeling layers as Iterated Function Systems that contract toward concept-specific Attractors. It proposes training-free, Attractor-based interventions for diverse tasks, including guardrailing, translation, toxicity reduction in vision-language models, and synthetic data generation, achieving competitive or superior performance relative to domain-specific baselines. The key contributions include a formal IFS perspective with concept Attractors, practical detection and steering methods, and data-generation techniques that operate without retraining or retention data. The findings demonstrate that Attractor manipulations can robustly influence model behavior across multiple modalities and tasks, offering an efficient alternative to heavy fine-tuning while highlighting limitations around access to hidden activations and generalization to larger models.

Abstract

Large language models (LLMs) often map semantically related prompts to similar internal representations at specific layers, even when their surface forms differ widely. We show that this behavior can be explained through Iterated Function Systems (IFS), where layers act as contractive mappings toward concept-specific Attractors. We leverage this insight and develop simple, training-free methods that operate directly on these Attractors to solve a wide range of practical tasks, including language translation, hallucination reduction, guardrailing, and synthetic data generation. Despite their simplicity, these Attractor-based interventions match or exceed specialized baselines, offering an efficient alternative to heavy fine-tuning, generalizable in scenarios where baselines underperform.
Paper Structure (36 sections, 8 equations, 16 figures, 3 tables)

This paper contains 36 sections, 8 equations, 16 figures, 3 tables.

Figures (16)

  • Figure 1: A t-snetsne_2 plot of the latent representations of Llama3.1-8B for $7 \times 4 = 28$ different prompts, seven each, for the Lord of the Rings universe, Narnia, Star Wars, and Harry Potter. Although the prompts explore different aspects of the universes and share almost no common keywords, we observe a clear clustering based on the different worlds.
  • Figure 2: An LLM can be viewed as an IFS that transforms the non-linear manifold of texts into a well-behaving collection of Attractors.
  • Figure 3: 4 different concepts in layer 0 (before any application of the underlying IFS, and one of the contractions of the underlying IFS we recover by solving the inverse problem for each concept separately. The circles correspond to the true vectors as obtained from the LLM in layer 24 and the stars correspond to the application of the contractions to the points in layer 0.
  • Figure 4: Attractors in Llama3.1-8B llama31 and Qwen2.5-7B qwen2qwen2.5. From the fractal-like structure of the task vectors in layer 16/14, to literature-based Attractors in layer 18/23 and programming-based in layer 19/22, the treatment of an LLM as an IFS allows us to recover (and use) them in multiple applications, invariant to the underlying LLM. More models can be found in \ref{['sec:models_appendix']})
  • Figure 5: Cosine similarity between all prompts' from TOFU forget05 tofu. The first 20 rows/columns of each heatmap correspond to questions about the first author, the second 20 about the second author, and so on. The forming of author-based Attractors is apparent and it becomes clearer in layer 24.
  • ...and 11 more figures