NeurIPS 2026 · Main Track

GlycoGen: Glycan Structure Prediction with Crystallizing Flows

Independent Researcher · romain@romainlacombe.com
92.67%
Top-1 Per-Spectrum Accuracy
+11.7 pp over leak-free GlycoBART (76,774 test spectra, 3 seeds)
93.31%
Seen-Structure Graph Accuracy
Approaches the single-spectrum CID MS/MS Bayes ceiling
21,883 /s
Batched Throughput (K=1)
13.9× (K=8) to 61× (K=1) faster than greedy GlycoBART on H200
8.6 ms
Unbatched Streaming Latency
Meets 100 Hz live LC-MS/MS acquisition cadence

Abstract

Glycosylation is among the most abundant post-translational modifications in biology, governing cellular signaling and the foundational mechanisms of immunity. Because glycans cannot be sequenced from a genetic template, their structure must be inferred directly from tandem mass spectrometry (MS/MS). Modern instruments acquire 100 to 200 spectra per second, yet the prior open-vocabulary state of the art, GlycoBART, is a 207M autoregressive transformer whose sequential decoding precludes live acquisition and large-scale glycomics. Discrete Flow Matching and masked diffusion remove this sequential bottleneck by generating all token positions in parallel, provided a low-step sampler preserves structural accuracy. We introduce GlycoGen, a 50M-parameter Discrete Flow Matching model over fragment spectra, paired with Crystallizing Flows, a deterministic sampler that runs out-of-the-box via mixture embeddings with no retraining. Crystallizing Flows integrate per-token distributions on the simplex, snap each position to a one-hot vector once its argmax leaves the mask, and exit early once all positions crystallize. On the 76,774-spectrum CandyCrunch v2 benchmark, GlycoGen reaches 92.67% top-1 accuracy in 17 passes and 90.19% in a single pass, surpassing GlycoBART by 11.7 percentage points with a 14× to 61× speedup. Setting a new state of the art in open-vocabulary glycan structure prediction, GlycoGen makes the glycome readable in real time and at scale.

GlycoGen end-to-end architecture and data pipeline
Figure 1: GlycoGen end-to-end pipeline. Low-energy CID cleaves glycosidic bonds of branched glycans streamed at 100–200 Hz. A 4-layer Transformer Spectrum Encoder maps 64 binned intensity/mass-offset patches and one precursor m/z token into continuous embeddings, and an 8-layer bidirectional DFM decoder generates all 74-token atomic IUPAC positions in parallel via Crystallizing Flows.

Reading Branched Sugar Trees from Fragment Spectra

Unlike linear proteins or nucleic acids, glycans are branched sugar trees serialized into bracketed IUPAC-condensed strings. Low-energy collision-induced dissociation (CID) cleaves glycosidic bonds into neutral monosaccharide losses, while regioisomers lacking cross-ring cleavages establish an intrinsic single-spectrum Bayes error ceiling.

Tandem mass spectrometry primer for branched glycans
Figure 2: Glycan MS/MS primer. (a) Branched N-glycans (e.g., on IgG antibodies) serialize into bracketed IUPAC strings tokenized into a 74-token atomic vocabulary. (b) Low-energy CID cleaves glycosidic bonds into neutral monosaccharide mass losses (Δm/z), while regioisomers lacking cross-ring cleavages establish an intrinsic single-spectrum Bayes error ceiling.

Crystallizing Flows: Deterministic Integration on the Simplex

Standard mask-source CTMC Euler sampling draws a discrete categorical token at each step and discards the rest of the predictive distribution. At low step budgets, random draws compound early mistakes and cause 2-step accuracy to regress below a single forward pass.

Crystallizing Flows instead propagate the full per-position probability vector on the simplex and snap each position to a frozen one-hot vector the exact moment its argmax leaves <mask>. Because all positions crystallize near the midpoint of the trajectory (t ≈ 0.5), every spectrum exits early in roughly K/2 + 1 forward passes with zero inference hyperparameters.

Crystallizing Flows mechanic across 16 steps
Figure 3: Crystallizing Flows mechanic. Blue cells show soft distributions on the simplex whose argmax is still <mask>. Amber cells show crystallized positions whose argmax has flipped to a glycan token, snapping the state to a frozen one-hot vector. The spectrum exits early at the red dashed line once all positions have crystallized.
Interactive Simplex Rollout (K = 16)
Step k = 0 (t = 0.00) · 0 / 8 positions crystallized

Pareto-Dominance & Controlled Design Ablations

