This is the official implementation for our paper KG4Ex: An Explainable Knowledge Graph-Based Approach for Exercise Recommendation, accepted by CIKM'23.
The code is built on Pytorch and the pyKT benchmark library. Run the following code to satisfy the requeiremnts by pip: pip install -r requirements.txt
-
Download the three public datasets we use in the paper at:
-
Preprocess the dataset using pyKT to obtain the student's mastery level of knowledge concepts (MLKC), the probability of knowledge concepts appearing in the next exercise (PKC), and the forgetting rate of knowledge concepts (FRKC).
-
We provide an example of a CSV file obtained after pyKT processing using the Algebra 2005 dataset (top 10 rows), located in
KG4Ex/pyKT_example/Algebra2005_head_10.csv
.
-
Construct the knowledge graph: use pyKT preprocessed files, for example,
Algebra2005_head_10.csv
, to constructentities.dict
(entity dictionaries),relations.dict
(relationship dictionaries),triples.txt
(triples required for knowledge graphs) andQ.txt
(Q-matrix). Place the three generated files in folderKG4Ex/data/algebra2005
. -
Embedding learning:
python run.py --do_train --cuda --data_path ../data/algebra2005 --model TransE -b 1024 -d 1000 -g 12.0 -a 1.0 -lr 0.001 -adv -save models/algebra2005/TransE_adv
. -
Recommendation and evaluation: the embedding vectors of entities and relations are saved in
KG4Ex/codes/models/algebra2005/TransE_adv
. Runtest_TransE.py
to obtain corresponding indicator results.
To validate the interpretability of KG4Ex and the rationality of exercise recommendations, we conducted real interviews with 250 real students. The student interviews were conducted through questionnaire surveys. We are making the questionnaire content public here questionnaire.txt
.
If you find our work helpful, please kindly cite our research paper:
@inproceedings{10.1145/3583780.3614943,
author = {Guan, Quanlong and Xiao, Fang and Cheng, Xinghe and Fang, Liangda and Chen, Ziliang and Chen, Guanliang and Luo, Weiqi},
title = {KG4Ex: An Explainable Knowledge Graph-Based Approach for Exercise Recommendation},
url = {https://doi.org/10.1145/3583780.3614943},
booktitle = {Proceedings of the 32nd ACM International Conference on Information and Knowledge Management},
pages = {597–607},
year = {2023},
}