TL;DR
InstructKG is a novel framework that automatically constructs instructor-aligned knowledge graphs from lecture materials (like slides and notes) to map out course prerequisites and sub-concepts. By combining large language model (LLM) reasoning with unique educational signals—such as teaching order and pedagogical roles—it accurately captures intended learning progressions, paving the way for automated, personalized student diagnostics.
What Problem Does This Paper Address?
In large-scale university courses, identifying exactly where a student's understanding breaks down is an immense challenge for instructors. While knowledge graphs (KGs) offer a natural way to map out how educational concepts connect, existing automated construction methods fall short. They either focus on macro-level relationships (like course enrollment or broad topics like "Algorithms") or process text chunks in isolation, completely ignoring the instructor's pedagogical intent.
As a result, standard text-extraction tools often pull out irrelevant noise—such as variable names from code snippets or logistics like "office hours"—instead of core educational concepts and their actual dependencies (e.g., needing to understand recursion before merge sort).
Methods
The authors introduce InstructKG, a framework designed to ground LLM reasoning in actual instructional context rather than relying purely on the model's pre-trained parametric knowledge. The pipeline operates in three distinct phases:
- Document Processing & Concept Extraction: Lecture PDFs are sorted by their natural teaching sequence and split into text chunks. An LLM extracts core concepts while explicitly ignoring code tokens, variable names, and example values.
- Pedagogical Role Mapping & Context Clustering: For each concept found in a chunk, the framework classifies its pedagogical role into Definition (the concept is being introduced), Example (demonstrated via a walkthrough), or Assumption (used as assumed prior knowledge). To catch relationships that span across chunk boundaries, chunks are embedded using a sentence-transformer and clustered using UMAP and HDBSCAN.
- Relation Judgment & KG Construction: Finally, an LLM acts as a relation judge. It takes pairs of concepts along with their temporal order, pedagogical roles, and text evidence to determine if the relationship is
depends_on(prerequisite),part_of(compositional), orNone.
Datasets
The framework was evaluated on three real-world computer science courses at a large public university, chosen because they vary significantly in format, scale, and instructional density:
- Database Systems: 27 lectures consisting of 569 pages of slides.
- Natural Language Processing (NLP): 15 lectures spanning 971 pages of slides and notes.
- Algorithms: 9 lectures containing 222 pages of dense lecture notes.
Key Insights and Ideas
- Pedagogical Structure Trumps Model Size: Standard text-extraction baselines fail because they lack educational context, regardless of how large the model is. InstructKG roughly doubles the "node significance" of baselines even when using a small 3B parameter model, proving that structuring the pipeline around instructor signals is more critical than raw model capacity.
- The Power of Role Pairings: Classifying pedagogical roles provides a clean, highly effective heuristic for relationship directionality. For instance, if a concept appears as an Assumption in a chunk where another concept is being Defined, it provides an incredibly strong signal for a
depends_on(prerequisite) relationship. - Clustering Heals Chunking Artifacts: Educational concepts don't always neatly co-occur in the exact same paragraph. Semantic clustering allows the framework to find implicit dependencies across different parts of the lecture materials, making the pipeline robust against arbitrary text-splitting boundaries.
Key Results
The authors evaluated their approach against two recent LLM-based KG construction baselines (KGGen and EDC) across two dimensions: node significance (how meaningful the concepts are) and triplet accuracy (how correct the relationships are).
- Node Significance: InstructKG achieved massive gains. Using Qwen-14B, it achieved mean node significance scores of 0.978 (Algorithms), 0.956 (NLP), and 0.949 (SQL) on a [0,1] scale, compared to the strongest baseline (KGGen-14B) which hovered between 0.509 and 0.581.
- Triplet Accuracy: InstructKG with Qwen-14B outperformed the best baseline configuration by 18% on Algorithms, 19% on NLP, and 34% on SQL.
- Qualitative Superiority: As shown in Figure 3, while baselines frequently linked core concepts to surface-level noise like variable names (e.g., linking "Optimization Problem" to "Instant I"), InstructKG correctly mapped out pedagogical hierarchies like "Dynamic Programming" and "Independent Set" being part of an "Optimization Problem."
Limitations and Future Work
While promising, the authors acknowledge a few key limitations:
- Domain Specificity: The evaluation was restricted to three computer science courses; its generalizability to highly qualitative or non-STEM disciplines remains an open question.
- Restricted Schema: The current framework only supports two relation types (
depends_onandpart_of), which might not encompass the full range of nuances in complex curricula. - Model Scale: The study only explored open-source models up to 14B parameters; performance on frontier-scale models (like GPT-4 or Claude 3.5 Sonnet) was not explored.
Future Work: The authors plan to integrate these constructed knowledge graphs directly with real student assessment data to enable automated, targeted learning interventions at scale.
Summary updated