SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2108.07386 · IJCAI · 2021

BOBCAT: Bilevel Optimization-Based Computerized Adaptive Testing

Aritra Ghosh, Andrew Lan

arXiv · PDF · Open in the Atlas

Code that ran

10 of 10 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 5 failures of our instrument; 0 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/2108.07386.json · badge: /api/ran/2108.07386.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
arghosh/bobcat marked official in Papers with Code
Papers with Code archive
5 ran · 0 no recorded run
arghosh/NeurIPSEducation2020 community
Papers with Code archive
4 ran · 0 no recorded run
copy not recorded community
not in the paper's declared repositories
1 ran · 0 no recorded run
FunctionStatusWhere it lives
AttentionModel Ran
ran on a synthesized input · constructed an object; no result was computed
arghosh/NeurIPSEducation2020/model_task_1_2.py
code served (permissive licence) · get_code("b86faf0fe0426b7f")
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, AttentionModel: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
from torch import nn

torch.manual_seed(0)

ARGS = {
    "n_question": 10,
    "n_user": 5,
    "n_subject": 8,
    "n_quiz": 6,
    "n_group": 4,
    "hidden_dim": 32,
    "q_dim": 16,
    "task": "prediction",
    "dropout": 0.25,
    "n_heads": 2,
    "s_dim": 24,
    "default_dim": 12,
    "num_gru_layers": 1,
    "is_dash": False,
}
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 AttentionModel — 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 AttentionModel 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
CosinePositionalEmbedding Ran
ran on a synthesized input · constructed an object; no result was computed
arghosh/NeurIPSEducation2020/model_task_1_2.py
code served (permissive licence) · get_code("7a466f4e8e785035")
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, CosinePositionalEmbedding: 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
from torch import nn
import math

torch.manual_seed(0)

ARGS = {
    'd_model': 8,
    'max_len': 16
}
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 CosinePositionalEmbedding — 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 CosinePositionalEmbedding 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
MAMLModel Ran
ran on a synthesized input
arghosh/bobcat/model.py
code served (permissive licence) · get_code("1a5ae3c194622d14")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned dict. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 numpy as np

# INIT_ARGS for MAMLModel.__init__
INIT_ARGS = {
    'n_question': 5,
    'question_dim': 1,
    'dropout': 0.2,
    'sampling': 'active',
    'n_query': 3
}

# Create a batch dictionary for the forward method
batch_size = 2
n_question = 5

batch = {
    'input_labels': torch.randint(0, 2, (batch_size, n_question)),
    'input_mask': torch.ones(batch_size, n_question).long(),
    'output_labels': torch.randint(0, 2, (batch_size, n_question)),
    'output_mask': torch.ones(batch_size, n_question)
}

# Create config dictionary
# meta_param represents student embeddings
# For question_dim=1, student_embed should have shape (batch_size, 1)
config = {
    'meta_param': torch.randn(batch_size, 1),
    'train_mask': torch.zeros(batch_size, n_question).long(),
    'available_mask': torch.ones(batch_size, n_question).long(),
    'mode': 'train'
}

# ARGS for MAMLModel.forward
ARGS = {
    'batch': batch,
    'config': config
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, 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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
MultiHeadAttention Ran
ran on a synthesized input · constructed an object; no result was computed
arghosh/NeurIPSEducation2020/model_task_1_2.py
code served (permissive licence) · get_code("e28f6e6239277b44")
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, MultiHeadAttention: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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
from torch import nn
import math

torch.manual_seed(0)

# Build the arguments dict for MultiHeadAttention
ARGS = {
    'd_key': 4,
    'd_val': 4,
    'd_model': 8,
    'n_heads': 2,
    'dropout': 0.1,
    'bias': True
}
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 MultiHeadAttention — 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 MultiHeadAttention 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
attention Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
arghosh/NeurIPSEducation2020/model_task_1_2.py
code served (permissive licence) · get_code("1abee56c1c82b3be")
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 4, dtype family float, shape (2, 2, 4, 3) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 math

torch.manual_seed(0)

# Create small tensors for q, k, v
batch_size = 2
seq_len = 4
head_dim = 3
num_heads = 2

# q, k, v shapes: (batch, num_heads, seq_len, head_dim)
q = torch.randn(batch_size, num_heads, seq_len, head_dim)
k = torch.randn(batch_size, num_heads, seq_len, head_dim)
v = torch.randn(batch_size, num_heads, seq_len, head_dim)

# mask shape: (seq_len, batch_size) based on how it's used in the function
# mask should be 0 or 1, where 1 indicates valid positions
mask = torch.ones(seq_len, batch_size)

ARGS = {
    'q': q,
    'k': k,
    'v': v,
    '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 Tensor, ndim 4, dtype family float, shape (2, 2, 4, 3) — shape (2, 2, 4, 3) 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
compute_loss Ran
ran; our contract draft was wrong, not the code
arghosh/bobcat/model.py
code served (permissive licence) · get_code("ddaa3dd8a024013d")
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) and returned Tensor, ndim 0, dtype family float, shape () 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 torch.nn as nn

torch.manual_seed(0)

# Create small tensors for the function
batch_size = 2
dim = 4

# output: logits from a model, shape (batch_size, dim)
output = torch.randn(batch_size, dim)

# labels: binary labels, shape (batch_size, dim)
labels = torch.randint(0, 2, (batch_size, dim)).float()

# mask: binary mask for weighting, shape (batch_size, dim)
mask = torch.ones(batch_size, dim)

# reduction: boolean flag
reduction = True

ARGS = {
    "output": output,
    "labels": labels,
    "mask": mask,
    "reduction": reduction,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () 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
get_inputs Ran
ran; our contract draft was wrong, not the code
this paper's copy was not recorded; identical code first harvested from bigdata-ustc/educat
pointer only · get_code("bf10b1462929ad81")
How it ran

The body of this sample is withheld: this paper's copy of the code was not recorded (its link names no repository or source path), so no licence was read for it. 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.

get_outputs Ran
ran, honoured the contract we drafted
arghosh/bobcat/model.py
code served (permissive licence) · get_code("98d34936f4d8072b")
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) and returned tuple, ndim 3, dtype family float; no output shape is stated. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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)

