Fractional Nonlocal-Gradient Residual Block
Implementation & benchmark of arXiv:2607.25621 — A Lusin theorem for nonlocal gradients
Source paper: A Lusin theorem for nonlocal gradients arXiv:2607.25621 ⓘ · analyzed Aug 31, 2026
AI-generated research hypothesis, automatically tested. Not peer-reviewed.
Idea description
Augment a local convolutional block with a fractional nonlocal-gradient branch that aggregates directional feature differences over multiple spatial scales. The residual branch gives each location access to long-range variation while preserving the property that constant feature fields produce zero response. A learnable residual gate allows the network to suppress the branch if nonlocal interactions are unhelpful.
Formulas
Mathematical statement
The paper defines the Riesz fractional gradient for s in (0,1) and u in C_c^infty(R^n) by D^s u(x) = c_{n,s} integral over R^n of ((u(y)-u(x))/|y-x|) times ((y-x)/|y-x|^{n-1+s}) dy. Here x and y are spatial coordinates, u is a scalar or channel-wise feature field, s is the fractional order, and c_{n,s} is a normalization constant. Combining the two powers of |y-x| gives the equivalent kernel c_{n,s}(y-x)/|y-x|^{n+s}. For a discrete feature map on a grid, approximate the integral using offsets r in a finite set Delta: G_s[u]_i = sum over r in Delta of w_r (u_{i+r}-u_i) r/(|r|^{n+s}+epsilon). The difference term makes constant fields vanish, while the power-law denominator supplies long-range interactions. In two dimensions, r is a two-dimensional offset and the result has horizontal and vertical components for every feature channel.
Implementation notes
(1) Integration point: insert the branch in a ResNet or ConvNeXt block immediately after the first pointwise projection and before the local spatial convolution. For input x with shape B by C by H by W, compute u = activation(Conv1x1(x)); the nonlocal branch operates on u and returns C output channels. (2) Pseudocode: choose fractional order s, radius R, and offset set Delta = {r in Z^2: 0 < max(|r_1|,|r_2|) <= R}. For each r, shift u by r using reflection padding, compute d_r = shift(u,r) - u, compute q_r = w_r * d_r * r/(||r||_2^(2+s)+epsilon), and sum q_r over offsets. Concatenate the horizontal and vertical components, apply a 1x1 output projection W_o, and return z = x + alpha times the projected tensor. Initialize alpha to zero or 0.01. (3) The paper determines the fractional power-law kernel; the finite radius, padding, quadrature weights, and projections are engineering choices. Start with w_r = 1 and normalize weights so the total kernel norm is one. Optionally parameterize s = sigmoid(s_0), clipped to [0.1,0.95], and learn it. (4) First experiment: compare a baseline ResNet-18 with the modified model on CIFAR-100 and on a small boundary-sensitive segmentation benchmark such as Cityscapes crops. Match parameter count and FLOPs using 1x1 projections. Test R = 2 and R = 4 and s = 0.5, 0.75, and 0.9. Record validation accuracy or mean IoU, boundary F-score, throughput, activation memory, and gradient-norm variance. The hypothesis is improved boundary F-score or accuracy at matched compute, especially for thin structures and textures; failure is no improvement over a local convolution after tuning alpha and normalization.
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.