HEAL: Hierarchical Embedding Alignment Loss for Improved Retrieval and Representation Learning

Manish Bhattarai, Ryan Barron, Maksim Eren, Minh Vu, Vesselin Grantcharov +6 more
12/5/2024
cs.IRcs.AI

No official code found. Best implementation: lanl/T-ELF (26 stars, last commit 2025-10-08).

Abstract

Retrieval-Augmented Generation (RAG) enhances Large Language Models (LLMs) by integrating external document retrieval to provide domain-specific or up-to-date knowledge. The effectiveness of RAG depends on the relevance of retrieved documents, which is influenced by the semantic alignment of embeddings with the domain's specialized content. Although full fine-tuning can align language models to specific domains, it is computationally intensive and demands substantial data. This paper introduces Hierarchical Embedding Alignment Loss (HEAL), a novel method that leverages hierarchical fuzzy clustering with matrix factorization within contrastive learning to efficiently align LLM embeddings with domain-specific content. HEAL computes level/depth-wise contrastive losses and incorporates hierarchical penalties to align embeddings with the underlying relationships in label hierarchies. This approach enhances retrieval relevance and document classification, effectively reducing hallucinations in LLM outputs. In our experiments, we benchmark and evaluate HEAL across diverse domains, including Healthcare, Material Science, Cyber-security, and Applied Maths.

View on arXivView PDF

Code Implementations(1)

lanl/T-ELFCommunity100%

Tensor Extraction of Latent Features (T-ELF). Within T-ELF's arsenal are non-negative matrix and tensor factorization solutions, equipped with automatic model determination (also known as the estimation of latent factors - rank) for accurate data modeling. Our software suite encompasses cutting-edge data pre-processing and post-processing modules.

267Shell, PythonOct 10, 20231 years agoNOASSERTION
blind-source-separationdimensionality-reductionfeature-extractiongpuhigh-performance-computing+14 more

Similar Papers

Cite this paper

@article{bhattarai2024heal,
  title  = {HEAL: Hierarchical Embedding Alignment Loss for Improved Retrieval and Representation Learning},
  author = {Manish Bhattarai and Ryan Barron and Maksim Eren and Minh Vu and Vesselin Grantcharov and Ismael Boureima and Valentin Stanev and Cynthia Matuszek and Vladimir Valtchinov and Kim Rasmussen and Boian Alexandrov},
  year   = {2024},
  eprint = {2412.04661},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.04661v1}
}

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/2412.04661.svg)](https://codeofpaper.com/paper/2412.04661)

Discussion