SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1907.06837 · 2019

A Self-Attentive model for Knowledge Tracing

arXiv · PDF · Open in the Atlas

Code that ran

8 of 12 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 2 violated it and 2 have no contract verdict; 4 failures of our instrument; 4 no recorded run), measured 2026-11-23; 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/1907.06837.json · badge: /api/ran/1907.06837.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
theophilegervet/learner-performance-prediction reimplementation (classifier label)
classifier basis: classifier_2025
4 ran · 2 no recorded run
jdxyw/deepKT community (classifier label)
classifier basis not recorded on the link
2 ran · 1 no recorded run
shalini1194/SAKT reimplementation (classifier label)
classifier basis: classifier_2025
2 ran · 1 no recorded run
FunctionStatusWhere it lives
attention Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
theophilegervet/learner-performance-prediction/model_sakt.py
pointer only (licence: NONE) · get_code("47e44e2cbc1d0361")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, theophilegervet/learner-performance-prediction when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

clone Ran
ran; our contract draft was wrong, not the code
theophilegervet/learner-performance-prediction/model_sakt.py
pointer only (licence: NONE) · get_code("1b483db3c68fe2df")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, theophilegervet/learner-performance-prediction when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

dkt_predict Ran
ran on a synthesized input
jdxyw/deepKT/deepkt/loss/loss.py
code served (permissive licence) · get_code("258c9e181f3270df")
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 tuple, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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)

# logits: tensor of shape (batch, seq_len, num_questions)
# The function applies sigmoid, then gathers along dim=2 using qid as index
# qid: tensor of shape (batch, seq_len, 1) containing indices for gathering
logits = torch.randn(2, 3, 4)  # batch=2, seq_len=3, num_questions=4
qid = torch.randint(0, 4, (2, 3, 1))  # batch=2, seq_len=3, 1 index per position

ARGS = {
    "logits": logits,
    "qid": qid
}
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 tuple, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
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
future_mask Ran
ran, violated the contract we drafted
theophilegervet/learner-performance-prediction/model_sakt.py
pointer only (licence: NONE) · get_code("77174654ec32c686")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, theophilegervet/learner-performance-prediction when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

prepare_batches Ran
ran; our contract draft was wrong, not the code
theophilegervet/learner-performance-prediction/train_sakt.py
pointer only (licence: NONE) · get_code("f2254f62decab8a1")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, theophilegervet/learner-performance-prediction when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

read_data_from_csv_file Ran
ran; our contract draft was wrong, not the code
shalini1194/SAKT/2019-EDM/main1.py
pointer only (licence: NONE) · get_code("dc76ab08d0c550d9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, shalini1194/SAKT when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

sakt_eval Ran
ran on a synthesized input
jdxyw/deepKT/deepkt/utils/utils.py
code served (permissive licence) · get_code("c408856774ceda9f")
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 tuple, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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

torch.manual_seed(0)

# Create small tensors for the function parameters
# logits: should be a tensor that can be viewed as 1D after operations
# Shape: (2, 4) - batch size 2, 4 logits per sample
logits = torch.randn(2, 4)

# qid: question IDs (not directly used in the function body, but required parameter)
# Shape: (2, 4) - matching logits shape for consistency
qid = torch.tensor([[1, 2, 3, 4], [5, 6, 7, 8]])

# targets: binary targets for each logit
# Shape: (2, 4) - same shape as logits for masking to work
targets = torch.randint(0, 2, (2, 4)).float()

# mask: indicates which elements to include in evaluation
# Shape: (2, 4) - same shape as logits/targets, values > 0 are selected
mask = torch.tensor([[1, 1, 0, 1], [1, 0, 1, 1]])

ARGS = {
    "logits": logits,
    "qid": qid,
    "targets": targets,
    "mask": mask,
}
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 tuple, ndim 2, dtype family float — a tuple output has no array shape of its own; none is stated
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
str2bool Ran
ran, violated the contract we drafted
shalini1194/SAKT/2019-EDM/main1.py
pointer only (licence: NONE) · get_code("37e217915347c2dc")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, shalini1194/SAKT when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

compute_auc Not yet run
unverified (harvested, no recorded run)
theophilegervet/learner-performance-prediction/train_sakt.py
pointer only (licence: NONE) · get_code("63379c3778af65f9")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, theophilegervet/learner-performance-prediction when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

deepirt_eval Not yet run
unverified (harvested, no recorded run)
jdxyw/deepKT/deepkt/utils/utils.py
code served (permissive licence) · get_code("845ba6090f20db7e")
How it ran

no invocation recorded.

get_data Not yet run
unverified (harvested, no recorded run)
theophilegervet/learner-performance-prediction/train_sakt.py
pointer only (licence: NONE) · get_code("a79ac5e51695f207")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, theophilegervet/learner-performance-prediction when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

run_epoch Not yet run
unverified (harvested, no recorded run)
shalini1194/SAKT/2019-EDM/main1.py
pointer only (licence: NONE) · get_code("ce77a64f3aefc943")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, shalini1194/SAKT when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 6 are also present in other papers whose code we hold (3 with at least one paper dated earlier, 0 the same month, 3 later) and 6 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.

FunctionAlso present inEarliest-datedOthers named
clone 1 other paper
1 later
2008.12736 (2020-08)
RKT : Relation-Aware Self-Attention for Knowledge Tracing
compute_auc 1 other paper
1 dated earlier
1905.06873 (2019-05)
DAS3H: Modeling Student Learning and Forgetting for Optimally Scheduling Distributed Practice of Skills
future_mask 1 other paper
1 later
2008.12736 (2020-08)
RKT : Relation-Aware Self-Attention for Knowledge Tracing
get_data 1 other paper
1 dated earlier
1905.06873 (2019-05)
DAS3H: Modeling Student Learning and Forgetting for Optimally Scheduling Distributed Practice of Skills
prepare_batches 1 other paper
1 dated earlier
1905.06873 (2019-05)
DAS3H: Modeling Student Learning and Forgetting for Optimally Scheduling Distributed Practice of Skills
str2bool 1 other paper
1 later
2405.10436 (2024-05)
Positional encoding is not the same as context: A study on positional encoding for sequential recommendation

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-23.

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 is the task of modeling each student's mastery of knowledge concepts (KCs) as (s)he engages with a sequence of learning activities. Each student's knowledge is modeled by estimating the performance of the student on the learning activities. It is an important research area for providing a personalized learning platform to students. In recent years, methods based on Recurrent Neural Networks (RNN) such as Deep Knowledge Tracing (DKT) and Dynamic Key-Value Memory Network (DKVMN) outperformed all the traditional methods because of their ability to capture complex representation of human learning. However, these methods face the issue of not generalizing well while dealing with sparse data which is the case with real-world data as students interact with few KCs. In order to address this issue, we develop an approach that identifies the KCs from the student's past activities that are \textit{relevant} to the given KC and predicts his/her mastery based on the relatively few KCs that it picked. Since predictions are made based on relatively few past activities, it handles the data sparsity problem better than the methods based on RNN. For identifying the relevance between the KCs, we propose a self-attention based approach, Self Attentive Knowledge Tracing (SAKT). Extensive experimentation on a variety of real-world dataset shows that our model outperforms the state-of-the-art models for knowledge tracing, improving AUC by 4.43% on average.

For agents

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

get_harvested_code_for_paper("1907.06837")
get_code_for_paper("1907.06837")
have("1907.06837")

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

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

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

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

Connect an agent — have() is free.