Skip to content

ENH: dsti-regadam model. - #58

Merged
ntustison merged 2 commits into
mainfrom
dstiadam
Sep 24, 2026
Merged

ntustison merged 2 commits into
mainfrom
dstiadam

Conversation

@ntustison

Copy link
Copy Markdown
Member

ENH: Port syntx's RegAdam optimizer as a new dsti_regadam arm.

Adds optimizer="reg_adam" to antstorch.syn.syn_registration(): a
lightweight port of syntx's greedy.py Adam-momentum pattern (per-voxel
first/second moments, reset each pyramid level, regularizer applied to
the bias-corrected quotient instead of the raw gradient). Default
behavior (optimizer="gradient_descent") is unchanged.

Wires this into antstorch.benchmark.evaluate_mindboggle_pair() as a new
"dsti_regadam" model: same dsti regularizer and dense-SyN loop as
dsti_syn, but with reg_adam instead of plain gradient descent. dsti_syn
itself is untouched, preserving reproducibility of prior comparison
runs.

Scope: RegAdam optimizer only, not the full syntx.tvf time-varying-
velocity-field engine (~2450 lines, architecturally distinct) --
narrowed from the original request after estimating that port's size,
to test first whether the optimizer alone explains part of the dsti_syn
vs syntx dsti gap.

Also:

  • tools/benchmarks/compare_syntx_antstorch_mindboggle.py: add
    dsti_regadam to --models (compared against the same syntx dsti arm
    as dsti_syn; conservative_smooth matched under --matched, optimizer
    intentionally left unmatched).
  • tools/benchmarks/README.md: new model catalog for tools/benchmarks/
    (which script compares what, every antstorch model name and its
    regularizer/optimizer, syntx/antstorch/FireANTs name mapping).

Tests: 6 new tests in tests/syn/test_syn.py (unknown optimizer rejected,
loss decreases under reg_adam, default stays gradient_descent, update
trajectory differs from plain gradient descent, Adam moments reset each
pyramid level, works in 3D), 1 new test + 1 parametrization entry in
tests/benchmark/test_evaluate.py (dsti_regadam vs dsti_syn differ on
the same pair). 141/141 passing, no regressions.

Not yet run on real Mindboggle-101 data -- only validated against the
synthetic mock dataset used by the test suite.

@ntustison
ntustison merged commit a376fe5 into main Sep 24, 2026
3 checks passed
@ntustison
ntustison deleted the dstiadam branch September 24, 2026 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant