Introduction
Large Language Models (LLMs) have revolutionized natural language processing, but their deployment in Retrieval-Augmented Generation (RAG) systems introduces significant challenges. Specifically, Knowledge Graph RAG (KG-RAG) often suffers from "token bloat." Retrieving a large number of triples to ensure factual accuracy can increase input sizes by orders of magnitude, leading to prohibitive costs and increased latency.
While routing queries between smaller, cheaper models and larger, more capable models is a promising solution, existing routers typically require expensive training on labeled datasets and struggle to generalize across different knowledge bases or model updates. SkewRoute addresses these issues with a training-free routing mechanism based on the statistical distribution of retrieval scores.
The SkewRoute Framework
The core innovation of SkewRoute is the Skewness Hypothesis, which posits that the distribution of scores from a retriever serves as a high-fidelity signal for query difficulty.
The Skewness Hypothesis
For simple queries (e.g., "Who is the CEO of Apple?"), retrievers typically exhibit high confidence in a small subset of triples, resulting in a high-skewness (power-law) distribution. Conversely, complex multi-hop queries often result in a low-skewness distribution, where scores are more uniform because the necessary information is distributed across multiple triples. This "flatness" indicates that the LLM will need to work harder to synthesize the correct answer.
Statistical Metrics for Routing
Instead of training a neural network to predict difficulty, SkewRoute employs four training-free statistical metrics to quantify this skewness directly from the retriever's output:
- Gini Coefficient: Measures inequality among scores; a high Gini coefficient indicates that a few triples dominate the total score.
- Entropy: Quantifies the randomness or uniformity of the score distribution.
- Area Under Curve (AUC): Calculates the total area of the normalized score curve.
- Cumulative Threshold: Determines the number of triples required to reach a specific percentage (e.g., 95%) of the total score sum.
Key Results
The framework was evaluated on the WebQSP and CWQ benchmarks using the Freebase knowledge graph, yielding several critical insights:
- Superior Effectiveness: SkewRoute demonstrated over 3x higher routing effectiveness compared to state-of-the-art training-based routers like RouteLLM and GraphRouter.
- Computational Efficiency: Because it relies on simple statistical calculations, SkewRoute is approximately 1,000x faster than neural-network-based routers, operating in roughly 0.01ms on a standard CPU.
- Plug-and-Play Generalization: The system generalizes across different model families (e.g., Qwen, Llama) and retrieval scorers without any retraining or fine-tuning.
- Token Savings: Beyond model routing, SkewRoute can dynamically adjust the number of retrieved triples. For high-skewness queries, reducing the triple count from 100 to 10 maintains performance while drastically cutting token costs.
Conclusion and Future Work
SkewRoute provides a robust, efficient, and training-free solution for optimizing KG-RAG systems. By leveraging the inherent signals in retrieval scores, it balances the trade-off between performance and cost without the overhead of model training. Future research will explore extending this skewness-based approach to standard text-chunk RAG and multimodal retrieval scenarios.
Summary updated