Logic-Oriented Retriever Enhancement via Contrastive Learning
Wenxuan Zhang, Yuan-Hao Jiang, Changyong Qi, Rui Jia, Yonghe Wu
TL;DR
Knowledge-intensive retrieval with LLMs often suffers from reliance on surface similarity when queries involve complex logical relations. LORE introduces a post-pretrain contrastive learning framework that fine-tunes the query encoder using a fine-grained, RST-guided dataset (CoEnTrain) while freezing the document encoder, optimizing an InfoNCE-style objective $L(q)$ to emphasize logical structure, and uses a tiered distractor scheme with P, N1, N2. It provides a dataset construction method, a method for defining the positive probability $p_k$ for negatives, and validates improvements across HotpotQA, MS MARCO, and MuSiQue with cross-task generalization, all without external supervision. The approach preserves efficiency and open-source compatibility, offering a practical path to strengthen embedding models' foundational reasoning capabilities for retrieval-augmented generation.
Abstract
Large language models (LLMs) struggle in knowledge-intensive tasks, as retrievers often overfit to surface similarity and fail on queries involving complex logical relations. The capacity for logical analysis is inherent in model representations but remains underutilized in standard training. LORE (Logic ORiented Retriever Enhancement) introduces fine-grained contrastive learning to activate this latent capacity, guiding embeddings toward evidence aligned with logical structure rather than shallow similarity. LORE requires no external upervision, resources, or pre-retrieval analysis, remains index-compatible, and consistently improves retrieval utility and downstream generation while maintaining efficiency. The datasets and code are publicly available at https://github.com/mazehart/Lore-RAG.
