Skip to content

Preserve constant residuals for zero source coordinates - #1

Open
sylvesterkaczmarek wants to merge 1 commit into
google-research:mainfrom
sylvesterkaczmarek:fix-zero-source-alignment-costs
Open

sylvesterkaczmarek wants to merge 1 commit into
google-research:mainfrom
sylvesterkaczmarek:fix-zero-source-alignment-costs

Conversation

@sylvesterkaczmarek

Copy link
Copy Markdown

Multiplying both inputs by sign(x) discards the target wherever x == 0. The reported alignment loss then omits constant residuals and can select the wrong affine anchor when source depths repeat.

Use a positive sign for zero source coordinates in both alignment paths. Cover clipped/unclipped costs, broadcast weights, target gradients and repeated-depth affine alignment.

Validation: all 18 regression tests pass and fail on unchanged upstream. An additional 180 scalar and 60 affine cases match explicit candidate-minimum calculations. Syntax and git diff --check pass.

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