SLM-Conditioned Hierarchical Relation Routing for Labeled Property Graph Learning

arXiv cs.LG Papers

Summary

This paper proposes SLM-Conditioned Hierarchical Relation Routing, an architecture that integrates small language models into graph neural networks to enable adaptive message selection in labeled property graphs, enhancing prediction accuracy by leveraging contextual semantic information.

arXiv:2608.26132v1 Announce Type: new Abstract: 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.
Original Article
View Cached Full Text

Cached at: 08/28/26, 09:37 AM

# SLM-Conditioned Hierarchical Relation Routing for Labeled Property Graph Learning
Source: [https://arxiv.org/html/2608.26132](https://arxiv.org/html/2608.26132)
11institutetext:NASK National Research Institute, Warsaw, Poland
[https://nask\.pl/](https://nask.pl/)
11email:michal\.podstawski@nask\.pl###### Abstract

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\.

## 1Introduction

Labeled property graphs \(LPGs\) represent entities and relationships together with labels and heterogeneous properties\. Unlike conventional attributed graphs, LPGs may associate rich semantic information with both nodes and relationships: a relationship can communicate not only that two entities are connected, but also the context, category, time, amount, or description of that connection\. This representation underlies many operational graph databases, with applications in healthcare, financial analysis, recommendation, cybersecurity, and network management\.

Graph neural networks \(GNNs\) are an effective mechanism for learning from relational structure, but common architectures either ignore textual properties or encode them once and treat the resulting vectors as static features\. Such integration cannot determine whether a particular property, neighboring entity, or relationship type is relevant to the current prediction target\. This is especially limiting in heterogeneous LPGs, where a single node may participate in many semantically different relationships and only a few of them carry the evidence needed for a given prediction\.

Language models offer contextual representations of textual and structured properties, yet existing ways of combining them with graphs sit at two extremes\. Used only as feature encoders, they separate semantic interpretation from graph propagation, so the interpretation cannot adapt to the target\. Used to read entire neighborhoods rendered as text, they discard explicit graph structure and quickly exceed the context window\. Neither lets language\-derived context control*which*relational evidence flows during message passing\. A useful integration should preserve graph topology while allowing semantics to modulate propagation conditionally on the target\.

We introduce*SLM\-Conditioned Hierarchical Relation Routing*, an architecture in which a small language model \(SLM\) directly conditions GNN message selection\. A topology GNN first produces a stable structural representation and prediction anchor\. For each target, incident messages combine structural neighbor states, semantic node and relationship encodings, and relationship\-type information\. A parameter\-efficient SLM derives a target\-conditioned query that routes these messages in two stages \- first within individual relationship types, then across relation\-level summaries \- and the routed evidence produces a bounded residual update to the anchor\. Because the correction is bounded and starts from the anchor, semantic conditioning can only improve on a strong structural prior, not silently degrade it\.

We evaluate the method on three real labeled property graphs \- adverse\-event reporting, financial\-crime filings, and movie recommendation \- spanning binary classification, multi\-class prediction, regression, and learning\-to\-rank tasks\. The router improves over the strongest static\-semantic baseline on the harder, imbalanced tasks while remaining competitive on a balanced, near\-saturated control, and the same mechanism transfers across task types with only its prediction head changed\.

## 2Related Work

Classical message\-passing GNNs aggregate information from local graph neighborhoods\. GCN uses normalized neighborhood convolution\[[1](https://arxiv.org/html/2608.26132#bib.bib1)\], GraphSAGE introduces inductive neighborhood aggregation\[[2](https://arxiv.org/html/2608.26132#bib.bib2)\], and GAT learns attention weights between connected nodes\[[3](https://arxiv.org/html/2608.26132#bib.bib3)\]\. These methods primarily assume node\-attributed graphs and do not explicitly address target\-conditioned interpretation of rich node and relationship properties\.

For heterogeneous and multi\-relational graphs, relation\-aware models maintain per\-relation transformations, as in R\-GCN\[[4](https://arxiv.org/html/2608.26132#bib.bib4)\], and hierarchical attention models learn importance at two levels \- within a relation and then across relations\. BR\-GCN\[[5](https://arxiv.org/html/2608.26132#bib.bib5)\], for example, combines node\-level attention inside each relation\-specific subgraph with relation\-level attention across relations\. Our routing adopts the same two\-level organization, but its attention is conditioned on a language\-model query derived from property text rather than learned from graph representations alone\.

Graph Transformers extend self\-attention to broader structural contexts\. Graphormer incorporates structural encodings into Transformer attention\[[6](https://arxiv.org/html/2608.26132#bib.bib6)\], while GraphGPS combines local message passing with global attention\[[7](https://arxiv.org/html/2608.26132#bib.bib7)\]\. Their attention mechanisms are, however, learned from graph representations rather than conditioned by an adapted language model interpreting property\-level evidence\.

Recent studies combine graphs with language models along several lines\. One line expresses graphs for language models or uses them for graph reasoning, as in GraphGPT\[[8](https://arxiv.org/html/2608.26132#bib.bib8)\]and GraphLLM\[[9](https://arxiv.org/html/2608.26132#bib.bib9)\]\. A second line adapts a language model parameter\-efficiently as a graph encoder or predictor: BiGTex\[[10](https://arxiv.org/html/2608.26132#bib.bib10)\]and GaLoRA\[[11](https://arxiv.org/html/2608.26132#bib.bib11)\]keep the language model frozen and use low\-rank adaptation to inject structural signal for node classification\. A third, most closely related line places the language model inside message passing on text\-rich graphs: the LLM\-as\-graph\-kernel approach recasts the language model as the aggregation operator\[[12](https://arxiv.org/html/2608.26132#bib.bib12)\], and LEMP4HG generates language\-model connection analyses that are fused into messages through a gate\[[13](https://arxiv.org/html/2608.26132#bib.bib13)\]\. Our method differs from all three\. We retain a standard GNN as the structural learner rather than replacing aggregation with the language model; we use the language model not as an encoder or predictor but as an in\-propagation conditioner that produces a target\-specific routing query; and we constrain its influence to a bounded residual on a fixed topology anchor, so semantic conditioning can refine but not override the structural prediction\. We further target labeled property graphs, treating relationship properties and schema\-level information as first\-class evidence\.

## 3Method

Let an LPG be defined as

𝒢=\(𝒱,ℰ,τV,τE,𝐏V,𝐏E\),\\mathcal\{G\}=\(\\mathcal\{V\},\\mathcal\{E\},\\tau\_\{V\},\\tau\_\{E\},\\mathbf\{P\}\_\{V\},\\mathbf\{P\}\_\{E\}\),where𝒱\\mathcal\{V\}andℰ\\mathcal\{E\}denote nodes and relationships,τV\\tau\_\{V\}andτE\\tau\_\{E\}are their labels or types, and𝐏V\\mathbf\{P\}\_\{V\}and𝐏E\\mathbf\{P\}\_\{E\}contain their property maps\. For a target nodevv, the objective is to predict an outputyvy\_\{v\}using its structural neighborhood and property\-derived semantic evidence\.

### 3\.1Structural Anchor

A topology GNN operates on graph connectivity and type information to produce structural node states:

𝐡v\(l\+1\)=GNN\(l\)⁡\(𝐡v\(l\),\{𝐡u\(l\):\(u,v\)∈ℰ\}\)\.\\mathbf\{h\}^\{\(l\+1\)\}\_\{v\}=\\operatorname\{GNN\}^\{\(l\)\}\\left\(\\mathbf\{h\}^\{\(l\)\}\_\{v\},\\left\\\{\\mathbf\{h\}^\{\(l\)\}\_\{u\}:\(u,v\)\\in\\mathcal\{E\}\\right\\\}\\right\)\.The final structural representation𝐡vtop\\mathbf\{h\}^\{\\mathrm\{top\}\}\_\{v\}is mapped to anchor logits

𝐳vtop=fanchor​\(𝐡vtop\)\.\\mathbf\{z\}^\{\\mathrm\{top\}\}\_\{v\}=f\_\{\\mathrm\{anchor\}\}\(\\mathbf\{h\}^\{\\mathrm\{top\}\}\_\{v\}\)\.This prediction path provides a stable reference that does not depend on the SLM successfully interpreting every property\.

### 3\.2Semantic LPG Encoding

Node and relationship property maps are serialized into semantic atoms containing labels, property names, and property values\. An SLM encoder maps them to fixed\-dimensional representations:

𝐬v=Enc⁡\(𝐏V​\(v\),τV​\(v\)\),𝐬u​v=Enc⁡\(𝐏E​\(u,v\),τE​\(u,v\)\)\.\\mathbf\{s\}\_\{v\}=\\operatorname\{Enc\}\(\\mathbf\{P\}\_\{V\}\(v\),\\tau\_\{V\}\(v\)\),\\qquad\\mathbf\{s\}\_\{uv\}=\\operatorname\{Enc\}\(\\mathbf\{P\}\_\{E\}\(u,v\),\\tau\_\{E\}\(u,v\)\)\.
For every relationship\(u,v\)\(u,v\)incident to targetvv, we construct a message candidate

𝐱u​v=\[𝐡utop∥𝐬u∥𝐬u​v∥𝐞τE​\(u,v\)\],\\mathbf\{x\}\_\{uv\}=\\left\[\\mathbf\{h\}^\{\\mathrm\{top\}\}\_\{u\}\\mathbin\{\\\|\}\\mathbf\{s\}\_\{u\}\\mathbin\{\\\|\}\\mathbf\{s\}\_\{uv\}\\mathbin\{\\\|\}\\mathbf\{e\}\_\{\\tau\_\{E\}\(u,v\)\}\\right\],where𝐞τE​\(u,v\)\\mathbf\{e\}\_\{\\tau\_\{E\}\(u,v\)\}represents the relationship type and∥\\\|denotes concatenation\. Thus, each candidate contains structural, node\-semantic, relationship\-semantic, and schema\-level evidence\.

### 3\.3SLM\-Conditioned Query

Structured graph views, target semantics, and anchor decision features are projected into the embedding space of a small language model and prepended to a short textual prompt as soft tokens\. The SLM is adapted using low\-rank adaptation while its base parameters remain quantized\. Its final hidden state produces the routing query

𝐪v=norm⁡\(fq​\(SLM⁡\(𝐓v\)\)\),\\mathbf\{q\}\_\{v\}=\\operatorname\{norm\}\\left\(f\_\{q\}\(\\operatorname\{SLM\}\(\\mathbf\{T\}\_\{v\}\)\)\\right\),where𝐓v\\mathbf\{T\}\_\{v\}denotes the target\-specific soft\-token sequence\.

The query also modulates message values using feature\-wise affine transformations:

𝐯~u​v=𝐯u​v⊙\(1\+γ​\(𝐪v\)\)\+β​\(𝐪v\)\.\\widetilde\{\\mathbf\{v\}\}\_\{uv\}=\\mathbf\{v\}\_\{uv\}\\odot\\left\(1\+\\gamma\(\\mathbf\{q\}\_\{v\}\)\\right\)\+\\beta\(\\mathbf\{q\}\_\{v\}\)\.This allows the SLM to influence both message importance and message content\.

### 3\.4Hierarchical Relation Routing

Routing is performed in two stages\. First, candidate messages are grouped according to their relationship typerr\. Within each group, attention weights are calculated as

αu​v\(r\)=exp⁡\(𝐪v⊤​𝐤u​v\)∑\(j,v\):τE​\(j,v\)=rexp⁡\(𝐪v⊤​𝐤j​v\)\.\\alpha\_\{uv\}^\{\(r\)\}=\\frac\{\\exp\\left\(\\mathbf\{q\}\_\{v\}^\{\\top\}\\mathbf\{k\}\_\{uv\}\\right\)\}\{\\sum\_\{\(j,v\):\\tau\_\{E\}\(j,v\)=r\}\\exp\\left\(\\mathbf\{q\}\_\{v\}^\{\\top\}\\mathbf\{k\}\_\{jv\}\\right\)\}\.A relation\-specific summary is then obtained:

𝐜v,r=∑\(u,v\):τE​\(u,v\)=rαu​v\(r\)​𝐯~u​v\+𝐞r\.\\mathbf\{c\}\_\{v,r\}=\\sum\_\{\(u,v\):\\tau\_\{E\}\(u,v\)=r\}\\alpha\_\{uv\}^\{\(r\)\}\\widetilde\{\\mathbf\{v\}\}\_\{uv\}\+\\mathbf\{e\}\_\{r\}\.The second stage routes information across the available relation summaries:

βv,r=exp⁡\(𝐪v⊤​𝐤v,r\)∑r′∈ℛvexp⁡\(𝐪v⊤​𝐤v,r′\),\\beta\_\{v,r\}=\\frac\{\\exp\\left\(\\mathbf\{q\}\_\{v\}^\{\\top\}\\mathbf\{k\}\_\{v,r\}\\right\)\}\{\\sum\_\{r^\{\\prime\}\\in\\mathcal\{R\}\_\{v\}\}\\exp\\left\(\\mathbf\{q\}\_\{v\}^\{\\top\}\\mathbf\{k\}\_\{v,r^\{\\prime\}\}\\right\)\},whereℛv\\mathcal\{R\}\_\{v\}is the set of relationship types incident tovv\. The final routed message is

𝐦v=∑r∈ℛvβv,r​𝐯v,r\.\\mathbf\{m\}\_\{v\}=\\sum\_\{r\\in\\mathcal\{R\}\_\{v\}\}\\beta\_\{v,r\}\\mathbf\{v\}\_\{v,r\}\.This decomposition prevents numerous relationships of one type from directly competing with isolated relationships of another type\. It also provides two complementary explanations:αu​v\(r\)\\alpha\_\{uv\}^\{\(r\)\}identifies relevant neighbors within a relation, whileβv,r\\beta\_\{v,r\}identifies relevant relation types\.

### 3\.5Bounded Residual Prediction

The routed message updates the structural target state:

𝐡~v=LayerNorm⁡\(𝐡vtop\+𝐦v\)\.\\widetilde\{\\mathbf\{h\}\}\_\{v\}=\\operatorname\{LayerNorm\}\\left\(\\mathbf\{h\}^\{\\mathrm\{top\}\}\_\{v\}\+\\mathbf\{m\}\_\{v\}\\right\)\.A residual head predicts a bounded correction:

Δ​𝐳v=tanh⁡\(fΔ​\(\[𝐡~v∥𝐦v\]\)\),\\Delta\\mathbf\{z\}\_\{v\}=\\tanh\\left\(f\_\{\\Delta\}\\left\(\[\\widetilde\{\\mathbf\{h\}\}\_\{v\}\\\|\\mathbf\{m\}\_\{v\}\]\\right\)\\right\),and the final prediction is

𝐳v=𝐳vtop\+δmax​Δ​𝐳v\.\\mathbf\{z\}\_\{v\}=\\mathbf\{z\}^\{\\mathrm\{top\}\}\_\{v\}\+\\delta\_\{\\max\}\\Delta\\mathbf\{z\}\_\{v\}\.The boundδmax\\delta\_\{\\max\}prevents semantic routing from arbitrarily replacing the structural prediction\. For regression, the same formulation can be used with scalar anchor and residual outputs\.

The model is optimized using the supervised prediction loss together with an auxiliary SLM verbalizer loss\. Only the LoRA parameters, soft\-token projections, routing modules, and residual head require adaptation\. Cached semantic encodings and low\-bit SLM quantization make training feasible on a single consumer GPU\.

## 4Implementation Details

We use Qwen2\.5\-1\.5B\-Instruct\[[16](https://arxiv.org/html/2608.26132#bib.bib16)\]as the small language model\. Node and relationship property atoms are encoded with the same model using a maximum sequence length of 128 tokens\. During hierarchical routing, the SLM is loaded using four\-bit NF4 quantization and adapted with LoRA\[[14](https://arxiv.org/html/2608.26132#bib.bib14),[15](https://arxiv.org/html/2608.26132#bib.bib15)\]\. LoRA is applied to the query, key, value, and output projections with rank 8 and scaling parameter 16\. The base SLM parameters remain frozen\.

The routing model uses up to 32 incident relationships per target\. Training uses five\-fold stratified cross\-validation; results are averaged over five random seeds for all tasks\. Semantic property encodings are cached before training\. Quantized SLM computation uses bfloat16 precision, gradient clipping, and a short LoRA\-only warm\-up period\. These settings allow the complete model to be trained using a single NVIDIA RTX 3090 GPU\.

### 4\.1Datasets

We evaluate on three labeled property graphs from the Neo4j\[[17](https://arxiv.org/html/2608.26132#bib.bib17)\]graph\-examples collection, each turned into a node\-prediction task in which the label\-defining attributes are removed from the encoded features\.

TheHealthcare Analytics111[https://github\.com/neo4j\-graph\-examples/healthcare\-analytics](https://github.com/neo4j-graph-examples/healthcare-analytics)graph is built from FDA Adverse Event Reporting System records, linking cases to drugs, indications, reactions, therapies, report sources, and demographics \(11,948 nodes, 91,090 edges\)\. The targets are 4,307Casenodes labeled by death outcome \(7\.6% positive\); outcome records and report identifiers are used only to form labels and are excluded from the encoded features\.

TheFinCEN Files222[https://github\.com/neo4j\-graph\-examples/fincen](https://github.com/neo4j-graph-examples/fincen)graph is derived from the ICIJ investigation of leaked Suspicious Activity Reports, connectingEntity,Filing, andCountrynodes via originator, beneficiary, and concern relationships \(7,524 nodes, 40,835 edges\)\. The targets are 4,507Filingnodes labeled by whether the transaction amount lies in the top quartile \(25\.0% positive\); the amount is removed from the features\.

TheRecommendations333[https://github\.com/neo4j\-graph\-examples/recommendations](https://github.com/neo4j-graph-examples/recommendations)graph extends the MovieLens corpus with movie metadata, connectingMovie,User,Actor,Director, andGenrenodes \(28,863 nodes, 166,261 edges\)\. The targets are the 9,058 ratedMovienodes labeled by whether the IMDb rating exceeds the median of 6\.9 \(50\.1% positive\); rating and vote count are removed\.

### 4\.2Evaluation Setup

Each task was evaluated with five stratified folds per seed; we report the mean and standard deviation across seed\-level means, using five seeds for all tasks\. Because the positive class ranges from 7\.6% \(healthcare\) to 50\.1% \(IMDb\), macro\-F1 and AUROC are emphasized over accuracy, which is inflated by the majority class on the imbalanced tasks\.

The proposed model was compared with three architectural baselines: a topology\-only GNN, a node\-semantic static GNN, and an edge\-semantic static GNN\. The node\-semantic model initializes nodes using SLM\-derived property encodings, whereas the edge\-semantic model additionally incorporates encoded relationship properties into message propagation\. In both semantic baselines, the encodings remain static and do not perform target\-conditioned routing\.

## 5Experimental Results

On the healthcare task, the hierarchical relation router obtains the best mean result on all three reported metrics \(Table[1](https://arxiv.org/html/2608.26132#S5.T1), Fig\.[1](https://arxiv.org/html/2608.26132#S5.F1)\)\. Relative to the strongest static baseline for each metric, it improves accuracy by 1\.7 points \(0\.9070\.907vs\.0\.8900\.890\), macro\-F1 by 5\.8 points \(0\.6870\.687vs\.0\.6290\.629\), and AUROC by 4\.8 points \(0\.8000\.800vs\.0\.7510\.751\)\. The gains in macro\-F1 and AUROC are the most relevant for this imbalanced task, where the positive class accounts for only 7\.6% of targets and accuracy is dominated by the majority class\. The small variation across seeds \(standard deviation≤0\.023\\leq 0\.023\) indicates that the improvement is not attributable to a single favorable data split\.

The same pattern holds on FinCEN, where the router is again best on all three metrics, improving over the strongest static baseline by 3\.7 points in accuracy, 4\.9 in macro\-F1, and 6\.9 in AUROC\. On the more saturated IMDb task \- where the classes are balanced and static semantic features already capture most of the signal \- the router remains best on accuracy and macro\-F1 but is marginally surpassed by the edge\-semantic baseline on AUROC \(0\.8740\.874vs\.0\.8800\.880\), consistent with its status as an external\-knowledge control\.

Table 1:Binary classification on labeled property graphs, 5\-fold×\\times5\-seed \(mean±\\pmstd\)\. All models share a fixed topology\-GNN anchor; the relation router predicts a bounded SLM\-conditioned correction to it\. Best per column per dataset inbold\.![Refer to caption](https://arxiv.org/html/2608.26132v1/x1.png)Figure 1:Binary classification on labeled property graphs \(5\-fold×\\times5\-seed; error bars are std across seeds\)\. The SLM\-conditioned relation router \(orange\) is compared with three frozen GNN anchors\.Across all datasets, the gap between the topology\-only and static semantic baselines confirms that node and relationship properties carry useful predictive evidence\. However, the further improvement obtained on healthcare and FinCEN shows that encoding this evidence statically is not sufficient by itself\. Target\-conditioned selection within relationship types and across relation\-level summaries provides additional value beyond static semantic message passing, and does so while adjusting only a bounded correction to a fixed topology anchor\.

Beyond classification, the same architecture applies without modification to regression and learning\-to\-rank formulations, with only the prediction head and loss replaced\. Table[2](https://arxiv.org/html/2608.26132#S5.T2)summarises results on three formulations of the FinCEN filing\-amount target\. For regression, the router improves Spearman correlation from0\.2700\.270\(best anchor\) to0\.4830\.483\(\+0\.213\+0\.213\), the largest absolute gain in the study\. For ranking, whereFilingnodes are ordered by transaction amount, it improves global rank correlation from0\.5310\.531\(best anchor\) to0\.6150\.615in Spearman and average precision from0\.5320\.532to0\.5810\.581in MAP\. The same routing mechanism thus transfers across task types with only its output head changed\.

Table 2:Multi\-task generality on a single target\.The same SLM\-conditioned relation router \- with only its prediction head and loss changed \- addresses three formulations of the FinCEN filing\-amount target: binary classification \(amount in the top quartile\), regression \(the amount itself\), and learning\-to\-rank \(ordering filings by amount\)\. In every formulation it improves over the strongest GNN baseline \(5\-fold×\\times5\-seed means; metrics are macro\-F1 for classification, Spearmanρ\\rhoand MAP for regression and ranking\)\. The best baseline is the top of the three GNN anchors \(topology / node\-semantic / edge\-semantic\), which varies by formulation\.Table[3](https://arxiv.org/html/2608.26132#S5.T3)extends the evaluation to multi\-class prediction\. On healthcare severity \(5 classes\), the router improves accuracy by 9\.1 points over the strongest static baseline \(0\.5550\.555vs\.0\.4640\.464\) and AUROC by 4\.0 points \(0\.7140\.714vs\.0\.6740\.674\), with markedly lower variance across seeds\. On FinCEN amount \(4 ordinal classes\), it improves accuracy by 2\.4 points \(0\.5020\.502vs\.0\.4780\.478\) and AUROC by 2\.0 points \(0\.7640\.764vs\.0\.7440\.744\)\. In both cases the router sweeps every reported metric, confirming that target\-conditioned routing generalises beyond binary tasks\.

Table 3:Multi\-class classification on labeled property graphs, 5\-fold×\\times5\-seed \(mean±\\pmstd\)\. All models share a fixed topology\-GNN anchor; the relation router predicts a bounded SLM\-conditioned correction to it\. AUROC is one\-vs\-rest macro\-averaged\. Best per column per dataset inbold\.
## 6Discussion

A central design choice in our method is to keep the structural prediction and the semantic correction separate: a frozen topology anchor fixes a strong structural prior, and the language model may only add a bounded residual on top of it\. This separation is what makes the role of the SLM interpretable\. Rather than asking whether a language\-model\-driven model is better in aggregate, it isolates the contribution of semantic conditioning as a quantity that is zero at initialization and bounded thereafter, so any gain is attributable to the learned routing rather than to re\-selecting a stronger predictor\. The same choice makes the method deliberately conservative: it cannot trade structural accuracy for semantic plausibility, which is desirable when the anchor is already strong, but it also limits how far semantic evidence alone can carry a prediction when the structural signal is weak\. We regard this as an appropriate default for property\-rich graphs, where structure is usually reliable and semantics is complementary rather than primary\.

The experiments also suggest a simple principle for when such conditioning is worthwhile\. Target\-conditioned routing can help only to the extent that the evidence relevant to a prediction is selective \- concentrated in particular neighbors and relationship types rather than spread uniformly across a node’s neighborhood\. When the relevant signal is diffuse, or already summarized by target\-independent pooling, a static semantic encoder is close to optimal and there is little for routing to recover\. This framing predicts that the benefit of the architecture should track the heterogeneity and selectivity of a task’s relational evidence rather than its raw difficulty, and it offers a way to anticipate, before training, where the method is most likely to pay off\.

This positions the approach between two common alternatives\. Static property encoders make semantic information available to a GNN but fix it before propagation, so they cannot reweight evidence with respect to the target; graph\-to\-text language\-model approaches gain contextual interpretation but discard explicit structure and are constrained by the context window\. Conditioning a real message\-passing process on a small language model keeps the structural learner intact while letting semantics modulate it locally\. A practical consequence is interpretability: the within\- and across\-relation weights expose, for each prediction, which neighbors and which relationship types were selected, which is directly useful for auditing decisions in domains such as financial\-crime or clinical\-outcome analysis\.

## 7Conclusion

We presented SLM\-Conditioned Hierarchical Relation Routing, a method for integrating language\-derived semantics directly into message propagation over labeled property graphs\. Rather than treating node and edge properties as static inputs, the architecture uses a parameter\-efficient SLM to condition which neighboring messages and relationship types are selected for each target\. A two\-stage routing mechanism separates within\-type from across\-type evidence selection, and a bounded residual update keeps the structural anchor stable under semantic corrections\.

The routing mechanism transfers across binary classification, multi\-class prediction, regression, and learning\-to\-rank formulations with only the prediction head and loss changed, and improves over the strongest static\-semantic baseline in each case\. The results support the view that relational context \- not just richer node features \- is a meaningful source of signal in property\-rich graphs, and that an SLM is a practical means of exploiting it during graph learning\.

\{credits\}

#### 7\.0\.1Acknowledgements

This manuscript acknowledges the use of Claude Code\[[18](https://arxiv.org/html/2608.26132#bib.bib18)\], powered by the Claude Opus 4\.8, to improve language clarity, refine sentence structure, and enhance overall writing precision\.

## References

- \[1\]Kipf, T\.N\., Welling, M\.: Semi\-supervised classification with graph convolutional networks\. In: International Conference on Learning Representations \(ICLR\) \(2017\)
- \[2\]Hamilton, W\., Ying, R\., Leskovec, J\.: Inductive representation learning on large graphs\. In: Advances in Neural Information Processing Systems \(NeurIPS\), vol\. 30 \(2017\)
- \[3\]Veličković, P\., Cucurull, G\., Casanova, A\., Romero, A\., Liò, P\., Bengio, Y\.: Graph attention networks\. In: International Conference on Learning Representations \(ICLR\) \(2018\)
- \[4\]Schlichtkrull, M\., Kipf, T\.N\., Bloem, P\., van den Berg, R\., Titov, I\., Welling, M\.: Modeling relational data with graph convolutional networks\. arXiv preprint arXiv:1703\.06103 \(2017\)
- \[5\]Iyer, R\.G\., Wang, W\., Sun, Y\.: Hierarchical attention models for multi\-relational graphs\. arXiv preprint arXiv:2404\.09365 \(2024\)
- \[6\]Ying, C\., Cai, T\., Luo, S\., Zheng, S\., Ke, G\., He, D\., Shen, Y\., Liu, T\.\-Y\.: Do transformers really perform badly for graph representation? In: Advances in Neural Information Processing Systems \(NeurIPS\), vol\. 34 \(2021\)
- \[7\]Rampášek, L\., Galkin, M\., Dwivedi, V\.P\., Luu, A\.T\., Wolf, G\., Beaini, D\.: Recipe for a general, powerful, scalable graph transformer\. In: Advances in Neural Information Processing Systems \(NeurIPS\), vol\. 35 \(2022\)
- \[8\]Tang, J\., Yang, Y\., Wei, W\., Shi, L\., Su, L\., Cheng, S\., Yin, D\., Huang, C\.: GraphGPT: Graph instruction tuning for large language models\. arXiv preprint arXiv:2310\.13023 \(2023\)
- \[9\]Chai, Z\., Zhang, T\., Wu, L\., Han, K\., Hu, X\., Huang, X\., Yang, Y\.: GraphLLM: Boosting graph reasoning ability of large language models\. arXiv preprint arXiv:2310\.05845 \(2023\)
- \[10\]Beiranvand, A\., Vahidipour, S\.M\.: Integrating structural and semantic signals in text\-attributed graphs with BiGTex\. arXiv preprint arXiv:2504\.12474 \(2025\)
- \[11\]Choudhary, M\., Sengupta, S\., Potika, K\.: GaLoRA: Parameter\-efficient graph\-aware LLMs for node classification\. arXiv preprint arXiv:2603\.10298 \(2026\)
- \[12\]Zhang, Y\., Yu, H\., Zhang, H\., Di, P\.: LLM as graph kernel: Rethinking message passing on text\-rich graphs\. arXiv preprint arXiv:2603\.14937 \(2026\)
- \[13\]Cheng, D\., Wang, W\., Guang, M\.: Language models as messengers: Enhancing message passing in heterophilic graph learning\. arXiv preprint arXiv:2505\.19762 \(2025\)
- \[14\]Hu, E\.J\., Shen, Y\., Wallis, P\., Allen\-Zhu, Z\., Li, Y\., Wang, S\., Wang, L\., Chen, W\.: LoRA: Low\-rank adaptation of large language models\. arXiv preprint arXiv:2106\.09685 \(2021\)
- \[15\]Dettmers, T\., Pagnoni, A\., Holtzman, A\., Zettlemoyer, L\.: QLoRA: Efficient finetuning of quantized LLMs\. In: Advances in Neural Information Processing Systems \(NeurIPS\), vol\. 36 \(2023\)
- \[16\]Qwen Team: Qwen2\.5 Technical Report\. arXiv preprint arXiv:2412\.15115 \(2024\)
- \[17\]Neo4j,*Neo4j Graph Examples*, https://github\.com/neo4j\-graph\-examples, Accessed: 2026\-06\-09\.
- \[18\]Anthropic,*Claude Code*, https://www\.anthropic\.com/claude\-code, Accessed: 2026\-06\-12\.

Similar Articles

Dynamic Latent Routing

Hugging Face Daily Papers

Dynamic Latent Routing (DLR) lets LLMs learn their own inner monologue by composing sub-policies via search, inspired by language compositionality. In low-data fine-tuning, DLR matches or outperforms standard supervised fine-tuning.