Matrix-free solution to make very large meshes more efficient for Interferometer #39
Replies: 3 comments 1 reply
|
@HRSAstro thank you, this is a very clear proposal and the benchmark table makes the case. We would like to incorporate it and have opened PyAutoLabs/PyAutoArray#638 to track it, with your write-up quoted; we will plan the phases there shortly and would value your involvement. To guide that, do you have working Python code we could look at, even just snippets showing the operator data term, the sparse Matérn precision, the SLQ evidence and the interior-point solve running on your build? Pointers into pyuvimage are ideal. We will post an update here when work starts. |
|
I attached some code snippets that includes the matrix-free solution implementation, with evidence assembly and postive-only solve. I ran it against pyuvimage's implementation and a dense solve on a small mock:
|
|
@HRSAstro thanks, the snippets and the check table made planning straightforward. Phase 1 (operator data term and preconditioned CG with parity tests against the current sparse path) is now up as PyAutoLabs/PyAutoArray#645 under PyAutoLabs/PyAutoArray#638; the sparse Matérn precision, Lanczos evidence and interior-point positivity follow as phases 2 to 4. We will keep that issue updated. |
Uh oh!
There was an error while loading. Please reload this page.
Summary
For large source meshes the inversion is limited by the dense n × n curvature and regularization matrices. Memory scales as n² and each Cholesky or NNLS solve as ~n³. For interferometer data with the w-tilde formalism, this puts a practical ceiling at around 100 × 100 source pixels. I have implemented a matrix-free alternative in PyUVimage (built on autoarray/autogalaxy), following Powell et al. (2021), and would like to suggest it as an option in autoarray. I'm happy to share the code.
The problem
At 192 × 192 (36,864 pixels), F + H takes 11 GB in double precision and each factorisation is ~2 × 10¹³ flops. The non-negative solver refactorises many times per solve. On our test case (NGC 4274, 2.6 M visibilities), the first positive solve extrapolated to days on 2 cores.
The approach
No n × n matrix is formed. Each piece is replaced by an operator or a sparse matrix:
pix_indexesand weights. D = Mᵀ (dirty image). Both agree with the dense path to 1e-16.MaternKernelregularization builds the dense covariance and inverts it. The sparse form only exists for integer α, so ν = 1.5 becomes ν = 1.Results
Real ALMA data, 2 cores, visibilities streamed, adaptive prior, regularization strength set by a residual criterion. "w-tilde" is the current dense path.
On the compact sources, the positive matrix-free models agree with the positive w-tilde models to 0.2–0.7% of the peak after smoothing to the beam. Most of the remaining difference on extended emission comes from ν = 1 vs 1.5.
Limitations
Possible shape
Perhaps a separate inversion class (or a
Settingsoption) for interferometer data on a rectangular mesh, where the curvature-plus-regularization matrix is aLinearOperator. The reconstruction would come from CG or the interior point method, and the log det terms from the sparse factor plus Lanczos quadrature. Much of the inversion interface reads the dense matrices directly, so a separate path may be simpler to start with.References
All reactions