Skip to content

Benchmarks & Interactive Slide Decks

KBank maintains reproducible Marimo notebooks in scripts/ covering every stage of the pipeline: multi-database bacterial glycan and biosynthetic locus curation, 10-head factorized 1D-CNN enzyme specificity classification, and RelationalMPNN + constrained spanning arborescence de novo structure prediction.

Each notebook is configured with a native 16:9 Marimo slide layout (scripts/layouts/*.slides.json) and a cached session snapshot (scripts/__marimo__/session/*.py.json) that exports directly into the interactive slide decks embedded in this section.

  • Glycan & Biosynthetic Locus Curation (curate_glycans.py)


    End-to-end streaming, canonicalization, and cross-linking of 1,530 bacterial surface polysaccharide structures across CSDB, KEGG, ECODAB, EPS-DB, EK3D, and GlyTouCan, paired de novo with 565 SeroGen biosynthetic gene clusters (src/kbank/data/glycans.npz).

    Explore Curation Deck

  • 10-Head 1D-CNN Cluster Classifiers (train_cluster_classifier.py)


    2-pass Expectation-Maximization (EM) self-training and 5-fold cross-validation of BiosyntheticClassifierSuite across all 10 enzymatic specificity heads (donor_linkage, donor, linkage, acceptor_sugar, acceptor_motif, is_backbone, mechanism, initiator_sugar, wzy_linkage, modifier_linkage).

    Explore Classifier Deck

  • MPNN Glycan Structure Predictor (train_glycan_predictor.py)


    Two-Phase Optuna TPE optimization of RelationalMPNN and GlycanPredictorParams (glycan_predictor_mpnn.npz), achieving >92% Monosaccharide Composition F1, >82% Disaccharide Bigram F1, and 100% topological + stereochemical isomorphism on held-out K. pneumoniae KL106 (LT174576.1) and KL107 (KF793263.1) capsules.

    Explore Predictor Deck


Running Notebooks Locally

All notebooks can be launched interactively as reactive web apps, slide presentations, or editable Marimo notebooks via uv:

# Launch any notebook directly in Marimo's fullscreen slide presentation mode
uv run --with marimo --with altair marimo run scripts/curate_glycans.py
uv run --with marimo --with altair marimo run scripts/train_cluster_classifier.py
uv run --with marimo --with altair --with optuna marimo run scripts/train_glycan_predictor.py
# Open in the reactive Marimo notebook editor
uv run --with marimo --with altair marimo edit scripts/train_glycan_predictor.py
# Re-execute a notebook and update its cached session snapshot in scripts/__marimo__/session/
uv run --with marimo --with altair marimo export session --no-sandbox --force-overwrite scripts/train_glycan_predictor.py

Comments