Source-linked AI summary

SLM-Conditioned Hierarchical Relation Routing for Labeled Property Graph Learning

Michal Podstawski

arXiv:2608.26132v1cs.LGcs.CL

TL;DR

Static semantic graph encodings cannot target which relational evidence matters in heterogeneous property graphs. The paper introduces an SLM-conditioned hierarchical router that selects messages within and across relationship types while applying a bounded correction to a topology anchor. Across task types, it improves over the strongest static-semantic baseline.

  • Problem

    Static graph-property encodings cannot determine which semantic properties, neighbors, or relationship types are relevant to each prediction target.

  • Method

    A parameter-efficient SLM generates target-conditioned queries to route structural and property-based messages within relationship types and across relation summaries, then updates a topology anchor with a bounded residual.

  • Results

    The routing mechanism improves over the strongest static-semantic baseline across binary classification, multi-class prediction, regression, and learning-to-rank formulations.

  • Takeaways & Limitations

    The results support relational context as a meaningful signal in property-rich graphs and an SLM as a practical means of exploiting it during graph learning.

  • Takeaways & Limitations

    Routing benefits depend on relevant evidence being selective across neighbors and relationship types; when signal is diffuse or already captured by target-independent pooling, static encoding may be close to optimal.

Abstract

from arXiv · show

Labeled property graphs combine relational structure with heterogeneous textual and categorical properties attached to both nodes and relationships. Conventional graph neural networks typically represent these properties as static feature vectors, limiting their ability to determine which semantic evidence should influence message propagation for a particular prediction target. We propose SLM-Conditioned Hierarchical Relation Routing, an architecture that integrates a small language model directly into graph message selection. A topology GNN provides a stable structural representation and prediction anchor. For each target node, incident messages combine the neighbor's structural state, node-property encoding, relationship-property encoding, and relationship type. A parameter-efficient SLM processes structured graph soft tokens and produces a target-conditioned routing query. This query first selects relevant messages within each relationship type and subsequently routes information across relation-level summaries. The resulting representation provides a bounded residual update to the topology anchor, preserving structural evidence while allowing contextual semantic information to modify the prediction. The architecture supports interpretable analysis at both the neighbor and relationship-type levels and provides a general mechanism for integrating language-derived semantics into property-rich graph learning.

1 Introduction

Labeled property graphs contain heterogeneous semantic information on nodes and relationships, but static encodings cannot select evidence for each target. SLM-Conditioned Hierarchical Relation Routing uses target-conditioned language-model queries to select messages while preserving topology.

  • Motivation: Labeled property graphs attach rich semantic properties to both entities and relationships.Relationship properties can describe connection context, category, time, amount, or description.
  • Motivation: Static property encodings cannot determine which properties, neighbors, or relationship types matter for a target prediction.This limitation is particularly important when only a few heterogeneous relationships contain the relevant evidence.
  • Motivation: Existing graph-language integrations either separate language interpretation from propagation or discard explicit graph structure by rendering neighborhoods as text.The paper motivates preserving topology while allowing semantics to modulate propagation conditionally on the target.
  • Approach: The proposed architecture uses a parameter-efficient SLM to route structural, node-semantic, relationship-semantic, and relationship-type evidence in two stages.It first selects messages within relationship types, then routes relation-level summaries, producing a bounded residual update to a topology anchor.
  • Evaluation: Across three labeled property graphs and four task formulations, routing improves over the strongest static-semantic baseline on harder imbalanced tasks and remains competitive on a balanced control.The same mechanism transfers across task types by changing only the prediction head.

2 Related Work

