Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
dsti_regadam to --models (compared against the same syntx dsti arm
as dsti_syn; conservative_smooth matched under --matched, optimizer
intentionally left unmatched).
(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.