Implement recursive decomposition (Schur-complement) log-det computation#2
Open
Balance-H wants to merge 2 commits into
Open
Implement recursive decomposition (Schur-complement) log-det computation#2Balance-H wants to merge 2 commits into
Balance-H wants to merge 2 commits into
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.
Motivation
log|det Omega|that follows the decomposition formula (Schur-complement recursion) from graphical-model theory (Lauritzen) so the result matches the nested atoms/separators structure.eigvalsanddadmethods while enabling an exactdecompoption that operates on the decomposition tree instead of simple per-atom aggregation.Description
main.pyand cache the nested decomposition trees asgraph_y.atoms_decompandgraph_y.seps_decomp, and print group counts using a_count_groupshelper for diagnostics.log_det_methodanddecomp_log_detselection flags inFlexLayerand requireatoms_decomp/seps_decompwhenlog_det_method == "decomp".layers/flex.py: construct the layer precision matrixOmegaon the current device (respectingdist_weighted), split the nested decomposition into left/right atoms and separator, form theAA,BB,SS,AS,BSblocks, compute Schur complement blocks using Cholesky solves, and recursively evaluate-logdet(S) + logdet(left) + logdet(right)until atomic subgraphs are reached.torch.linalg.slogdet,torch.linalg.cholesky, andtorch.cholesky_solvefor stable factor/solve operations.Testing
torch/igraph).Codex Task