English

HiNS: Hierarchical Negative Sampling for More Comprehensive Memory Retrieval Embedding Model

Computation and Language 2026-01-22 v1

Abstract

Memory-augmented language agents rely on embedding models for effective memory retrieval. However, existing training data construction overlooks a critical limitation: the hierarchical difficulty of negative samples and their natural distribution in human-agent interactions. In practice, some negatives are semantically close distractors while others are trivially irrelevant, and natural dialogue exhibits structured proportions of these types. Current approaches using synthetic or uniformly sampled negatives fail to reflect this diversity, limiting embedding models' ability to learn nuanced discrimination essential for robust memory retrieval. In this work, we propose a principled data construction framework HiNS that explicitly models negative sample difficulty tiers and incorporates empirically grounded negative ratios derived from conversational data, enabling the training of embedding models with substantially improved retrieval fidelity and generalization in memory-intensive tasks. Experiments show significant improvements: on LoCoMo, F1/BLEU-1 gains of 3.27%/3.30%(MemoryOS) and 1.95%/1.78% (Mem0); on PERSONAMEM, total score improvements of 1.19% (MemoryOS) and 2.55% (Mem0).

Keywords

Cite

@article{arxiv.2601.14857,
  title  = {HiNS: Hierarchical Negative Sampling for More Comprehensive Memory Retrieval Embedding Model},
  author = {Motong Tian and Allen P. Wong and Mingjun Mao and Wangchunshu Zhou},
  journal= {arXiv preprint arXiv:2601.14857},
  year   = {2026}
}
R2 v1 2026-07-01T09:13:50.808Z