Across the 76,774 test spectra of the CandyCrunch v2 benchmark, GlycoGen with Crystallizing Flows strictly Pareto-dominates standard CTMC Euler sampling, our matched-architecture 50M autoregressive baseline (GlycoGen-AR), and the 207M GlycoBART model across both accuracy and latency.

Pareto frontier of accuracy vs measured wall-clock latency
Figure 4: Accuracy vs. wall-clock latency on the CandyCrunch v2 benchmark (n = 76,774). DFM + Crystallizing Flows (deep blue) and MDLM + Crystallizing Flows (green) Pareto-dominate CTMC Euler on both objectives, 50M GlycoGen-AR, and 207M GlycoBART across low step budgets.
Model & Operating Point Effective NFE Latency (ms/spec) Throughput (spec/s) Top-1 Accuracy (3 seeds) Speedup
GlycoGen-DFM + Crystallizing Flows (K = 1, one-pass) 1 0.046 21,883 90.19% ± 0.04% 61×
GlycoGen-DFM + Crystallizing Flows (K = 8, recommended) 5 0.201 4,975 92.51% ± 0.06% 13.9×
GlycoGen-DFM + Crystallizing Flows (K = 32) 17 0.675 1,481 92.67% ± 0.05% 4.1×
GlycoGen-MDLM + Crystallizing Flows (K = 32) 17 0.676 1,479 92.47% ± 0.11% 4.1×
GlycoGen-AR (50M matched autoregressive control, beam 1–32) 33 – 1,045 2.21 – 72.66 452 – 14 90.38% ± 0.05% 1.3× – 0.04×
GlycoBART Reproduction (207M, beam 1 top-1 / beam 32 top-5) 23 / 720 2.80 / 91.21 357 / 11 80.92% / 86.35% 1.0× / 0.03×

Dual-Channel Spectrum Patching & Evaluation Regimes

Rather than truncating spectra to top-N discrete peak tokens and predicting lossy antenna motifs, GlycoGen encodes the entire fragment spectrum as 64 continuous dual-channel patches of L1-normalized intensities and exact sub-bin mass offsets while generating atomic IUPAC tokens directly (+9.5 pp over GlycoBART).

Dual-channel continuous spectrum patching encoder
Figure 5: Dual-channel spectrum patching. Raw peaks across [39.714, 3000.0] Da are binned into 2,048 channels storing both summed L1-normalized intensity and exact sub-bin mass remainder, reshaped into 64 continuous patch tokens plus one precursor m/z token (with zero instrument or retention-time metadata).

● Approaching the Single-Spectrum Bayes Ceiling

On the 76,203 test spectra whose target glycan appears in training, GlycoGen reaches 93.31% exact graph accuracy, and 99.1% of generated strings are syntactically valid IUPAC glycans. Among the remaining mismatches:

  • 41.8% share the exact ground-truth monosaccharide composition and differ only in linkage or branch isomerism (where single-spectrum CID lacks cross-ring cleavage ions or where reference studies differ in wildcard notation such as a2-?).
  • 38.4% differ by a single labile fucose or sialic acid residue subject to in-source neutral loss or co-elution.
  • Only 19.8% of errors (1.3% of the test set) correspond to genuine core or branch topology mistakes.

● Emergent Molecular Graph Generalization

Because two different IUPAC strings can serialize the same branched glycan tree under different branch traversal orders, we isolate 66 test spectra whose target molecular graph appears in training only under a different IUPAC string spelling:

  • GlycoGen-MDLM + CF: 62.1% top-1 graph accuracy
  • GlycoGen-DFM + CF: 60.6% top-1 graph accuracy
  • GlycoBART (207M AR): 13.6% top-1 graph accuracy

Bidirectional denoising learns the underlying molecular graph topology from string supervision alone.

Qualitative SNFG predictions across the four evaluation regimes
Figure 6: Qualitative SNFG predictions across the four evaluation regimes. (a) Exact branched N-glycan recovery (93.3% seen-graph regime). (b) Graph-isomorphic generalization to an unseen IUPAC branch serialization (60.6% DFM vs. 13.6% GlycoBART). (c) Single-spectrum CID regioisomer ambiguity (β1-3 vs. β1-4 Gal, approaching the Bayes error ceiling). (d) Fallback to a valid core motif on a rare unseen methylated topology (ManOMe).

Citation

If you use GlycoGen or Crystallizing Flows in your research, please cite:

@inproceedings{lacombe2026glycogen,
  title     = {GlycoGen: Glycan Structure Prediction with Crystallizing Flows},
  author    = {Lacombe, Romain},
  booktitle = {Advances in Neural Information Processing Systems (NeurIPS)},
  year      = {2026}
}