---
title: 'GenFoldC: Hybrid Unfolding Algorithm'
url: https://www.emergentmind.com/topics/genfoldc
type: topic
---

# GenFoldC: Hybrid Unfolding Algorithm

GenFoldC is an analysis-ready unfolding algorithm that combines a generative model with discriminative, classifier-based components to address, within one coherent pipeline, the detector-related effects relevant to unbinned, high-dimensional cross-section measurements: resolution or smearing, backgrounds or impurities, acceptance, and efficiency [2509.02708]. In the formulation introduced in "Analysis-ready Generative Unfolding" [2509.02708], the generative component learns the posterior \(p(y|x)\) of truth-level variables \(y\) conditioned on reconstructed variables \(x\), while classifiers are used for reco-level background subtraction, acceptance estimation, gen-level efficiency estimation, and iterative reduction of prior-simulation dependence. The result is a hybrid unfolding scheme that returns an analysis-ready gen-level distribution after multiplicative correction by classifier-estimated probabilities.

## 1. Definition and scope

GenFoldC is a generative-discriminative hybrid. Its generative component is a conditional generative network trained on paired signal simulation to learn the posterior \(p(y|x)\), and this component is responsible for statistically removing detector resolution or smearing by mapping reco-level events to gen-level events [2509.02708]. Its discriminative components are classifiers used to subtract background at reco level, estimate acceptance \(\delta(x)=p(g|x)\), estimate efficiency \(\epsilon(y)=p(r|y)\), and iteratively reduce prior-simulation dependence through likelihood-ratio reweighting \(w(y)\).

The method is explicitly designed for the full measurement setting rather than the narrower problem of de-smearing alone. The motivating claim is that practical unfolding for cross-section measurements must account not only for statistical resolution effects but also for impurities and finite acceptance and efficiency effects. GenFoldC addresses those effects in a single pipeline, and the paper positions it as a complementary and analysis-ready addition to the unfolding toolkit [2509.02708].

A central structural feature is the tight coupling between the generator and the classifiers. The generator produces an initial unfolded sample from background-subtracted and acceptance-weighted reco-level data; a classifier then compares that sample to the simulation prior, supplies weights used to update the generative training distribution, and the process iterates. Acceptance and efficiency enter the final result multiplicatively through classifier-estimated probabilities rather than being absorbed entirely into the generator.

## 2. Statistical formulation

The paper defines \(y\) as truth or gen-level variables and \(x\) as reco-level variables, and writes the observed reco-level distribution with backgrounds, acceptance, and efficiency as
\[
g(x) = \int R(x|y) A(y)\,\epsilon(y)\,f(y)\,dy + B(x),
\]
where \(f(y)\) is the unknown gen-level signal distribution in the fiducial region, \(R(x|y)\) is the detector response kernel, \(A(y)\) is a truth-level acceptance indicator or probability if truth-level cuts are used, \(\epsilon(y)\) is the selection or reconstruction efficiency at truth level, and \(B(x)\) is the background contribution at reco level [2509.02708].

The paper also gives a mixture-model form,
\[
p(x) = (1-\pi_B)\int R(x|y)A(y)\epsilon(y)f(y)\,dy + \pi_B p_B(x),
\]
with \(\pi_B\) the background fraction and \(p_B(x)\) the background pdf. In the algorithmic realization, backgrounds are statistically subtracted from data at reco level, producing a signal-only reco-level sample that serves as the input to unfolding.

Within GenFoldC, detector resolution is not treated by explicitly fitting \(R(x|y)\). Instead, the method learns the posterior \(p_{MC,s}(y|x)\) from paired signal simulation. The paper states that if \(R\) is universal and the prior \(f_{MC}(y)\) is updated iteratively, then the learned \(p(y|x)\) can be used to statistically remove smearing from data; this suggests that the method relies on an implicit representation of detector response through conditional density modeling rather than through a separately parameterized response matrix or kernel.

Acceptance has a particular treatment. In the general observed-distribution model it appears as \(A(y)\), but in GenFoldC it is estimated as the conditional probability \(\delta(x)=p(g|x)\) on reco inputs and then pulled to gen level after unfolding as \(\delta(y)\). Efficiency remains a gen-level correction through \(\epsilon(y)=p(r|y)\).

