Where Shift Variance Lives After Anti-Aliasing: Separating Aliasing from Border Effects

Image classifiers and detectors can change their answer when the input moves by a single pixel. The standard fix is anti-aliased downsampling: blur feature maps before shrinking them so that high frequencies cannot fold back into the coarse grid. This is the sampling-theorem argument, and it works well. Learnable polyphase selection now reports 100% consistency under shifts. That figure, however, is measured with circular shifts, where the image wraps around like a torus. Real translations are linear: content enters at one edge and leaves at the other, and zero-padding at the borders gives the network a built-in sense of absolute position. Because each layer's receptive field (the input region a unit can "see") keeps growing, border information gradually reaches the image interior. We argue that once aliasing is fixed, most of the remaining shift variance comes from these borders, and that blur-based anti-aliasing makes the border problem worse by smearing padded zeros inward.

The proposal has two parts. The first is a measurement protocol. It splits any model's sensitivity to linear shifts into an aliasing part and a border part, using an "oracle" input that surrounds the crop with real image pixels instead of padding. The second is a cheap downsampling layer that blurs and subsamples while tracking which pixels are real. Its low-pass filters renormalize over valid pixels only, and its polyphase choice ignores the border band. If the decomposition shows the border part dominates, as we expect, then the next gains in translation robustness will come from boundary handling, not from sharper anti-aliasing filters.

Core Claim

For networks that are already anti-aliased (BlurPool, post-filter, polyphase selection, FFT de-aliasing), we make three predictions about linear-shift inconsistency. First, it is dominated by a border component, not an aliasing component. Second, this component is confined to a "border corridor" whose width tracks the effective receptive field. Third, the corridor is wider for blur-based anti-aliasing than for the unfiltered baseline, because the low-pass kernel convolves padding zeros into the interior at every downsampling stage.

The first and third predictions are new claims about existing models. The method follows from them: a mask-aware anti-aliased downsampler that narrows the corridor without the roughly 15% runtime cost of full convolution.

Research Program

Diagnosis. We compare three versions of the same shift.

  1. Circular. The shift wraps around, so there is no border; this is the setting where polyphase methods are exact.
  2. Linear with padding. The ordinary real-world case.
  3. Context oracle. Each crop is cut from a larger image, and the network is fed real neighbouring pixels in place of padding. Outputs are then cropped back to the nominal window, so no artificial border exists in the computation.

Let $C_{\text{lin}}$ and $C_{\text{ctx}}$ denote prediction consistency under the second and third conditions. We attribute the leftover inconsistency of the oracle to aliasing:

$$1 - C_{\text{lin}} = \underbrace{(1 - C_{\text{ctx}})}_{\text{aliasing}} + \underbrace{(C_{\text{ctx}} - C_{\text{lin}})}_{\text{border}}.$$

The decomposition is exact by construction. The only modelling assumption is that a network given real context behaves as it would on an infinite image. For dense tasks we also plot per-pixel consistency against distance from the image edge. The distance at which consistency reaches the oracle level defines the corridor width. We compare that width with the theoretical and effective receptive field of each stage, and with blur kernel support multiplied by cumulative stride.

Motivating and constraining work. The border side is motivated by two papers. On Translation Invariance in CNNs shows that zero-padding plus a large receptive field lets convolutional networks encode absolute location; even a 1-layer network classifies corner position with 100% accuracy. Mind the Pad shows that padding artifacts propagate inward and create detector "blind spots."

Neither paper measures how this interacts with anti-aliased downsampling. That interaction is our question. The aliasing side builds on Making Convolutional Networks Shift-Invariant Again (fixed blur before subsampling) and Learnable Polyphase Sampling (learned selection among subsampling grids, exact only for circular shifts). Both supply the models we diagnose.

How Convolutional Neural Networks Deal with Aliasing constrains our interpretation. It finds that networks partly undo aliasing using channel redundancy. We therefore report the decomposition at two widths, to check that the aliasing component is not underestimated in wide models.

Method. The mask-aware anti-aliased downsampler carries a binary validity map: 1 on real pixels, 0 on padding. The map is propagated through each layer, in the spirit of normalized convolution. At each downsampling step, the low-pass filter is applied to both the features and the mask, and the filtered features are divided by the filtered mask. Padding zeros therefore never enter the average. For polyphase selection, the norm that picks the subsampling grid is computed only over units whose receptive field lies inside the valid region. The method adds no learned parameters beyond the base polyphase variant, and only elementwise operations beyond a standard blur.