device = torch.device('cpu')

batch = {
    'output_labels': torch.randn(2, 4),
    'output_mask': torch.randint(0, 2, (2, 4))
}

ARGS = {
    'batch': batch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
normalize_loss Ran
ran; our contract draft was wrong, not the code
arghosh/bobcat/model.py
code served (permissive licence) · get_code("b8d6b34baa8e618a")
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) and returned Tensor, ndim 0, dtype family float, shape () 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
from torch import nn

torch.manual_seed(0)

# Create small tensors with distinct dimensions
batch_size = 2
seq_length = 4

# output: logits for BCEWithLogitsLoss, shape (batch_size, seq_length)
output = torch.randn(batch_size, seq_length)

# labels: binary targets, shape (batch_size, seq_length)
labels = torch.randint(0, 2, (batch_size, seq_length)).float()

# mask: binary mask for valid positions, shape (batch_size, seq_length)
mask = torch.ones(batch_size, seq_length)

ARGS = {
    "output": output,
    "labels": labels,
    "mask": mask,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, shape () — shape () 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
pick_random_sample Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
arghosh/bobcat/model.py
code served (permissive licence) · get_code("5e6b5e316fc4d0d6")
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) and returned Tensor, ndim 2, dtype family int, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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

torch.manual_seed(0)

device = torch.device('cpu')

# input_mask: a tensor of shape (batch_size, n_question) with values that can be used for multinomial sampling
# The function calls input_mask.detach().clone() and input_mask.float() and torch.multinomial on it
batch_size = 2
n_question = 4
input_mask = torch.ones(batch_size, n_question).long()

# n_query: number of samples to draw via multinomial, or -1 to return clone
n_query = 2

ARGS = {
    'input_mask': input_mask,
    'n_query': n_query,
    'n_question': n_question,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
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 int, 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

Also present in other papers' code

Of 10 samples lifted from this paper's linked repositories, 10 carry a function identity and 0 do not. Of the 10 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 9 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
get_inputs
brick of this paper's assembly: data_transform
1 other paper
1 later
2404.00712 (2024-04)
Survey of Computerized Adaptive Testing: A Machine Learning Perspective

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

Computerized adaptive testing (CAT) refers to a form of tests that are personalized to every student/test taker. CAT methods adaptively select the next most informative question/item for each student given their responses to previous questions, effectively reducing test length. Existing CAT methods use item response theory (IRT) models to relate student ability to their responses to questions and static question selection algorithms designed to reduce the ability estimation error as quickly as possible; therefore, these algorithms cannot improve by learning from large-scale student response data. In this paper, we propose BOB-CAT, a Bilevel Optimization-Based framework for CAT to directly learn a data-driven question selection algorithm from training data. BOBCAT is agnostic to the underlying student response model and is computationally efficient during the adaptive testing process. Through extensive experiments on five real-world student response datasets, we show that BOBCAT outperforms existing CAT methods (sometimes significantly) at reducing test length.

For agents

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

get_harvested_code_for_paper("2108.07386")
get_code_for_paper("2108.07386")
have("2108.07386")

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

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

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

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

Connect an agent — have() is free.