## 3. Algorithmic pipeline

The GenFoldC pipeline begins with classifier-based background subtraction at reco level. A binary classifier \(C(x)\) is trained with a weighted binary cross-entropy loss on two labeled samples: label 1 is the signed sample \(\{x_d\ \text{(weight }+1),\,x_{MC,b}\ \text{(weight }-1)\}\), and label 0 is the data sample \(\{x_d\}\) with weight \(+1\). With equal class priors, the trained output satisfies
\[
\nu(x) \equiv \frac{p_d(x)-p_b(x)}{p_d(x)} = \frac{C(x)}{1-C(x)},
\]
so \(\nu(x)\) is the per-event weight applied to data events to implement statistical background subtraction. The corresponding loss is
\[
L_{\mathrm{bkg}} = - \mathbb{E}_{x\sim(x_d \oplus x_{MC,b})}[\log C(x)] - \mathbb{E}_{x\sim x_d}[\log(1-C(x))],
\]
with signed weights, producing a background-subtracted reco-level signal distribution \(p_{d,s}(x)\approx \nu(x)p_d(x)\) [2509.02708].

Acceptance correction is then performed at reco level. A classifier is trained to distinguish reco events paired with gen-level events that pass fiducial cuts, \(x_g\), from those that fail, \(x_{\bar g}\). With Bayes' theorem and equal class priors, the classifier learns
\[
\delta(x)\equiv p(g|x)=\frac{p(g)p(x|g)}{p(g)p(x|g)+p(\bar g)p(x|\bar g)},
\]
where \(p(g)=N_g/N_{\text{total}}\) is the unconditional acceptance rate estimated in simulation. The BCE objective is
\[
L_{\mathrm{acc}}=-\mathbb{E}_{x\sim x_g}[\log C_{\mathrm{acc}}(x)]-\mathbb{E}_{x\sim x_{\bar g}}[\log(1-C_{\mathrm{acc}}(x))].
\]

The generative unfolding step trains a conditional generative model \(p_{MC,s}(y|x)\) on paired signal simulation \((x,y)\) that pass both reco and gen selections. In the implementation described in the paper, the unfolder is a conditional flow matching network. The initial unfolded distribution is
\[
p^{(0)}_{d,s}(y)_r \propto \int dx\, p_{MC,s}(y|x)\,[\nu(x)\delta(x)]\,p_d(x),
\]
which amounts to pushing forward corrected reco-level data through the learned posterior.

Prior dependence is then reduced iteratively. A classifier \(E(y)\) distinguishes the acceptance-corrected unfolded sample \(y_d \sim \delta(y)p^{(k)}_{d,s}(y)_r\) from the simulation prior \(y_{MC}\sim f_{MC}(y)\), producing
\[
w^{(k)}(y)=\frac{E(y)}{1-E(y)} \approx \frac{\delta(y)p^{(k)}_{d,s}(y)_r}{f_{MC}(y)}.
\]
The gen-level simulation prior is updated by
\[
f^{(k+1)}_{MC}(y)\leftarrow w^{(k)}(y) f^{(k)}_{MC}(y),
\]
and the paired training sample is reweighted accordingly. The iterative classifier is trained with
\[
L_{\mathrm{iter}}=-\mathbb{E}_{y\sim y_d}[\log E(y)]-\mathbb{E}_{y\sim y_{MC}}[\log(1-E(y))].
\]
The paper reports that convergence typically occurs in \(5\) to \(10\) iterations in its studies.

Finally, an efficiency classifier is trained on gen-level inputs to distinguish \(y_r\), paired with reconstructed events, from \(y_{\bar r}\), not reconstructed. The learned quantity is
\[
\epsilon(y)\equiv p(r|y)=\frac{p(r)p(y|r)}{p(r)p(y|r)+p(\bar r)p(y|\bar r)},
\]
with \(p(r)=N_r/N_{\text{total}}\) estimated in simulation, and the BCE loss
\[
L_{\mathrm{eff}}=-\mathbb{E}_{y\sim y_r}[\log C_{\mathrm{eff}}(y)]-\mathbb{E}_{y\sim y_{\bar r}}[\log(1-C_{\mathrm{eff}}(y))].
\]

