TL;DR
Traditional Knowledge Graph Question Answering (KGQA) retrieves a single entity answer, failing to address relational questions like "How are Person A and Person B related?" UniRel-R1 introduces a framework for relation-centric KGQA that extracts and generates informative subgraphs connecting target entities. By coupling multi-stage graph pruning with reinforcement learning (GRPO) using verifiable rewards that penalize trivial high-degree hub nodes and generic relations, UniRel-R1 yields valid, semantically rich relational paths across diverse LLMs and graphs.
What Problem Does This Paper Address?
Standard KGQA systems focus on entity-centric queries (e.g., "Who is Meghan Markle’s husband’s grandmother?" $\to$ Queen Elizabeth II). However, real-world user queries are frequently relation-centric, seeking to understand the semantic web of associations between multiple entities.
The primary challenge in answering relation-centric queries is the trivial path problem:
- The shortest path between two entities often routes through generic, high-degree "hub" nodes (e.g., connected via
gender: femaleorcountry: United States). - While topologically valid and short, these candidate subgraphs convey almost no informative semantic context.
Selecting compact, semantically specific, and non-trivial connection subgraphs among millions of candidates requires balancing graph connectivity, relation rarity, and node specificity.
Methods
UniRel-R1 structures the relational QA pipeline into three core stages:
- Subgraph Selection: Given seed entities extracted from a query, the model extracts a localized subgraph by combining their $k$-hop neighborhoods ($k \le 4$).
- Multi-Stage Graph Pruning: To filter out uninformative shortcuts before LLM processing, the graph undergoes five pruning steps:
- Local Pruning: Removes nodes exceeding a degree-based hub penalty ($\text{HubPenalty}(e) = \log(1 + \deg(e))$).
- Connectivity Guarantee: Checks pairwise intersection graphs among seed neighborhoods; if disconnected, it dynamically relaxes the penalty threshold.
- Leaf Entity Pruning: Iteratively strips dangling dead-end nodes.
- Compactness Control & Iterative Reduction: Selects minimal covering intersections to keep the subgraph compact.
- RL-Tuned LLM via RLVR: The pruned subgraph is serialized into node and edge tables. An LLM is fine-tuned using Group Relative Policy Optimization (GRPO) under a Reinforcement Learning with Verifiable Reward (RLVR) paradigm. The composite reward function optimizes:
- Format validity ($R_{\text{fmt}}$): strict parser-friendly triple generation.
- Connectivity ($R_{\text{con}}$): penalizing broken or incomplete paths between seed entities.
- Entity Informativeness ($R_{\text{ent}}$): penalizing intermediate nodes with high degrees.
- Relation Informativeness ($R_{\text{rel}}$): rewarding relations with higher Inverse Document Frequency (IDF).
Datasets
The authors evaluated UniRel-R1 across seven standard KG benchmarks spanning encyclopedic, biomedical, and commonsense knowledge:
- Freebase13, FB15k-237, and MetaQA
- DBpedia50 and DBpedia500
- YAGO3-10 and UMLS
Because existing benchmarks only provide single-entity targets, the authors synthesized 2,500 relation-centric queries per dataset (2,000 train / 500 test) for pairs reachable within 4 hops. They also generated 3-entity and 4-entity queries on DBpedia50 to evaluate multi-entity scalability.
Key Insights and Ideas
- Shorter is not always better: Shortest-path baselines frequently yield trivial answers (e.g., connecting two film directors because both have nationality "USA"). Incorporating relation IDF and entity degree penalties forces the model to uncover specific connections (e.g., shared mentorship, artistic influences, or specific institutions).
- Semantics vs. Structure (Qwen vs. Llama): When transferring a model trained on DBpedia500 to other graphs where entity and relation names were replaced with masked tokens (e.g.,
ENT1,REL1): - Qwen models suffered dramatic drops in connectivity and reward (e.g., a 58.3% drop in connectivity on YAGO3-10), indicating heavy reliance on pre-trained semantic cues.
- Llama models showed remarkable resilience to token masking (less than a 1% drop on Llama-3B), showing that Llama relied more consistently on graph topology and structural routing.
Key Results
- Massive Gains Over Vanilla Baselines: Across model families (Qwen-2.5 3B/7B/14B and Llama-3.1/3.2 3B/8B), UniRel-R1 produced at least a 35% improvement in connectivity ratio and over a 245% increase in average reward compared to zero-shot base models.
- Format Compliance: Zero-shot Llama models struggled severely with graph-to-text syntax (often achieving $<5\%$ format compliance). UniRel-R1 brought format compliance to nearly 100% across all models and datasets.
- Multi-Entity Scalability: On complex 3- and 4-entity queries on DBpedia50, UniRel-R1 increased full connectivity by 591.3% for triplet queries and 355.6% for quadruplet queries over baseline models.
Limitations and Future Work
- Static Normalization Parameters: Normalization constants ($x=7, y=6$) governing the trade-off between entity penalties and relation rarity were tuned on DBpedia500 and held constant across all graphs, which may not be universally optimal for graphs with atypical degree distributions.
- Heuristic Informativeness: Informativeness is modeled purely through statistical node degrees and relation IDF; this can occasionally overlook cases where a common relation or entity is genuinely the most salient answer to a user's question.
- Search Scale: Queries were bounded within 4 hops; extending relation-centric reasoning over open-ended, massive-hop web graphs remains an open direction.
Summary updated