Abstract
Continual Structured Knowledge Reasoning (CSKR) focuses on training models to handle sequential tasks where each task involves translating natural language questions into structured queries grounded in diverse knowledge sources. Existing approaches face significant challenges, including catastrophic forgetting, poor generalization to heterogeneous knowledge formats, and inefficient parameter growth. We propose K-DeCore, a novel framework that utilizes a knowledge decoupling mechanism to disentangle reasoning into task-specific and task-agnostic stages. By integrating a dual-perspective memory consolidation mechanism and a structure-guided pseudo-data synthesis strategy, K-DeCore achieves state-of-the-art performance with a fixed number of tunable parameters. Extensive experiments across four benchmark datasets demonstrate its superiority over existing continual learning methods.
Introduction
Structured Knowledge Reasoning (SKR) is the process of translating natural language questions into machine-executable queries, such as SQL for relational databases or SPARQL for knowledge graphs. While Large Language Models (LLMs) have shown promise in static SKR tasks, real-world applications are dynamic, requiring models to learn new schemas, APIs, and query languages sequentially. This paradigm, known as Continual Structured Knowledge Reasoning (CSKR), introduces three primary hurdles:
- Catastrophic Forgetting: Learning a new task (e.g., SPARQL) often degrades the model's performance on previously learned tasks (e.g., SQL).
- Task Heterogeneity: Different tasks use vastly different formats (relational tables vs. graph triples), hindering knowledge transfer.
- Efficiency Constraints: Many continual learning methods add parameters for every new task, leading to unsustainable "parameter explosion."
The K-DeCore Framework
To address these challenges, K-DeCore (Knowledge DEcoupling for COntinual REasoning) introduces a modular approach to reasoning that promotes forward knowledge transfer while maintaining a fixed parameter footprint.
1. Knowledge Decoupling and Unified Schema
K-DeCore breaks the query generation process into two distinct stages to bridge the gap between heterogeneous tasks:
- Stage 1: Schema Filtering (Task-Agnostic): The model identifies relevant components of the database or knowledge graph. To facilitate this across diverse tasks, K-DeCore converts all schemas (KGs, APIs, etc.) into a unified, "DB-like" format. This stage treats schema selection as a universal skill, allowing the model to transfer filtering capabilities from one task to the next.
- Stage 2: Query Building (Task-Specific): The model constructs the final executable query using the filtered schema. This stage focuses on the specific syntax and logic of the target query language.
2. Dual-Perspective Memory Consolidation
To mitigate forgetting, K-DeCore employs a replay buffer of past examples. Unlike random sampling, K-DeCore selects samples based on two criteria:
- Schema Similarity: Ensures the schema filter remains sharp across different domains.
- Query Structure Diversity: Ensures the query builder retains the flexibility to handle various logical structures.
3. Structure-Guided Pseudo-Data Synthesis
To enhance generalization, K-DeCore uses the LLM to synthesize complex query structures by merging simpler ones. It then generates corresponding natural language questions for these synthetic queries. This "hallucinated" training data exposes the model to complex, nested patterns it might not have encountered in the original training set, improving its ability to handle novel reasoning paths.
Experimental Evaluation
Methodology
The researchers evaluated K-DeCore using three distinct task streams curated from four major benchmarks:
- Spider: Complex Text-to-SQL over relational databases.
- ComplexWebQuestions (CWQ): Multi-hop SPARQL queries.
- GrailQA: S-expressions over the Freebase knowledge graph.
- MTOP: Task-oriented parsing for dialogue systems.
The framework was tested across three LLM backbones: T5-Large, Llama3-8B, and Qwen2.5-7B, using Parameter-Efficient Fine-Tuning (LoRA) to keep the backbone models frozen.
Key Results
- Superior Accuracy: On the primary SKR stream, K-DeCore (using Qwen2.5) achieved an Average Accuracy (AA) of 43.2%, significantly outperforming the next best continual learning method, EMAR (35.6%).
- Reduced Forgetting: The Backward Transfer (BWT) metric—measuring performance loss on old tasks—was significantly improved compared to vanilla fine-tuning, indicating that K-DeCore effectively preserves prior knowledge.
- Zero-Shot Generalization: The structure-guided synthesis strategy allowed the model to handle novel query structures with higher proficiency than baseline methods.
Discussion and Insights
The success of K-DeCore highlights that while query syntax varies, the underlying act of schema filtering is a universal bridge. By unifying the schema format, the framework transforms a heterogeneous problem into a homogeneous one. Furthermore, the results suggest that for structured reasoning, the structural diversity of training data is more critical than sheer volume.
Limitations
While effective, K-DeCore's pseudo-data synthesis currently relies on an execution check to ensure query validity, requiring a functioning environment for each task. Additionally, while the framework was tested on models up to 8B parameters, future work is needed to explore its behavior in massive "reasoning-heavy" models (e.g., 30B+ parameters) where forgetting patterns may differ.
Conclusion
K-DeCore provides a robust and parameter-efficient solution for the evolving demands of structured knowledge reasoning. By decoupling task-agnostic filtering from task-specific building and leveraging synthetic structural diversity, it enables LLMs to adapt to new reasoning challenges without sacrificing their existing capabilities.
Summary updated