- The paper introduces a self-supervised preference-tuning framework that reformulates node classification as a link prediction problem on text-attributed graphs.
- It employs hierarchical hop-based sampling with weighted Direct Preference Optimization to differentiate between proximate and distant node connections.
- Empirical results highlight competitive accuracy (e.g., 89.98% on Pubmed-20) and a ~3.6× reduction in inference cost compared to conventional methods.
HopRank: Self-Supervised Preference-Tuning for Few-Shot Node Classification with LLMs
Introduction and Motivation
The paper "HopRank: Self-Supervised LLM Preference-Tuning on Graphs for Few-Shot Node Classification" (2604.17271) addresses the challenge of node classification on text-attributed graphs (TAGs) by leveraging the semantic capabilities of LLMs while circumventing the dependence on labeled data. Classical graph neural networks (GNNs) have dominated this problem but exhibit two major limitations: shallow text encoding, leading to semantic losses, and a pronounced dependence on abundant node labels, resulting in degraded few-shot performance. In contrast, LLMs provide superior text understanding and few-shot generalization, but existing LLM-based graph methods either demand labels during training or insufficiently exploit the structural information offered by the graph.
HopRank is formulated on the empirical observation that homophily—the tendency for nodes of similar classes or features to connect—induces predictable patterns in graph structure. The core methodological shift is the recasting of node classification as a link prediction problem, allowing the model to be trained via self-supervision derived purely from graph connectivity without accessing any node labels.
Figure 1: Direct connections in a homophilous TAG correlate with class and text similarity, which both decay from 1-hop to multi-hop neighbors.
Methodological Framework
HopRank consists of two principal components: a self-supervised preference-tuning stage and an efficient, adaptive few-shot inference protocol.
During training, hierarchical hop-based sampling constructs listwise preference instances for each edge, treating the 1-hop neighbor as the positive candidate and nodes at progressively greater hop distances (e.g., 2-hop, 3-hop) as negatives of decreasing difficulty. This operationalizes the homophily principle: close neighbors are likely similar, while distant nodes are less so. LLMs are prompted to select the most probable connection—a proxy for shared class membership— and trained with a weighted variant of the Direct Preference Optimization (DPO) objective. The weighting curriculum emphasizes hard negatives (close in hop distance) and pairs where the model exhibits ranking errors, following an automatic curriculum learning approach.
At inference, few-shot classification is realized through anchor-based sampling: given a query node and a small labeled anchor set per class, the tuned LLM predicts the connection preferences between the query and anchors. Classification is determined by majority vote over multiple sampled anchor combinations. An adaptive early-exit voting scheme further reduces computational cost by terminating as soon as a confident majority is established.
Figure 2: HopRank: self-supervised hop-based preference data construction and preference-learning training (left); few-shot node classification via anchor-based connection prediction and adaptive voting (right).
Training Loss Design
The DPO-based objective is augmented with two novel weightings:
- Distance Weight (wdist): Prioritizes challenging (close) negatives by inversely weighting hop distance.
- Ranking Weight (wrank): Focuses training on instances with highest current model ranking error, emphasizing pairs where negatives are erroneously ranked above positives.
The final loss combines these weighted preferences with a strong supervised fine-tuning (SFT) regularizer for target grounding, using a large γ to counteract SFT decay during preference training. Ablations confirm all components are necessary for optimal performance.
Experimental Results
HopRank is evaluated on three high-homophily citation graphs (Cora, Citeseer, Pubmed) under few-shot node classification settings (K=5,10,20 labeled anchors per class). The framework is compared with both strong GNN baselines and state-of-the-art LLM-based methods, including instruction-tuning and graph-LLMs relying on labeled data.
Key empirical findings:
- HopRank matches or exceeds the accuracy of fully supervised GNNs, e.g., achieving 89.98% on Pubmed-20, outperforming GCN by over 10 points.
- Against label-dependent LLM baselines (e.g., InstructTuning, LLaGA, GraphGPT), HopRank consistently improves accuracy by 5–25 points, despite using zero labeled nodes during training.
- The adaptive early-exit scheme reduces inference cost by ∼3.6× (from R=100 to R≈27 in practical runs) with negligible accuracy loss, demonstrating efficiency for large-scale inference.
Figure 3: HopRank ablations on Citeseer-20, illustrating gains from ensemble voting, hierarchical negative sampling, and sensitivity analyses for hop configuration and optimization hyperparameters.
Analysis and Ablations
Comprehensive ablation studies show:
- Removing self-supervised preference tuning renders the LLM unable to capture graph structure, dropping accuracy to random guessing levels.
- Both the distance and ranking weightings are necessary for maximal performance; SFT regularization is particularly critical for stable optimization.
- The effectiveness is robust to the choice of DPO temperature β; however, large SFT weight γ is essential to prevent gradient vanishing.
Theoretical and Practical Implications
HopRank demonstrates that in homophilous graph regimes, structural self-supervision is a viable substitute for explicit label supervision for LLM adaptation on TAGs. This suggests a future direction where topological signal can be directly leveraged for LLM alignment in graph reasoning tasks, circumventing the need for scarce or costly labels.
Practically, HopRank enables label-free fine-tuning of LLMs for node classification, immediately enabling deployment in resource-limited domains, and theoretically supports the view that preference learning objectives grounded in graph topology can induce semantic class understanding in LLMs.
The approach is currently evaluated on high-homophily graphs and leaves open directions regarding extension to heterophilous graphs (where topology does not reflect class) or scalable adaptation to graphs with millions of nodes via importance-based subsampling.
Conclusion
HopRank provides a formal and empirically validated self-supervised alternative for node classification on TAGs with LLMs, matching or exceeding the performance of fully-supervised classical and LLM baselines without relying on training-time labels. The combination of hierarchical structural sampling, adaptive preference weighting, and efficient ensemble inference positions HopRank as a robust paradigm for structural self-supervision in graph-LLM integration. This paves the way for future work on scaling, modeling heterophilous and complex graph regimes, and refining anchor selection for optimal LLM inference fidelity.