NNPDF — neural nets and Monte-Carlo replicas
No-fixed-form neural-net PDFs, the Monte-Carlo replica method and closure tests, and the open-source ecosystem Colibri is built on.
Of the three PDF collaborations profiled in this topic, NNPDF is the one you must understand best — not because it is the most accurate (all three fit the same world data to comparable precision), but because our lab runs inside its machinery. The Colibri framework this portal is built on borrows NNPDF's open-source theory tables, its data format, and its closure-test apparatus, and adds a Bayesian inference layer on top. So this section is half group-profile, half tour of the toolshed we work in every day. The through-line is one radical idea: stop guessing the functional form of the PDF, and let a neural network and a Monte-Carlo ensemble carry the shape and the uncertainty for you.
Who they are
NNPDF — the Neural Network PDF collaboration — is a European theory group that grew out of a Milan–Edinburgh axis in the mid-2000s and now spans Milan (Università di Milano / INFN), Edinburgh (the Higgs Centre for Theoretical Physics), Amsterdam (VU / Nikhef), Cambridge (DAMTP), Turin, CERN, and beyond. Its long-standing figures include Richard D. Ball (Edinburgh), Stefano Forte (Milan), Luigi Del Debbio (Edinburgh), Juan Rojo (VU Amsterdam / Nikhef), Stefano Carrazza (Milan, who led the modern machine-learning rewrite), Emanuele R. Nocera (Turin / Ancona), and — the reason this lab exists — Maria Ubiali at Cambridge, who advises this project. Colibri and the Bayesian program you are reading about come directly out of Ubiali's ecosystem, which is why NNPDF is not a distant rival here but the substrate under our feet.
Because NNPDF made a deliberate choice the other groups did not: they released the whole pipeline — code, data, and theory grids — as open source. That turned NNPDF from a closed competitor into a public platform. This lab's contribution is not a new dataset or a new evolution code; it is a new inference philosophy (fully Bayesian nested sampling, §5) and a way to run MSHT-style fixed functional forms (§3.7) inside NNPDF's open machinery, so that all three methodologies can finally be compared on identical footing.
The radical break — no fixed functional form
Recall the MSHT/CT approach (§3.6–3.7): choose a parametric shape for each PDF at the input scale, something like $x f(x) = A\,x^{a}(1-x)^{b}\,(1 + \text{polynomial in }\sqrt{x})$, and fit the handful of coefficients $A, a, b, \dots$ by minimising $\chi^2$. The shape is a human hypothesis; the fit only tunes it. This is economical and interpretable, but it bakes in a parametrisation bias: whatever the true PDF does that your chosen form cannot express, your fit simply cannot see, and — worse — your error band will not know it is missing.
NNPDF's founding move was to remove the human-chosen shape almost entirely. Each PDF combination is represented by a neural network — a universal function approximator flexible enough, in principle, to reproduce any smooth curve. The only residual "form" is a theory-motivated preprocessing factor $x^{1-\alpha}(1-x)^{\beta}$ that nudges the network toward the physically expected small-$x$ ($x\to0$) and large-$x$ ($x\to1$) power laws, so the net does not have to learn those asymptotics from scratch. Concretely, in NNPDF4.0 a single flavour is written
where $Q_0 = 1.65$ GeV is the parametrisation scale and the network takes both $x$ and $\ln x$ as inputs (so it sees the variable natively on both linear and logarithmic scales, matching the physics at large and small $x$). In NNPDF4.0 the exponents $\alpha_j, \beta_j$ are held fixed within a fitted bounded range (they were randomised in earlier versions), because letting them float freely was found to underestimate the uncertainty in the extrapolation region.
The Monte-Carlo replica method — the core
Having removed the functional form, NNPDF faces a question: with thousands of free network weights, how do you attach a meaningful uncertainty to the answer? A single best-fit network gives one curve and no error band. The MSHT/CT answer is the Hessian: expand $\chi^2$ around its minimum and read off the covariance of the parameters (§3.7). NNPDF instead uses the Monte-Carlo replica method, a technique that is essentially a parametric bootstrap — and this is one of the three inference legs this lab compares.
The recipe has three steps:
| 1. Generate replicas | Take the real central data $\mathbf{D}$ with its full experimental covariance $\mathbf{C}$ (statistical + all systematics). Draw $N_{\text{rep}}$ pseudodata sets $\mathbf{D}^{(k)}$ by sampling from a multivariate Gaussian $\mathcal{N}(\mathbf{D}, \mathbf{C})$ — i.e. fluctuate the data around itself according to how well it is known. |
| 2. Fit each replica | Fit an independent neural network to each pseudodata set $\mathbf{D}^{(k)}$, minimising its $\chi^2$. This yields an ensemble of $N_{\text{rep}}$ fitted PDFs $f^{(k)}(x, Q^2)$. |
| 3. Read off the distribution | The ensemble is the probability distribution of the PDF. The central value at any $(x,Q^2)$ is the mean over replicas; the uncertainty is the standard deviation; correlations between flavours or $x$-points are the replica covariance. |
The beauty is that the ensemble propagates the experimental uncertainty through the entire nonlinear fit without ever writing down a Hessian. To compute the error on any derived quantity — a cross-section, a Higgs rate — you simply evaluate it on all $N_{\text{rep}}$ replicas and take the spread. No linear error propagation, no assumption that $\chi^2$ is parabolic.
Consider the linearised limit where the fit is well-approximated by a linear model: predictions depend on parameters $\boldsymbol{\theta}$ through a design matrix $\mathbf{G}$, so $\mathbf{T}(\boldsymbol\theta) = \mathbf{G}\boldsymbol\theta$, and the data relate to the truth by $\mathbf{D} = \mathbf{G}\boldsymbol\theta_{\text{true}} + \boldsymbol\eta$ with noise $\boldsymbol\eta \sim \mathcal{N}(0, \mathbf{C})$. The $\chi^2$ minimiser is the generalised least-squares estimator
$$ \hat{\boldsymbol\theta}(\mathbf{D}) = \big(\mathbf{G}^{\!\top}\mathbf{C}^{-1}\mathbf{G}\big)^{-1}\mathbf{G}^{\!\top}\mathbf{C}^{-1}\,\mathbf{D}. $$
Now the replica step replaces $\mathbf{D}$ by $\mathbf{D}^{(k)} = \mathbf{D} + \boldsymbol\epsilon^{(k)}$ with $\boldsymbol\epsilon^{(k)}\sim\mathcal{N}(0,\mathbf{C})$, and refits: $\hat{\boldsymbol\theta}^{(k)} = \hat{\boldsymbol\theta}(\mathbf{D}^{(k)})$. Because the estimator is linear in the data, the fluctuation of the fitted parameters is exactly the estimator applied to the injected noise:
$$ \hat{\boldsymbol\theta}^{(k)} - \hat{\boldsymbol\theta}(\mathbf{D}) = \big(\mathbf{G}^{\!\top}\mathbf{C}^{-1}\mathbf{G}\big)^{-1}\mathbf{G}^{\!\top}\mathbf{C}^{-1}\,\boldsymbol\epsilon^{(k)}. $$
Taking the covariance over replicas ($\langle\boldsymbol\epsilon\boldsymbol\epsilon^{\!\top}\rangle=\mathbf{C}$) gives
$$ \mathrm{Cov}\big[\hat{\boldsymbol\theta}^{(k)}\big] = \big(\mathbf{G}^{\!\top}\mathbf{C}^{-1}\mathbf{G}\big)^{-1} \;=\; \text{the exact least-squares parameter covariance.} $$
So in the linear regime the replica ensemble reproduces the same covariance the Hessian method would give — the parametric bootstrap and the Hessian agree. Away from linearity (which is exactly where flexible neural nets live), the replica method keeps working — it samples the true nonlinear response — while the naive Hessian would fail. This is why the MC method and the Hessian coincide as sanity checks yet differ in the extrapolation regions that matter most. $\blacksquare$
Closure tests — how NNPDF checks itself
A method this indirect demands a way to prove it is not fooling itself. NNPDF's answer is the closure test: generate pseudodata from a known input PDF (a "true" law you get to choose), run the entire fitting machinery on it as if it were real, and check that the fit recovers the input and assigns a correct, faithful uncertainty. Because you know the truth, you can grade the fit exactly — this is impossible with real data, where the truth is what you are trying to find. Closure tests come in three levels of increasing realism:
| Level 0 (L0) | Pseudodata = the theory prediction from the input PDF with no noise added at all. The fit should reproduce the input essentially perfectly (up to the flexibility of the network). L0 tests whether the parametrisation is flexible enough to represent the truth — a pure interpolation check. |
| Level 1 (L1) | Add one layer of Gaussian noise: draw the pseudodata once from $\mathcal{N}(\mathbf{T}_{\text{true}}, \mathbf{C})$, giving a single realistic "experiment" with realistic scatter. L1 tests whether the fit handles genuine data-level noise without over-fitting to it — the fit should land within its error band of the truth, not chase the fluctuations. |
| Level 2 (L2) | On top of the L1 dataset, run the full Monte-Carlo replica procedure — a second layer of fluctuations for the fit's own uncertainty estimate. L2 is the complete, production-faithful test: it checks that the replica spread correctly captures the propagated data uncertainty, i.e. that the quoted PDF errors are neither too small (over-confident) nor too large. |
The grading uses statistical estimators — bias-to-variance ratios, $\phi$ estimators, and coverage checks — that ask whether, over many closure runs, the truth falls inside the 68% band 68% of the time. This is exactly the self-validation machinery this lab runs (see §4.4 for the estimators in full, and Topic 5 for how closure testing underwrites our Bayesian error bars). A modern reinterpretation recasts closure testing in the language of Bayesian inverse problems, which dovetails directly with the nested-sampling program of §5.
Because "faithful uncertainties" is precisely the property a Bayesian posterior is supposed to have by construction, and closure tests are the empirical audit of whether any method — frequentist MC-replica or Bayesian nested-sampling — actually delivers them. When this lab claims its posterior credible intervals mean what they say, a closure test is how we prove it. The MC-replica method and Bayesian inference should agree in the linear regime (the derivation above shows why); closure tests are where we watch them agree or diverge on real problems.
The fitting engine — from genetic algorithms to deep learning
The how of minimisation has changed dramatically across NNPDF's history, and the change is a nice microcosm of machine learning at large. Early NNPDF fits (up to and including NNPDF3.1) minimised each replica with a genetic algorithm: no efficient way existed to differentiate the fit quality with respect to thousands of network weights, so the fit bred populations of candidate networks, mutated them, and selected the fittest across many generations. It was robust against local minima but slow and idiosyncratic, with hand-tuned mutation rates and multi-epoch schedules.
NNPDF4.0 replaced this wholesale with gradient descent in a modern deep-learning framework. The fitting code, n3fit, is built on TensorFlow/Keras (with a PyTorch backend option), so the gradients of the loss with respect to every weight are available by automatic differentiation, and stochastic gradient descent with backpropagation trains each replica far faster and more reliably. Crucially, the architecture and training hyperparameters are no longer hand-picked: they are chosen by an automated hyperoptimisation scan that guards against both under-fitting (missing the true minimum) and over-fitting (chasing noise). The current flagship release is NNPDF4.0, delivering proton structure at the stated goal of roughly one-percent accuracy.
The open ecosystem — the machinery our lab runs inside
NNPDF's most consequential decision, from this lab's point of view, was to make the entire pipeline open source — not just the final PDF grids, but the code, the data, and the fast theory tables. The pieces you will meet directly in this portal are:
| validphys | The analysis and bookkeeping framework: it loads datasets, applies kinematic cuts, builds covariance matrices, evaluates $\chi^2$, and produces reports. Our lab uses its data handling and its FK-table parser directly. |
| FK (Fast-Kernel) tables | The key to fast fitting. A theory prediction for a data point is, in general, a convolution of the PDF with a perturbative partonic cross-section and DGLAP evolution from $Q_0$ to the data's scale. FK tables precompute all of that — partonic hard-scattering grids (via APPLgrid-style interfaces) combined with the DGLAP evolution kernels — into a single table, so that a prediction becomes a simple linear operation on the input-scale PDF. This linearity is exactly what makes thousands of replica fits (and, for us, thousands of nested-sampling likelihood calls) computationally feasible. |
| PineAPPL | The modern interpolation-grid code (written in Rust, with C/C++/Fortran/Python interfaces) that stores partonic predictions independently of the PDF and the strong coupling, including electroweak and mixed higher-order corrections. Together with the EKO evolution-operator code and the pineko glue, it is how the FK tables our fits consume are generated. |
This is the punchline of the whole section. NNPDF is not merely a group we profile alongside MSHT and CT — it is the platform our entire lab is built on. We consume the same FK tables, the same open experimental data, the same closure-test apparatus. Our original contribution sits on top: a fully Bayesian inference layer (nested sampling, §5) replacing the Monte-Carlo replica method as the way uncertainties are computed, and the ability to run a fixed MSHT-style functional form (§3.7) inside this same machinery. That last point is what finally makes a clean comparison possible — because the three methodologies now differ only in the inference philosophy, not in the data, the theory, or the code around them.