No description
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Satya Benson d79f9543bb Add README and MIT license
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 15:34:00 -04:00
app Initial commit: tightness bound sweep and exact tightness tools 2026-02-02 15:30:22 -05:00
.gitignore Initial commit: tightness bound sweep and exact tightness tools 2026-02-02 15:30:22 -05:00
Definitions.hs Initial commit: tightness bound sweep and exact tightness tools 2026-02-02 15:30:22 -05:00
LICENSE Add README and MIT license 2026-10-05 15:34:00 -04:00
README.md Add README and MIT license 2026-10-05 15:34:00 -04:00
tight-bound.cabal Initial commit: tightness bound sweep and exact tightness tools 2026-02-02 15:30:22 -05:00

natlat-bound-tightness

Haskell code for checking how tight the "Mediator Determines Redund" bound from natural latents is:

H(Z_red | Z_med) <= TC(X_1, ..., X_n | Z_med) + 2 * max_i H(Z_red | X_i)

where TC(X | Z_med) is the conditional total correlation (the mediation error) and max_i H(Z_red | X_i) is the redundancy error. The tightness of a distribution is the left side divided by the right side (taken as 1 when the right side is 0); all entropies are in nats.

File What
Definitions.hs Entropy, marginals, conditional entropy, redundancy error, conditional total correlation, tightness, over finite joint distributions
app/exactTightness.hs exact-tightness: an example where the bound holds with equality (X_1 a fair coin, X_2 = X_1 XOR a biased coin, Z_red = (X_1, X_2), Z_med constant), so it cannot be improved
app/tightnessSweep.hs tightness-sweep: a grid sweep over distributions where three binned observables and both latents are deterministic functions of a temperature; prints CSV with the errors, bound and tightness of each

Build and run

Needs GHC and cabal.

cabal run exact-tightness
cabal run tightness-sweep > sweep.csv

License

MIT. See LICENSE.