GenFoldG: Collider Unfolding & E-Graph Folding
- GenFoldG is defined as two unrelated technical constructions: a generative iterative unfolding algorithm for collider experiments and a catamorphism over e-graphs in egglog.
- In collider physics, GenFoldG integrates background subtraction, acceptance, and efficiency within a generative pipeline to recover fiducial particle-level distributions.
- In e-graph analysis, GenFoldG uses user-supplied algebras and memoized folding to efficiently compute values over equivalence classes.
GenFoldG denotes two unrelated technical constructions that appear under the same name in recent arXiv literature. In collider phenomenology, GenFoldG is a fully generative iterative unfolding algorithm introduced in "Analysis-ready Generative Unfolding" to recover a fiducial particle-level signal distribution from reconstructed data while accounting for detector response, sample impurities, limited acceptance, and finite efficiency (Butter et al., 2 Sep 2025). In e-graph research, GenFoldG is a generic fold, or catamorphism, over e-classes in pure egglog, introduced in "Folding an e-graph in pure egglog" as a reusable pattern for memoized analysis over shared recursive structure (Ren et al., 2 Jun 2026). The shared label therefore identifies not a single method, but two domain-specific formalisms with different semantics, objectives, and implementation constraints.
1. Disambiguation of the term
The collider-physics GenFoldG is defined inside an unfolding framework. Its purpose is to approximate a truth-level distribution from reconstructed observations , using generative modeling, an iterative posterior-learning procedure, and explicit handling of backgrounds, acceptance, and efficiency. The e-graph GenFoldG is instead a fold over equivalence classes: it computes a value for each e-class from user-supplied functions and , while exploiting structural sharing for memoization (Butter et al., 2 Sep 2025, Ren et al., 2 Jun 2026).
| Usage of GenFoldG | Domain | Core object |
|---|---|---|
| Generative unfolding | Collider experiments | Conditional generative model |
| E-graph catamorphism | egglog / e-graphs | Fold defined by an algebra and merge |
A common source of confusion is to assume that the two usages are variants of one another because both involve the word “fold.” The available descriptions do not support that interpretation. One is a probabilistic inverse problem for differential cross section measurements; the other is a recursive computation over equivalence classes in a saturation engine. The shared name is nominal rather than methodological.
2. GenFoldG in analysis-ready generative unfolding
In the collider setting, reconstructed events differ from the particle-level, or truth, variables because of a stochastic detector response , sample impurities 0, limited acceptance (“fakes”), and finite efficiency (“misses”). The stated goal is to recover the true signal distribution within a user-defined fiducial region,
1
given observed data 2 and a simulation prior 3. The unfolding task is formulated as
4
with 5. Within that paper, GenFoldG is one of the newly introduced methods; the same work also introduces generative-discriminative hybrid approaches, including GenFoldC, and emphasizes that most ML-based unfolding methods focus exclusively on statistically removing resolution effects, whereas practical unfolding must also address impurities and finite acceptance and efficiency effects (Butter et al., 2 Sep 2025).
This framing matters because it expands unfolding beyond a pure deconvolution problem. The stated design criterion is “analysis-ready” behavior: the algorithm is constructed so that the final output already lies in the chosen fiducial region and has the intended normalization. A plausible implication is that GenFoldG is aimed at direct use in downstream differential measurement workflows rather than only at intermediate posterior estimation.
3. Generative pipeline, empty events, and iterative posterior learning
The GenFoldG unfolding procedure collects the relevant effects in five conceptual steps, but fuses them into a single generative pipeline. Background subtraction is handled by training a generative model on the mixture 6, so that
7
The description explicitly states that no separate classifier is needed, because negative-weight training data automatically subtracts backgrounds. Acceptance and efficiency are represented through an “empty-event” symbol 8: if an event 9 passes reconstruction but fails gen-level fiducial cuts, or an event 0 passes gen-level fiducial cuts but is not reconstructed, the corresponding 1 or 2 is replaced by 3. The joint training sample 4 therefore contains both regular pairs and empty entries (Butter et al., 2 Sep 2025).
The iterative step maintains a learned generative model 5. At iteration 6, a large sample 7 is generated from the current unfolded prior 8, each 9 is passed through the fixed detector model 0, and acceptance and efficiency are simulated by dropping a fraction of 1-pairs at random to simulate fakes and by replacing a fraction of 2 by 3 to mimic misses. A conditional generative flow is then trained on all non-empty 4 to learn
5
with loss
6
Sampling 7 for each real data point 8 yields the updated estimate 9, and the procedure is repeated until convergence, typically 5–8 iterations.
Acceptance and efficiency are estimated once through small classifier networks. Acceptance is written as
0
and efficiency as 1. The reported consequence is that no per-event reweights remain and no further reweighting is needed: because fakes and misses are treated as empty entries in generative training, the final sample 2 automatically lives in the chosen fiducial region and has correct normalization. The summary expression after 3 iterations is
4
4. Architectures, reported performance, and implementation practice
The unfolding implementation uses generative flows described as conditional Flow Matching networks (“CFM”) with 3–4 hidden layers, width 64–512, ReLU activations, a cosine-annealing learning rate schedule from 5, batch size 128–256, and 100 epochs per iteration, with later iterations taking fewer than 40 epochs. The classifier corrections for acceptance and efficiency are described as networks with 3 hidden layers 6 64 units, ReLU activations, and binary cross-entropy loss. The reported optimizer is Adam with betas=7 and weight decay 8, and regularization is based on early stopping on flow likelihood, with no dropout needed.
Performance is monitored using the bias 9, the variance of the unfolded sample, pull distributions 0, and coverage defined as the fraction of the true distribution covered by MC-bootstrap intervals. In the Gaussian toy, after 5 iterations GenFoldG recovers the true Gaussian mean and width to 1 bias and yields pulls centered at zero with unit width. In the 6D 2+jet substructure (OmniFold) example, jet mass, 3, width, 4, 5, and 6 are all matched at the few-percent level after 8 iterations; background (7), acceptance (8), and efficiency (9) corrections are correctly applied; and residual differences in extreme tails give an empirical systematic uncertainty 0. Computationally, each iteration is reported as one flow training, approximately 1–2 hours on a single GPU for 1 events, with total wall time around 1 day. The implementation advice emphasizes pretraining the detector flow and the acceptance/efficiency classifiers on a large MC sample, validating with toy closure tests before applying to real data, using early stopping to avoid overfitting fluctuations, and ensembling 3–5 independent runs to estimate the unfolding uncertainty. The stated pitfalls are destabilization from unbalanced backgrounds in negative-weight training, the need for acceptance and efficiency classifiers to saturate to probabilities in 2, and irreducible bias when the detector flow 3 is not expressive enough (Butter et al., 2 Sep 2025).
A recurrent misconception in unfolding is that resolution removal alone is sufficient. The GenFoldG formulation directly rejects that premise by incorporating backgrounds, acceptance, and efficiency within the generative procedure itself. This suggests that the method is intended not merely as a statistical correction layer, but as an end-to-end event-level pipeline.
5. GenFoldG as a catamorphism over e-graphs
In the egglog setting, GenFoldG is a generic fold over an e-graph 4 whose e-classes are of the least-fixed-point type 5. The fold is specified by two user-supplied components: an algebra 6, which computes a value for each e-node from the already-folded values of its children, and a merge 7, which combines all e-node values in an e-class into the final e-class value. If 8 is the set of e-nodes in e-class 9, 0 is the final folded value, and 1 is the multiset of intermediate e-node values, the catamorphism is given as the least fixed-point solution of the mutually recursive equations
2
3
The description stresses that, because e-classes share structure, the fold obtains memoization “for free,” and performs one pass per e-class rather than re-traversing every concrete term in the graph (Ren et al., 2 Jun 2026).
This construction differs fundamentally from the unfolding algorithm despite the shared name. Here “fold” is used in the functional-programming sense of catamorphism. The core technical issue is not inverse inference, but how to stage rule execution so that recursive analyses over merged classes produce stable and non-redundant results.
6. Rule staging, complexity, example, and limitations in egglog
A naïve schedule consisting of saturating inductive rules to build 4 and then saturating resolve rules to build 5 can misfire if some e-node values arrive late. The proposed solution stages the rules and guards the resolve step with a relation 6, which becomes true only once every e-node in 7 has contributed to 8. Three bookkeeping objects are central: 9, which counts how many 0-nodes live in 1; 2, which counts how many 3-applications have been recorded; and 4, which carries the frozen multiset 5 when 6. Once 7 holds, the resolve rule computes 8 exactly once. The implementation sketch also uses 9 with multiset-union merge and 0 with supercede, so later writes override, although the resolve rule is intended to fire only once (Ren et al., 2 Jun 2026).
The claimed complexity benefit is that each e-class is folded exactly once and each e-node triggers exactly one 1-application, regardless of how many concrete term occurrences it represents. The overall work is therefore 2 in 3, rather than 4. The step-by-step example uses e-classes 5, 6, and 7, with 8 interpreting 9 and 00, while 01 takes the maximum. After pre-seeding the zero-arity constructors, the two add-nodes in 02 each produce 03, so 04 and 05. The stated limitations are that the counter-match trick depends on egglog scheduling behavior, resolved classes are not currently re-resolved if new e-nodes are later added, and applications with an incremental 06 may prefer a native binary-merge function and can skip the 07 machinery.
A common misconception here is that a conventional two-phase saturation schedule is sufficient. The counterexample given by the authors is procedural rather than semantic: late-arriving e-node values can invalidate that expectation. The proposed staging discipline is therefore not an implementation embellishment, but part of the method’s correctness envelope.
7. Comparative significance of the two GenFoldG constructions
The collider GenFoldG and the egglog GenFoldG share a reliance on iterative state construction and on representations that avoid redundant work, but they solve different classes of problems. In the unfolding case, iteration is used to reduce dependence on the MC prior while learning a posterior 08 that absorbs detector response, background, acceptance, and efficiency into a single generative workflow. In the e-graph case, iteration and staging are used to ensure that each e-class is analyzed once all necessary child results are available. The former returns unweighted particle-level events ready for downstream analysis; the latter returns folded e-class values defined by a user algebra and merge (Butter et al., 2 Sep 2025, Ren et al., 2 Jun 2026).
The coexistence of these two meanings is mainly a nomenclatural accident. For readers working across collider ML and symbolic reasoning systems, explicit disambiguation is essential: GenFoldG may denote either an analysis-ready generative unfolding pipeline or a staged catamorphism over e-graphs, and the two should not be conflated.