Baselines

Plain backbone. The naive reference is the unmodified backbone with zero-padding: ResNet-50 for ImageNet, UPerNet-R50 for segmentation, and RetinaNet and Faster R-CNN for COCO. All use the same training recipe. For COCO, Shift Equivariance in Object Detection reports ΔAP50 (the gap between best and worst AP across shifts) of 5.1 for RetinaNet and 6.4 for Faster R-CNN under a 1-pixel shift. We will reproduce these numbers first, to validate our evaluation code.

Strongest aliasing-side competitors. These are polyphase selection and post-filter anti-aliasing.

Strongest border-side competitors. - Mirror padding, from Mind the Pad, which raises BSTLD AP50 from 49.58% to 57%. - Full convolution, from On Translation Invariance in CNNs, which is about 15% slower on ResNet-50.

Each will be combined with BlurPool and with polyphase selection.

Fair comparison. All models are trained from the same initialization, schedule, augmentation and tuning budget. Polyphase temperature is tuned on the same validation split for every polyphase variant. The context oracle serves as an upper bound on what any boundary fix can achieve.

What counts as beating them. The proposed downsampler must close a clearly larger share of the oracle gap $C_{\text{ctx}} - C_{\text{lin}}$ than the best "mirror padding plus anti-aliasing" combination. It must do so without losing accuracy and at lower runtime than full convolution.

Ablations. Two ablations isolate the key ingredient. The first applies mask renormalization in the blur only, without interior-weighted polyphase selection. The second applies the reverse.

Why not just…?

Why not just combine mirror padding with BlurPool? This is the serious threat. Mirror padding replaces artificial zeros with reflected content, which may already prevent the blur from smearing a sharp border inward. However, reflected content is not real context: a reflection seam is still a structured signal that moves with the crop. Whether the network exploits that seam is an empirical question. The decomposition answers it directly by asking how much of the oracle gap each combination closes.

If mirror padding plus BlurPool matches the mask-aware downsampler, we will report that outcome. The contribution then becomes the diagnostic result itself: border effects, not aliasing, are the remaining problem, and a two-line fix addresses them. That remains a useful correction to how the field reports "100% consistency."

Why not just train with random-shift augmentation? Impact of Aliasing on Generalization argues that augmentation cannot overcome structural limits on low-pass filtering. Shift Equivariance in Object Detection finds that augmented detectors still have ΔAP50 between 5.1 and 8.1. Augmentation could plausibly teach a network to ignore borders more effectively than it teaches anti-aliasing, so we include a shift-augmented baseline and decompose it like every other model.

Why not just evaluate only the interior, or use test-time shift averaging? Interior-only scoring hides the corridor rather than removing it, and detection of objects near edges matters; the blind spots in Mind the Pad are exactly such cases. Test-time averaging multiplies inference cost and, per Shift Equivariance in Object Detection, does not make the model equivariant. We report the corridor curve so that readers can see what interior-only scoring would conceal.

Proposed Experiments

ImageNet. We train ResNet-18 and ResNet-50 variants and report three things. The first is top-1 accuracy. The second is consistency under circular shifts, linear shifts and the context oracle, for shifts of 1 to 32 pixels. The third is the resulting aliasing and border split.

Dense prediction. On Cityscapes and PASCAL VOC, we report mIoU, shift consistency and the corridor curve. On COCO, we report ΔAP50 under 1-pixel and 15-pixel shift ranges. Shift Equivariance in Object Detection reports a 21.5-point AP swing for RetinaNet across 15 pixels and roughly 30% variance reduction from BlurPool. BSTLD tests whether a narrower corridor translates into fewer missed small objects near image edges.

Decisive checks. 1. For anti-aliased models, the border share of $1 - C_{\text{lin}}$ should exceed the aliasing share. 2. The corridor should be measurably wider under BlurPool than under the plain baseline. 3. Corridor width should scale with effective receptive field across stages and backbone depths. 4. The mask-aware downsampler should recover most of the oracle gap at under full convolution's runtime.

If the first check fails, meaning aliasing still dominates under linear shifts, the claim is wrong. In that case, effort should return to better filters such as those of Delving Deeper into Anti-aliasing in ConvNets.