When a neural network halves the resolution of its feature maps, it averages or max-selects each small window of pixels. A target only a few pixels wide, such as a distant swimmer or a dim infrared aircraft, can vanish in that step. Average pooling blends it into the background. Max pooling keeps it only if it happens to be the brightest thing in the window, and a bright wave crest usually wins. We propose replacing the pooling step with the exact solution of a tiny optimization problem. Each window is split into a smooth part, which goes to the coarse grid, and a sparse part, which holds the few pixels that deviate sharply from their surroundings. Both quantities have closed-form solutions: a robust average for the smooth part and soft-thresholding for the sparse part. The sparse part is then carried explicitly to the next scale instead of being thrown away.
Put simply, the pooling layer asks which pixels in this window are outliers relative to the window's typical value, keeps those separately, and averages the rest. This turns a classical prior from infrared detection, "target is sparse, background is smooth", into a drop-in downsampling layer with two learnable numbers per channel. It differs from the usual move of treating it as a separate unrolled network. The opportunity is that existing work applies the "activations are proximal steps" view only to activation functions and leaves downsampling heuristic. Yet downsampling is exactly where tiny targets are lost.
Core Claim
Let $x$ be one channel of a feature map, $z$ its half-resolution version, $U$ nearest-neighbour upsampling, and $s$ a full-resolution sparse residual. We define the pooling output through
$$ (z^\star, s^\star) = \arg\min_{z,s} \tfrac12 \| x - Uz - s \|_2^2 + \lambda \| s \|_1 , $$
where $\lambda > 0$ is a learned per-channel threshold. Alternating minimization has exact closed-form steps. The $z$-step is window averaging of $x - s$. The $s$-step is soft-thresholding of $x - Uz$, which is the proximal operator of the $\ell_1$ norm. The fixed point is a Huber-type robust mean for each window together with its outliers. We run $K \in \{1,2,3\}$ alternations and emit $z^\star + \gamma \, P(s^\star)$. Here $P$ keeps the largest-magnitude residual in each window with its sign, and $\gamma$ is a learned per-channel gain.
The claim is that this layer preserves small, locally contrasting structures through the downsampling hierarchy better than magnitude-based pooling, while passing less background noise than carrying all high-frequency detail. Its gains should therefore concentrate on targets under roughly 20 pixels and on high-clutter images. We do not expect broad gains on large-object or generic classification benchmarks.
Relation to Prior Work
Three papers motivate the method. A mathematical explanation of UNet shows that ReLU is an exact projection step and that skip connections act as multigrid relaxation inside an operator-splitting reading of U-Net. It leaves grid restriction, meaning downsampling, as a fixed numerical operation; we make restriction itself a proximal step. RPCANet unrolls a low-rank-plus-sparse decomposition for infrared small targets. It replaces both proximal operators with convolutional sub-networks, works at a single scale, and degrades beyond about six stages. We use the exact soft-threshold, apply the decomposition locally at every resolution change, and need only one to three cheap iterations per layer, which sidesteps deep unrolling. Deep Layers as Stochastic Solvers and Deep Component Analysis via Alternating Direction Neural Networks supply the general justification for computing a layer as a few solver iterations with exact proximal steps.
Two papers constrain the method. From ReLU to GeMU finds that richer proximal activations give only marginal ImageNet gains (75.06% vs 74.99% on DeiT-tiny). We therefore do not frame this as a general activation upgrade, and we predict and test size-stratified gains instead. The same paper flags that operators coupling coordinates can interact badly with standard optimizers. Our operator is per-channel and acts within a local window, with two scalar parameters per channel, so Adam and SGD apply unchanged.
The downsampling literature supplies the competitors. LIP learns a convolutional importance map and softmax-weights each window. It needs normalization tricks to avoid collapse. SoftPool weights by exponentiated activation. Both score importance by magnitude, so a uniformly bright background dominates. Our residual is zero on uniform regions regardless of brightness and nonzero only on local outliers. DPNet instead picks an image-level downsampling factor. That choice is orthogonal to ours and could be combined with it, so we do not compete with it directly.
Research Program
We first characterize the operator in isolation. We plant dim blobs of 1×1 to 4×4 pixels at controlled contrast on textured backgrounds, cropped from TinyPerson sea scenes and NUDT-SIRST clouds. We then measure the signal-to-clutter ratio of the blob location after one, two, and three downsampling stages under each pooling rule. This tells us whether the mechanism works before any training confounds it. We also analyze the gradient: the soft-threshold passes gradient only through active residual pixels, and we check that learned $\lambda$ does not drift to zero (no shrinkage) or to infinity (pure robust averaging).
We then substitute the layer for every stride or pooling step in two settings. The first is a U-Net-style infrared small-target segmenter trained on NUDT-SIRST, MDvsFA, SIRST-Aug, and IRSTD-1K. The second is a Faster R-CNN with a ResNet-50 backbone, evaluated on MS COCO small objects and on TinyPerson. For TinyPerson we start from COCO pretraining with Monotone Scale Match, so that our contribution stacks on the input-rescaling fix rather than replacing it.
Baselines
The naive reference point is the unchanged network with strided convolution or max pooling. It is trained with identical schedules, augmentation, and seeds (three each), so every method gets the same data and tuning budget.
For downsampling, the strongest existing method is LIP. Its reported Faster R-CNN small-object result on COCO is $AP_s$ = 24.0% against a 21.9% baseline (LIP). We rerun LIP in our own pipeline with its bottleneck logit module. Beating it means matching or exceeding its $AP_s$ with far fewer added parameters, and exceeding it on TinyPerson and infrared clutter subsets. SoftPool is run as the parameter-free magnitude-weighted competitor.
For infrared segmentation, the strongest reported numbers are AEDNet's: IoU 82.77% and $P_D$ 80.70% at $F_A$ 4.69×10⁻⁶ on NUDT-SIRST, and IoU 90.10% on MDvsFA (AEDNet). For RPCANet we have SIRST-Aug mIoU 72.54% and F1 84.08% (RPCANet). No reported result was found on Lacuna for RPCANet on NUDT-SIRST or IRSTD-1K, nor for DPNet's absolute $AP_{tiny}$ on TinyPerson. On TinyPerson the reference is Monotone Scale Match at $AP_{50}$ = 47.29% (Scale Match for Tiny Person Detection).
We do not claim to beat AEDNet's full architecture with a pooling swap. The fair test inserts our layer into AEDNet's own downsampling path and also into a plain U-Net, and reports the change. Success means a gain in $P_D$ at equal or lower $F_A$.
Three ablations isolate the key ingredient. Setting $\lambda = 0$ carries the entire window residual forward, a Laplacian-pyramid-style pooling with no shrinkage. Setting $\gamma = 0$ keeps only the robust mean. A fixed rather than learned $\lambda$ tests whether learning the threshold matters. If $\lambda = 0$ performs as well as learned $\lambda$, the proximal shrinkage is not doing the work and the claim fails.
Why not just…?
Why not just concatenate average and max pooling? This is the most serious threat, because max pooling already carries peaks. The difference is that max pooling passes the brightest pixel whether or not it stands out from its window, so bright clutter passes too. Our residual is zero on any uniform region. We run avg+max concatenation followed by a 1×1 projection, which gives it more parameters than our method. If it matches us on the high-clutter subsets of NUDT-SIRST (clouds, bright spots) and on TinyPerson sea scenes, we would conclude that the variational framing adds nothing.
Why not just use LIP or SoftPool? Both score importance by learned or raw magnitude. The SoftPool limitation noted in the research file is that strong background activations receive high exponential weight. LIP needs extra normalization to avoid collapse. Our synthetic blob-survival test and the clutter-stratified detection results compare them directly. If LIP matches us there, our remaining advantage is only parameter count and stability, and we will say so.
Why not just upscale the input or remove strides? DPNet documents that brute-force enlargement inflates GFLOPs and multiplies background negatives. We include a 2× input-upscaling baseline and report accuracy against GFLOPs. Our layer adds only element-wise operations, so it should sit on a better accuracy–compute curve. If upscaling wins at matched compute, the method is not worth adopting.
Why not just a hand-crafted local-contrast map as an extra input channel? That would inject the prior once, at full resolution. Our claim is that the prior must be re-applied at every downsampling step. The test feeds a top-hat local-contrast map as an extra input channel to the baseline network and compares the result.
Decisive Checks
The method is supported only if three things hold. First, on the synthetic test, blobs survive three downsampling stages at higher signal-to-clutter than under avg, max, avg+max, SoftPool, and LIP. Second, COCO and TinyPerson gains, stratified by object size, are concentrated in the smallest bins and roughly absent for large objects. Third, learned $\lambda$ beats $\lambda = 0$ on high-clutter infrared subsets, at matched or lower false-alarm rate, across three seeds. A uniform small gain across all sizes, or no difference from avg+max pooling, would count as a negative result and be reported as one.
References
- A mathematical explanation of UNet
- RPCANet: Deep Unfolding RPCA Based Infrared Small Target Detection
- Deep Layers as Stochastic Solvers
- Deep Component Analysis via Alternating Direction Neural Networks
- From ReLU to GeMU: Activation functions in the lens of cone projection
- LIP: Local Importance-Based Pooling
- Refining activation downsampling with SoftPool
- DPNet: Dynamic Pooling Network for Tiny Object Detection
- AEDNet: Anisotropic Enhanced Dual-Branch Network for Infrared Small Target Detection
- Scale Match for Tiny Person Detection