Some images have no left or right edge. A 360° panorama, a spinning-LiDAR range map, or a vessel scan unrolled into polar coordinates all have a horizontal axis that is an angle, so the leftmost and rightmost columns are physical neighbors. Standard convolutional networks pad those borders with zeros. That invents a wall, and it splits any object that crosses the seam into two fragments at opposite ends of the tensor. Circular padding fixes this by filling each border with values wrapped from the opposite side.
We propose that this small change matters most for interpretable-by-design models, specifically prototype networks that classify by saying "this patch looks like that training patch." Such a network makes its decision from a single best-matching contiguous patch, so it is more fragile to seam splitting than a black box that pools evidence globally. It also tends to turn the artificial border itself into a "prototype." With circular padding, the network's predictions are exactly unchanged when the panorama is rotated horizontally, and its explanations move exactly with the rotation. That turns a geometric fix into a built-in, checkable faithfulness property.
The two-sentence version is this. On periodic images, the accuracy and explanation quality that prototype networks lose comes partly from zero-padded borders rather than from interpretability itself. Wrapping the borders should remove the loss, eliminate "border prototypes," and give a free test of whether an explanation tracks the object.
Core Claim
Our hypothesis is that on panoramic and polar data, the gap between prototype networks and black boxes has a large boundary-induced component, and that this component is larger for prototype networks than for black boxes. Circular padding throughout the backbone removes it, with no added parameters. Deformable prototypes additionally need part offsets taken modulo the image width.
The mechanism comes from This Looks Like That, which introduced ProtoPNet. ProtoPNet scores each learned prototype $p_m$ by its best match over all spatial positions $z_j$ of the backbone feature map, and then combines these scores with a transparent linear layer. Let $R_k$ shift an image's columns cyclically by $k$ pixels, and let $s$ be the backbone's total horizontal stride. A fully circular backbone $g$ satisfies
$$g(R_k x) = R_{k/s}\, g(x) \quad \text{whenever } s \text{ divides } k,$$
because every convolution and pooling step commutes with a cyclic shift. The max over positions then makes each prototype score $s_m(R_k x) = s_m(x)$ exactly invariant. The prototype's activation map is exactly equivariant: it moves by $k/s$ columns. A zero-padded backbone has neither property. For shifts that are not multiples of $s$, aliasing from striding breaks exactness, so we report both stride-aligned shifts and arbitrary shifts, the latter with anti-aliased downsampling.
As far as the research file shows, nobody has put circular padding into prototype networks or concept bottlenecks. The file's own review of the literature states this explicitly. The closest work sits on either side of the gap:
- Padding Aware Neurons motivates the proposal. It found that 1.5–3% of filters in standard CNNs fire specifically on zero-padded borders (81 in ResNet-50). It also found that switching to reflect padding moves prediction odds by more than 7% for over 100 ImageNet classes. That study covered only planar black-box classifiers and never tested circular padding.
- Geo-UNet supplies evidence that wrap-padding plus an interpretable geometric output (a per-angle radial contour) works in polar ultrasound. It is a segmentation model, not case-based reasoning.
- PanoSwin makes a vision transformer seamless on panoramas by wrapping attention windows across the seam, but remains a black box.
Research Program
We will build circular variants of ProtoPNet and of Deformable ProtoPNet. Deformable ProtoPNet extends ProtoPNet with prototypes made of movable parts whose offsets are predicted per input. The circular variants make three changes:
- Every horizontal padding in the ResNet backbone becomes circular.
- Deformable part offsets are computed modulo the feature-map width, so a part can sit across the seam.
- The "push" step, which snaps each prototype to its nearest real training patch, searches over wrapped positions. A prototype can therefore be visualized as a patch that crosses the seam, rendered by rolling the source image.
Vertical padding stays as in the original model. Poles and latitude distortion are explicitly out of scope; PanoSwin addresses those with pitch attention, and we treat them as a limitation rather than a claim.
The main benchmark is new and controlled: CUB-on-SUN360. It follows the background-swap design that Concept Bottleneck Models used to expose shortcut learning (CUB+Places). Here, segmented CUB-200-2011 birds are composited into SUN360 equirectangular panoramas at a controlled azimuth and an equatorial latitude. Because we know the azimuth, we can sweep birds across the seam. Because we know the bird mask, we can score whether prototype activations land on the bird.
We pair this with two existing sources. The first is SPH-CIFAR10 from PanoSwin, with test images randomly rotated in azimuth. The second is an object-classification task cut from the real annotated field-of-view boxes in 360-Indoor, where each sample is a full panorama labeled by a target box's category. The proprietary intravascular-ultrasound data from Geo-UNet is not available to us, so polar medical imaging remains a stated future target.
Baselines
Naive reference. The do-nothing reference is ProtoPNet and Deformable ProtoPNet with standard zero padding, trained on the same panoramas. This is exactly what a practitioner would do today. On planar CUB, Deformable ProtoPNet reports 87.8% accuracy (Deformable ProtoPNet) and ensembled ProtoPNet reports 84.8% (This Looks Like That). Those figures are only a ceiling reference, since our composite task differs. There is no reported result on Lacuna for any prototype network on panoramic data.
Strongest black-box baseline. On SPH-CIFAR10 the strongest competitor is PanoSwin-T+, which reports 75.01% accuracy against 72.64% for vanilla Swin-T (PanoSwin). On 360-Indoor detection, PanoSwin reports 29.4 mAP. That metric is not directly comparable to our derived classification task, so we will retrain PanoSwin on our task. We also run a circular-padded ResNet black box with the same backbone as our prototype models, which isolates the cost of the prototype bottleneck itself.
Fairness and what counts as winning. All models share data splits, ImageNet initialization, an equal number of training epochs, and an equal hyperparameter-search budget of 20 configurations. Beating the naive reference means a flat accuracy-versus-azimuth curve and no border prototypes. Matching the black box means landing within one standard deviation over five seeds of the circular ResNet's accuracy. The ambitious target is matching PanoSwin-T+'s 75.01% on SPH-CIFAR10.
Ablations that isolate the ingredient. Reflect padding removes the artificial zeros but keeps the false wall, so it separates "removing the padding shortcut" from "restoring the correct topology." Circular backbone padding with flat (non-wrapped) deformable offsets isolates the offset change.
Why not just…?
Why not just train a zero-padded ProtoPNet with random horizontal roll augmentation? This is a real threat to the accuracy claim, though not to the guarantee. Augmentation teaches the network that birds can appear anywhere, but a test object sitting on the seam is still split at inference. The padding-aware filters that Padding Aware Neurons documents can still form, because the zero border is present in every training image regardless of rolling. The azimuth sweep settles this: if the augmented model's accuracy curve stays flat at the seam and its explanations stay roll-consistent, our accuracy claim collapses to the faithfulness guarantee alone, and we will report it that way.
Why not just average predictions over many rolls at test time? Roll ensembling makes predictions invariant, and it is the most serious simple alternative. It costs as many forward passes as there are rolls, much like the rotate-during-sampling approach in PanoDiffusion. It also destroys the single-case explanation: the output is an average over many "this looks like that" matches rather than one prototype at one location. We run it with 8 and 32 rolls and compare accuracy, cost, and whether its averaged activation maps still localize to the bird mask.
Why not just apply Grad-CAM to PanoSwin or a circular ResNet? The circular black box gets the topology right, but its heatmaps are produced after the fact and need not reflect what drove the decision, a concern raised in This Looks Like That. We test this directly. Grad-CAM gets the same bird-mask localization score as the prototype models, plus a deletion test: remove the highlighted region and measure how much the prediction drops.
Why not just cut the panorama into cubemap faces or perspective crops and run standard ProtoPNet? This replaces one seam with twelve cube edges, so objects are still split, only at face junctions. We include a cubemap ProtoPNet that takes the maximum score across faces, and we measure accuracy for birds placed on face edges.
Decisive Checks
The first check is the seam curve: top-1 accuracy as a function of bird azimuth on CUB-on-SUN360, five seeds each. The hypothesis predicts three things:
- The zero-padded prototype model shows a sharp dip near 0°/360°.
- That dip is deeper than the zero-padded black box's dip.
- The circular prototype model's curve is flat.
If the prototype dip is no deeper than the black box's, the claim that prototype networks are more fragile is wrong.
The second check is explanation equivariance. We measure the intersection-over-union between "the explanation of the rolled input" and "the rolled explanation of the original input." This should be exactly 1 for stride-aligned rolls with circular padding. We report how far each baseline falls short.
The third check counts border prototypes: the fraction of pushed prototypes whose source patch lies within one stride of a border, and the fraction whose activation falls outside the bird mask. We also count padding-aware filters using the same statistical test as Garcia-Gasulla et al., which compares activation distributions at borders and centers. We expect them to vanish horizontally under circular padding but not under reflect padding.
Finally, we run a background-swap test: train on birds paired with fixed panorama types, then test on swapped backgrounds, mirroring the CBM robustness protocol. This shows whether removing border cues also reduces background reliance or merely relocates it.
One finding cuts against us and we will address it directly. Padding Aware Neurons suggests the border can be a useful prior on planar photographs, because photographers frame subjects away from the edges. In 360° data no photographer frames the shot, so we expect that prior to be purely spurious. If removing it still costs accuracy in panoramas, the result itself tells us something about how panoramas are captured and is worth reporting.
References
- This Looks Like That: Deep Learning for Interpretable Image Recognition
- Padding Aware Neurons
- Geo-UNet: A Geometrically Constrained Neural Framework for Clinical-Grade Lumen Segmentation in Intravascular Ultrasound
- PanoSwin: a Pano-style Swin Transformer for Panorama Understanding
- Deformable ProtoPNet: An Interpretable Image Classifier Using Deformable Prototypes
- Concept Bottleneck Models
- 360-Indoor: Towards Learning Real-World Objects in 360deg Indoor Equirectangular Images
- PanoDiffusion: 360-degree Panorama Outpainting via Diffusion