SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2302.06885 · AAAI · 2023

Improving Interpretability of Deep Sequential Knowledge Tracing Models with Question-centric Cognitive Representations

Jiahao Chen, Zitao Liu, Qiongqiong Liu, Shuyan Huang, Weiqi Luo

arXiv · PDF · Open in the Atlas

Code that ran

8 of 11 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (5 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 2 failures of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2302.06885.json · badge: /api/ran/2302.06885.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
pykt-team/pykt-toolkit community
Papers with Code archive
6 ran · 2 no recorded run
ZhijieXiong/pyedmine community
Papers with Code archive
2 ran · 1 no recorded run
FunctionStatusWhere it lives
MLP Ran
ran on a synthesized input · constructed an object; no result was computed
pykt-team/pykt-toolkit/pykt/models/qikt.py
code served (permissive licence) · get_code("391fc1018439e361")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, MLP: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Parameters for MLP.__init__
n_layer = 2
hidden_dim = 4
output_dim = 3
dpo = 0.5

ARGS = {
    "n_layer": n_layer,
    "hidden_dim": hidden_dim,
    "output_dim": output_dim,
    "dpo": dpo,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MLP — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MLP output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
MLP Ran
ran on a synthesized input · constructed an object; no result was computed
ZhijieXiong/pyedmine/edmine/model/sequential_kt_model/QIKT.py
code served (permissive licence) · get_code("7e570661ec2055e1")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, MLP: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'num_layer': 2,
    'dim_in': 4,
    'dim_out': 3,
    'dropout': 0.5
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type MLP — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a MLP output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
QIKT Ran
ran on a synthesized input · constructed an object; no result was computed
pykt-team/pykt-toolkit/pykt/models/qikt.py
code served (permissive licence) · get_code("30289d7d9c2392f4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, QIKT: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np

torch.manual_seed(0)

# Define a stub QueEmb class that the forward method calls
class QueEmb(nn.Module):
    def __init__(self, num_q, num_c, emb_size, emb_type, model_name, device, emb_path, pretrain_dim):
        super().__init__()
        self.num_q = num_q
        self.num_c = num_c
        self.emb_size = emb_size
        self.q_emb = nn.Embedding(num_q, emb_size)
        self.c_emb = nn.Embedding(num_c, emb_size)
        
    def forward(self, q, c, r):
        # Returns: (_, emb_qca, emb_qc, emb_q, emb_c)
        batch_size, seq_len = q.shape
        emb_q = self.q_emb(q)  # (batch, seq, emb_size)
        emb_c = self.c_emb(c)  # (batch, seq, emb_size)
        emb_qc = torch.cat([emb_q, emb_c], dim=-1)  # (batch, seq, 2*emb_size)
        emb_qca = torch.cat([emb_q, emb_c, emb_c, emb_c], dim=-1)  # (batch, seq, 4*emb_size)
        return None, emb_qca, emb_qc, emb_q, emb_c

# Define a stub get_outputs function that's called in forward
def get_outputs(model, emb_qc_shift, hidden_state, data, add_name, model_type):
    batch_size, seq_len, hidden_dim = hidden_state.shape
    num_q = model.num_q if model_type == 'question' else model.num_c
    return {
        'y_question_next': torch.randn(batch_size, seq_len, 1),
        'y_question_all': torch.randn(batch_size, seq_len, num_q),
        'y_concept_all': torch.randn(batch_size, seq_len, model.num_c),
        'y_concept_next': torch.randn(batch_size, seq_len, model.num_c),
    }

# Create small tensors for input
batch_size = 2
seq_len = 5
num_q = 10
num_c = 8

q = torch.randint(0, num_q, (batch_size, seq_len))  # question ids
c = torch.randint(0, num_c, (batch_size, seq_len))  # concept ids
r = torch.randint(0, 2, (batch_size, seq_len)).float()  # responses

# Build ARGS dictionary
ARGS = {
    'num_q': num_q,
    'num_c': num_c,
    'emb_size': 4,
    'dropout': 0.1,
    'emb_type': 'qaid',
    'emb_path': '',
    'pretrain_dim': 768,
    'device': 'cpu',
    'mlp_layer_num': 1,
    'other_config': {'output_mode': 'an'},
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type QIKT — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a QIKT output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
QueBaseModel Ran
ran on a synthesized input · constructed an object; no result was computed
pykt-team/pykt-toolkit/pykt/models/qikt.py
code served (permissive licence) · get_code("438cbf17f4ebb444")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, QueBaseModel: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

ARGS = {
    'model_name': 'test_model',
    'emb_type': 'word2vec',
    'emb_path': '/tmp/embeddings.txt',
    'pretrain_dim': 4,
    'device': 'cpu',
    'seed': 0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, sklearn, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type QueBaseModel — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a QueBaseModel output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
QueEmb Ran
ran on a synthesized input · constructed an object; no result was computed
pykt-team/pykt-toolkit/pykt/models/qikt.py
code served (permissive licence) · get_code("e0192bd887c533f8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, QueEmb: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'num_q': 10,
    'num_c': 5,
    'emb_size': 4,
    'model_name': 'dkt_que',
    'device': 'cpu',
    'emb_type': 'qid',
    'emb_path': '',
    'pretrain_dim': 768,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type QueEmb — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a QueEmb output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_now_time Ran
ran on a synthesized input
pykt-team/pykt-toolkit/pykt/models/qikt.py
code served (permissive licence) · get_code("84856773d55a9836")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import datetime

def get_now_time():
    """Return the time string, the format is %Y-%m-%d %H:%M:%S

    Returns:
        str: now time
    """
    now = datetime.datetime.now()
    dt_string = now.strftime('%Y-%m-%d %H:%M:%S')
    return dt_string


ARGS = {}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_outputs Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
pykt-team/pykt-toolkit/pykt/models/qikt.py
code served (permissive licence) · get_code("d64e5058e11fc74e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import torch.nn.functional as F

torch.manual_seed(0)

class MockModel(nn.Module):
    def __init__(self, num_q, num_c, hidden_dim, emb_dim):
        super().__init__()
        self.num_q = num_q
        self.num_c = num_c
        
        # For question model_type
        self.out_question_next = nn.Linear(emb_dim + hidden_dim, 1)
        self.out_question_all = nn.Linear(hidden_dim, num_q)
        
        # For concept model_type
        self.out_concept_next = nn.Linear(emb_dim + hidden_dim, num_c)
        self.out_concept_all = nn.Linear(hidden_dim, num_c)
    
    def get_avg_fusion_concepts(self, y_concept, cshft):
        """Mock method for concept fusion averaging"""
        # y_concept shape: (batch, num_c)
        # cshft shape: (batch,) containing concept indices
        batch_size = y_concept.shape[0]
        result = torch.zeros(batch_size, dtype=y_concept.dtype)
        for i in range(batch_size):
            c_idx = cshft[i].long()
            if c_idx < y_concept.shape[1]:
                result[i] = y_concept[i, c_idx]
        return result
    
    def get_outputs(self, emb_qc_shift, h, data, add_name='', model_type='question'):
        outputs = {}
        if model_type == 'question':
            h_next = torch.cat([emb_qc_shift, h], axis=-1)
            y_question_next = torch.sigmoid(self.out_question_next(h_next))
            y_question_all = torch.sigmoid(self.out_question_all(h))
            outputs['y_question_next' + add_name] = y_question_next.squeeze(-1)
            outputs['y_question_all' + add_name] = (y_question_all * F.one_hot(data['qshft'].long(), self.num_q)).sum(-1)
        else:
            h_next = torch.cat([emb_qc_shift, h], axis=-1)
            y_concept_next = torch.sigmoid(self.out_concept_next(h_next))
            y_concept_all = torch.sigmoid(self.out_concept_all(h))
            outputs['y_concept_next' + add_name] = self.get_avg_fusion_concepts(y_concept_next, data['cshft'])
            outputs['y_concept_all' + add_name] = self.get_avg_fusion_concepts(y_concept_all, data['cshft'])
        return outputs

# Create model instance
num_q = 5
num_c = 4
hidden_dim = 3
emb_dim = 2
batch_size = 2

model = MockModel(num_q=num_q, num_c=num_c, hidden_dim=hidden_dim, emb_dim=emb_dim)

# Create input tensors
emb_qc_shift = torch.randn(batch_size, emb_dim)
h = torch.randn(batch_size, hidden_dim)

# Create data dict with required keys
data = {
    'qshft': torch.tensor([1, 3]),
    'cshft': torch.tensor([0, 2])
}

ARGS = {
    'self': model,
    'emb_qc_shift': emb_qc_shift,
    'h': h,
    'data': data,
    'add_name': '',
    'model_type': 'question'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sigmoid_inverse Ran
ran; our contract draft was wrong, not the code
ZhijieXiong/pyedmine/edmine/model/sequential_kt_model/QIKT.py
code served (permissive licence) · get_code("6bfa1fe3138c452f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# Construct arguments for sigmoid_inverse function
# The function takes:
# - x: a tensor that should be in range (0, 1) for valid sigmoid inverse
# - epsilon: small float for numerical stability (has default)

# Create a small tensor with values in valid range (0, 1)
# Using values strictly between 0 and 1
x = torch.tensor([[0.1, 0.5, 0.9, 0.2],
                   [0.7, 0.3, 0.8, 0.4]], dtype=torch.float32)

epsilon = 1e-08

ARGS = {
    "x": x,
    "epsilon": epsilon
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
QIKT Not yet run
unverified (harvested, no recorded run)
ZhijieXiong/pyedmine/edmine/model/sequential_kt_model/QIKT.py
code served (permissive licence) · get_code("9ad3588ca804907c")
How it ran

no invocation recorded.

QIKTNet Not yet run
unverified (harvested, no recorded run)
pykt-team/pykt-toolkit/pykt/models/qikt.py
code served (permissive licence) · get_code("29283795644f73af")
How it ran

no invocation recorded.

debug_print Not yet run
unverified (harvested, no recorded run)
pykt-team/pykt-toolkit/pykt/models/qikt.py
code served (permissive licence) · get_code("d5437c252c405c85")
How it ran

no invocation recorded.

Also present in other papers' code

Of 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 11 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Knowledge tracing (KT) is a crucial technique to predict students' future performance by observing their historical learning processes. Due to the powerful representation ability of deep neural networks, remarkable progress has been made by using deep learning techniques to solve the KT problem. The majority of existing approaches rely on the homogeneous question assumption that questions have equivalent contributions if they share the same set of knowledge components. Unfortunately, this assumption is inaccurate in real-world educational scenarios. Furthermore, it is very challenging to interpret the prediction results from the existing deep learning based KT models. Therefore, in this paper, we present QIKT, a question-centric interpretable KT model to address the above challenges. The proposed QIKT approach explicitly models students' knowledge state variations at a fine-grained level with question-sensitive cognitive representations that are jointly learned from a question-centric knowledge acquisition module and a question-centric problem solving module. Meanwhile, the QIKT utilizes an item response theory based prediction layer to generate interpretable prediction results. The proposed QIKT model is evaluated on three public real-world educational datasets. The results demonstrate that our approach is superior on the KT prediction task, and it outperforms a wide range of deep learning based KT models in terms of prediction accuracy with better model interpretability. To encourage reproducible results, we have provided all the datasets and code at https://pykt.org/.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2302.06885")
get_code_for_paper("2302.06885")
have("2302.06885")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2302.06885.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2302.06885.svg)](https://syntology.ai/paper/2302.06885)

Connect an agent — have() is free.