Unverified 2026

Sharp BLO-based adaptive spike clipping

Implementation & benchmark of arXiv:2608.10892 — Sharp constants in the one-sided John-Nirenberg inequality for functions of bounded lower oscillation

Usefulness5/10
Difficulty3/10
Novelty7/10

Source paper: Sharp constants in the one-sided John-Nirenberg inequality for functions of bounded lower oscillation arXiv:2608.10892 ⓘ · analyzed Sep 1, 2026

AI-generated research hypothesis, automatically tested. Not peer-reviewed.

Idea description

Use the sharp exponential tail bound to set a local clipping threshold from a desired exceedance probability. Instead of globally clipping activations at a fixed value or percentile, clip each local window at its minimum plus B log(e/delta), where delta is the tolerated fraction of clipped entries.

Formulas

$$\frac{1}{|I|}\left|\left\{x\in I:f(x)-\operatorname*{ess\,inf}_{I}f>\lambda\right\}\right|\leq e\exp\left(-\frac{\lambda}{B}\right),\qquad B=\|f\|_{\mathrm{BLO}(I_0)}.$$
$$\lambda_\delta=B\log\frac{e}{\delta},\qquad e\exp\left(-\frac{\lambda_\delta}{B}\right)=\delta.$$
$$m_W=\min_{t\in W}z_t,\qquad B_W=\frac{1}{|W|}\sum_{t\in W}z_t-m_W,\qquad z'_t=\min\left(z_t,\,m_W+B_W\log\frac{e}{\delta}\right).$$

Mathematical statement

Let B = ||f||_{BLO(I0)}, and define the local excess u(x) = f(x) - ess inf_I f on an interval I. The paper's sharp inequality gives Pr_I[u > lambda] <= e exp(-lambda/B). Solving this inequality for a target exceedance probability delta in (0,1) yields lambda_delta = B log(e/delta). In a tensor window W, estimate the essential infimum by the exact minimum m_W = min_{t in W} z_t and estimate B by B_W = mean(z_W) - m_W. The adapted clipping rule is z'_t = min(z_t, m_W + B_W log(e/delta)). The theorem assumes a true BLO bound, so its tensor application is a calibrated heuristic; the testable prediction is that the empirical clipped fraction is near or below delta after conservative calibration.

Implementation notes

(1) Insert the operation immediately before attention softmax, before an activation quantizer, or before a tensor is written to a KV cache. Use non-overlapping or half-overlapping windows over the sequence dimension. For attention logits, compute one threshold per query row and head; for hidden states, compute one threshold per channel and token window. (2) Pseudocode: z = logits_or_activation; m = amin(z, dim=window); B = mean(z, dim=window) - m; B = maximum(B, eps); threshold = m + B * log(e / delta); z_clip = minimum(z, threshold). Initially apply stop-gradient to m and B so the model cannot reduce the penalty by manipulating its threshold. At inference, maintain an exponential moving average B_ema = beta * B_ema + (1-beta) * B and use B_ema. (3) The paper determines the factor log(e/delta); the window choice, tensor-wise B estimate, and any safety multiplier c are empirical. On a held-out calibration set, choose the smallest c >= 1 for which the observed clipped fraction is at most delta, then evaluate on a separate test set. (4) First experiment: run a pretrained small Transformer on WikiText-2 or C4 with attention-logit clipping at delta = 1e-2 and 1e-3, comparing fixed-value clipping and percentile clipping. Measure attention entropy, FP16/FP8 overflow or underflow, perplexity, and latency. Success is fewer saturated or numerically invalid rows and improved reduced-precision stability at unchanged or nearly unchanged perplexity. For KV-cache activations, also measure dynamic range and INT8 quantization error at the same bit width.

Verification

This idea has not been verified yet.

Verification happens in two stages: Stage 1 — a mechanism check on a toy system confirms the claimed mathematical phenomenon reproduces; Stage 2 — a benchmark implements the idea on a real (small) neural network task and compares it against a tuned baseline over 8 paired seeds with a permutation test.

Artifacts

Artifacts unavailable.