After \(n\) iterations, the final analysis-ready output is
\[
p_{\mathrm{GenFoldC}}(y)=\epsilon(y)\,\delta(y)\,p^{(n)}_{d,s}(y)_r.
\]
This expression summarizes the division of labor in the pipeline: smearing is removed through the learned posterior, backgrounds are subtracted through \(\nu(x)\), acceptance is accounted for through \(\delta(x)\) and then \(\delta(y)\), prior dependence is reduced through \(w(y)\), and efficiency is corrected through \(\epsilon(y)\) [2509.02708].

## 4. Treatment of detector effects and relation to GenFoldG

Backgrounds in GenFoldC are modeled via reco-level simulated background \(p_b(x)\) and subtracted from observed data using the classifier-derived weight \(\nu(x)\). The paper emphasizes that no gen-level background is needed for this step. The subtraction is therefore likelihood-ratio-based and probabilistic rather than based on explicit hard assignment.

Acceptance and efficiency are treated asymmetrically. Acceptance addresses events that pass reco-level selection but lie outside the gen-level fiducial region, and is corrected by \(\delta(x)=p(g|x)\), learned from paired simulation and later pulled to gen level as \(\delta(y)\). Efficiency addresses events in the gen-level fiducial region that fail reconstruction, and is corrected by \(\epsilon(y)=p(r|y)\), learned on gen-level inputs [2509.02708]. This separation is central to the “analysis-ready” designation, because it extends the method beyond pure deconvolution.

The paper contrasts GenFoldC with GenFoldG, a fully generative alternative introduced in the same work. GenFoldC uses one generative model for \(p(y|x)\) plus classifiers for background subtraction, acceptance, efficiency, and prior updates; its corrections enter as per-event weights at reco level, \(\nu\) and \(\delta\), and gen level, \(\epsilon\), while prior update is performed by reweighting the gen-level training sample via \(w(y)\). GenFoldG, by contrast, is described as fully generative across all steps: background subtraction is done with a generative model trained with negative weights to model \(p_{\mathrm{model},s}(x)=p_d(x)-p_b(x)\), acceptance and efficiency are integrated via “empty events” in the generative training and sampling loop, and prior updating proceeds through fully generative steps. The paper states that GenFoldG ultimately returns unweighted unfolded events, whereas GenFoldC returns weighted events with \(\delta(y)\) and \(\epsilon(y)\) factors applied.

This division suggests two different operational philosophies. GenFoldC fits naturally into pipelines that already use classifiers for selection and subtraction corrections, while GenFoldG moves those operations into the generative model itself. The paper explicitly notes that GenFoldC is often simpler to deploy if classifier-based corrections are already in use, whereas GenFoldG is attractive when unweighted unfolded events are preferred.

## 5. Training configuration and implementation

The required inputs are reco-level data \(x_d\) including backgrounds, reco-level background MC \(x_{MC,b}\) for subtraction, and paired signal MC \((x,y)\) passing both reco and gen selections with flags indicating \(r\) and \(g\) [2509.02708]. Background subtraction therefore depends only on reco-level background simulation or data-driven estimates, whereas the generative unfolding step requires adequate paired signal simulation for learning \(p(y|x)\).

The paper describes an optional preprocessing step in which gen-level MC is pre-reweighted to match pseudo-data gen-level distributions, with the aim of reducing non-universal response differences. Network architectures are then specialized by task: the unfolder is a conditional generative model \(p_{MC,s}(y|x)\), implemented with conditional flow matching in the paper, while the background, acceptance, efficiency, and iterative prior-update components are feed-forward classifiers trained with BCE losses.

The reported optimization schedules are explicitly presented as selected examples. For the Gaussian toy example, GenFoldC uses \(20\) epochs for classifiers, a one-cycle learning-rate schedule, learning rate \(10^{-4}\), Adam, batch size \(128\), and \(4\) layers of width \(64\); the unfolder uses a cosine schedule, learning rate \(10^{-4}\), and the same batch size. For the OmniFold dataset, the paper lists \(20\) epochs for background and acceptance classifiers, \(50\) epochs for the efficiency classifier, \(50\) epochs for the iterative classifier, learning rates about \(10^{-4}\) to \(5\times 10^{-4}\), Adam, batch sizes \(2048\) to \(10000\), widths \(64\) to \(128\), and for the unfolder \(400\) epochs initially, later iterations reduced to \(40\), cosine schedule, learning rate \(10^{-3}\), width \(512\), \(8\) layers, and batch size \(16384\) [2509.02708].

