Abstract
Inferring the parameters of a stochastic model based on experimental observations is central to the scientific method. A particularly challenging setting is when the model is strongly indeterminate, i.e., when distinct sets of parameters yield identical observations. This arises in many practical situations, such as when inferring the distance and power of a radio source or when estimating the amplifier gain and underlying brain activity of an electrophysiological experiment. In this work, we present Hierarchical Neural Posterior Estimation (HNPE), a novel method for cracking such indeterminacy by exploiting additional information conveyed by an auxiliary set of observations sharing global parameters. Our method extends recent developments in simulation-based inference (SBI) based on normalizing flows to Bayesian hierarchical models. We validate our proposal on a motivating example amenable to analytical solutions and apply it to invert a well-known non-linear model from computational neuroscience, using both simulated and real EEG data.
Introduction: The "Banana" Problem in Inference
In many scientific fields, researchers utilize complex simulators to model phenomena ranging from neuronal firing patterns to galactic evolution. The goal is often to work backward: given a set of observations, what were the simulator parameters that generated them? This process, known as Simulation-Based Inference (SBI), is essential when the underlying likelihood function of the model is too complex to express analytically.
A significant hurdle in SBI is indeterminacy. This occurs when multiple parameter combinations produce the same observation, creating a "ridge" or "banana-shaped" posterior distribution. For instance, a radio signal might be the result of a weak source nearby or a powerful source far away. Without further constraints, standard inference techniques often fail to distinguish between these scenarios, leaving researchers with high levels of uncertainty.
Methodology: Hierarchical Neural Posterior Estimation (HNPE)
HNPE addresses indeterminacy by leveraging the hierarchical structure often found in real-world experiments. In many studies, multiple observations share certain "global" parameters (e.g., the gain of an amplifier used across all trials) while other "local" parameters vary (e.g., the specific brain activity during a single trial). By pooling information across these observations, HNPE can "break" the indeterminate ridges.
Key Components
- Factorized Normalizing Flows: Rather than employing a single monolithic network, HNPE utilizes two distinct normalizing flows. One flow estimates the posterior for the global parameters ($\beta$) given a set of observations, while the second estimates the local parameters ($\alpha$) conditioned on those global parameters.
- DeepSet Architecture: To process an arbitrary number of auxiliary observations, the model incorporates a "DeepSet" network. This architecture is permutation invariant, meaning the order of observations does not affect the outcome. It aggregates data into a single representative embedding, typically through averaging.
- Sequential Refinement (SNPE-C): The authors adapted the Sequential Neural Posterior Estimation (SNPE-C) algorithm. This allows the model to iteratively "zoom in" on the most relevant regions of the parameter space over multiple simulation rounds, significantly improving sample efficiency.
Experimental Validation
The researchers validated HNPE across three levels of complexity:
- Analytical Toy Example: A multiplicative model ($x = \alpha\beta + \epsilon$) specifically designed to generate a "banana" posterior. This provided a ground truth to measure how effectively the method collapses uncertainty as the number of observations increases.
- Neural Mass Model (NMM): A sophisticated system of stochastic differential equations used in neuroscience to simulate the electrical activity of cortical columns. This model is notoriously difficult to invert due to its non-linearities.
- Real-World EEG Data: The model was applied to a public dataset of human EEG recordings (Cattan et al., 2018), focusing on "alpha waves" during eyes-open and eyes-closed conditions.
Key Insights and Results
Statistical Strength through Sharing
The core innovation of HNPE is the realization that while a single observation may be ambiguous, a collection of observations sharing a global parameter provides sufficient constraints to resolve the ambiguity. Mathematically, the hierarchical likelihood acts as a "sharpener," penalizing ambiguous regions as the number of observations ($N$) grows.
Performance Metrics
In the toy example, increasing the number of auxiliary observations from $N=0$ to $N=100$ dramatically reduced the Sinkhorn divergence—a metric for the distance between probability distributions—between the estimated and true analytical posterior. In the NMM simulator, HNPE successfully identified "gain" and "connectivity" parameters that were previously unidentifiable using standard SBI methods.
Biological Discovery
When applied to real EEG data, HNPE demonstrated that the global gain parameter remained consistent across different experimental conditions, while the connectivity parameters clearly distinguished between "eyes open" and "eyes closed" states. This suggests that HNPE can successfully map abstract simulator parameters to tangible biological phenomena.
Limitations and Future Directions
Despite its success, the authors identify several challenges for future research:
- Validation: As with most likelihood-free methods, verifying the accuracy of the posterior is difficult when the true likelihood is unknown.
- Computational Intensity: Generating thousands of simulations is computationally expensive and carries a non-negligible carbon footprint.
- Scaling Summary Statistics: While the team experimented with learning summary statistics directly from raw data (using the YuleNet architecture), they encountered numerical instabilities and memory issues as the number of observations scaled.
Future work will focus on improving the robustness of data-driven summary statistics and exploring more complex, multi-level hierarchical structures.
Summary updated