Skip to content

Stabilize SO(3) chordal weight normalization#4448

Open
FlorianPfaff wants to merge 2 commits into
mainfrom
agent/stabilize-so3-chordal-weight-normalization
Open

Stabilize SO(3) chordal weight normalization#4448
FlorianPfaff wants to merge 2 commits into
mainfrom
agent/stabilize-so3-chordal-weight-normalization

Conversation

@FlorianPfaff

Copy link
Copy Markdown
Owner

Bug

SO3ChordalMeanSmoother._normalize_weight_vector() summed finite nonnegative weights at their original scale. For weights near the active floating-point maximum, the sum could overflow to infinity. Dividing by that total then collapsed every normalized weight to zero, so the projected chordal mean could become an unrelated rotation.

For example, weights proportional to 3:1 at the float64 limit produced the identity rotation instead of the same weighted mean as ordinary [3.0, 1.0] weights.

The same risk applied when finite sample and kernel weights were multiplied during local smoothing.

Fix

  • scale every weight vector by its largest positive entry before summation
  • normalize the bounded scaled weights when a probability vector is needed
  • retain the bounded relative weights for kernel/sample weighting so their products cannot overflow
  • preserve existing validation for length, finiteness, nonnegativity, and positive mass

Validation

  • reproduced overflow of the old raw weight sum and the resulting identity rotation
  • verified scaled normalization yields [0.75, 0.25] for the extreme finite 3:1 case
  • added a backend-aware regression comparing extreme weights with ordinary [3.0, 1.0] weights
  • branch is 2 commits ahead of main, 0 behind, and changes only the smoother plus the focused regression

Full repository CI is requested by this pull request.

@FlorianPfaff FlorianPfaff marked this pull request as ready for review July 15, 2026 15:43
@FlorianPfaff FlorianPfaff enabled auto-merge (squash) July 15, 2026 15:43
@github-actions

Copy link
Copy Markdown
Contributor

MegaLinter analysis: Success

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ COPYPASTE jscpd yes no no 22.5s
✅ JSON prettier 7 0 0 0 0.72s
✅ JSON v8r 7 0 0 4.52s
✅ MARKDOWN markdownlint 68 0 0 0 1.96s
✅ MARKDOWN markdown-table-formatter 68 0 0 0 0.99s
✅ PYTHON black 1543 198 0 0 90.39s
✅ PYTHON isort 1543 368 0 0 2.58s
✅ REPOSITORY betterleaks yes no no 2.94s
✅ REPOSITORY checkov yes no no 52.51s
✅ REPOSITORY gitleaks yes no no 14.3s
✅ REPOSITORY git_diff yes no no 0.6s
✅ REPOSITORY secretlint yes no no 61.44s
✅ REPOSITORY syft yes no no 5.95s
✅ REPOSITORY trivy-sbom yes no no 6.28s
✅ REPOSITORY trufflehog yes no no 31.25s
✅ YAML prettier 11 0 0 0 0.78s
✅ YAML v8r 11 0 0 11.45s
✅ YAML yamllint 11 0 0 0.77s

Notices

📣 MegaLinter 9.5.0 is out! Discover the new features and security recommendations in the release announcement. (Skip this info by defining SECURITY_SUGGESTIONS: false)

See detailed reports in MegaLinter artifacts

Your project could benefit from a custom flavor, which would allow you to run only the linters you need, and thus improve runtime performances. (Skip this info by defining FLAVOR_SUGGESTIONS: false)

  • Documentation: Custom Flavors
  • Command: npx mega-linter-runner@9.6.0 --custom-flavor-setup --custom-flavor-linters PYTHON_BLACK,PYTHON_ISORT,COPYPASTE_JSCPD,JSON_V8R,JSON_PRETTIER,MARKDOWN_MARKDOWNLINT,MARKDOWN_MARKDOWN_TABLE_FORMATTER,REPOSITORY_CHECKOV,REPOSITORY_GIT_DIFF,REPOSITORY_GITLEAKS,REPOSITORY_BETTERLEAKS,REPOSITORY_SECRETLINT,REPOSITORY_SYFT,REPOSITORY_TRIVY_SBOM,REPOSITORY_TRUFFLEHOG,YAML_PRETTIER,YAML_YAMLLINT,YAML_V8R

MegaLinter is graciously provided by OX Security
Show us your support by starring ⭐ the repository

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