One-loop engine internals
This page records how the safeguards of one-loop evaluation work, what each one records, and the measurements behind the rules on Numerical stability. It is a record for maintainers, ordered like the evaluation of a point. The measured numbers come from the runs named with them; the per-process benchmark records are in performance_reports/loop/data/.
- Vocabulary
- The safeguards, end to end
- Default checks per backend
- Reduction backends and
"auto" - Near-planar NinjaRS hazard
- NinjaRS tracked precision
- Inexact inputs near forward
- Unchecked reductions
- Cross-backend check
- Estimates, absolute errors and the finiteness ratio
- Lane rescue: carriers, engines and memory
- NinjaRS’s cancellation rescue
- Lanes served without accuracy evidence
- Best-effort values
- Rescue policy in detail
- Kinematics improvement in detail
- Momenta, masses and units in the loop integrals
- Rank beyond N+2 (TIR-only artifacts)
- What a loop artifact stores
- Where the user-facing rules live
Vocabulary
- Lane: one loop family and one Laurent column of one point: a tensor numerator (its coefficients) and the family’s kinematics (propagator shifts, masses, scale, invariants). The reduction works lane by lane.
- Carrier: the arithmetic of an evaluation: binary64 (
double), double-double (106 bits), arbitrary precision at a number of decimal digits (MPFR; 500 by default,loops.v2.reduction.default_arbitrary_digits(), the native policy’sDEFAULT_ARBITRARY_DIGITS). - Checked / unchecked reduction: with or without the reduction backends’ own acceptance and refusal checks (
reduction_unchecked). - Fast engine / generic engine (NinjaRS): the binary64 engine, and the exact engine that serves double-double, arbitrary precision and the binary64 lanes routed to it (light masses, below).
The safeguards, end to end
A one-loop point meets four safeguards, in this order. Each acts only on what the previous one left.
- Reduction-level checks. The backend tests each lane and refuses the lanes it cannot reduce reliably: TIRust’s acceptance checks, NinjaRS’s stability thresholds, and its conditioning bounds (the box \(\mu\)-expansion bound in binary64, the box-Gram bound in double-double and arbitrary precision). The refusal text names the cause. On by default;
reduction_unchecked=Truedrops the thresholds and acceptance checks, the conditioning bounds stay. In the checked reduction NinjaRS also runs its cancellation rescue on the lanes it serves (below). - Lane rescue. A refused lane is reduced again in double-double, then at 500 digits, with its kinematics rebuilt in that carrier; every other lane stays as it was. On by default, in the checked and the unchecked mode (Lane rescue). Only a lane refused at every carrier fails its point; under
"auto"on TIRust the per-point NinjaRS fallback then evaluates that point again. - Point-level checks. Stability checks (rotations, the reduction-direction check, its rescaled variant, the cross-backend check) re-evaluate the point and form its estimate. Off by default in
evaluateand in the SDKs. In arbitrary precision NinjaRS’s tracked-precision test fails a point whose lanes kept too few bits; it is always on, except in the unchecked mode. - Rescue stack (Python
evaluateonly). Withstability=VirtualRescuePolicy(), a point that fails or misses its target is evaluated again at the next level. Off unless a policy is passed.
What remains refused is returned by the failure policy, by default (on_failure="best-effort") with the unchecked reduction’s value, its refusal and an uncertainty, status best-effort.
| Safeguard | Default | Python | CLI (evaluate, profile) | SDK | Run card |
|---|---|---|---|---|---|
| Reduction-level checks | on | reduction_unchecked=True turns them off | --reduction-unchecked | rusticol_virtual_set_reduction_unchecked(handle, 1) | reduction_unchecked = true |
| Lane rescue | on | lane_rescue=False | --no-lane-rescue | rusticol_virtual_set_lane_rescue(handle, 0) | lane_rescue = false |
| Point-level checks | off | stability_checks=VirtualStabilityChecks(...) | --stability-rotations, --stability-reduction-direction, --stability-rescaled (evaluate) | rusticol_virtual_set_stability_checks | [evaluation.stability_checks] |
| Rescue stack | off | stability=VirtualRescuePolicy() | none | none | none |
Default checks per backend
Where pyAmpliCol chooses the checks for the caller, a point TIRust serves runs one rotation and the rescaled reduction-direction check; a point NinjaRS serves runs what it ran without this rule. Checks a caller gives are never changed (an explicit VirtualStabilityChecks(1) on TIRust stays one rotation, apart from the lane-rescue rule below).
| Where | NinjaRS-served point | TIRust-served point |
|---|---|---|
evaluate / CLI evaluate without stability_checks | no checks (no estimate) | no checks (no estimate) |
every level of VirtualRescuePolicy() and of the loop-induced default stack | one rotation + rescaled reduction check | one rotation + rescaled reduction check |
best-effort uncertainty (VirtualBestEffort) | the call’s checks with the recommended ones | the call’s checks with the recommended ones |
profile --stability without evaluation.stability_checks | one default rotation | one default rotation + rescaled reduction check |
SDK (rusticol_virtual_set_stability_checks not called) | no checks | no checks |
Under "auto" the set follows the backend that serves each point: a per-point NinjaRS fallback point keeps the NinjaRS set (loops.v2.reduction.default_checks / backend_checks). Why: one rotation alone under-states the error of accepted TIRust points. The true error lay above the one-rotation estimate on 144 of 200 flat g g > g g g points, up to \(1.1 \times 10^{4}\) times, and on 24 of 50 g g > g g g g points; with the reduction check, on none of them. The SDK has no per-backend default set: for TIRust-served evaluations a caller sets the recommended checks.
The recommended checks are VirtualStabilityChecks(1, True, rescaled=True), importable as pyamplicol.loops.v2.stability.RECOMMENDED_CHECKS.
Rotation about the beam axis. A rotation "z:..." (beams along \(z\)) leaves both incoming momenta and every energy and \(p_z\) bitwise unchanged; it under-reported a binary64 double pole 23-fold on u u~ > u u~ e+ e-. Master-integral rounding. Only the rescaled check recomputes the master integrals: without it the estimate of g g > b b~ h with a massive b was up to 96-fold below the error.
Calibrated miss rate. About 0.1 % of binary64 points lie above their estimate with one rotation and the rescaled check.
Reduction backends and "auto"
NinjaRS (integrand reduction) and TIRust (tensor-integral reduction: one set of tensor integrals per loop family and point serves every helicity and color amplitude, which suits loop-induced processes, reduced per amplitude) both serve both process types. loop.reduction is the generation default recorded in the artifact (the artifact itself does not depend on it); evaluation.reduction (CLI --loop-reduction on generate and evaluate, Python reduction= on Runtime.load and every evaluation) overrides it. loop.reduction other than "auto" needs a one-loop request.
"auto" takes TIRust for a loop-induced and NinjaRS for a Born-interfered process (TIRust for both on a TIR-only artifact). Where TIRust cannot serve the call (a native extension built without the cargo feature tir, a carrier it does not serve, an output whose executor does not run it: the summed virtual and the resolved, correlated and selected outputs are checked separately) it falls back to NinjaRS and records why. The choice is made once per call and carrier (each rescue level’s carrier in the Python rescue). The effective backend is always one the call’s executor runs, so a result never names a backend that did not reduce it. Every lane diagnostic records VirtualReduction(requested, effective, reason, fallback, target, unchecked, guard_estimate, best_effort); the CLI’s JSON carries the same.
An explicit backend that cannot serve the call is refused before any point is evaluated (pyamplicol.ReductionUnavailable, a CompatibilityError with key reduction-unavailable), never switched. Which families TIRust serves is TIRust’s own capability (number of propagators, rank), read from TIRust: a family outside it is refused typed with TIRust’s reason before any point. TIRust’s qualified domain is up to six loop propagators at numerator rank six (reported, never enforced). TIRust reads the same external invariants as NinjaRS, so a loop with an on-shell massive leg next to a propagator of its mass (a top in its own gauge loop) stays on its exact on-shell branch in every arithmetic.
TIRust: gates, method choice and last resort
In every arithmetic TIRust serves only the kinematic rows its conditioning gates accept; in double-double and arbitrary precision the gate is binary64’s taken to the arithmetic’s precision. A row the gates refuse fails its point with the gates’ reason (under "auto" the per-point fallback evaluates it on NinjaRS; under explicit "tirust" it stays failed and a rescue’s next level moves it).
In binary64 the rows the gates refuse are tried once more with TIRust’s method choice (small-Gram expansions or an alternative reduction). A row the method choice cannot serve either is evaluated by plain Passarino-Veltman reduction without the gates, the verified last resort: the gates bound the worst case of a Gram system, not the error of the row, and plain reduction is often accurate there. Each such value is kept only if it agrees with the same row evaluated again at rescaled inputs (a check that sees the wrong values a rotated frame alone misses) within the calibrated acceptance of the target (next section). A value that fails this check fails its point.
Target accuracy and its calibration
reduction_target (default \(10^{-5}\)) is the relative accuracy of each point’s result, every squared-order sector against its own size (the rescue’s "relative" metric). On TIRust it sets the acceptance of the method choice and of the verified last resort: a value is kept when its two frames agree within the target divided by the calibrated factor 580, the largest ratio of a true error to that frame deviation measured against consistent high-precision truths (a synthetic lane set and the loop-induced benchmark rows’ points). The calibration was measured on method-choice values and is carried over to the last resort, checked at the default target on a few hundred points of five processes.
- A tighter target refuses more values (served by the fallback under
"auto"), a looser one admits more; a value served at one target is the same value at another (the acceptance only admits). - The target governs only the values the method choice and the last resort admit. Rows that pass the gates carry binary64’s own reduction error, measured up to about \(10^{-7}\) relative on the calibration sets, so a tighter target can be missed by construction.
- In double-double and arbitrary precision TIRust’s method choice is off, so the target acts on TIRust through nothing else; it is there the per-point fallback’s guard threshold, never below \(10^{-5}\).
- On NinjaRS’s fast engine, in the checked reduction, it sets the lane target of the cancellation rescue,
reduction_target / 64. - A value that is not a finite positive number is refused (
ValueError; the SDKs: invalid argument).
The per-point NinjaRS fallback
On TIRust, "auto" has a per-point NinjaRS fallback. A point TIRust refuses (in binary64 a value of its method choice or of its verified last resort that the acceptance check finds beyond the target; in double-double and arbitrary precision a row its gates refuse) or fails (also in the call’s own stability checks, for example a rotated evaluation) is evaluated again on NinjaRS from its original exact inputs, in the call’s own arithmetic, after the TIRust call. That point’s lane records effective="ninjars" and a reason quoting TIRust’s failure; a point NinjaRS fails too fails with both reasons. A fallback point’s cross-backend check is not run (not_run names the fallback). Explicit "ninjars" or "tirust" has no fallback, nor has a TIR-only artifact.
The guard. In double-double and arbitrary precision every point the fallback serves runs a rotation re-test: the evaluated point (the given inputs improved in the call’s arithmetic) rotated exactly by the recommended checks’ rotation and evaluated again, in the call’s own arithmetic, never a higher one. The point fails typed when that check’s relative estimate exceeds the limit \(\max(\text{target}, 10^{-5})\), the target being the call’s reduction_target or a rescue level’s own. The reason names the fallback, TIRust’s failure, the arithmetic, the estimate and the limit, e.g.
auto: TIRust refused or failed the point (...); the per-point NinjaRS
fallback's value failed its rotation check: estimate >1, above
1e-5 = max(target 1e-5, 1e-5) (double-double)
An estimate above 1 reads >1; the record keeps the number. on_failure="raise" raises EvaluationError with it, "return" returns the point failed (a rescue stack escalates it), and "best-effort" returns it with its unchecked value as a best-effort lane. The estimate is recorded in VirtualReduction.guard_estimate, also for a rejected point. A point within the limit keeps the fallback’s value; the result’s stability stays what the call’s own checks give.
- When the call’s checks run that rotation first (the recommended checks) it is reused; beside other checks (another rotation first, as on every default rescue level, or the reduction checks alone) the served points are evaluated once more with it.
- The guard decides on the outputs the call returns: the summed value, or on the resolved, correlated and selected calls each output (a helicity row, a color correlation, a helicity selection), from the fallback’s evaluation of the call’s own rows only. Each output’s estimate is taken against its own magnitude; an output that vanishes (its magnitude within the estimate’s rounding floor, 16 units of the arithmetic’s roundoff times the output’s term scale) against the largest output of the point. The largest ratio is the point’s
guard_estimate. - In binary64 the fallback’s value is served unguarded, with no estimate recorded: there the protection is the conditioning bound of NinjaRS’s fast engine, and stability checks or the rescue stack flag what it serves.
- The rotation re-test replaced a cached reduction-direction check, which did not see the double-double near-forward losses of NinjaRS (Inexact inputs near forward); no false rejection was found on the regular double-double points measured.
- The estimate is sampled, not a proven bound. Strongly suppressed helicity rows near exactly forward kinematics can be served beyond their own \(10^{-5}\): at
g g > z z, \(\theta = 10^{-4}\) in a rotated frame, double-double rows \(5 \times 10^{-11}\) of the largest were served \(10^{-2}\) off at a guard estimate of \(10^{-5}\).
In the SDKs the fallback is recorded in diagnostics_json: "reduction" holds requested, effective, reason, "fallback" and "fallback_points", and "fallbacks" maps the id of every point the fallback evaluated again to {"effective", "reason", "guard_estimate"} (effective null: the point failed on NinjaRS too, or its guard rejected it). The SDK’s guard estimates are the Python API’s, bitwise or a few units in the last place apart (the SDK forms the color-metric norms of the inclusive \(\lvert\mathcal{M}\rvert^2\) in binary64).
Near-planar NinjaRS hazard
At near-planar \(2 \to 3\) points (the event plane contains the beam: the pentagon Gram determinant nearly vanishes) of pentagon families whose rank equals their propagator count (all-vector quark loops), NinjaRS’s reduction can produce finite, badly wrong values in every arithmetic. Its box \(\mu\)-expansion’s conditioning bound refuses such lanes typed (Unstable in the fast engine; CutFailed { SingularParameter } in the generic engine), so under "auto" the fallback fails them typed (in double-double the measured g g > z z z points at tilts \(0\), \(10^{-14}\) and \(10^{-13}\) out of the plane). The guard stays as defence in depth.
Measured without the bound (truth: TIRust at 78 digits): g g > z z z tilted by \(\varepsilon\) out of its plane was served wrong in binary64 from \(\varepsilon \approx 5 \times 10^{-7}\) (\(2 \times 10^{-2}\) off at \(10^{-7}\)) down to at least \(10^{-12}\); in double-double at \(\varepsilon = 0\) (up to \(1.3 \times 10^{7}\) off), \(3.3 \times 10^{-6}\) off at \(10^{-14}\) and within \(2.1 \times 10^{-10}\) from \(10^{-13}\) up.
- Measured affected: loop-induced
g g > z z z,z z g,z g g,a a g,a g gandW+ W- g. - Measured unaffected: the rank-4 pentagon rows
g g > h h handg g > h z g, Born-interferedg g > g g gand five Born-interfered NLO electroweak rows. - The recommended checks flag such values: estimates 22 to 892 in double-double, 3.0 to 236 in binary64 on the measured wrong points; the rescue stack escalates them.
- A value the bound does not flag is not verified: an explicit
reduction="ninjars"has no fallback guard, and the SDKs run no monitoring in double-double and arbitrary precision (AccuracyNotEstablished, no estimate).
The binary64 engine refuses a flagged lane when the first-order rounding estimate of its boxes’ \(\mu\)-expansion terms exceeds \(2^{-17}\) of the lane’s value; the generic engine refuses every lane whose predicted loss of digits exceeds the carrier’s precision minus 14 bits. Failure texts name the test, what was found and what was allowed, for example
family 58722 lane ...: Unstable (box mu-expansion conditioning:
predicted error 3.19e-15, allowed <= 2.36e-15)
Unstable (box normal: found 3.09e-11, required > 3.26e-8)
CutFailed { cut_index: 0, failure: DegenerateGram } (box-Gram bound:
predicted loss 295.0 bits, allowed <= 228 bits (256 - 28))
(each message on one line in the record), the last in bits of the carrier’s working precision (256 at 57 requested digits).
NinjaRS tracked precision
Symbolica’s arbitrary-precision numbers track the bits that survive each operation, so every NinjaRS lane in arbitrary precision carries the uncertainty of its value. Per Laurent coefficient, pyAmpliCol sums that uncertainty and the size of each value over all NinjaRS lanes of a point, and fails the point (status failed, reason “NinjaRS tracked precision: the point’s lanes keep … tracked bits …”) when the largest summed uncertainty exceeds \(2^{-r}\) of the largest summed size. \(r\) is NinjaRS’s own rule for its master integrals at the working precision: 53 bits up to 212 working bits, a quarter of them above, at most half (53 at 40 digits, 64 at 57, 66 at 60, 83 at 80). Summed over the point, families that vanish identically weigh by their size and the largest coefficient decides, so the identically vanishing poles of a loop-induced amplitude do not fail it.
- It applies to NinjaRS in arbitrary precision, in the inclusive and resolved evaluations, the Python reference path and the SDKs. Binary64 and double-double track nothing; TIRust’s values have their own acceptance tests;
reduction_unchecked=Truedrops it. It never changes a served value. - A lane the lane rescue reduced in arbitrary precision inside a binary64 or double-double point is held to the analogous rule at that point: per Laurent coefficient, the tracked uncertainty of its arbitrary-precision value, summed over the point’s lanes rescued there, must stay below the point carrier’s unit roundoff (\(2^{-53}\), \(2^{-106}\)) of the point’s summed lane sizes; otherwise those lanes count as refused at that last carrier and the point fails (“NinjaRS tracked precision: the N lanes rescued in arbitrary … keep … tracked bits …”).
- A rescue stack evaluates a failed point at its next level.
What it catches: NinjaRS’s cut tests miss nearly degenerate box Gram determinants (a \(2 \to 3\) point with a spatially collinear final state, NinjaRS issue 15). Measured (truth: NinjaRS at 150 digits) on 200 points of HC05 g g > x0 g g at \(\sqrt{s} = 1\) TeV, two such points were served as success, \(3.4 \times 10^{18}\) and \(9.4 \times 10^{13}\) off at 57 digits (\(4.7 \times 10^{34}\) and \(6.7 \times 10^{30}\) at 40, \(8.2 \times 10^{-5}\) and \(4.4 \times 10^{-11}\) at 80). The test fails exactly these two at 40, 57, 60 and 80 digits (at 80 the second was right), and no other point; every other value is unchanged bitwise, the worst within \(1.2 \times 10^{-10}\) (40 digits). On g g > g g g, g g > h h, g g > z z, u u~ > d d~ and g g > z z g at 40 and 57 digits it fails no point. The default rescue stack takes the two points from its 57-digit to its 500-digit level (a stack with 100- and 150-digit levels served them right at 150 and 100 digits); a stack that ends at 57 digits keeps them flagged.
Limits: tracked precision is an estimate, not a bound. It overstates the accuracy of a ruined value (the two points still claim some kept bits) and does not see a loss outside the tracked arithmetic. An amplitude that integrates to zero at every point (a Landau-Yang zero such as loop-induced g g > z, every family vanishing by itself) has only lanes of rounding noise, so on NinjaRS in arbitrary precision the test fails it (measured at 40 and 57 digits). The default loop-induced route (TIRust) does not take the test; the "scale" metric of the rescue stack accepts such a zero at its binary64 level; under the default "relative" metric the stall rule keeps the point at double-double with the target not met; a stack that reaches NinjaRS in arbitrary precision returns it as best-effort. An explicit NinjaRS arbitrary-precision value of such a zero is obtained with reduction_unchecked=True, which drops the test and nothing else.
Inexact inputs near forward
Near forward, backward or threshold kinematics NinjaRS amplifies a point’s on-shell and momentum-conservation defect by about the inverse box Gram determinant. Neither the reduction-direction check nor a rotation re-test sees it (a rotation keeps the defect). Measured at near-forward g g > h h points given as binary64 texts (gluon legs off shell by up to \(5.2 \times 10^{-13}\ \mathrm{GeV}^2\), Higgs legs by up to \(2.0 \times 10^{-10}\ \mathrm{GeV}^2\)): the \(+-\) helicity rows of evaluate_resolved (\(10^{-13}\) to \(10^{-21}\) of the \(++\) rows) moved \(1.1 \times 10^{-4}\) to \(9.3 \times 10^{11}\) from those of the exact point nearby on NinjaRS, while the summed value stayed within \(1.2 \times 10^{-9}\). The kinematics improvement removes that defect. On exactly on-shell, momentum-conserving points double-double’s own rounding remains: there "auto" served the \(+-\) rows of one point \(1.8 \times 10^{-5}\) and \(2.0 \times 10^{-5}\) off with the guard’s estimate \(9.3 \times 10^{-6}\), inside its limit. This is the guard’s known limitation: strongly suppressed helicity rows near exactly forward kinematics can be served beyond their own \(10^{-5}\); the summed observables are not affected at that level.
Near-forward accuracy, measured. At a nearly degenerate \(2 \to 2\) (sub-)box (a small transverse momentum or a pair near its threshold) a binary64 call without stability checks can be far off with no estimate (NinjaRS’s binary64 engine and oneloop’s binary64 box integral): g g > z z at \(\sqrt{s} = 500\) GeV and \(\theta = 10^{-4}\) is off by a factor \(10^{18}\). The recommended checks flag such values and the rescue evaluates them in double-double or arbitrary precision on the improved point (within \(10^{-5}\) on the points measured). An estimate is not a bound: at \(W^+W^-\) production at 1 TeV with \(p_T = 4.9\) GeV the binary64 estimate \(9.2 \times 10^{-6}\) accepts a value \(4.8 \times 10^{-5}\) off. Resolved outputs far below the point’s largest need about \(\log_{10}(\text{largest}/\text{output})\) plus the conditioning plus the target’s digits of working precision: TIRust at 20 to 32 digits can serve them badly off, which the recommended checks flag.
Forward, backward and boosted binary64, measured (one point each, against 60 digits): g g > a g (default reduction) is off by \(2 \times 10^{-6}\) relative at \(\lvert t\rvert/s = 10^{-5}\), \(5 \times 10^{-4}\) at \(10^{-6}\) and \(2 \times 10^{-2}\) at \(10^{-7}\); at \(\lvert t\rvert/s = 0.3\) it is off by \(4 \times 10^{-6}\) at a boost \(\gamma = 200\) and \(3 \times 10^{-4}\) at 1000. At each point the stability estimate is larger than the error (much larger in the boosted frames); double-double is right to \(10^{-15}\) at every point quoted.
Unchecked reductions
reduction_unchecked=True (Python, on Runtime.load and every evaluation; [evaluation] reduction_unchecked; CLI --reduction-unchecked; SDK rusticol_virtual_set_reduction_unchecked; default off) drops the backends’ own acceptance and refusal checks, so that a backend serves every point it can give a finite value for, the way the one-loop providers’ most optimistic settings run (OpenLoops and Recola with COLLIER’s method choice and no stability system).
- TIRust keeps its a priori conditioning gates and its method choice as method selection and returns the method-choice values as computed: their acceptance check (re-evaluation at rescaled inputs) is not computed, so the target drives nothing on TIRust. Rows the method choice refuses (an expansion that does not converge, an alternative estimate above its limit, a cancelling determinant, vanishing adjugates, a triangle below the requested rank, its own gate) are served by plain Passarino-Veltman at gate 0. Every other row’s value is bitwise the checked one.
- NinjaRS runs its fast engine with zero stability thresholds (Ninja’s
stability_thresholdandrelative_tolerance0): a lane fails only where a tested quantity is exactly zero or NaN, or where its conditioning bound refuses it. The bound is not a stability threshold and stays active in every carrier. The generic engine has no threshold to set to zero; the setting drops its tracked-precision test in arbitrary precision. - Residual failures, which no scheme gives a finite value for, stay failed with their reasons: an exactly singular pivot (TIRust, after its affine-relation variants), a non-finite output (TIRust’s “nonfinite direct-engine coefficient”, a non-finite numerator, NinjaRS’s
NonFinite), a master failure (MasterFailure,MasterFailed), TIRust’sInvalidInput, and a NinjaRS lane refused asUnstable(a cut whose two momenta span a Euclidean plane, a near-planar box \(\mu\)-expansion). A family outside TIRust’s capability stays a call-levelReductionUnavailable. "auto"keeps its rule, each backend in its unchecked form. Its per-point fallback acts only on the residual failures, and in double-double and arbitrary precision its served points are guarded (the guard is pyAmpliCol’s check, not a backend’s: it stays on). Where nothing fails, an"auto"call is a pure TIRust call.- In double-double and arbitrary precision TIRust’s method choice is off, so there the conditioning gates select and the last resort serves what they refuse.
- pyAmpliCol’s stability checks and rescue stack stay their own settings; combined with the setting they check the unchecked values, and the rescue levels (each reducing unchecked) or the fallback act on the points those checks fail. The lane rescue still serves the lanes the unchecked backend refuses. NinjaRS’s cancellation rescue does not run.
The setting is recorded in every lane diagnostic (VirtualReduction.unchecked) and in the SDKs’ "reduction" diagnostics. A value that is not a bool is refused (ValueError).
Measured accuracy of the unchecked mode
Record: performance_reports/loop/data/li-unchecked-accuracy.json. Binary64 finite part through the Python API (Runtime.load(artifact, reduction_unchecked=True), evaluate(points, mu_r2=..., poles="none", on_failure="return", reduction="tirust" | "ninjars")) on each row’s first stream points against TIRust at 256 bits with supplied invariants: the largest relative error over the points, then the points above \(10^{-5}\) and the points that fail. TIRust’s errors above \(10^{-5}\) all come from rows its last resort serves. NinjaRS’s zero thresholds return finite values off by up to \(10^{64}\) where its checks refuse the point (g g > h h h: a box whose three momenta are linearly dependent, which only its noise tests catch), and keep its few points off by up to \(3 \times 10^{-3}\) that the checked mode serves as well (a triangle cut with a small Gram determinant). Its conditioning bound refuses the near-planar g g > z z z points in both modes.
| Process | Points | TIRust unchecked | NinjaRS unchecked |
|---|---|---|---|
g g > h | 128 | 1.2e-13 | 1.2e-12 |
h > g g | 128 | 1.0e-13 | 1.1e-12 |
h > a a | 128 | 2.4e-14 | 4.2e-13 |
h > z a | 128 | 1.2e-14 | 1.6e-12 |
a a > h | 128 | 1.4e-14 | 1.6e-13 |
g g > a a | 128 | 6.6e-13 | 2.4e-13 |
g g > z z | 128 | 5.5e-12 | 8.8e-11 |
g g > w+ w- | 128 | 1.2e-12 | 5.2e-12 |
g g > z a | 128 | 6.8e-13 | 6.4e-12 |
g g > h h | 128 | 3.4e-9 | 8.8e-11 |
g g > h z | 128 | 1.4e-12 | 1.4e-12 |
g g > h g | 128 | 2.4e-14 | 7.3e-13 |
u u~ > h g | 128 | 1.1e-14 | 1.5e-13 |
u g > h u | 128 | 1.2e-14 | 1.1e-13 |
g g > z g | 128 | 9.4e-13 | 9.7e-12 |
g g > a g | 128 | 2.3e-13 | 1.7e-12 |
e+ e- > h a | 128 | 3.8e-14 | 1.8e-13 |
a a > a a | 128 | 1.8e-14 | 4.9e-14 |
a a > z z | 128 | 1.5e-13 | 7.4e-13 |
a a > h h | 128 | 8.8e-11 | 9.1e-11 |
e+ e- > h h | 128 | 1.3e-10 | 1.3e-10 |
h > g g g | 128 | 6.6e-13 | 1.5e-12 |
z > g g g | 128 | 5.5e-11 | 3.7e-10 |
e+ e- > g g g | 128 | 3.5e-7 | 3.2e-10 |
g g > h h h | 128 | 7.6e-7 | 4.5e64: 2 above 1e-5 (the checked mode refuses them) |
g g > h g g | 128 | 9.2e-10 | 8.0e-10 |
g g > z z g | 128 | 1.2e-2: 18 above 1e-5 (all on the last resort) | 5.0e-8 |
g g > a a g | 128 | 7.0e-6 | 1.0e-3: 1 above 1e-5 (also when checked) |
g g > w+ w- g | 128 | 1.4e-2: 24 above 1e-5 (all on the last resort) | 6.2e-8 |
g g > z z z | 128 | 2.2e-8 | 1.8e-9; 20 fail (Unstable) |
g g > h z g | 128 | 8.2e-9 | 3.0e-8; 2 fail (MasterFailed, Unstable) |
g g > a g g | 128 | 3.3e-6 | 2.0e-4: 1 above 1e-5 (also when checked) |
g g > z g g | 128 | 3.1e-5: 3 above 1e-5 (all on the last resort) | 6.2e-6 |
u u~ > h g g | 128 | 3.7e-9 | 3.5e-8 |
u u~ > d d~ h | 128 | 4.1e-10 | 4.3e-9 |
g g > h h g g | 32 | 7.1e-7 | 7.0e-7 |
g g > h g g g | 32 | 5.9e-8 | 4.2e-5: 2 above 1e-5 (also when checked) |
g g > e+ e- mu+ mu- | 32 | 5.4e-12 | 6.5e-10 |
g g > a a g g | 128 | TIRust vs NinjaRS 7.0e-2 (no 256-bit truth: 405 s per point at 256 bits); at the 2 largest-difference points vs the 256-bit truth: 1.3e-4 | at those points: 7.6e-2 |
g g > z z z z | 112 | TIRust vs NinjaRS 4.9e-6 (no 256-bit truth: 764 s per point at 256 bits) | – |
g g > e+ e- mu+ mu- g | 16 | 8.3e-9 | 7.0e-9 |
Other processes and points are not measured.
Cross-backend check
VirtualStabilityChecks(..., cross_backend=True) (SDK: rusticol_virtual_set_stability_checks’s cross_backend; no run-card key) evaluates every point a second time on the other backend and enters the deviation of its reduction lanes into the estimate as the check "cross-backend". It samples what neither backend’s own frames see (the two reductions round differently everywhere), costs one more evaluation of every point, and combines with at least one other check. A point the other backend fails or refuses keeps the estimate of the other checks and names the check, with the reason, in not_run. It is a runtime option of the call, never stored in an artifact. A carrier the other backend does not serve refuses it before any point (ReductionUnavailable). The values are those of the call without it, bit for bit. It runs on evaluate and on the resolved, correlated and selected outputs of both process types, not on the Python reference executor, which refuses it.
Estimates, absolute errors and the finiteness ratio
With stability checks every estimate carries, besides the relative estimates, the absolute estimate \(E\) per sector and Laurent coefficient (absolute), the scale \(S\) it is measured against (magnitude, the size of the contributions before they cancel) and their largest ratio (scale). A value with \(\lvert c\rvert \le E\) is zero within the estimate. In arbitrary precision the ratios are formed from exponent-safe sizes, so they stay right beyond binary64’s exponent range (at 500 digits, say); absolute and magnitude are binary64 floats and read 0.0 below it. For a loop-induced result the pole estimates are \(E/S\) as well.
Each lane’s finiteness is the amplitude-level finiteness ratio of a loop-induced point: the largest \(\lVert a_{-k}\rVert_G / S_k(h)\) over its loop orders, helicity rows and poles, of the order of the carrier’s unit roundoff for a finite amplitude. It exists exactly when the call computes the poles and requests stability checks (a bare VirtualStabilityChecks() enables none), and is None otherwise, also for poles="none". Its scale \(S_k(h)\) is the row’s term floor, the amplitude’s size before the reduction’s own cancellations, which needs every family’s tensor moments at the point (one unit-numerator reduction per family monomial and point with NinjaRS: 1.3 times a plain evaluation on g g > z z, 2 times on g g > h). The checks form it anyway, as the floor of \(E\); a call without checks pays nothing for it. Without the ratio the computed poles still vanish against the finite part, a necessary-only cross-check.
An artifact generated with generation.loop_induced_probes = true (off by default) also passed the generation-time finiteness probe, in binary64 or, where binary64 failed or was refused, in double-double. A failed probe refuses the process unless generation.allow_failed_probes, which is recorded; without the option the record reads {"status": "off"}. An exact color zero (every color coefficient of the loop amplitude vanishes at \(N_c = 3\), as for h > g a, \(\mathrm{Tr}\, T^a = 0\)) evaluates to an exact 0 and its lanes say so.
The floor weight of loop-induced estimates
The floor weight \(w\) (stability_checks.floor_weight, --stability-floor-weight, VirtualStabilityChecks(..., floor_weight=), VirtualRescueLevel(..., floor_weight=), SDK rusticol_virtual_set_stability_floor_weight) weighs the first-order term of a loop-induced estimate’s rounding floor, \(w \cdot 2^{14} u\,(N S' + S N')\), with \(N\) the size of the computed amplitude and \(S\) the size of what cancelled in it, per side of \(\lvert\mathcal{M}\rvert^2\). The floor stands for the roundings no stability check samples.
- With \(w = 1\) it has its calibrated coverage: on 95,857 binary64 reference points of both backends, every point the earlier floor covered stays within ten times \(E\) and fewer than 1 in \(10^4\) exceed \(E\).
- Unset, the default depends on the highest-point loop the process reduces, in whole floor units (\(w \cdot 2^{14}\)): \(2^{14}\) units (\(w = 1\)) up to pentagons, \(2^8\) (\(w = 2^{-6}\)) for hexagons, 4 (\(w = 2^{-12}\)) for heptagons and above, not extrapolated beyond. Box and pentagon processes have misses below the calibrated count; the hexagon value rests on 2,662 reference points, the heptagon value on projections of stored estimates (693 points), where the full floor overestimates the error by about four digits and 4 units leave a typical one-digit overestimate (
g g > z z g g g). - \(w = 0\) leaves twice the checks plus the second-order term \((16u)^2 S S'\), which keeps an exact zero “zero within its estimate”. A weight that is set applies to every process.
- Precedence per call: a rescue level’s own weight, else the call’s checks’, else the runtime options’, else the process’s default. A layer that names no weight keeps the one below it. A weight given without any check runs no check; it reaches the estimates the call forms with checks of its own (the best-effort pass, the profile’s default set, the rescue levels).
- In the SDKs the weight setter and the runtime-options TOML set the same setting (the last call wins; NaN restores the default), which
rusticol_virtual_set_stability_checkskeeps. - The weight changes no value and no other estimate (the fallback guard keeps deciding with \(16u\,S\)); every estimate reports its weight (
VirtualStabilityEstimate.floor_weight).
Lane rescue: carriers, engines and memory
A backend may refuse a lane in binary64 (NinjaRS Unstable at a nearly singular cut, TIRust’s acceptance check). Such a lane is rescued, in the checked and the unchecked reduction (in the unchecked one the lanes still refused have no value at all: NinjaRS’s conditioning screen, a Euclidean-plane cut, a non-finite result). Only its reduction is redone in a higher carrier, double-double first, then arbitrary precision (500 digits), on the same backend. The rescue reductions are always checked: a refusal moves the lane to the next carrier, so no value a higher-precision engine rejects is served. TIRust’s rescue engines run its method choice in these carriers too, so a row its gates refuse is not sent straight to the costly 500-digit step.
- Inputs. The coefficients are the binary64 ones, lifted exactly (the numerators are not recomputed). The kinematic inputs are rebuilt in the higher carrier from the point’s improved kinematics (exact conservation and on-shell external legs in that carrier, with the call’s
kinematics_improvementvariant; with"off"the given point). This is why the rescue cannot live inside the reduction library alone: from its binary64 inputs lifted exactly, the shifts and invariants stay inconsistent at binary64’s rounding, which the reduction of such a lane amplifies (measured on NinjaRS: \(9 \times 10^{-3}\) relative at worst ong g > g g g, \(9 \times 10^{-10}\) from the rebuilt inputs); only pyAmpliCol holds the point’s exact momenta. - Result. The lane’s result, rounded to binary64, takes its place in the point’s binary64 sum; every other lane, and every point without a refused lane, is bitwise unchanged. The same holds in double-double (a refused lane is reduced again in arbitrary precision), for the rotated evaluations of the stability checks and for the per-point fallback’s evaluations.
- Both frames. A lane counts as refused when the backend refuses it in the direct reduction or in the reduction-direction check’s re-test frame, and a rescued lane is served in both frames. With a reduction-direction check in the call’s checks (also the default set on TIRust’s points), a lane accepted directly but refused in the re-test frame is rescued, so the point’s value can differ, at the rescued lane’s rounding (\(3 \times 10^{-15}\) relative on one \(2 \to 6\) gluon point; no case on 282 flat
g g > g g gpoints), from the same point evaluated with checks without a reduction check. - Accuracy. The reduction is linear in the coefficients, and the tensor integrals they multiply are smooth where a Gram determinant is small: the amplification that made the lane unstable sits in the reduction’s own arithmetic, which the higher carrier removes. A rescued lane is therefore about as accurate as an accepted binary64 lane (binary64 rounding of its coefficients against the size of the terms that cancel), not double-double accurate, and it is not certified by itself: the point’s estimate is formed on the mixed total.
- Estimate rule. When the call’s checks lack the reduction-direction check (an explicit
VirtualStabilityChecks(1), or the NinjaRS default set ofprofile --stability), a point with rescued lanes is evaluated again, on such points only, with the call’s checks and the rescaled reduction-direction check, on the backend that served it, and returns that estimate (itschecksincludereduction-rescaled; its value is unchanged). One rotation does not see the reduction error of a rescued TIRust point’s other lanes: the true error lay above the one-rotation estimate on 162 of 185 suchg g > g g gpoints and on 30 of 100 suchg g > g g g gpoints; above the extended estimate on 1 of 185, by 3 %, and on none of the 100. The SDKs’ binary64 checks do the same (equal estimates); so do the selected, resolved and correlated routes, for every output. The re-run costs a whole checked evaluation of the rescued points (g g > g g gon TIRust: 0.42 s per rescued point with it, 0.19 s without, 0.22 s for a direct call with the rotation and the rescaled check); a best-effort point with rescued lanes is re-run too. - Accepted lanes are never rescued, however inaccurate. On flat \(2 \to 6\) gluon points (NinjaRS, binary64, one rotation) 23 of 32 points are accepted, and 10 of those have an estimate above \(10^{-5}\), 3 of them above 1.
Record. lane.lane_rescue (a VirtualLaneRescue, None without one) gives per carrier the lanes it served (lanes, e.g. (("double-double", 3),), counted over the point’s evaluations), moments the same for a loop-induced checked call’s term-scale moments (counted apart), count and the highest carrier. The lane’s detail adds “lane rescue: N lanes in” the carrier (with checks: “its estimate includes the rescaled reduction-direction check”). A lane refused at every rescue carrier leaves the point failed (its reason ends with each carrier’s status), and the fallback, a rescue policy’s next level or the best-effort value act as usual. evaluate_resolved and evaluate_correlated (and their variants) take the same keyword and carry the same record. Under a rescue policy a level’s VirtualRescueAttempt records no lane rescue. The lane rescue’s time is part of the call (profile: the reduction stage), and its points are counted in profile’s cause tables under “lane rescue”. The SDKs record only the setting ("lane_rescue" in "reduction"), not which lanes were rescued.
Engines and memory. The engines (one per rescue carrier and backend) are built once, at the first refused lane, and kept: the call that meets a runtime’s first refused lane pays that one-time build. Measured: NinjaRS’s double-double engine 2.9 s on g g > g g g g and 4 s on g g > g g g g g, TIRust’s 0.03 to 0.4 s; NinjaRS’s 500-digit engine about 35 s on 6-gluon points. Memory: about 19 MB (NinjaRS double-double) and 640 MB (NinjaRS 500 digits) on 6-gluon points, about 57 MB for TIRust’s 500-digit engine. A rescue of many refused lanes is done in parts of about 2 GiB of lane inputs, so its memory grows little with the number of refused points (64 copies of a g g > z z g point whose double-double lanes are refused peak at 2.3 GiB). The budget covers the lane inputs, not the whole process, and is not configurable; values, statuses and counts do not depend on it.
NinjaRS’s cancellation rescue
In the checked reduction (the default of evaluate, check and the stability run of profile; off with reduction_unchecked=True, the mode profile --runtime times), NinjaRS measures, for every lane its binary64 reduction serves, an error estimate: the unit roundoff times the moduli of the terms it summed (each coefficient times its master integral, and the rational terms), over the lane’s finite part. A lane whose estimate exceeds its target (a nearly degenerate cut, for example a two-mass triangle with \(P^2\) close to \(Q^2\) in g g > g g g, cancels its bubble coefficients by many orders) is reduced again, within NinjaRS, in double-double: every cut level and master at the point improved in double-double (pyAmpliCol’s kinematics improvement, the same point the lane rescue and a double-double evaluation use), only the numerator’s coefficients staying the binary64 ones.
- pyAmpliCol hands NinjaRS that point lazily, for the lanes it asks for only: per lane the low parts of its shifts, invariants and (when not exact) squared masses against the binary64 values, whose high parts are the binary64 pass’s inputs bit for bit.
- A re-reduced lane whose own estimate still misses the target is refused (status
Unstable, “cancellation rescue: …”) and goes to the lane rescue; every other lane keeps its binary64 value bit for bit. - A point such a lane leaves without a value (lane rescue off, or refusing too) is, under
on_failure="best-effort", returned best-effort: its best-effort evaluation is the unchecked reduction with the cancellation rescue kept on, which serves the lane its better value (binary64 or re-reduced, whichever NinjaRS’s estimate prefers). - In a binary64 evaluation through the Python API the improved point of these rescues (this one and the lane rescue) is always the default variant’s (z-shift), whatever
kinematics_improvementsays,"off"included (measured: the projection variant gives the same worst and median digits ong g > g g g,g g > g g g gandg g > t t~ g). NinjaRS uses its own repair (exactly zero invariants made light-like) only for a lane no improved point reaches. In the SDKs the rescues’ improved points followrusticol_virtual_set_kinematics_improvement("off": the given point).
The lane target. It is the call’s reduction_target divided by a safety factor of 64 (reduction_policy::RESCUE_SAFETY). A point’s error is at most its largest lane error times the cross-lane condition number \(\sum\lvert\ell\rvert / \lvert\sum \ell\rvert\) (measured 1.5 to 12 on g g > g g g, growing with the number of lanes), and NinjaRS’s estimate bounds a lane’s error, so a lane target of \(\text{target}/64\) keeps the point within the target where the lanes cancel by less than 64 (a margin of about 5 over five gluons for higher multiplicities). Measured (checked binary64 against double-double references on g g > g g g, g g > g g g g, g g > t t~ g and u u~ > e- e+ g g g): no point below 5 digits and a worst point error of 0.014 of the target. A lane small in its sum is judged more strictly than needed, which costs time only. The lane rescue’s own reductions take the same lane target: a target far below what any carrier reaches makes every flagged lane climb each carrier’s precision ladder and still be refused (slow), so the point ends best-effort or failed. Under a rescue policy each level’s lane target is that level’s target / 64.
Record. VirtualLaneDiagnostic.reduction_rescue (a VirtualReductionRescue, None when NinjaRS re-reduced no lane of the point): lanes gives per precision ("double-double") the lanes NinjaRS re-reduced and served, counted over the point’s evaluations (the reference and its rotated evaluations), estimate the largest relative error estimate of those re-reductions (each at most the lane target). lane_rescue keeps its meaning (lanes the backend refused and pyAmpliCol served); NinjaRS’s own rescue never appears there and does not add the rescaled reduction-direction check to the point’s estimate. A re-reduced lane’s precision is limited by its binary64 coefficients (about 8 digits where the cancellation was catastrophic): the rescue removes the loss of all digits, not the coefficients’ rounding. The SDKs’ per-point diagnostics do not record which lanes NinjaRS rescued; the Python API, the CLI and profile’s records do.
The generic engine’s ladder. NinjaRS’s generic engine (the binary64 lanes routed to it, squared masses or invariants between 0 and \(10^{-9}\) in the model’s units or an invariant within \(10^{-9}\) of a real squared mass, and every double-double and arbitrary-precision evaluation) has the same rescue in the checked mode: the same lane target, a lane whose measured loss misses it reduced again in a higher precision chosen from the loss (double-double for a binary64 base, MPFR above), refused Unstable for the lane rescue when no precision tried meets the target, and recorded in reduction_rescue (a precision above double-double as "arbitrary"). At the default target a double-double evaluation’s lanes keep about 70 of their 106 bits even at the worst g g > g g g points measured, so the ladder rarely acts there; a smaller target makes it act. The unchecked mode runs neither.
Limits. Lane results of subnormal magnitude (below about \(2.2 \times 10^{-308}\)) from the fast engine are outside the rescue’s accuracy coverage; the generic engine’s ladder never serves a subnormal value as a success. The improved kinematics (pyAmpliCol’s and a caller’s higher-accuracy input) feed the fast engine’s rescue only: the generic engine’s ladder projects the lane’s base-precision inputs onto exact shells in its rescue precision itself. The Python reference executor (an oracle path) has no rescue, and its NinjaRS-reduced points are never certified (reason “the Python reference executor does not report the reduction’s certification”; a rescue-policy level on it is never met). The reduction-direction check’s re-test frame is rescued with NinjaRS’s own repair of the kinematics, not the improved point.
Lanes served without accuracy evidence
These lanes are served at their value, the point’s value is returned with status "success", and its accuracy is not established: VirtualLaneDiagnostic.uncertified names the reasons, the detail adds “accuracy not established: …”, and accuracy_established stays False whatever the stability estimate says.
- A lane NinjaRS’s generic engine finds below the resolution of its own terms (
BelowResolution: its value lies below the rescue precision’s rounding of the terms it sums; a lane zero by a symmetry and a lane whose terms cancel beyond every precision tried look alike): “a reduction lane vanishes within the resolution of its own terms (no symmetry proof)”. - A lane the fast engine’s rescue measured above its target but could not take without refined kinematics (an on-shell massive leg, for a caller that supplies no improved point: the Python reference executor, a re-test frame): “a reduction lane is outside NinjaRS’s rescue domain without refined kinematics”.
- A vanishing lane: one refused by NinjaRS’s rescue and by every carrier of the lane rescue whose best value at the highest precision tried is consistent with zero within its own absolute bound in every Laurent coefficient (“… at double-double” or “… at arbitrary precision; no symmetry proof”). A refused lane whose best value is not consistent with zero stays refused (best effort).
- A binary64 lane that the fast engine’s rescue refuses and whose re-reduced double-double value is consistent with zero within that re-reduction’s own absolute error estimate is served the same way by the reduction itself, without going to the lane rescue. A default binary64 evaluation of a configuration that vanishes identically (the Born-zero helicity rows of a resolved
g g > g g) therefore touches no Symbolica state and needs no license. What this gives up: a lane that loses more than about 100 bits to cancellation and is in truth not zero is returned at its near-zero re-reduced value, uncertified, instead of being recovered by the lane rescue’s arbitrary-precision carrier. A caller who wants that recovery uses a rescue policy. - The shell-consistency screen’s mark (below, Kinematics improvement).
The status stays "success" so that generation and every consumer keep working; nothing of this certifies a value. Under a rescue policy a level whose result has such a lane is never met: the policy escalates, or returns the point not established with the reason (at its last level, or where its stall rule keeps an earlier level’s result). profile --stability carries the marking (per point and sample uncertified, the backend total uncertified_points); the resolved, correlated and selected outputs, the CLI’s JSON (diagnostics[].uncertified of evaluate --json) and the native SDKs carry the same reasons: the C ABI’s diagnostics record "uncertified" maps the id of every successful point with such a lane to its sorted, distinct reasons (points without one absent, {} when none), which the C++, Fortran, packaged Rust and Rust SDK wrappers hand out unchanged.
Not implemented: a point-level budget (the summed absolute bounds of such lanes against the point’s result) that would certify the points where such a lane cannot matter. Exact zeros proven at generation (color and fold zeros) are named as such already.
Best-effort values
A point that no configured alternative accepts (the backend’s own acceptance checks, "auto"’s per-point fallback, the last level of a rescue policy) is evaluated again, from its original exact inputs and on that point only, without the backends’ own acceptance and refusal checks: exactly what reduction_unchecked=True gives for that point and backend. Where that yields a value, the lane is returned with it under status "best-effort": never valid, has_value true, its refusal kept, and an uncertainty. A point without any value stays a "failed" lane (value None). A runtime loaded with reduction_unchecked=True has no checks to override: its failed points stay failed.
VirtualBestEffort (the lane’s reduction.best_effort) holds refusal (one message per distinct reason class, with the count of the others), uncertainty (the "relative" metric: each squared-order sector against its own magnitude), source, backend_deviation and gram_conditioning. The uncertainty always includes the recommended checks, run on the refused points only, whatever checks the call asked for:
source | Meaning |
|---|---|
"stability-and-recommended-checks" | the call’s checks together with the recommended ones (at least the larger of the two estimates; the public stability stays that of the call’s checks) |
"stability-checks" | the call’s checks already include the recommended ones |
"recommended-checks" | the call asked for no checks (the public result carries no estimate) |
"none" | no estimate could be formed; uncertainty is None, said so in the detail |
Why: one rotation alone under-states the error of an unchecked TIRust value of a Born-interfered process. Measured with one default rotation (explicit TIRust, binary64, flat points seed 1 at \(\sqrt{s} = 1000\), truth double-double): the one-rotation estimate covered the true error of 220 of 722 u u~ > t t~ g g best-effort points and 39 of 65 u u~ > d d~ e+ e- ones; with the recommended checks included, 722 of 722 and 65 of 65 (the C ABI alike: 221 to 722 of 722 and 42 to 64 of 65).
backend_deviation and gram_conditioning are TIRust’s own lane-level measures of the refused lanes, returned by the native reduction as data next to the reason texts (never parsed from them; the C ABI’s record carries the same two numbers): the largest method-choice deviation between a lane’s two frames relative to its term scale, and the smallest conditioning estimate of a lane its stability threshold refused (Gram, Cayley or coordinate-system measure; zero for an exactly singular pivot); None where no refused lane states one (NinjaRS’s refusals). Neither is the value’s accuracy. The lane’s reduction records the backend whose unchecked reduction gave the value (unchecked=True).
Cost: accepted points are evaluated exactly as without the policy, bitwise and at the same cost; only refused points pay for one unchecked evaluation with the call’s checks and the recommended checks (two when the call runs the cached reduction-direction check, which does not combine with the rescaled one in one evaluation). Under a rescue policy only the last level serves best-effort values (rescue_counts counts them under "best-effort").
result.warnings is a tuple of ResultWarning(source, kind, message, count, where, points), computed from the lanes, never emitted: one entry for the best-effort points and one for the failed ones ("numerical" source). result.emit_warnings() turns a result’s warnings into one pyamplicol.NumericalAccuracyWarning (a UserWarning subclass). Generator.generate and pyamplicol.api.check return the known, benign dependency log events they trigger in their result’s warnings (source "symbolica" or "ufo-model-loader") instead of printing them, and so the Python warnings a UFO model’s own modules raise when compiled (source "ufo-model", one entry per compile). In the SDKs the policy is rusticol_virtual_set_on_failure; a best-effort point has status RUSTICOL_VIRTUAL_BEST_EFFORT (5), its uncertainty in rusticol_virtual_result_copy_uncertainties (NaN for other points), and diagnostics_json carries "best_effort" per point id, "warnings", "on_failure" and "failures".
Rescue policy in detail
A policy is an ordered stack of levels in non-decreasing precision bits, modelled on gammaloop’s stability levels. Each level names its carrier, its checks, its target with a metric, and its reduction backend. Escalated points are evaluated one per native call, so each carrier builds one executor and compiles its kernels once. The lane rescue happens inside each level’s evaluation, before a point counts as failed.
Backends per level. An "auto" level takes the call’s reduction= request when it names a backend, else the runtime’s or the artifact’s, else the per-type default with its fallback; it follows the call’s "auto" rule (on TIRust: the per-point fallback at the level’s arithmetic). A level naming a backend has no fallback; its next level is the fallback. TIRust’s acceptance at a level follows the level’s target. Each level’s backend is resolved once, for its carrier, before the first point: an explicit one that cannot serve the level’s carrier is refused (ReductionUnavailable), never switched. result.rescue[i].attempts shows the backend of every level a point reached; result.rescue[i].reduction is the returning level’s.
Default stacks. VirtualRescuePolicy(): binary64, double-double, 57 digits, 500 digits, each with target \(10^{-5}\) on the relative estimate, one rotation "euler:0.1,0.2,0.3" and the rescaled reduction check, every level "auto". For a loop-induced call requesting "auto" it is the loop-induced default stack: TIRust in binary64, then NinjaRS in binary64, then the double-double, 57- and 500-digit levels ("auto": TIRust with the per-point fallback). A point TIRust refuses at level 0 is recorded at the NinjaRS level. A call naming a backend runs the default ladder on that one backend. A stack you build keeps each level’s named backend.
Rotations. rotations takes a count of default rotations, exact Rotation records or rotation text, including gammaloop’s Euler rotation "euler:<alpha>,<beta>,<gamma>" \(= R_z(\gamma)\,R_y(\beta)\,R_x(\alpha)\) in radians, rounded once to an exact rotation.
The stall rule. Accepted points are never evaluated again. A point whose estimate grew, against the next lower precision (the same backend’s estimate there, else the larger where two backends ran), at least by the square root of the two levels’ unit-roundoff ratio is not escalated: that is the signature of a numerical zero (its value is rounding of size \(u^2\) while its error falls like \(u\), so its relative estimate grows like \(1/u\)). It keeps that level’s value with the target not met, detail not escalated. This stops an integrated zero (g g > z, Landau-Yang: \(4.7 \times 10^{15}\) in binary64, \(8.4 \times 10^{33}\) in double-double, a growth of \(1.8 \times 10^{18}\) against the \(4.7 \times 10^{7}\) needed) at double-double. A real point escalates: its estimate falls with \(u\), or at a ruined point stays flat and noisy above 1 (HC05 point 29: 13.96 at 50 digits, 48.8 at 57, a growth of 3.5 against the \(3.2 \times 10^{3}\) needed); a failed attempt never stops a point.
Statuses and records. Each lane of the result is the evaluation of the level that returned it: its values, pole parts, stability estimate and diagnostic carrier. accuracy_established is True exactly when the estimate met the target: the estimate’s verdict, not a certificate. result.rescue[i] is a VirtualRescueRecord (level, arithmetic, precision_bits, target, met, attempts), each VirtualRescueAttempt with its estimate or failure, reduction and kinematics (each level improves the original inputs in its own carrier). Without a policy rescue is None.
Combinations. For a Born-interfered process every pole selection, color accuracy and selection (helicities= at every accuracy, color_flows= at leading color) is supported; every level and rotation evaluates the selected rows only. A loop-induced process is rescued with the pole selections "all" and "none", full color and its helicity selections; it has no color flows (CompatibilityError). stability= together with arithmetic, a non-default precision or stability_checks is refused with a CompatibilityError, as is a policy on evaluate_resolved and evaluate_correlated(_many), and a load-time policy with a load-time arithmetic or precision. Empty per-call checks (VirtualStabilityChecks()) select a plain call under a load-time policy. Double-double and arbitrary-precision levels read the artifact’s saved Symbolica state under the pyAmpliCol package key. The run card has no rescue ([evaluation.stability] stays refused), nor have the SDKs and the CLI.
Cost. Checks cost about one extra evaluation per rotation plus a fifth to a third for the rescaled check (one rotation and the rescaled check: 2.35 times plain binary64 on g g > g g g). One 500-digit evaluation costs 1.7 to 10 times one at 57 digits; on 200 HC05 g g > x0 g g points, 25 of the 27 that leave double-double stop at 57 digits: 770 s with the 57-digit level, 1489 s without.
Correspondence with gammaloop
Field by field, a level is gammaloop’s StabilityLevelSetting with a backend (gammaloop crates/gammalooprs/src/settings/runtime.rs, StabilitySettings and StabilityLevelSetting; the escalation loop of integrands/process/mod.rs):
| pyAmpliCol | gammaloop |
|---|---|
arithmetic / precision | precision (Double, Quad = double-double, Arb) |
rotations | StabilitySettings.rotation_axis (shared by every level there, per level here) |
reduction_check | no counterpart |
target with metric | required_precision_for_re / _im (one target on pyAmpliCol’s estimate; "relative" normalizes by the result as check_on_norm does) |
reduction | no counterpart |
As in gammaloop, the levels run in order, a point stops at the first level that accepts it and the last level keeps its result. gammaloop’s escalate_if_exact_zero, loop_momenta_norm_escalation_factor and escalate_for_large_weight_threshold have no counterpart (a loop-induced zero is accepted by the "scale" metric). The default ladder differs from gammaloop’s defaults (f64, f128, 1000-bit arb, target \(10^{-5}\), the same rotation) in three ways:
- the rescaled reduction check is added, because a rotation keeps every master integral’s invariants and cannot see its own rounding;
- arbitrary precision is two levels, 57 digits (pyAmpliCol’s calibration carrier) and 500 digits, instead of one at 1000 bits (
VirtualRescueLevel("arbitrary", 302)gives gammaloop’s). The last level serves what 57 digits gets wrong (points of a nearly vanishing box Gram determinant: TIRust issue 40, NinjaRS issue 15, right at 100 to 150 digits); - the target applies to pyAmpliCol’s error estimate, which sums the deviations of every reduction lane with a safety factor of two, not to the spread of the rotated values.
Kinematics improvement in detail
Before anything is evaluated in a carrier above binary64 (double-double, and arbitrary precision at any requested digit count, 16 included), each point is moved onto exact conservation and the exact external shells in that carrier’s arithmetic, MadLoop’s ImprovePSPoint. Binary64 evaluations are improved only with kinematics_improvement_binary64 = true.
"z-shift"(default; MadLoop’sImprovePSPoint = 2, the “original” method ofimprove_ps.inc): every final state keeps \(E, p_x, p_y\) and takes \(p_z\) on its shell, and the two massless initial states, which must lie along the \(z\) axis, take the closed-form \(E/p_z\) shifts that restore conservation. Where it refuses (beams off the \(z\) axis, massive or one initial state, a negative energy) MadLoop’s own fallback runs"rescaling". Where the point MadLoop’s chain produces misses exactness or both variants refuse, the chain finishes with"projection", continuing from MadLoop’s point; only if the projection refuses too is the point evaluated as given (typed), or, after a produced point, used with thekinematics-inexactrecord. So the default is exact in every frame: on points whose beams are along \(z\) it is MadLoop’s z-shift bit for bit, elsewhere the projection of MadLoop’s point. A final state of small \(\lvert p_z\rvert\) moves by about \(\sqrt{2E\,\delta E}\) rather than by the input’s defect (up to about \(10^{-8}\) relative on values; MadLoop behaves so), and one whose given energy lies below its transverse mass keeps a shell defect of the input’s order after the z-shift, which the finish removes."rescaling"(MadLoop’sImprovePSPoint = 1; fallback"z-shift", finish"projection"): the last particle balances the 3-momentum, every 3-momentum is scaled (particle 1 by \(x^2\), the others by \(x\), \(x\) from Newton on the energy balance) and every energy is put on its shell. As MadLoop codes it, it leaves the 3-momentum residual \((x^2 - x)\,\vec p_1\), of the input’s order: on shell but not exactly conserving. In a frame whose beams are not along \(z\) the default’s MadLoop step produces this point, and near forward, backward or a threshold NinjaRS amplifies its residual by about the inverse box Gram determinant, where no rotation or rescaling check can see it:g g > z zat \(\theta = 10^{-4}\), rotated and boosted, was returned 5.3 off at double-double, met at estimate \(1.6 \times 10^{-7}\), without the finish. The finish removes it."projection": the frame-independent minimal-norm projection of the external momenta onto the shells and the four conservation equations (Gauss-Newton \(x \leftarrow x - J^{T}(J J^{T})^{-1} c(x)\), Euclidean on the components), iterated until the residual is at the carrier’s rounding or stops decreasing (two to three steps from a binary64 input). Selected, it runs alone from the given point; it is also the finish of both MadLoop selections."off": no improvement in any carrier. Switched off above binary64, a near-forward binary64 point can be served far off without any flag (g g > z zat \(\theta = 10^{-4}\), double-double,"auto": a relative error of 5.25, flagged by no check or guard; correct with the default), because the rotation checks and the fallback guard act on the same inexact point.
The shells are the masses the evaluation binds for the external states (a leg without a bound mass keeps its own \(p^2\)). The improvement runs once per point and carrier from the caller’s exact inputs, in the caller’s leg order, never on an already improved point: every rescue level and the per-point fallback start from the original inputs in their own carrier, and the stability checks rotate the improved point. An exactly physical input is evaluated unchanged.
MadLoop’s bounds. MadLoop’s input sanity test runs first for the two MadLoop variants (IS_PHYSICAL: a conservation defect above \(10^{-6}\) of the summed energies, or a shell defect \(\sqrt{\lvert p^2 - m^2\rvert}\) above \(10^{-2}\) of a leg’s \(\lvert E\rvert + \lvert p_x\rvert + \lvert p_y\rvert + \lvert p_z\rvert\); the defect’s magnitude is tested, where MadLoop’s own test is signed): an input failing it is evaluated as given with the typed warning (code 1), with no finish. Every variant refuses a move above \(10^{-2}\) of the summed components (IS_CLOSE, code 999). These bounds concern the input, not the carrier. They are overridable at the improvement’s own entry, not by an evaluation setting: pyamplicol.kinematics.improve(points, n_initial, masses2, arithmetic, digits, variant, tolerances={"fourmom": ..., "onshell": ..., "close": ...}) (Rust: kinematics_improvement::Tolerances) returns the improved exact point, which an evaluation then takes with kinematics_improvement = "off". MadLoop’s precision literals (its Newton convergence, consistency and “beams along z” thresholds) are derived from the carrier’s unit roundoff.
Record. VirtualLaneDiagnostic.kinematics (a VirtualKinematics; the SDKs’ "kinematics"): the requested setting, what became of the point (improved by the variant that produced it, exact, not-improved, or off), every step of the chain with its code (MadLoop’s: 1 the input test, 100 to 999 the z-shift, 1000 to 9999 the rescaling, 999 the move bound; 10001 a singular projection), and the produced point’s exactness record: its largest shell and conservation defects relative to the point’s scale against the carrier’s rounding bounds. The typed warnings kinematics-not-improved and kinematics-inexact are records, not failures: the value is returned as computed, on_failure is unaffected and no rescue escalates on them.
Trees. Tree evaluations are values only; a tree runtime’s record is the warnings channel. Runtime.take_warnings() (C ABI: rusticol_runtime_take_warnings_json) returns the record of the most recent improved call (a summary line such as "kinematics-improvement: arbitrary at precision 32 (z-shift): z-shift 4", then every typed warning with its point index), replaced by the next improved call and not kept while warnings are muted; in Python the typed warnings are also issued as Python warnings. The tree higher-precision modes (Python precision above 16 and the correlated calls’ double-double and arbitrary carriers, the default "arbitrary" at 16 digits included) improve toward the exact executors’ external masses; the binary64 switch toward the binary64 masses of the native runtime’s external wavefunctions, the same code as the C ABI’s.
How far it moves a point. On 3000 profiling points each of g g > g g, g g > g g g and g g > t t~ g, in units of \(\sqrt{\hat s}\) times binary64’s unit roundoff, the double-double point lies a median 0.4 to 2 such units from the input, 99 % within 150, at most \(5.3 \times 10^{3}\) (a final-state leg nearly transverse to the beams, whose \(p_z\) the default re-solves from its shell); the projection stays within 1.5 units (invariants within 4.7 units of \(\hat s\)). Either is at most \(6 \times 10^{-13}\) relative.
Higher-accuracy input kinematics
A caller who has the point to more digits than binary64 can give it as such, and every carrier then starts from it: the binary64 evaluation reads its rounding, and the improvement and the rescues (the lane rescue and the fast engine’s cancellation rescue) start from the given point instead of its binary64 rounding (the generic engine’s ladder projects its own lanes’ inputs instead). A point physical to the carrier’s digits is moved only at that carrier’s rounding; a less accurate one is made exact in the carrier.
| Surface | How to give the point |
|---|---|
| Python API | momenta as Decimal or decimal strings (any digits); a float is read by its shortest decimal |
| CLI | --momenta FILE: JSON numbers with as many digits as wanted (read exactly, never through binary64) or decimal strings |
| Rust SDK | Runtime::evaluate_decimal (decimal literals), or evaluate_refined |
| C, C++, Fortran, packaged Rust | rusticol_virtual_evaluate_refined: the binary64 momenta plus binary64 correction words per component, refused unless the momenta are the binary64 roundings of the refined point |
The UMAMI provider’s interface is binary64 by its standard and takes no refinement. The SDK reads every binary64 input as its exact value, while the Python API reads a float by its shortest decimal (33.6, not the double’s exact value): where the two differ, values and estimates may differ in their last digits.
The shell-consistency screen
A one-loop amplitude binds every invariant that one external leg fixes to that leg’s bound squared mass, never to the \(p^2\) of the given momenta: at a point off those shells the value is no amplitude of consistent kinematics, and a stable reduction does not certify it. In the checked mode every virtual evaluation (summed, correlated, resolved and selected outputs, every carrier) screens each external leg of the point it evaluates (the caller’s momenta after the requested improvement) against the mass that call binds. A massive leg passes the first condition, a massless one the second:
\[\begin{aligned} \lvert p^2 - m^2 \rvert &\le t\, m^2 + 8u\,\bigl(E^2 + \lvert\vec p\rvert^2 + m^2\bigr) , \\ \lvert p^2 \rvert &\le (t + 8u)\,\bigl(E^2 + \lvert\vec p\rvert^2\bigr) , \end{aligned}\]with \(t\) the call’s reduction_target and \(u\) the unit roundoff of the carrier each leg’s components were supplied in (\(2^{-53}\) for a Python float; 0 for an exact spelling: an integer, a decimal text or Decimal), or the evaluating carrier’s when coarser. A leg beyond it marks the point: its original value is served, its lane carries the reason in uncertified (“off the bound mass shell: external leg k, p^2 = …, bound m^2 = …, relative defect …, … times the screen’s allowance”) and its accuracy is not established; a non-finite component marks it too. The mark never fails a lane, never raises, never escalates a rescue level by itself, and never hides a failure. Every lane records the per-leg relative defect (VirtualLaneDiagnostic.mass_shell). reduction_unchecked measures nothing, at no cost. A generator that boosts its momenta adds rounding of its own: at targets near the carrier’s rounding (1e-25 in double-double) a few of its points (20 of 2,000 native draws with three massless final legs) are marked. The native SDKs do not run the screen.
Momenta, masses and units in the loop integrals
External invariants. Every arithmetic takes each external leg’s invariant \(p^2\) in the loop integrals to be the leg’s squared mass at the evaluation’s model parameters, exactly, rather than the \(p^2\) of the supplied momenta; everything else (trees, wavefunctions, loop-momentum shifts, invariants of several legs) uses the momenta as given. Momenta rounded to binary64 sit off their shells by about \(10^{-16}\) relative, so a point copied from a binary64 evaluation gives the same finite part and poles in double-double and arbitrary precision, to the accuracy of the binary64 value; double-double and arbitrary precision agree with each other to double-double accuracy. A point off its shells by a relative \(\delta\) moves the result at order \(\delta\).
Light masses in binary64. The fast binary64 reduction compares squared masses and invariants with an absolute constant, \(10^{-9}\) in the model’s units. A double evaluation never applies these: a loop whose squared masses or invariants at a point fall in that window (a keV-scale internal mass in GeV, the electron mass in TeV) is reduced by the exact generic binary64 engine instead, so the comparisons do not depend on the units; only the cost of those loops changes. The generic engine uses Symbolica in the native code, under pyAmpliCol’s package key. The artifact’s generation filters list the masses this light at the generation parameters (binary64_exact_engine); a parameter override is checked again at evaluation. Binary64 itself limits light loops far below the other scales: a box with three or four light lines can lose several digits, and one beside a massive leg can fail with a non-finite master integral. Such a loop is as accurate as binary64’s master integrals at its arguments, and the rotation and reduction-direction checks reuse those masters, so they do not see that error (u u~ > t t~ with a \(10^{-6}\) GeV top: \(2.5 \times 10^{-6}\) off with estimates of \(4 \times 10^{-15}\)); only the rescaled check, which recomputes the masters, does.
Units and the beam axis in binary64. The fast engine has no absolute constant tied to the beam axis or to the units: its light-like spinors are formed from the larger light-cone component, with no window around the \(z\) axis (NinjaRS issue 10). With every momentum and dimensionful parameter scaled from GeV by factors from \(10^{-6}\) to \(3 \times 10^{7}\) (g g > t t~, u u~ > d d~ g, beams along \(z\) or rotated off it), a binary64 virtual keeps its value and its estimate, and a final-state leg between \(10^{-8}\) and \(10^{-3}\) rad from the \(z\) axis loses no accuracy (the rotation and reduction-direction checks agree to about \(2 \times 10^{-14}\)). Light internal masses are the exception above.
Rank beyond N+2 (TIR-only artifacts)
Open, untested for correctness. NinjaRS reduces loop numerators of rank at most \(N+2\) over \(N\) propagators; TIRust has no such limit (its own capability query decides). A family beyond \(N+2\), which effective operators produce (in Feynman gauge each insertion of a dimension-five or -six operator with both loop legs raises the rank by at most one, so it takes three such insertions, e.g. g g > x0 x0 x0 in HC_NLO_X0), is generated when TIRust reduces it, and the artifact is then TIR-only: it records reductions = ["tirust"], "auto" takes TIRust for both process types in every arithmetic and on every rescue level (the reason says so), and an explicit "ninjars" (also as the cross-backend check or a rescue level’s backend) is refused typed (ReductionUnavailable), as is a generation default loop.reduction = "ninjars"; a native extension without TIRust refuses the artifact. Such results carry no correctness claim: the rational terms (R2) and counterterms of rank \(> N+2\) numerators would need dimension-eight operators that no model provides, so the values are neither validated against a reference nor gauge invariant in general. The feature only runs (tools/loop_v2_eft_execution.py: the two backends agree on the families NinjaRS reduces). Artifacts whose families stay within \(N+2\) are unaffected.
What a loop artifact stores
A loop artifact stores its whole program: the loop plan and its per-point tree, Born, counterterm and parameter programs (point_inputs = "native-v2"), the latter as SymJIT IR recompiled for the loading CPU and as saved Symbolica states for double-double and arbitrary precision, with the companion of the certified-scaleless families that the "uv" and "ir" pole selections evaluate, and the color- and spin-correlated and helicity-resolved columns. No call of a loaded process regenerates anything: every pole selection, stability check, arithmetic, model-parameter change, per-order partial, exact flavor member, correlated, resolved and catalogue call reads the stored programs, and a load takes a small fraction of the generation time. A process whose programs cannot be stored natively is refused at generation with the reason.
- The SymJIT IR of the kernels is compiled at -O2, whatever
evaluator.jit.optimization_levelsays (a program whose -O2 code fails the generation’s plane check is kept at level 0: a SymJIT SIMD defect), and that of the parameter program at level 0. - The artifact holds no absolute path, user or host name of the generating host. A copy moved to another directory, user or machine loads without regeneration and, with the same pyAmpliCol build, gives bitwise-identical binary64 results on CPUs of the same SymJIT class (x86-64 with AVX and FMA3; AArch64 expected to behave the same, untested); other CPU levels (checked under emulation) run the saved states and agree to rounding.
- Binary64 evaluation needs no Symbolica license, at any model parameters, pole selection and scale, except for loops routed to the exact engine at light masses (pyAmpliCol’s own Symbolica key); double-double and arbitrary precision, and generation, use pyAmpliCol’s own key as well (Symbolica and licensing).
- The native SDKs (C, C++, Fortran, Rust) open a loop artifact through
rusticol_virtual_openand evaluate binary64 virtuals bitwise equal to the Python API: the same pole selections (rusticol_virtual_set_poles;"none"skips the pole-only work natively, the pole entries quiet NaNs), model-parameter rules and messages, arithmetic (rusticol_virtual_set_arithmetic, equalDecimalvalues as decimal literals throughrusticol_virtual_result_decimal_json), resolved and correlated calls (bitwise equal toevaluate_resolvedandevaluate_correlated_manyin binary64) and stability checks (rusticol_virtual_set_stability_checks(handle, rotation_count, rotations, reduction_direction, rescaled, cross_backend), the estimate in the result’s"stability"diagnostics). A loop artifact carries no API bundle (a requestedemit_api_bundleis dropped with a recorded configuration adjustment).
Where the user-facing rules live
| Subject | User page |
|---|---|
| Which control to use, defaults, costs | Numerical stability |
| Runtime-option keys and their flags and setters | Run card |
| Native setters and records | C, C++, Fortran and Rust |
| Every refusal key | Refusals and errors |