First-hand information for everyone
Scientists have turned a longstanding challenge in hierarchical Bayesian modelling into an opportunity to cut analysis time. When data arrive in separate groups—think clinical sites or experimental batches—standard practice requires re‑integrating each group’s likelihood into the global posterior every time a group is added, removed, or a new prior is tried.
Coherent Amortized Marginal Evidence Learning (CAMEL) solves this by learning a finite‑dimensional coefficient vector for each group that represents its log integrated likelihood modulo an irrelevant additive constant. These vectors are added together and then evaluated with a fixed basis, so the cost of adding a new cohort or deleting an old one is O(K) and requires no further neural evaluations or raw‑data access.
| Property | NPE (e.g., BayesFlow) |
|---|
| Groupwise NLE/NRE |
|---|
| CAMEL (proposed) |
|---|
| Learned target | Posterior density q0(η∣D1:J) under a reference hyperprior π0. | Groupwise likelihood m^Dj(η) or likelihood ratio r^Dj(η). | Groupwise log integrated likelihood modulo additive constants, ℓ^Dj(η)=cj⊤φ(η), on a shared basis. |
| Hyperprior revision | Posterior reweighting by π(η)/π0(η), subject to support and integrability conditions; no retraining. | Apply the new hyperprior to the fitted likelihood or ratio contributions; no retraining or re-encoding. | Apply the new hyperprior to the aggregated log integrated likelihood; no retraining or re-encoding. |
| Group addition/deletion | 𝒪(S) update when group summaries are additive; extrapolation beyond trained collection sizes is not guaranteed. | Add or remove a stored group contribution; unchanged groups need not be re-encoded. | 𝒪(K) vector update, c¯←c¯±cj. |
| Stored state after aggregation | An S-dimensional summary conditioning the posterior network; additivity alone does not enforce likelihood factorization. | J groupwise contributions or encodings, evaluated separately at each new η. | A single K-dimensional vector c¯, whose size does not grow with J. |
| Evaluation at a new η | 𝒪(Cpost) for posterior-density evaluation; direct sampling is typical. | 𝒪(JCnet) for conventional parameter-dependent groupwise neural estimators. | 𝒪(K) for the inner product c¯⊤φ(η). |
| Gradient computation | Not required for direct sampling; density gradients can be obtained through the posterior network. | Typically requires differentiation through J parameter-dependent network evaluations. | (Dηφ(η))⊤c¯; no differentiation through the fitted encoder. |
Experiments on replicated spatial Gaussian processes and an agricultural uniformity trial show that CAMEL’s approximated hyperposterior matches the exact solution in total‑variation distance and preserves downstream inferences across a variety of re‑analyses, including hyper‑prior updates and leave‑one‑out studies.
| Analysis | Fields | Settings | Maximum TV | Maximum mean-gj error |
|---|---|---|---|---|
| Full field set | 24 | 4 | 0.0582 | 0.0108 |
| Nested field subsets | 4,8 | 8 | 0.0331 | 0.0113 |
| Leave-one-field-out | 23 | 96 | 0.1185 | 0.0240 |
A theoretical analysis shows that the convergence of the approximate hyperposterior to the exact one depends on conditions involving hyperparameter score gradients; only under these conditions does the method guarantee total‑variation convergence to the true posterior.
These results mean that analysts can combine thousands of studies, shift priors, or re‑configure partitions instantly, but the guarantees only hold when the hyper‑gradient conditions are satisfied.