Related graph models learn neighborhood, relation-aware, hierarchical, or global attention, while graph-language methods use language models for encoding, reasoning, or message passing. The proposed routing is distinguished by conditioning hierarchical selection on an adapted language-model query.

  • Graph neural networks: Classical GNNs aggregate local neighborhoods but generally assume node-attributed graphs without target-conditioned interpretation of rich properties.GCN, GraphSAGE, and GAT provide normalized aggregation, inductive aggregation, and learned edge attention, respectively.
  • Heterogeneous graph models: Relation-aware and hierarchical models handle multiple relations using per-relation transformations or attention within and across relation types.The proposed routing adopts this two-level organization while conditioning attention on a language-model query.
  • Graph Transformers: Graph Transformers extend attention to broader structural contexts using structural encodings or combinations of local message passing and global attention.Their attention is learned from graph representations rather than an adapted language model interpreting property-level evidence.
  • Graph-language integration: Graph-language research includes graph-to-language reasoning, parameter-efficient language-model graph encoders, and language models placed inside message passing on text-rich graphs.These lines establish the neighboring design space for integrating language models with graph learning.

3 Method

The method represents an LPG with topology, labels, and property maps, then forms target-specific semantic message candidates and routes them hierarchically. A bounded residual combines routed evidence with a stable structural prediction anchor.

  • Graph representation: An LPG is modeled with nodes, relationships, node and relationship types, and property maps, with target prediction based on structural and semantic evidence.The topology and property components define the inputs to the method.
  • Topology anchor: The topology GNN produces structural node states and a stable anchor prediction independent of successful SLM interpretation.This path provides the structural reference for later semantic correction.
  • Semantic LPG encoding: Each incident relationship yields a candidate combining structural neighbor state, node semantics, relationship semantics, and relationship type.Property maps are serialized into semantic atoms and encoded by the SLM.
  • SLM-conditioned query: Structured graph views, target semantics, and anchor decision features become soft tokens whose SLM hidden state produces a routing query.The SLM uses parameter-efficient adaptation while its base parameters remain quantized, and the query can modulate message values.
  • Hierarchical relation routing: Routing first selects messages within each relationship type and then selects among relation-level summaries.This decomposition prevents relation cardinality from forcing direct competition between numerous and isolated relationships and provides neighbor- and relation-level explanations.
  • Bounded residual prediction: The routed message updates the structural target state through a residual head that predicts a bounded correction.The bound prevents semantic routing from arbitrarily replacing the structural prediction and also applies to scalar regression outputs.
  • Optimization: Training combines supervised prediction and auxiliary verbalizer losses while adapting only LoRA, soft-token projections, routing modules, and the residual head.Cached semantic encodings and low-bit quantization support training on a single consumer GPU.

4 Implementation Details

Experiments use three real labeled property graphs converted into node-prediction tasks with label-defining attributes removed from features. Evaluation uses stratified cross-validation, static semantic baselines, and a fixed topology anchor.

  • Model configuration: The method uses Qwen2.5-1.5B-Instruct with four-bit NF4 quantization, LoRA rank 8, and frozen base parameters.Node and relationship property atoms use a maximum sequence length of 128 tokens.
  • Training setup: The router processes up to 32 incident relationships per target and averages five-fold stratified validation over five random seeds.Semantic encodings are cached, and the complete model fits on one NVIDIA RTX 3090 GPU.
  • Datasets: Three Neo4j graph examples become node-prediction tasks with label-defining attributes excluded from encoded features.The datasets cover adverse-event reporting, financial-crime filings, and movie recommendation.
  • Healthcare Analytics: The healthcare graph contains 11,948 nodes and 91,090 edges, with 4,307 Case targets and 7.6% positive death outcomes.Outcome records and report identifiers are used only to form labels.
  • FinCEN Files: The FinCEN graph contains 7,524 nodes and 40,835 edges, with 4,507 Filing targets and 25.0% positive top-quartile transaction amounts.Transaction amount is removed from the features.
  • Recommendations: The Recommendations graph contains 28,863 nodes and 166,261 edges, with 9,058 Movie targets and 50.1% positive above-median IMDb ratings.Rating and vote count are removed from the features.
  • Metrics: Macro-F1 and AUROC are emphasized because accuracy is inflated by the majority class on imbalanced tasks.The positive class ranges from 7.6% in healthcare to 50.1% in IMDb.
  • Baselines: The proposed model is compared with topology-only, node-semantic static, and edge-semantic static GNN baselines.Static semantic baselines do not perform target-conditioned routing.

