Skip to content

VOP compression: grow each point to every matrix it dominates - #50

Merged
mcencini merged 1 commit into
mainfrom
vop-core-plus-margin
Oct 30, 2026
Merged

mcencini merged 1 commit into
mainfrom
vop-core-plus-margin

Conversation

@mcencini

Copy link
Copy Markdown
Contributor

Summary

  • Each point in vop.compress is the strongest matrix left plus margin · λmax · I, and its cluster is every matrix left that the point dominates. The construction follows Eichfelder and Gebhardt.
  • Dominance is tested with a batched Cholesky factorisation (cholesky_ex(point − Q).info == 0) in complex128, on the stack's own device. The eigenvalues are taken once, on the processor: CUDA's batched eigvalsh asks for about 1 MB of workspace per 8 × 8 matrix, which is 140 GiB at 131k matrices.
  • The bound is unchanged: each point overestimates any drive's SAR by at most margin · λmax · |v|².
  • Before this change, each point grew from the sum of its members' deficiencies and covered only 10–30 matrices. On the nova-coil BrainWeb population (678,657 10 g cubes, 15 data sets), a 5 % margin gave 41,786 points in 14 h on the CPU.

Margin sweep (nova-coil population, A40)

"Over" is how far the points overstate the exact peak over every cube.

margin points time over, all-ones drive random drives: median / max
5 % 271 5.8 s 78.4 % 23.2 % / 92.3 %
2 % 2,461 41.6 s 30.5 % 9.5 % / 37.3 %
1 % 13,541 226 s 16.0 % 4.7 % / 18.6 %
0.5 % 56,076 1,013 s 8.0 % 2.4 % / 9.3 %
0.2 % 216,978 4,713 s 3.2 % 1.0 % / 3.7 %

Tests

  • New: every matrix the first point dominates joins its cluster; single-precision matrices are bounded in double; the compression needs no more points than CoSimPy's compVOP (skipped without cosimpy). The margin test allows a relative 1e-12, because a drive whose worst matrix leads a cluster reaches the margin exactly.
  • bash scripts/format_and_lint.sh: 92 files left unchanged / All checks passed!
  • pytest -q on aleatico2 (A40, so the CUDA legs ran): 1161 passed, 28 deselected, 20 warnings in 433.31s

nova-coil PR #3 uses this to write its points file.

🤖 Generated with Claude Code

Each point is the strongest matrix left plus the margin's share of the
identity; its cluster is every matrix left that it dominates, tested by a
batched Cholesky factorisation in double precision on the stack's device.
The eigenvalues are taken once, on the processor.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@codecov

codecov Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/mariepy/vop.py 0.00% 16 Missing ⚠️

📢 Thoughts on this report? Let us know!

@mcencini
mcencini merged commit 0a5e3b4 into main Oct 30, 2026
6 checks passed
@mcencini
mcencini deleted the vop-core-plus-margin branch October 30, 2026 08:47
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