Skip to content

Latest commit

 

History

History
69 lines (55 loc) · 5.66 KB

File metadata and controls

69 lines (55 loc) · 5.66 KB

adaptive-msm Documentation

Complete documentation for the crate: theory, design, architecture, engineering, usage, science, and machine-checked proofs. Start with the reading path that matches your goal.

Reading paths

I want to… Path
use the crate Getting startedLearner guide / WFST guideCookbook
understand the ideas MSM metricTropical semiringWFST foundationsOnline learning / FPTL
understand the code Design overviewModule structureData flow
evaluate correctness Formal verification mapEmbedding proofRegret & the honest gap
judge performance Complexity & performanceBenchmarks
know the caveats Known issuesADRs

Contents

Theory — what the ideas are

  • MSM metric — Move/Split/Merge, the $C(a,b,c)$ cost function, the DP recurrence, and why MSM (unlike DTW) is a true metric.
  • Tropical semiring — min-plus algebra; why shortest path is minimum-cost alignment.
  • WFST foundations — weighted transducers, path weight, lazy composition, and the trait contracts.
  • Online learning / FPTL — FPL → tropical losses; and the honest gap between that theory and this learner.

Design — why it is built this way

Architecture — how the pieces fit

  • Module structure — layout, the feature-gated boundary, the public API surface.
  • Data flow — the learner round and the WFST build→expand→search flows.

Engineering — how it behaves in practice

Usage — how to drive it

Scientific — evidence, not assertion

Formal — machine-checked proofs

  • Map — what is proven, where, by whom.
  • Upstream references — the liblevenshtein / lling-llang theorems we cite (with re-check commands).
  • MsmWeight homomorphism — proof (mechanized: formal/rocq/MsmWeightHomomorphism.v).
  • Embedding equivalence — shortest path = MSM distance (mechanized: formal/rocq/EmbeddingEquivalence.v).
  • Regret & the honest gap — a convergence theorem is proven; the FPTL regret bound is not claimed.
  • Gate: docs/formal/verify.sh (Rocq coqc axiom-freeness + TLA+ TLC).

Diagrams & archive

  • diagrams/ — PlantUML sources (.puml) and rendered SVGs.
  • archive/ — the superseded ancestor design doc, kept for lineage.

Conventions

  • Math is MathJax with GitHub delimiters: inline $`x`$, display fenced ```math.
  • Diagrams are PlantUML (with LaTeX labels) for concepts; matplotlib SVG only for empirical data plots.
  • Every claim is sourced: code claims cite file.rs; formal claims cite a theorem name; performance claims cite measured data.