5 Experimental Results

The SLM-conditioned relation router improves property-rich graph prediction across binary, multi-class, regression, and ranking tasks, with strongest gains on harder imbalanced settings. It preserves a fixed topology anchor while adding target-conditioned semantic routing.

  • Binary classification: Healthcare gains 1.7 accuracy points, 5.8 macro-F1 points, and 4.8 AUROC points over the strongest static baseline.The router reaches 0.907 accuracy, 0.687 macro-F1, and 0.800 AUROC versus 0.890, 0.629, and 0.751; seed standard deviation is ≤0.023.
  • Binary classification: FinCEN shows the same pattern, with improvements of 3.7 accuracy points, 4.9 macro-F1 points, and 6.9 AUROC points.The router is best on all three reported metrics relative to the strongest static baseline.
  • Binary classification: On IMDb, the router remains best on accuracy and macro-F1 but trails the edge-semantic baseline on AUROC, 0.874 versus 0.880.The balanced, near-saturated task provides an external-knowledge control where static semantic features already capture most of the signal.
  • Interpretation: Target-conditioned selection adds value beyond static semantic message passing while applying a bounded correction to a fixed topology anchor.Across datasets, topology-only and static semantic baselines differ, and further gains on healthcare and FinCEN support the value of conditional routing.
  • Regression and ranking: For FinCEN regression, Spearman correlation rises from 0.270 to 0.483, while ranking improves Spearman correlation from 0.531 to 0.615 and MAP from 0.532 to 0.581.Only the prediction head and loss change across the binary, regression, and learning-to-rank formulations.
  • Multi-class prediction: Multi-class routing improves healthcare accuracy by 9.1 points and AUROC by 4.0 points, while FinCEN accuracy rises 2.4 points and AUROC 2.0 points.The router sweeps every reported metric across healthcare severity and FinCEN amount prediction.

6 Discussion

The method deliberately separates a frozen structural prediction from a bounded semantic correction, making the SLM’s contribution interpretable and conservative. Its benefit is expected to depend on selective, heterogeneous relational evidence rather than raw task difficulty.

  • Design trade-offs: A frozen topology anchor supplies the structural prior, while the SLM adds only a bounded residual correction.The correction is zero at initialization and bounded thereafter, isolating semantic conditioning from re-selecting a stronger predictor.
  • Design trade-offs: The separation prevents semantic plausibility from trading away structural accuracy but limits semantic influence when structural signal is weak.The authors describe this as appropriate when structure is reliable and semantics is complementary rather than primary.
  • When conditioning helps: Routing is most worthwhile when prediction-relevant evidence is concentrated in particular neighbors and relationship types.When evidence is diffuse or already summarized by target-independent pooling, static semantic encoding is close to optimal.
  • When conditioning helps: Expected benefit should track relational heterogeneity and evidence selectivity rather than raw task difficulty.This framing is presented as a way to anticipate where the architecture is most likely to pay off before training.
  • Positioning: Compared with static encoders and graph-to-text approaches, the router keeps explicit structure while allowing semantic information to modulate local message passing.The paper connects this design to interpretability through within-relation and across-relation weighting.

7 Conclusion

The method integrates language-derived semantics directly into LPG message propagation, using hierarchical routing and bounded residual updates to preserve structural evidence. Across varied prediction formulations, routing transfers with minimal task-specific changes and improves over static-semantic baselines.

  • SLM-Conditioned Hierarchical Relation Routing conditions which neighboring messages and relationship types are selected for each target node.The method uses a parameter-efficient SLM to integrate language-derived semantics into message propagation over labeled property graphs.
  • Two-stage routing separates within-type from across-type evidence selection, while a bounded residual update stabilizes the structural anchor.
  • The routing mechanism transfers across binary classification, multi-class prediction, regression, and learning-to-rank with only the prediction head and loss changed.
  • The method improves over the strongest static-semantic baseline across these task formulations.
  • The manuscript acknowledges Claude Code and Claude Opus 4.8 for language clarity, sentence structure, and writing precision.
Loading 2608.26132v1…