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

Xiaoyu Liang, Yuchen Peng, Jiale Luo, Wenhao Wang, Haoji Hu +1 more
1/16/2026
cs.IRcs.AI

No confident code implementation found for this paper.

Abstract

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.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{liang2026learn,
  title  = {Learn Before Represent: Bridging Generative and Contrastive Learning for Domain-Specific LLM Embeddings},
  author = {Xiaoyu Liang and Yuchen Peng and Jiale Luo and Wenhao Wang and Haoji Hu and Xincheng Zhou},
  year   = {2026},
  eprint = {2601.11124},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2601.11124v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2601.11124.svg)](https://codeofpaper.com/paper/2601.11124)

Discussion