Code, frozen protocols, per-item results and analysis scripts for the paper "Type-Safe Multi-Answer Decision Support for Digital Assessment Workflows" (submitted to CAiSE 2027).
TASP (Typed Answer-Set Proposals) integrates schema-typed answer-set proposals with acceptance-time currency checks, option-level decoding, Learn-then-Test (LTT) risk control and uncertainty-ranked review hints. This repository lets you re-run every analysis in the paper offline, from archived model responses, without any API key.
| Path | Content |
|---|---|
jevset/ |
Core library: typed scorer client with an exact-request response cache (live.py, backend.py), candidate construction and Choice decoding (v2.py, coverage_v2.py, candidate_ranking.py, algorithms.py), data schema and grouping (schema.py, splits.py) |
contract/ |
Proposal contract: in-memory checker with exhaustive 7,776-sequence check (paper01_contract*.py) and the persistent SQLite store with invariants I1–I5 plus the concurrency stress test (tasp_store.py) |
experiments/ |
All experiment and analysis scripts, frozen protocols, cohort manifests and per-item results (see below) |
experiments/newsbank/ |
Prospective, pre-registered LTT certification on a fresh Reuters-21578 news bank (runs 1 and 2) |
data/, outputs/, results_private/ |
Inputs from earlier project stages that the scripts read: development cohorts, the frozen ridge ranker, earlier manifests, and the formerly sealed 96-item reserved test set |
assets/ |
Archives of all raw scorer requests/responses (attach to a GitHub Release; not tracked in git) |
LTT_AUDIT.md |
Data-access history of the risk-control analysis and the claim status of each result |
pip install -r requirements.txt # numpy, scipy, statsmodels, matplotlib suffice for the analyses
# optional, only to replay request-level costs or re-derive scores from raw responses:
tar xzf assets/raw_main.tgz -C experiments
tar xzf assets/raw_deepseek_newsbank.tgz -C experiments
cd experiments
python analyze.py # decoder comparison, coverage/selection, flagging, order sensitivity -> analysis.json
python extra_stats.py # ECE, threshold sensitivity, Holm, per-bank CIs, macro averages -> extra_stats.json
python ablation_analyze.py # menu size / order / prior weight / pairwise oracle / repeats -> ablation_analysis.json
python risk_resplit.py # LTT on the design split and cal2 -> eval2, 1,000 half-splits -> risk_resplit.json
python ltt_audit.py # fixed-grid vs sample-quantile grid (primary main-pool setting) -> ltt_audit.json
python ltt_audit2.py # dependent quantities and calibration-budget simulation -> ltt_audit2.json
python open_analyze.py # Qwen2.5-1.5B / 7B scorers -> open_summary.json
python deepseek_analyze.py # DeepSeek-V4.1-Flash scorer -> open_summary.json
python figs.py # Figures 2 and 3 -> figures/
cd newsbank && python certify.py && python certify2.py # prospective News-bank certification
python ../../contract/paper01_contract_checks.py # exhaustive contract check
python ../../contract/tasp_store.py # SQLite concurrency stress test (~3 min)Running the analysis scripts on the shipped per-item results reproduces the JSON files in experiments/ exactly.
| Paper element | Script | Output |
|---|---|---|
| Table 2 (decoder comparison), all-1,387 secondary analysis | analyze.py, extra_stats.py |
analysis.json, extra_stats.json, unified_1387.json |
| Table 3 (item banks) | analyze.py, extra_stats.py |
analysis.json (domains_test), extra_stats.json (per_bank) |
| Fig. 2a (quality vs. tokens) | replay_tokens.py, figs.py |
heldout_tokens.json |
| Fig. 2b, menu/order/prior ablations, pairwise oracle, Eq. (1) | run_ablation.py, ablation_analyze.py |
ablation_analysis.json |
| Table 4 (scorer dependence) | open_scorer.py, qwen_run.py, deepseek_run.py, open_analyze.py, deepseek_analyze.py |
open_summary.json |
| Table 5 (LTT, main pool and News bank) | risk_resplit.py, ltt_audit.py, ltt_audit2.py, risk_gate.py, newsbank/certify*.py |
ltt_audit*.json, newsbank/certify_result*.json |
| Calibration budget | ltt_audit2.py (fixed grid), ltt_budget.py |
ltt_audit2.json |
| Fig. 3 (idealized review effort) | analyze.py, figs.py |
analysis.json (localization, flag_review) |
| RQ4 order and repeat sensitivity | run_repeat.py, run_ablation.py, ablation_analyze.py |
ablation_analysis.json (reliability) |
| Contract under concurrency | contract/tasp_store.py |
contract/tasp_store_stress_v2.json |
| Development-stage choices (t = 0.4, confidence) | extract_dev.py, dev_*.py |
dev_*.json |
verify_numbers_v3.py cross-checks every number quoted in the manuscript against these outputs; it expects the
manuscript source at experiments/paper/main.tex.
make_cohorts.pyrebuilds the held-out cohorts (431 design split, 860 test, 96 reserved) from the public sources;heldout_manifest.jsonlists all item IDs andheldout.jsonlthe items.protocol.json,deepseek_protocol.json,newsbank/protocol*.jsonare the frozen protocols;freeze_hashes.txtrecords their SHA-256 hashes together with those of cohort files and runners, written before the corresponding runs.- See
LTT_AUDIT.mdfor the order in which labels were accessed and which risk-control results carry a guarantee.
Copy .env.example to .env and set TYPESAFE_API_KEY (main scorer, model jev-1.14.0) and/or DEEPSEEK_API_KEY.
The client caches every exact request under the experiment's *_raw/ folder; with the archives extracted, the runners
replay from cache and send no requests. Provider-side model updates may change fresh responses.
Open-weight scorers: open_scorer.py hf Qwen/Qwen2.5-1.5B-Instruct <ids> <outdir> and
open_scorer.py gguf <path-to-qwen2.5-7b-instruct-q4_k_m.gguf> <ids> <outdir> (CPU is sufficient).
Run ./fetch_data.sh to download the public sources at the pinned versions and verify their checksums, then set
REUTERS_DIR if you extract Reuters-21578 elsewhere.
| Dataset | Version | License / terms |
|---|---|---|
| SATA-BENCH | commit 371dd0c |
MIT (honor the terms of the original source datasets) |
| MultiRC | SuperGLUE v2 | see the SuperGLUE / MultiRC terms |
| Reuters-21578 | Distribution 1.0 (UCI) | free for research use, see its README |
Derived item files in this repository (heldout.jsonl, newsbank/items*.jsonl, development cohorts) contain text
from these datasets and remain subject to their terms.
Code: MIT (see LICENSE). Data files follow the licenses of their sources.