A codebase for generative (instant) cognitive diagnosis.
Explore the paper »
Generative cognitive diagnosis is a new paradigm in the cognitive diagnosis (CD) task. Unlike traditional cognitive diagnosis models (CDMs) that model learners and test items by trainable parameters, generative CDMs model learners and test items via generative diagnostic functions (GDFs). Analogically, generative CDMs are "encoder-decoder" models while traditional CDMs are "decoder-only" models.
The encoder-decoder design of generative CDMs brings two significant advantages:
- Instant diagnosis without training for new learners. When new learners comes, their cognitive state estimation could be instantly obtained by directly inputting their response scores to the GDF and running the generation process, without retraining the whole model.
- Reliability of diagnostic outputs. The latent trait estimation of GDF is highly controllable because one can conveniently apply parameter mediation to the GDF. This leads to a comprehensive understanding of the explainability and causality between response data and cognitive states generated by GDF.
For G-IRT:
conda create -n girt python=3.10
conda activate girt
pip install -r ./GIRT/requirements.txtFor G-NCDM:
conda create -n gncdm python=3.10
conda activate gncdm
pip install -r ./GNCDM/requirements.txtAll training scripts are included in GIRT/scripts/train*. Remember to change file paths to your local path.
Training and fitting are integrated together. The scripts are included in GNCDM/scripts/gncdm*.
All evaluation scripts are included in GIRT/scripts/eval*. Remember to change file paths to your local path.
Training and fitting are integrated together. The scripts are included in GNCDM/scripts/gncdm*.
We saved checkpoints of generative CDMs for quick start of instant diagnosis on the ASSIST and Math1 dataset.
Please refer to GIRT/scripts/diagnose*.
Please refer to G-NCDM/scripts/gncdm_*_diagnose.sh
Please feel free to use our code and cite the paper!
@misc{li2025generativecognitivediagnosis,
title={Generative Cognitive Diagnosis},
author={Jiatong Li and Qi Liu and Mengxiao Zhu},
year={2025},
eprint={2507.09831},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/2507.09831},
}
