Dual-Tree LLM-Enhanced Negative Sampling for Implicit Collaborative Filtering

Jiayi Wu, Zhengyu Wu, Xunkai Li, Rong-Hua Li, Guoren WangarXiv 2026

TL;DR

DTL-NS (Dual-Tree LLM-enhanced Negative Sampling) is a text-free and fine-tuning-free framework that uses Large Language Models (LLMs) to optimize negative sampling in implicit collaborative filtering. By encoding item relationships into structured, hierarchical tree paths, it allows a frozen LLM to accurately identify "false negatives" offline and guide high-quality hard negative sampling during training, significantly boosting recommendation accuracy.

What Problem Does This Paper Address?

In implicit collaborative filtering (CF), recommender models learn from user behaviors like clicks or views rather than explicit ratings. Because we only know what users did interact with, training requires negative sampling—treating unobserved items as negative examples.

However, many unobserved items are actually false negatives: items the user would love but simply hasn't discovered yet due to limited exposure. Standard hard negative sampling methods often accidentally select these false negatives, introducing noisy supervision that degrades model performance.

While researchers have recently turned to LLMs to solve recommendation challenges, existing LLM-based approaches suffer from two major bottlenecks:

  1. Text Dependency: They rely heavily on rich textual metadata (titles, descriptions), which is often sparse or unavailable in real-world production systems.
  2. Fine-Tuning Costs: They require expensive task-specific fine-tuning (even with parameter-efficient methods like LoRA), making them computationally prohibitive.

DTL-NS addresses these challenges by introducing a text-free, fine-tuning-free framework that leverages the reasoning power of frozen LLMs using purely structural and semantic ID data.

Methods

The DTL-NS framework operates in three distinct stages:

  1. Dual-Tree Construction & Item Encoding: To make discrete item IDs understandable to a frozen LLM without using text, the authors construct two hierarchical index trees via recursive $k-means$ clustering:

  2. Collaborative-Structure Tree: Captures item-item structural proximity based on user interaction co-occurrences (normalized via Jaccard coefficients and smoothed with graph Laplacian spectral embeddings).

  3. Latent Semantic Tree: Captures higher-order semantic similarities extracted from a pre-trained CF model's embedding space.

Every item is mapped to a discrete, interpretable root-to-leaf path encoding (e.g., 0-2-2-1-2), where items sharing longer prefixes are structurally or semantically closer.

  1. Dual-Tree LLM-based False Negative Identification (DTL-FNI): This module runs entirely offline before training. For each user, a candidate pool of high-scoring unobserved items is generated by a base recommender. The LLM is prompted to perform direct binary classification on these candidates using only the tree-path encodings of the user's history and the candidate item. Candidates flagged as "positive" by the LLM are classified as false negatives and permanently moved to the positive training set to enhance supervision.

  2. Dual-Tree Guided Multi-View Hard Negative Sampling (DT-MHNS): During model training, the framework combines standard user-item preference scores with item-item hierarchical similarities (calculated via the Longest Common Prefix of their tree paths). This multi-view score ensures the sampler selects true hard negatives that are structurally and semantically close to the positive item, which are then enhanced using an embedding mixup strategy.

Figure 2: The DTL-NS framework. We depict a single tree-based item encoding example, since the dual trees use node embeddings from different sources, yet share the same subsequent tree construction and item encoding procedures.

Datasets

The authors evaluated DTL-NS on three widely used real-world benchmarks:

  • Amazon-sports
  • Amazon-toys
  • Yelp

They also created synthetic noisy datasets (Amazon-sports-20% and Amazon-toys-20%) by randomly removing a percentage of true positive interactions during training to explicitly simulate controlled false negatives for diagnostic testing.

Key Insights and Ideas

  • IDs as a Structured Language: Raw numerical IDs mean nothing to a frozen LLM, and continuous embeddings suffer from alignment issues and massive token overhead. Converting items into hierarchical tree paths provides a discrete, structured language that LLMs can naturally reason about using simple prefix matching.
  • Flipping the Script on False Negatives: Instead of merely trying to avoid sampling false negatives to reduce noise, DTL-NS actively converts them into positive training instances, expanding the explicit positive supervision signal.
  • Prioritizing Efficiency: By opting for direct classification over Chain-of-Thought (CoT) prompting, the authors achieved a 167× speedup in offline LLM inference overhead, making the framework highly practical for real-world pipelines.

Key Results

  • Superior False Negative Identification: In controlled diagnostic tests, the LLM-based classifier achieved over 90% Recall and 85% Precision in identifying simulated false negatives, vastly outperforming non-LLM baselines like XGBoost (XGBFNI) or rule-based retrieval (RuleFNI).
Figure 1: False-negative identification performance compari- son on Amazon-sports.
  • Recommendation Performance Boost: DTL-NS consistently outperformed state-of-the-art negative samplers (such as MixGCF and DNS) across all datasets. For example, on the real-world Amazon-sports dataset, it improved Recall@10 from 10.53% (MixGCF) to 12.46%.
  • Plug-and-Play Versatility: DTL-NS demonstrated robust generality. It successfully boosted recommendation accuracy when integrated with different backbone architectures (Matrix Factorization, LightGCN, SimGCL) and across various open-source LLMs (Llama-3.1, Qwen3, Mistral, Gemma).

Limitations and Future Work

  • Candidate Pool Dependency: The offline false negative identification module relies on a pre-trained recommender to generate the initial candidate pool. If the base model fails to include a true latent positive in this pool, the LLM never gets the chance to rescue it.
  • One-Time Offline Overhead: While the training phase is highly efficient, generating the tree encodings and running LLM inference across all user candidate pools still requires a non-trivial, one-time offline computational cost before training begins.
  • Future Directions: The authors suggest exploring adaptive candidate pool sizing and extending the dual-tree encoding mechanism to sequential or cross-domain recommendation tasks.

Summary updated

BibTeX
@misc{wu2026dual,
  author = {Jiayi Wu and Zhengyu Wu and Xunkai Li and Rong-Hua Li and Guoren Wang},
  title = {{Dual-Tree LLM-Enhanced Negative Sampling for Implicit Collaborative Filtering}},
  year = {2026},
  eprint = {2602.18249},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.18249},
}
Figure