RICE-Former: a curve–event Transformer
Abstract
This reproducibility-focused software archive provides the Residual-on-Inertia Curve–Event Transformer (RICE-Former) materials used in the manuscript RICE-Former: A Residual-on-Inertia Curve–Event Transformer for Event-Aware 1–4 h Glucose Trajectory and Glycemic Event Forecasting. The repository supports independent audit of the study's four connected designs: (1) typed event marks that retain each meal, bolus, correction, and basal record; (2) wall-clock lag encoding relative to the prediction origin; (3) a residual-on-inertia connection that generates a 48-point 1–4 h trajectory over a persistence reference; and (4) a curve–event dual-branch decoder that produces the trajectory and 16 event–horizon scores from shared memory. Included materials RICE-Former method code: marked-event adapters, shared encoder, residual-on-inertia curve generation, and dual-branch event queries (CEQT is the retained engineering codename) Locked protocol and splits: prediction horizons, event thresholds, leakage checks, and the frozen AZT1D participant allocation Evaluation and baseline code for the staged experiment pipeline Privacy-preserving aggregate result tables for AZT1D, OhioT1DM, and DiaTrend curve, event, ablation, slice, and mechanism summaries Aggregate analysis tables for subject-level metrics and paired statistical tests Manuscript figures used in the paper, including the illustrative trajectory panels Documentation for data access, reproducibility, and GitHub–Zenodo release steps Repository layout src/ceqt/: model, data adapters, training, evaluation, baselines, and staged experiment code results/tables/: locked protocol, split identifiers, aggregate performance tables, and leakage-test report results/analysis/: aggregate subject-level metrics and paired tests results/figures/: manuscript figures scripts/: subject-level aggregate analysis exports docs/: data access, reproducibility, and release instructions Install and verify conda env create -f environment.yml conda activate rice-former export PYTHONPATH="$PWD/src" Obtain AZT1D, OhioT1DM, and DiaTrend from their original providers, arrange them as described in docs/data-access.md, and run selected stages with python -m ceqt.phases.run --from P0 --to P9. Data and privacy boundary The datasets analyzed in the study are available from their original sources: AZT1D (Mendeley Data, 10.17632/gk9m674wcx.1), OhioT1DM (Marling and Bunescu, 2020), and DiaTrend (Synapse, 10.7303/syn38187184). This deposit archives method and evaluation code, locked protocol files, aggregate result tables, analysis tables, and manuscript figures. Raw CGM records, participant event logs, the numeric extract behind the illustrative trajectory figure, credentials, trained weights, and caches are not redistributed. Details are provided in docs/data-access.md. Citation Please cite this software archive as: Liu Q, Yang M, Wang Z, Wang S, An X, Lu S, Yang Q, Liu M, Wu Z, Huang D. RICE-Former: a curve–event Transformer. Zenodo. https://doi.org/10.5281/zenodo.22171786 Citation metadata are also provided in CITATION.cff. Please cite the accompanying manuscript when referring to the scientific findings. Software repository: https://github.com/modalfuse/rice-former