Mitigating Over-Personalization in Language Models via Structured Memory

Hakeem Hannoon, Andrew Zhao, Mihir Narayan, Sharvin Goyal, Ivaxi Sheth

TL;DR

This paper introduces "Structured Memory," an inference-time technique to prevent LLMs from inappropriately using personal user information across unrelated contexts. By reorganizing a flat list of user memories into categorized blocks (like "Health," "Work," or "Finance"), the authors reduced cross-domain information leakage by an average of 8.8% across seven frontier models without sacrificing the benefits of personalization.

What Problem Does This Paper Address?

As AI assistants gain "long-term memory," they store snippets of user information to provide a personalized experience. However, this creates a major privacy and reliability risk known as over-personalization.

The authors identify two primary failure modes:

  1. Cross-Domain Leakage: The model recalls sensitive information in the wrong context—for example, mentioning a user’s personal medical history or a family tragedy while drafting a professional business strategy.
  2. Memory-Induced Sycophancy: The model defers to a user’s stored beliefs or biases rather than providing a truthful or objective response.

Currently, most systems inject memories as a "flat list" into the system prompt. This forces the LLM to figure out what is relevant on the fly, often leading to false associations where irrelevant memories remain just as salient as relevant ones.

Methods

The researchers propose transforming the unstructured memory list ($M$) into a structured representation ($M'$) before it reaches the LLM. They tested three main "inference-time transformations":

  • Fixed-Domain Partitioning: Memories are sorted into 11 predefined categories (e.g., health, identity, finance) using either an LLM classifier or embedding similarity.
  • Dynamic-Domain Partitioning: This is a more flexible version where the classifier can invent new categories (e.g., "Family") if the memories don't fit the fixed taxonomy.
  • Two-Level Memory Tree: A hierarchical approach that creates subcategories within domains to provide even more granular context.

Crucially, these methods do not require retraining the model or changing the actual content of the memories; they simply change the layout of how information is presented in the prompt.

Datasets

The study evaluates these methods using PersistBench, a benchmark specifically designed to probe long-term memory failures. It consists of three subsets:

  • Cross-Domain Leakage (200 samples): Tests if the model uses memories from a different life domain than the query.
  • Memory-Induced Sycophancy (200 samples): Tests if stored user beliefs bias the model away from the truth.
  • Beneficial Memory Use (100 samples): A "utility" check to ensure the model still uses relevant memories when it's appropriate to do so.

Key Insights and Ideas

  • Structure as a Safety Signal: The "aha moment" here is that the physical layout of information acts as a meta-instruction. By grouping memories, the model can more easily "ignore" entire blocks that are contextually irrelevant.
  • Dynamic is Better than Rigid: Dynamic partitioning was the most robust method. Rigid taxonomies sometimes forced "ambiguous" memories into the wrong buckets, which actually increased leakage in some models (like Gemini 3.1 Pro).
  • The RAG Trade-off: While Retrieval-Augmented Generation (RAG) can reduce leakage by only showing the model "similar" memories, it often over-filters, causing the model to miss beneficial personalization. Structured memory provides a "middle ground" that preserves utility while improving safety.
  • Defense Stacking: Memory structuring is complementary to prompt-based defenses. You can use a "Restrictive" system prompt and structured memory to get better results than either method alone.

Key Results

The researchers benchmarked seven models, including Llama 3.3 70B, DeepSeek-V3.2, and Gemini 3.1 Pro.

  • Leakage Reduction: Dynamic partitioning reduced cross-domain leakage across all seven models. The average reduction was 8.8%, with some models like DeepSeek-V3.2 seeing drops as high as 14% (69.0% → 55.0%).
  • Preserving Utility: Unlike aggressive RAG, structured memory actually improved beneficial memory use in six out of seven models.
  • Sycophancy Stalemate: Interestingly, structuring memory had almost no effect on sycophancy. Models remained highly likely (~95% failure rate) to agree with stored user biases regardless of how they were formatted.

Limitations and Future Work

The authors acknowledge several hurdles:

  • Classification Errors: If the "memory organizer" puts a memory in the wrong domain (e.g., putting a friend's medical issue into the user's own health bucket), it can actually trigger leakage.
  • The Sycophancy Gap: Since memory structure doesn't fix sycophancy, the authors suggest this remains a "training-time" problem rather than an "inference-time" formatting problem.
  • Latency/Cost: Using an extra LLM call to organize memories adds latency and cost to the system, though the authors note that cheaper "cosine similarity" methods offer a partial, low-cost alternative.

Future work may involve exploring how these structures interact with even longer contexts or multi-agent systems where memories are shared across different specialized bots.

Summary updated

BibTeX
@inproceedings{hannoon2026mitigating,
  author = {Hakeem Hannoon and Andrew Zhao and Mihir Narayan and Sharvin Goyal and Ivaxi Sheth},
  title = {{Mitigating Over-Personalization in Language Models via Structured Memory}},
  booktitle = {AIWILD @ ICML},
  year = {2026},
  url = {https://openreview.net/forum?id=UXZ59mtY7c},
}
Figure