Particle physicists extract rare signals with an unbinned extended maximum likelihood fit. Every recorded collision event is scored by a continuous probability density instead of being dropped into a histogram bin, and the total event count is treated as a Poisson variable. Fits like this are what turn a few candidate events into a published limit, as in the CLEO search for τ→μγ (Update of the search for the neutrinoless decay τ→μγ). Neural networks could replace the hand-written densities. The barrier is that real fits must also absorb detector uncertainties such as energy scale or resolution, through "nuisance parameters" that are re-optimized at every step of the fit. If the neural density depends on those nuisances, each optimizer step means re-running the network on millions of events, and inside each event the Transformer's attention over particles costs time that grows with the square of the particle count.
This note proposes inserting nuisance dependence into a frozen, pretrained Transformer density model through small adapters, meaning lightweight trainable modules added to a frozen network. The adapters are placed only in its last few layers. The activations of all earlier layers can then be cached once for the whole dataset, and each fit step recomputes only the shallow tail. Adapter placement stops being a question about parameter count and becomes the knob that sets the cost of every likelihood evaluation. The question we test is how far toward the output a detector effect can be pushed before the fit's intervals lose accuracy or coverage.
Core Claim
The research file frames the attention bottleneck as quadratic in the number of events $N$. For an unbinned likelihood that framing is wrong. Events are independent given the parameters, so the log-likelihood is a sum of per-event terms, and no attention across events is needed to evaluate it. The real cost sits inside each event, in attention over its $n$ particles or hits, multiplied by $N$ events and by the number of times the optimizer calls the likelihood.
We model each event's density with a causal Transformer over the event's particle list. Its output heads give normalized conditional distributions, so the product over particles is an exactly normalized density for every value of the adapter weights. This matters because an extended likelihood is only valid with normalized densities. The fit maximizes
$$\log \mathcal{L}(\mu,\nu) = -\sum_j \mu_j + \sum_{i=1}^{N} \log \sum_j \mu_j\, p_j(x_i \mid \nu) - \tfrac{1}{2}\lVert \nu \rVert^2 ,$$
where $\mu_j$ is the expected yield of component $j$ (signal, backgrounds), $p_j(x_i\mid\nu)$ is the network's normalized density for event $x_i$, and $\nu$ are nuisance parameters in units of their prior standard deviation. This is the classical extended likelihood from the file plus a Gaussian constraint term.
The nuisance enters through adapters that are zero at $\nu=0$, starting at layer $s$ of an $L$-layer network. With the first $s-1$ layers cached, the cost of one likelihood evaluation is roughly
$$C(s) \approx N \sum_{l=s}^{L} \left( a\, n^2 d + b\, n d^2 \right),$$
with $d$ the hidden width and $a,b$ hardware constants for the attention and feed-forward blocks. The form follows from counting the dense attention and feed-forward operations in each recomputed layer.
The claim has three parts. First, detector nuisances are low-dimensional enough that adapters in the last few layers reproduce their effect on the density. Second, profiled intervals then match a fully nuisance-conditioned model in width and coverage at a cost that is a small fraction of $C(1)$. Third, this placement beats a cheap first-order expansion in $\nu$ once the nuisances move by more than about one prior standard deviation.
Relation to Prior Work
Three groups of papers shape this proposal, each in a different role.
The adapter-placement papers supply the method and pose the tension. AutoPEFT searches about $10^{10}$ adapter configurations with multi-objective Bayesian optimization that trades accuracy against parameter count. It finds that the best designs turn off early-layer adapters, matching full fine-tuning on GLUE (83.17 vs 83.15) with 0.76% of parameters. LLM-Adapters shows that bottleneck adapters work best on the feed-forward sublayers, while low-rank adaptation (LoRA) works best on both attention and feed-forward. Both studies optimize accuracy against parameters on language tasks. We reuse their module types but replace the cost axis with recompute cost per likelihood call. We also face a tension they never met: physics intuition says detector distortions act on low-level features, which favors early placement, while compute favors late placement.
The machine-learning-for-physics papers motivate the gap. OmniFold and Publishing unbinned differential cross section results do unbinned unfolding with dense classifiers and invertible networks. Neither profiles detector nuisances inside a neural likelihood, and neither uses attention over particles. The classical CLEO fits (τ→μγ, B⁺→ωK⁺) show what unbinned fits buy, but they rely on analytic densities in two or three variables.
The attention-cost papers supply one technique and impose constraints. We borrow the exact online-softmax tiling from Chunked TabPFN to batch many events through the recomputed layers in bounded memory. We deliberately do not copy its cross-sample attention, because the likelihood factorizes over events. Hard-Coded Gaussian Attention replaces lower-layer attention with fixed patterns. Our analysis implies the opposite allocation: cached early layers are paid for once, so cheaper attention only helps in the recomputed tail. That paper also reports that hard-coded attention degrades on long-range dependencies, which is a warning for physics correlations. Spikformer and E-ATT report large energy savings, but those savings depend on custom hardware, so we treat them as out of scope.
Research Program
Base models. We first pretrain a causal Transformer density model on nominal simulation, one network per fit component or one shared network with a component token. Each output head is a mixture density over the particle's continuous features.
Simulation variants. We then produce simulation in which each detector nuisance (jet energy scale, constituent energy resolution, tracking efficiency) is drawn from its prior. This is done by re-running the fast detector simulation on fixed generator-level events.
Adapters. The adapters are LoRA or bottleneck modules whose weights are produced by a tiny network from $\nu$, gated to be exactly zero at $\nu=0$. They are trained on the variants with the base frozen. We sweep the start layer $s$, and separately compare attention-only, feed-forward-only, and both. This yields a measured accuracy-versus-$C(s)$ frontier for each nuisance type.
Fitting. Fitting uses gradient-based profiling over $(\mu,\nu)$ with cached prefix activations stored at the single boundary layer. For 1.6M events with about 30 particles at width 256 in half precision, this is roughly 25 GB, which fits on one accelerator or streams from host memory.
Placement law. The analysis asks whether nuisance types differ in how shallow they can go. A resolution change, which spreads every particle's energy, may need earlier placement than a global scale shift. We would then fit a simple placement rule from a nuisance's measured effect on low-level features.
Baselines
Binned fit (naive reference). The naive reference is a binned Poisson fit on fine histograms of two or three summary observables. Nuisance dependence comes from interpolating histogram templates built from the same detector variants. It uses identical simulation and event selection, with bin counts tuned on held-out toys. It is the reference that any neural method must clearly beat in interval width, at matched or better coverage, to justify itself.
Fully nuisance-conditioned network (accuracy ceiling). The strongest existing-style competitor feeds $\nu$ into the input of the same Transformer and trains the whole network on the variants, so every fit step recomputes all layers. It gets the same architecture, data, and training budget measured in accelerator-hours. It is the ceiling on accuracy and the most expensive option. Beating it means matching its interval width within about 5% and its coverage within toy-statistics error, while cutting fit wall-clock by at least a factor of five. No reported result found on Lacuna for nuisance-profiled neural unbinned fits on the Z+jets sample or any other benchmark, so we will establish these numbers ourselves.
Placement ablations. Uniform adapters in all layers ($s=1$) isolate whether shallow placement costs accuracy. An AutoPEFT-style search using parameter count instead of $C(s)$ as the cost isolates the key ingredient, the cost objective. The relevant reference figure is AutoPEFT's 0.76% parameter footprint at GLUE parity, but that comes from a different task.
Oracle. A fit with the nuisances fixed to their true values gives the floor on achievable interval width.
Why not just…?
Why not just use binned template fits, the standard practice? Binning loses information on narrow features and scales as $B^D$ in the number of observables. The CLEO searches needed unbinned multi-variable fits to reach their limits and significances (τ→μγ, B⁺→ωK⁺). Still, for one or two dominant observables a fine binned fit may be nearly optimal. That is why it is our naive baseline: if it matches our intervals on the Z+jets task, the proposal fails there.
Why not just linearize the density in the nuisances? One can compute each event's derivative of $\log p$ with respect to $\nu$ once and fit with a first- or second-order expansion. That is nearly free and is a real threat. It is the limit of our method in which the tail adapter is linear in $\nu$ and adds no recompute. We include it as a baseline and expect it to fail only when the profiled nuisances move more than about one prior standard deviation, or when nuisances interact. The experiment sweeps the injected nuisance size to locate exactly where, if anywhere, it breaks down.
Why not just reweight events with a nuisance-conditioned classifier, OmniFold-style? A classifier trained to tell nominal from varied simulation, conditioned on $\nu$, gives a density ratio that can reweight a nominal density (OmniFold). This also requires re-evaluating a network per fit step, unless its trunk is cached. Its ratios are not guaranteed to keep the reweighted density normalized, which biases the extended term. We run it with a cached trunk and a refit tail as a competitor and check normalization drift directly.
Why not just put the whole dataset in context, TabPFN-style, and read off parameters? Amortized in-context inference attends across events, which is where Chunked TabPFN tiling would matter, but it still caps at around $10^5$ rows. It also returns point estimates without a likelihood whose coverage can be checked against Neyman toys. We treat it as out of scope rather than as a competitor.
Proposed Experiments
Toy validation. The first testbed is a CLEO-like two-dimensional toy in ΔE and Δm, with a narrow signal over smooth background and an analytic energy-scale nuisance. There the exact likelihood is known, so we can measure bias, interval coverage over 1,000 toys, and interval width against the analytic optimum.
Main testbed. The main testbed reuses the OmniFold Z+jets samples: Pythia and Herwig through Delphes, $p_T>200$ GeV, $R=0.4$, about 1.6M events each. We fit a yield parameter, the Herwig-like fraction in a mixed pseudo-dataset, while profiling jet energy scale and resolution nuisances generated by re-running Delphes. Metrics are the bias and width of the profiled yield interval, coverage over toys, and wall-clock time per likelihood evaluation and per full fit. Both are reported as functions of the adapter start layer $s$ and sublayer target.
Decisive check. The decisive check is the accuracy-versus-cost frontier at injected nuisance shifts of 0.5, 1, 2, and 3 prior standard deviations, compared against the full-conditioning and linearized baselines. The proposal succeeds if some shallow placement (for example the last two of eight layers) stays within tolerance of full conditioning at all shifts while linearization fails at large shifts. It fails if linearization holds everywhere, which would make adapters unnecessary, or if only early placement works, which would erase the compute gain.
References
- Update of the search for the neutrinoless decay<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:mrow><mml:mrow><mml:mover><mml:mrow><mml:mi>τ</mml:mi></mml:mrow><mml:mrow><mml:mo>→</mml:mo></mml:mrow></mml:mover></mml:mrow></mml:mrow><mml:mi>μ</mml:mi><mml:mi>γ</mml:mi></mml:math>
- AutoPEFT: Automatic Configuration Search for Parameter-Efficient Fine-Tuning
- LLM-Adapters: An Adapter Family for Parameter-Efficient Fine-Tuning of Large Language Models
- OmniFold: A Method to Simultaneously Unfold All Observables
- Publishing unbinned differential cross section results
- Observation of<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:mrow><mml:msup><mml:mrow><mml:mi mathvariant="italic">B</mml:mi></mml:mrow><mml:mrow><mml:mo>+</mml:mo></mml:mrow></mml:msup></mml:mrow><mml:mo>→</mml:mo><mml:mrow><mml:msup><mml:mrow><mml:mi mathvariant="italic">ω</mml:mi><mml:mi mathvariant="italic">K</mml:mi></mml:mrow><mml:mrow><mml:mo>+</mml:mo></mml:mrow></mml:msup></mml:mrow></mml:math>and Search for Related<mml:math xmlns:mml="http://www.w3.org/1998/Math/MathML" display="inline"><mml:mi mathvariant="italic">B</mml:mi></mml:math>Decays Modes
- Chunked TabPFN: Exact Training-Free In-Context Learning for Long-Context Tabular Data
- Hard-Coded Gaussian Attention for Neural Machine Translation
- Spikformer: When Spiking Neural Network Meets Transformer
- Attention Mechanism with Energy-Friendly Operations