Gaussian Estimator¶
Full covariance Gaussian posterior estimation.
Overview¶
GaussianFullCov provides a simpler alternative to Flow for posterior
estimation. Instead of normalizing flows, it models the posterior as a
multivariate Gaussian with full covariance, using eigenvalue-based operations.
Key features:
- Full covariance matrix showing parameter correlations directly
- Eigenvalue-based tempered sampling for exploration
- Simpler and more interpretable than flow-based methods
Note
GaussianFullCov requires a Product prior with "standard_normal" mode.
Configuration¶
Like Flow, all GaussianFullCov parameters are specified flat directly
under estimator: in YAML — no nested group keys.
estimator:
_target_: falcon.estimators.GaussianFullCov
max_epochs: 1000
batch_size: 128
early_stop_patience: 32
hidden_dim: 128
num_layers: 3
momentum: 0.01
min_var: 1.0e-20
eig_update_freq: 1
embedding:
_target_: model.E_identity
_input_: [x]
lr: 0.01
lr_decay_factor: 1.0
lr_patience: 8
gamma: 0.5
discard_samples: false
log_ratio_threshold: -20.0
Configuration Reference¶
Network Parameters¶
| Parameter | Type | Default | Description |
|---|---|---|---|
hidden_dim |
int | 128 | MLP hidden layer dimension |
num_layers |
int | 3 | Number of hidden layers |
momentum |
float | 0.01 | EMA momentum for running statistics |
min_var |
float | 1e-20 | Minimum variance for numerical stability |
eig_update_freq |
int | 1 | Eigendecomposition update frequency |
The training loop, optimizer, and inference parameters (max_epochs, batch_size,
early_stop_patience, lr, lr_decay_factor, lr_patience, prior_epochs,
gamma, discard_samples, log_ratio_threshold, etc.) are identical to those in
Flow.
gamma for GaussianFullCov
Unlike Flow, where gamma controls importance-sampling breadth, in
GaussianFullCov it controls eigenvalue tempering of the covariance matrix.
Smaller gamma (e.g. 0.1) produces a broader proposal relative to the
posterior; the relationship is not the same as in Flow.
Complete Example¶
graph:
z:
evidence: [x]
simulator:
_target_: falcon.priors.Product
priors:
- ['normal', 0.0, 1.0]
- ['normal', 0.0, 1.0]
- ['normal', 0.0, 1.0]
estimator:
_target_: falcon.estimators.GaussianFullCov
max_epochs: 8000
batch_size: 128
early_stop_patience: 128
hidden_dim: 128
num_layers: 3
momentum: 0.01
min_var: 1.0e-20
eig_update_freq: 1
embedding:
_target_: model.E_identity
_input_: [x]
lr: 0.01
lr_decay_factor: 1.0
lr_patience: 8
gamma: 0.1
discard_samples: false
log_ratio_threshold: -20.0
ray:
num_gpus: 1
x:
parents: [z]
simulator:
_target_: model.ExpPlusNoise
sigma: 1.0e-6
observed: "./data/mock_data.npz['x']"
sample:
posterior:
n: 1000
Class Reference¶
GaussianFullCov
¶
GaussianFullCov(*, max_epochs=100, lr=0.01, gamma=0.5, embedding=None, device=None, batch_size=128, early_stop_patience=16, prior_epochs=0, cache_on_device=False, cache_sync_every=0, max_cache_samples=0, hidden_dim=128, num_layers=3, momentum=0.01, min_var=1e-20, eig_update_freq=1, betas=(0.9, 0.9), lr_decay_factor=1.0, lr_patience=8, discard_samples=False, log_ratio_threshold=-20.0)
Bases: StepwiseEstimator
Full-covariance Gaussian posterior estimator for TransformedPrior simulators.
Works in the standard-normal latent space; samples are mapped back to parameter space after generation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
max_epochs
|
int
|
Maximum training epochs. |
100
|
lr
|
float
|
Learning rate. |
0.01
|
gamma
|
float
|
Proposal tempering coefficient. |
0.5
|
embedding
|
Embedding config dict or |
None
|
|
device
|
Device string; auto-detected if |
None
|
|
batch_size
|
int
|
Mini-batch size. |
128
|
early_stop_patience
|
int
|
Epochs without improvement before stopping. |
16
|
prior_epochs
|
int
|
Epochs to sample from prior before switching to proposal. |
0
|
cache_on_device
|
bool
|
Cache training data on the estimator's device. |
False
|
cache_sync_every
|
int
|
Resync buffer cache every N epochs (0 = every epoch). |
0
|
max_cache_samples
|
int
|
Cap on cached training samples (0 = all). |
0
|
hidden_dim
|
int
|
MLP hidden layer width. |
128
|
num_layers
|
int
|
MLP depth. |
3
|
momentum
|
float
|
EMA momentum for running statistics. |
0.01
|
min_var
|
float
|
Minimum variance for numerical stability. |
1e-20
|
eig_update_freq
|
int
|
Eigendecomposition update frequency. |
1
|
betas
|
tuple
|
AdamW beta coefficients. |
(0.9, 0.9)
|
lr_decay_factor
|
float
|
LR decay factor (1.0 = no decay). |
1.0
|
lr_patience
|
int
|
Plateau patience before LR decay. |
8
|
discard_samples
|
bool
|
Discard low log-ratio training samples. |
False
|
log_ratio_threshold
|
float
|
Log-ratio cutoff for discarding. |
-20.0
|