arXiv:2511.17129cs.CLcs.AI2025-11AAAI被引 2

用上下文压缩训练大模型,提升文本表示效果。

Learning to Compress: Unlocking the Potential of Large Language Models for Text Representation

  • 以压缩上下文为预训练任务,让大模型生成紧凑记忆令牌。
  • 在多个任务上超越传统词级预测方法,且更节省训练数据。
  • 适合需要高效文本表示的下游应用,如检索与聚类。

文本表示在聚类、检索等下游任务中至关重要。随着大语言模型(LLM)的兴起,人们开始探索其在文本表示中的潜力。然而,大多数LLM基于因果结构,优化目标为下一个词预测,难以生成整体性表征。现有研究引入预训练任务来适应LLM,但多依赖于词粒度预测目标,如LLM2Vec中的掩码下一词预测(MNTP)。本文探索将上下文压缩作为无监督适配LLM的预训练任务。在压缩预训练阶段,模型学习生成替代整个上下文的紧凑记忆令牌,用于下游序列预测。实验表明,设计合理的压缩目标可显著提升基于LLM的文本表示性能,优于使用词级预训练任务的模型。结合对比学习进一步优化后,得到的模型LLM2Comp在广泛任务上表现优异,且样本效率更高,所需训练数据显著减少。代码已公开于https://github.com/longtaizi13579/LLM2Comp。

原文摘要 · Abstract (English)

Text representation plays a critical role in tasks like clustering, retrieval, and other downstream applications. With the emergence of large language models (LLMs), there is increasing interest in harnessing their capabilities for this purpose. However, most of the LLMs are inherently causal and optimized for next-token prediction, making them suboptimal for producing holistic representations. To address this, recent studies introduced pretext tasks to adapt LLMs for text representation. Most of these tasks, however, rely on token-level prediction objectives, such as the masked next-token prediction (MNTP) used in LLM2Vec. In this work, we explore the untapped potential of context compression as a pretext task for unsupervised adaptation of LLMs. During compression pre-training, the model learns to generate compact memory tokens, which substitute the whole context for downstream sequence prediction. Experiments demonstrate that a well-designed compression objective can significantly enhance LLM-based text representations, outperforming models trained with token-level pretext tasks. Further improvements through contrastive learning produce a strong representation model (LLM2Comp) that outperforms contemporary LLM-based text encoders on a wide range of tasks while being more sample-efficient, requiring significantly less training data. Code is available at https://github.com/longtaizi13579/LLM2Comp.

文本表示大模型无监督学习

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。