arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2601.11124cs.IRcs.AI
收藏

在表示之前学习:连接生成学习与对比学习以构建领域特定的LLM嵌入

Learn Before Represent: Bridging Generative and Contrastive Learning for Domain-Specific LLM Embeddings

Zhejiang University(浙江大学);Peking University(北京大学)

Xiaoyu Liang, Yuchen Peng, Jiale Luo, Wenhao Wang, Haoji Hu, Xincheng Zhou

AI总结:

本文提出LBR框架,通过生成学习和对比学习结合,在垂直领域中提升LLM嵌入的准确性和鲁棒性。

摘要:

大型语言模型(LLMs)通过对比学习进行适应在通用表示学习中表现出色,但在垂直领域如化学和法律中表现不佳,主要原因是缺乏领域特定的知识。本文识别了一个核心瓶颈:现有的「LLM+CL」范式侧重于语义对齐,但无法进行知识获取,导致在专业术语上失败。为弥合这一差距,我们提出了Learn Before Represent(LBR),一种新的两阶段框架。LBR首先通过信息瓶颈约束的生成学习注入领域知识,保留LLM的因果注意力以最大化知识获取同时压缩语义。然后在压缩的表示上进行生成-精细对比学习以实现对齐。这种方法保持了架构一致性并解决了生成和对比学习之间的目标冲突。在医疗、化学和代码检索任务中的广泛实验表明,LBR显著优于强大的基线。我们的工作为在垂直领域构建准确且稳健的表示建立了一个新范式。

英文摘要:

Large Language Models (LLMs) adapted via contrastive learning excel in general representation learning but struggle in vertical domains like chemistry and law, primarily due to a lack of domain-specific knowledge. This work identifies a core bottleneck: the prevailing ``LLM+CL'' paradigm focuses on semantic alignment but cannot perform knowledge acquisition, leading to failures on specialized terminology. To bridge this gap, we propose Learn Before Represent (LBR), a novel two-stage framework. LBR first injects domain knowledge via an Information Bottleneck-Constrained Generative Learning stage, preserving the LLM's causal attention to maximize knowledge acquisition while compressing semantics. It then performs Generative-Refined Contrastive Learning on the compressed representations for alignment. This approach maintains architectural consistency and resolves the objective conflict between generative and contrastive learning. Extensive experiments on medical, chemistry, and code retrieval tasks show that LBR significantly outperforms strong baselines. Our work establishes a new paradigm for building accurate and robust representations in vertical domains.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