The practical guidance in the paper adds several implementation caveats. Weighted BCE may become numerically unstable in regions of near-perfect separation, for example with highly clustered backgrounds, and the suggested responses are oversampling the background, pretraining, or constraining classifier capacity. The interpretation of \(C/(1-C)\) as a likelihood ratio assumes balanced class priors. For acceptance near sharp phase-space boundaries, \(\delta(x)\) can become prior-dependent; the paper therefore recommends considering sideband inclusion and enforcing the gen-level selection after unfolding rather than relying on \(\delta(x)\) alone when the fiducial cut lies on the unfolded observable itself. It also notes that large batch sizes for conditional generative models reduce variance and that later iterations can be shorter.

## 6. Validation, uncertainty, and limitations

The paper validates GenFoldC on both a Gaussian toy model and an LHC-like OmniFold dataset, reporting closure and percent-level accuracy in most kinematic regions but not providing a full uncertainty model such as coverage or pull plots [2509.02708]. It therefore presents strong empirical validation of reconstruction quality while leaving full statistical calibration to future work.

In the Gaussian toy example, the truth distributions are \(p_{MC,s}(y)=N(0,1)\) and \(p_{\mathrm{data},s}(y)=N(0.2,0.8)\), the reco-level smearing kernel is \(N(0,0.5)\), there is \(10\%\) background contamination, and there is a uniform \(10\%\) drop at reco and gen, corresponding to efficiency and acceptance. The first iteration of unfolding showed more than \(25\%\) discrepancy relative to truth, while after five iterations GenFoldC matched \(p_{\mathrm{data},s}(y)\) at the percent level. Background and acceptance corrections worked as expected, and the final GenFoldC and GenFoldG results agreed within uncertainties.

In the LHC-like OmniFold dataset, the background labeled ZV contributes approximately \(8\%\) contamination; acceptance is about \(2\%\) for events passing reco but failing gen, and efficiency is about \(6\%\) for events passing gen but failing reco. The study used \(8\) iterations for GenFoldC and \(10\) for GenFoldG, with later iterations trained for fewer epochs to reduce cost. The unfolded six-dimensional distributions in jet mass \(m\), multiplicity \(N\), width \(w\), log groomed mass \(\log \rho\), \(\tau_{12}\), and groomed \(z\) matched gen-level pseudo-data at the percent level across most of phase space. Remaining differences were concentrated in the tails of \(\tau_{21}\) and groomed mass and were described as consistent with residual prior dependence.

The limitations are stated explicitly. Residual prior dependence remains in extreme regions or when the forward mappings \(R\) differ between pseudo-data and MC even after gen-level reweighting, and the paper recommends treating this as a systematic uncertainty. Acceptance estimates near sharp boundaries can be sensitive to the prior, especially when the fiducial selection aligns with the unfolded observable. Background subtraction can be unstable with highly clustered backgrounds in high-dimensional spaces, and mis-modeling can appear in the high-mass tail where purity is low; the paper suggests possible future improvements through oversampling or alternative subtraction strategies. A plausible implication is that GenFoldC is most reliable when paired simulation is sufficiently representative and when boundary effects and low-purity tails are explicitly monitored during validation.

For uncertainty estimation in practice, the paper states that statistical uncertainties can be estimated through bootstrap or toy resampling of the data and MC pairs through the entire pipeline, with bands obtained from the dispersion of unfolded results, and that systematic components such as residual prior dependence and background modeling can be assessed by varying classifiers, generators, hyperparameters, and background normalizations. These are implementation recommendations rather than a full uncertainty prescription, but they align with the method’s modular structure.

Overall, GenFoldC is characterized in the paper as a hybrid unfolding pipeline in which a conditional generative model performs the de-smearing step, classifiers implement background subtraction and selection corrections, and iterative classifier reweighting suppresses dependence on the simulation prior. Within the reported studies, it achieves percent-level agreement with truth in most regions and performs comparably to the fully generative GenFoldG, while retaining the weighted-event structure implied by its acceptance and efficiency corrections [2509.02708].

Source: https://www.emergentmind.com/topics/genfoldc