Repository navigation
Fisher divergence, mutual information (MINE), tempered transitions - #42
Merged
Merged
Conversation
fisher_divergence: E‖s_a - s_b‖² between two EBMs' scores (exact vs the two-Gaussian closed form). mutual_information: MINE's Donsker-Varadhan bound via a small trained statistics net (validated against -½log(1-ρ²)). Both torch-only.
Single-chain barrier crossing: anneal one chain up a temperature ladder to a freely-mixing hot distribution and back, accumulating Neal's telescoping log-weight for a single end-of-move accept/reject. Complements ParallelTempering without replicas; reuses the _Tempered helper.
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.
Fisher divergence, mutual information (MINE), tempered transitions
The research-tail of the expansion — three independently-useful additions, each with a closed-form or distributional test.
eval.fisher_divergence(energy_a, energy_b, x)—E‖s_a − s_b‖², a score-space distance between two EBMs (no partition function). Test: matches the two-Gaussian closed formtr(MΣ₁Mᵀ)+‖b(μ₁−μ₂)‖²(0.864 vs 0.873); identical models → 0.eval.mutual_information(x, y)— MINE (Belghazi et al. 2018): a small statistics net maximizing the Donsker–Varadhan bound, marginals by in-batch shuffling. Test: recovers Gaussian MI−½log(1−ρ²)within 0.05. Examplemine_mutual_information.pytracks the closed form across a ρ sweep.TemperedTransitions— Neal's (1996) single-chain annealed barrier crossing: melt one chain up a temperature ladder and refreeze, with the telescoping log-weight and one accept/reject. A replica-free complement toParallelTempering. Test: recovers an asymmetric 70/30 mixture's weights from a fully trapped start (0.30, not 0.5) where single-chain MALA stays at 0.005 — which pins the acceptance sign, since a symmetric target can't.No version bump — lands under the unreleased 0.13.0 CHANGELOG section.
Verification
ruff + format + mypy clean; 151 tests pass; example runs on CPU.
🤖 Generated with Claude Code