Skip to content

NagaPranathiRallabandi/gnn-explainable-education-recommender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

GNN Explainable Education Recommender

Prototype implementation of an explainable educational recommender using knowledge graph reasoning and GNN concepts (accompanying published patent).

This repository provides a prototype implementation accompanying a published patent on explainable educational recommendation using knowledge graphs and graph reasoning.

This project demonstrates a Graph Neural Network (GNN) approach to explainable education recommendations. It uses a heterogeneous knowledge graph to model relationships between Learners, Resources, and Concepts, enabling multi-hop reasoning (e.g., "You failed Topic X because you missed Prerequisite Y").

🚀 How to Run

  1. Clone the repository
  2. Install dependencies:
    pip install -r requirements.txt
  3. Run the Jupyter Notebook:
    jupyter notebook gnn_reasoning_demo.ipynb
    (Or open directly in VS Code / Google Colab)

📂 Synthetic Dataset Schema

Dataset Note: The dataset is synthetic and intentionally small to demonstrate reasoning behavior rather than model performance.

The dataset follows a normalized heterogeneous knowledge graph schema separating node entities and edge relations. Concepts form a prerequisite dependency graph, resources are mapped to concepts, and learner interactions provide learning signals. The structure enables reasoning over missing prerequisites and generation of interpretable recommendation paths.

1. concepts.csv (Knowledge Layer)

Defines the core knowledge units.

  • concept_id: Unique ID (e.g., c1)
  • name: Concept name (e.g., "Python Basics")

2. prerequisites.csv (Reasoning Layer)

Defines the dependency graph between concepts.

  • Edge Meaning: concept_id -> prerequisite_id means Concept ID depends on Prerequisite ID (Target -> Source).
  • Example: c2, c1 means "Control Flow" requires "Python Basics".

3. resources.csv (Content Layer)

Educational materials mapped to concepts.

  • Edge Meaning: resource_id -> concept_id means Resource teaches Concept.
  • resource_id: Unique ID (e.g., r1)
  • title: Title of the resource
  • concept_id: The concept covered

4. learners.csv (User Layer)

Users and their specific learning objectives.

  • learner_id: Unique ID (e.g., l1)
  • name: Learner name
  • target_concept_id: The goal concept the learner wants to master.
  • Edge Meaning: learner_id -> target_concept_id means Learner targets Concept.

5. interactions.csv (Signal Layer)

Logs of learner activities with outcomes.

  • Edge Meaning: learner_id -> resource_id means Learner interacted with Resource.
  • status: Interaction outcome (completed, attempted, failed).
  • timestamp: ISO 8601 format (YYYY-MM-DD).

🧠 Explainability Logic

The graph structure supports explainable reasoning:

  • Good Learner (Asha): Follows the path c1 -> c2 -> c3 -> c4. Success is predicted because prerequisites c1, c2, c3 are satisfied.
  • Failing Learner (Ravi): Targets c4 but has only attempted c4 directly (skipping prerequisites). The system can explain: "Failed r5 (OOP) because prerequisites c3 (Functions) and c2 (Control Flow) are missing."

📝 Example Reasoning Output

The following example demonstrates the explainability pathway generated by the system on the synthetic dataset.

Scenario

Learner: Asha Target Goal: Data Structures (c5)

Learning history:

  1. Completed Python Basics (c1)
  2. Completed Control Flow (c2)
  3. Failed Object Oriented Programming (c4)

System Reasoning

Target Concept: Data Structures (c5)

Required Path: c5 -> c4 -> c3 -> c2 -> c1

Learner Known Concepts: c1, c2

Missing Prerequisite: c3 (Functions)

Failure Explanation: The learner attempted Object Oriented Programming before mastering Functions.

Recommended Resource

"Functions Explained" (r3)

Explanation:

You attempted to learn Object Oriented Programming, but it requires understanding Functions. We recommend completing "Functions Explained" before proceeding toward your goal: Data Structures.

⚠️ Limitations

This repository demonstrates reasoning and explainability logic primarily. It does not include large-scale training or performance evaluation. The focus is on the graph construction and path-based reasoning algorithms described in the patent.

About

Explainable educational recommendation prototype using knowledge graph reasoning and GNN concepts, accompanying a published patent.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors