ComMer: a Framework for Compressing and Merging User Data for Personalization

Yoel Zeldes, Amir Zait, Ilia Labzovsky, Danny Karmon, Efrat FarkasharXiv 2025 · DOI

Introduction

Adapting Large Language Models (LLMs) to specific users—such as mimicking a unique writing style or recalling personal history—traditionally requires choosing between two suboptimal extremes. Prompt engineering and Retrieval-Augmented Generation (RAG) are easy to update but become computationally expensive and slow as document volume grows, often suffering from "positional bias." Conversely, Parameter-Efficient Fine-Tuning (PEFT) offers fast inference but is prohibitively expensive to train and maintain for millions of individual users.

ComMer (Compress and Merge) identifies a "missing middle" in this landscape. It provides a framework to represent large collections of user data in a compact, fixed-size format that remains computationally efficient while effectively guiding model behavior.

Comparison of ComMer against traditional personalization approaches like Textual Prompting and PEFT.

Methodology

The ComMer framework introduces an amortized, three-step pipeline designed to personalize a frozen LLM without requiring per-user training sessions.

  1. Compression: Each user document is processed independently by a compressor—a frozen LLM (e.g., Gemma-2b) enhanced with trainable LoRA weights and specialized compression embeddings. This stage transforms raw text into a "soft prompt," represented as a sequence of continuous vectors.
  2. Merging: This is the framework's core innovation. Rather than concatenating vectors (which would increase prompt length linearly), ComMer employs mean pooling. By averaging the representations of all documents into a single, fixed-size soft prompt, the system becomes order-agnostic and maintains constant inference costs regardless of the number of input documents.
  3. Response Generation: The final merged representation is fed into a frozen LLM to generate a personalized response.
The ComMer three-step pipeline: independent document compression, mean-pooling merge, and final response generation.

Experimental Evaluation

The researchers evaluated ComMer across two distinct personalization paradigms:

  • Style-Based Tasks (LaMP): Using tasks like tweet paraphrasing and news headline generation, the model was tested on its ability to learn a user's specific linguistic "skill" or style.
  • Knowledge-Intensive Tasks (PerLTQA): Using synthetic personal memories, the model was tested on its ability to retrieve specific facts.
  • Unsupervised Pretraining: The compressor was pretrained on the FineWeb dataset using an auto-encoding task, which significantly boosted downstream performance compared to training from scratch.

Key Insights and Discussion

Skill vs. Knowledge

A critical finding of this research is that ComMer excels at "skill" tasks but struggles with "knowledge" tasks. Style is an aggregate signal; averaging multiple documents helps distill a user's general aesthetic. However, for factual retrieval, mean pooling can cause "destructive interference," where specific details from different documents blur together, making verbatim fact retrieval difficult.

Latent Linearity and Scaling

The authors observed that LLM latent spaces exhibit a degree of natural linearity. Even when the model was trained only to compress single documents, averaging those compressions at test time improved performance. Furthermore, the relationship between perplexity and the number of documents follows a power law, suggesting that ComMer scales effectively as a user's data history grows.

Efficiency and Performance

In scenarios with low token budgets (e.g., under 128 tokens), ComMer achieved higher quality results than standard prompt-tuning. Because the merged representation is a fixed size, the computational cost of generating a response does not increase as the user profile expands, offering a scalable solution for long-term personalization.

Conclusion and Future Work

ComMer demonstrates that mean pooling is a powerful tool for stylistic personalization, often outperforming concatenation by reducing noise and focusing on shared stylistic signals. While the current approach is less suited for verbatim fact retrieval, future research may explore hybrid strategies combining ComMer with RAG or more sophisticated merging techniques to mitigate the "blurring" effect of mean pooling on factual data.

Summary updated

BibTeX
@misc{zeldes2025commer,
  author = {Yoel Zeldes and Amir Zait and Ilia Labzovsky and Danny Karmon and Efrat Farkash},
  title = {{ComMer: a Framework for Compressing and Merging User Data for Personalization}},
  year = {2025},
  eprint = {2501.03276},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2501.03276},
}
Figure