TL;DR
Even when a document contains the exact answer to a question, a Retrieval-Augmented Generation (RAG) system can fail simply because its underlying knowledge base slices and connects the text in the wrong way. This paper introduces Knowledge-Base Gradient Descent, a method that treats the structural blueprint of a knowledge base—like a graph schema or document template—as a learnable parameter. By diagnosing failed answers, proposing structural edits, and rebuilding the knowledge base from scratch, the system iteratively reshapes how it stores knowledge to match how it will be queried.
What Problem Does This Paper Address?
Imagine asking an LLM how much a new model improves over its strongest baseline in a research paper. The paper explicitly states the percentage gain. Yet, your RAG system replies "Unanswerable." Why? Because the knowledge graph schema used to ingest the paper stored absolute scores in one place and qualitative comparisons in another, severing the specific numerical gain from its experimental conditions.
When we build persistent knowledge bases—whether as structured knowledge graphs or linked Markdown "knowledge cards"—we have to decide upfront what constitutes an entity, a relationship, or a document boundary. Automated tools usually guess this structure directly from the raw text during ingestion. However, a structure that looks neat on paper might be terrible at serving actual user queries. The author flips the problem on its head: instead of designing a knowledge base around the text, we should learn its structure directly from the questions the application is expected to answer—a setting called Self-Structuring Learning.
Methods
While recent methods optimize prompts using LLM feedback, editing a prompt takes effect immediately. Editing a knowledge base blueprint does not—if you invent a new graph relation or split a card type, you have to go back to the raw text and rebuild the database to see if it actually helps.
Enter Knowledge-Base Gradient Descent (and its graph-specific cousin, Schema Descent). Keeping the ingestion builder, retrieval system (BM25), and answering LLM fixed, the algorithm runs an iterative update loop over a set of learning questions:
- Diagnose: Run the learning questions through the current knowledge base. Compare failed answers against expected answers and source evidence to see what context got dropped or disconnected.
- Propose: An LLM proposes a single, complete structural edit—such as adding/replacing entity and relation types in a graph schema, or changing field definitions and grouping rules for knowledge cards. Because multiple structural tweaks often interact, joint edits are bundled as a single candidate.
- Rebuild & Compare: Re-ingest the source documents under the proposed structure and re-answer all learning questions. Why call a discrete edit "Gradient Descent"? If you imagine choosing a candidate edit with probability $\theta$, the change in overall loss is mathematically the exact derivative with respect to $\theta$. If the loss drops (fixing failures without breaking previously correct answers), the new structure is adopted for the next round.
Datasets
The method is evaluated using Qasper (v0.3), a dataset of NLP research papers paired with questions. To simulate querying large multi-topic repositories, the author bundles 50 eligible papers into five independent "large documents" of 10 papers each.
Two distinct question sets are used per bundle:
- Generated Questions: Mimicking Qasper's original collection process, an LLM reads only titles and abstracts to write 5 questions per paper, while a separate LLM reads the full text to write reference answers. Per bundle, 40 questions drive the structural learning loop, and 10 are held out for evaluation.
- Human Questions: All 293 original human-written Qasper questions and annotations across the 50 papers, strictly reserved for final evaluation.
Key Insights and Ideas
- Structure dictates specialization: You get what you train for. Structures learned from LLM-generated questions excelled on held-out LLM questions, outperforming a raw passage-chunking baseline. Yet on human questions, raw source passages beat both structured representations—because raw chunks never accidentally summarize away an unexpected detail (like an explicit definition of "hate speech" dropped by specialized cards).
- Graphs consolidate, cards fragment: Left to optimize itself, Schema Descent made graph items fewer and larger (dropping from 4,384 to 2,756 items across the bundles), creating rich n-ary concepts like a
findingtype that binds a model, baseline, metric, and conditions together. Conversely, knowledge cards split general section summaries into more and smaller specialized cards (rising from 877 to 1,328), meaning fewer cards could fit inside the retrieval token budget. - Discrete edits have interaction effects: Deleting one flawed graph rule might yield zero improvement if a second rule still blocks the right answer; deleting both together fixes it. Evaluating complete rebuilds captures these non-linear interactions directly.
Key Results
After five update rounds per document, structures were scored using Qasper Answer F1 (0–100 points):
- On held-out generated questions: Both representations improved substantially. Graph schemas jumped by +12.91 points on average (from 35.33 to 48.24, improving in all five documents), and knowledge cards rose by +4.45 points (50.61 to 55.06). Both beat the 100-unit raw passage baseline (46.71).
- On human questions: Graph schemas edged up by +1.10 points (28.97 to 30.07), cutting "Unanswerable" responses from 131 down to 95 as richer context became connected. Knowledge cards, however, dropped by −2.89 points (35.56 to 32.67). Raw source passages scored highest here at 37.03.
Limitations and Future Work
- Distribution mismatch: Because learned structures mold themselves tightly to the learning set, any gap between development questions and real-world user queries can hurt performance—especially for rigid templates like typed cards that omit text outside their narrow scope. Ensuring learning questions faithfully represent production traffic is critical.
- Reconstruction cost: Every candidate edit requires re-extracting entities or cards from the source text. While affordable offline during development, scaling this loop to massive corpora is non-trivial.
- Metric fragility: Lexical Answer F1 can penalize semantically identical answers over punctuation quirks (e.g., scoring
"English–Chinese back-translation"as 0 against"back translation between English and Chinese"), adding noise to evaluation. Future directions were not explicitly discussed beyond aligning learning questions with target distributions.
Summary updated