Papers
Topics
Authors
Recent
Search
2000 character limit reached

MSPCaps: Multi-Scale Patchify Capsule Net

Updated 9 July 2026
  • The paper introduces a novel capsule architecture that integrates multi-scale feature extraction and uniform patchification to preserve spatial locality.
  • It employs cross-scale agreement routing (CAR) to selectively fuse fine and coarse capsule predictions, improving coherence and parameter efficiency.
  • Empirical results on MNIST, CIFAR-10, SVHN, and FashionMNIST demonstrate competitive accuracy gains over previous capsule designs with a favorable parameter tradeoff.

Multi-Scale Patchify Capsule Network (MSPCaps) is a capsule-based visual recognition architecture that combines multi-scale feature extraction, localized capsule formation, and cross-scale agreement-based routing to address two recurrent limitations of prior capsule networks: dependence on a single high-level feature map and shallow multi-scale fusion by addition or concatenation (Hu et al., 23 Aug 2025). The model is organized around three components—Multi-Scale ResNet Backbone (MSRB), Patchify Capsule Layer (PatchifyCaps), and Cross-Agreement Routing (CAR)—that together preserve fine-grained detail, retain global contextual information, and route only the most coherent part-to-whole predictions across scales. For 32×3232\times 32 inputs, the canonical pipeline extracts feature maps at 32×3232\times 32, 16×1616\times 16, and 8×88\times 8, converts them into localized primary capsules through uniform patchification, and fuses them in two non-iterative CAR stages before classification by class capsule norm (Hu et al., 23 Aug 2025).

1. Problem setting and design rationale

MSPCaps is motivated by a tension internal to the capsule-network program. Standard CapsNets form primary capsules directly from a single high-level feature map, often a global feature representation that dilutes spatial locality. In the formulation adopted by MSPCaps, this weakens the capsule objective of encoding parts through pose and activation so that higher-level capsules can be inferred from consistent votes. The paper further argues that downsampling in deep backbones reduces equivariance to local transformations, thereby compounding the loss of localized structure (Hu et al., 23 Aug 2025).

A second motivation concerns multi-scale fusion. Addition and concatenation combine features with different receptive fields and semantic levels without explicitly testing whether those features are mutually consistent. Under this view, fine-scale capsules may be dominated by local textures while coarse-scale capsules encode semantic context, and shallow fusion can therefore produce incoherent votes. MSPCaps is designed to resolve this by extracting multi-scale feature maps, patchifying each scale with a uniform patch size so that capsules remain localized and spatially aligned, and routing via cross-scale maximum agreement so that only the most coherent prediction pair per spatial region contributes to the final vote.

This design places MSPCaps within the broader line of capsule architectures that emphasize equivariant representation and part-whole hierarchy, but it departs from earlier single-scale or concatenation-based formulations by making cross-scale consistency a routing primitive rather than a post hoc fusion step. A plausible implication is that MSPCaps treats multi-scale structure not merely as added capacity, but as a constraint on which votes are permitted to survive.

2. Architectural organization

The end-to-end architecture has three stages: multi-scale feature extraction, per-scale capsule formation, and two-stage cross-scale routing (Hu et al., 23 Aug 2025). For a 32×3232\times 32 image, MSRB emits three feature maps f1,f2,f3f_1, f_2, f_3 at resolutions 32×3232\times 32, 16×1616\times 16, and 8×88\times 8. PatchifyCaps converts each feature map into a capsule set u1,u2,u3u_1, u_2, u_3. CAR then first fuses 32×3232\times 320 to produce an intermediate capsule set 32×3232\times 321, and subsequently fuses 32×3232\times 322 to produce class capsules. Prediction uses the class capsule norms.

Within MSRB, each stage begins with a downsampling 32×3232\times 323 convolution with stride 32×3232\times 324, followed by BatchNorm and ReLU, then 32×3232\times 325 identical 32×3232\times 326 convolutional modules with stride 32×3232\times 327 and residual connections. The backbone is explicitly asymmetric across resolution: shallower parametrization at high resolution is intended to preserve localized primitives and reduce overfitting to textures, while deeper parametrization at lower resolution is intended to enrich global semantics. The paper also states that sharing early residual blocks across scales regularizes learning by exposing shared kernels to gradients from both fine and coarse outputs.

Two named instantiations are provided.

Variant Core configuration Total parameters
MSPCaps-T 32×3232\times 328, 32×3232\times 329, 16×1616\times 160, 16×1616\times 161, 16×1616\times 162, patch size 16×1616\times 163, CAR with weight sharing 16×1616\times 164
MSPCaps-L 16×1616\times 165, 16×1616\times 166, 16×1616\times 167, 16×1616\times 168, 16×1616\times 169, patch size 8×88\times 80 as global choice, CAR without weight sharing 8×88\times 81

Fusion is not performed inside MSRB. BatchNorm and ReLU operate within residual blocks, while capsule formation applies LayerNorm after patchification and positional embedding. The architecture therefore separates feature extraction from cross-scale reconciliation: MSRB produces scale-specific representations, and CAR performs the actual multi-scale fusion.

3. PatchifyCaps and localized capsule formation

PatchifyCaps enforces a strict “one-patch, one-capsule” mapping (Hu et al., 23 Aug 2025). Each feature map 8×88\times 82 is partitioned into non-overlapping 8×88\times 83 patches by AvgPool2d with kernel 8×88\times 84 and stride 8×88\times 85. A 8×88\times 86 convolution then projects channels to capsule dimension 8×88\times 87. The resulting grid is flattened into 8×88\times 88 capsules,

8×88\times 89

Positional embeddings 32×3232\times 320 are added to preserve spatial identity, and LayerNorm normalizes the capsule vectors.

The paper attributes three roles to this operation. First, it preserves locality by tying each primary capsule to a bounded spatial patch rather than to a globally mixed feature tensor. Second, because the patch size is uniform in feature space across scales, it induces spatial correspondence between fine and coarse capsule grids. Third, it is computationally efficient relative to conventional primary-capsule constructions: AvgPool2d plus 32×3232\times 321 projection replaces parallel convolutions, and with 32×3232\times 322 the model yields 32×3232\times 323 capsules instead of 32×3232\times 324 in the cited earlier capsule formulation.

Capsule pose is represented as a vector of dimension 32×3232\times 325, not a matrix, and activation is implicit in the vector norm. The output nonlinearity is the standard squash function,

32×3232\times 326

where 32×3232\times 327 is the pre-activation vote sum and 32×3232\times 328 is the output capsule. This preserves the usual capsule interpretation in which vector orientation carries pose information while vector magnitude encodes activation strength.

A common misconception is to treat patchification here as generic tokenization analogous to transformer patch embeddings. In MSPCaps, patchification is not merely a preprocessing convenience; it is the mechanism that makes cross-scale spatial grouping deterministic and thereby enables the subsequent agreement calculation in CAR.

4. Cross-Agreement Routing

CAR is the central routing mechanism of MSPCaps and is explicitly non-iterative (Hu et al., 23 Aug 2025). It takes two capsule sets from layer 32×3232\times 329: a fine set f1,f2,f3f_1, f_2, f_30 and a coarse set f1,f2,f3f_1, f_2, f_31. For each output capsule f1,f2,f3f_1, f_2, f_32, linear predictions are formed from both inputs,

f1,f2,f3f_1, f_2, f_33

In the weight-sharing option used by MSPCaps-T, f1,f2,f3f_1, f_2, f_34 is eliminated and f1,f2,f3f_1, f_2, f_35 is reused for grouped fine capsules:

f1,f2,f3f_1, f_2, f_36

Uniform patchification induces a local grouping relation between scales. Each coarse capsule f1,f2,f3f_1, f_2, f_37 corresponds to a group of f1,f2,f3f_1, f_2, f_38 fine capsules. CAR computes raw agreement for the f1,f2,f3f_1, f_2, f_39-th output capsule and the 32×3232\times 320-th coarse capsule by taking the maximum similarity over the fine predictions within that group,

32×3232\times 321

This is the model’s “maximum agreement” operation: only the best fine-to-coarse prediction pair within a spatial group determines the coupling for that region. The weighted aggregation then uses coarse predictions,

32×3232\times 322

followed by squash to obtain the output capsule.

The paper contrasts CAR with both self-routing and concatenation-based fusion. Self-routing over a single scale does not explicitly check cross-scale coherence. Concatenation mixes features with incompatible receptive fields but does not resolve disagreement. CAR instead acts as a hard attention mechanism over local fine-scale explanations, selecting the most coherent part-to-whole pair and suppressing incoherent votes. Its stated complexity scales with

32×3232\times 323

and memory is reduced because the weighted sum is formed over coarse predictions. Dropout with rate 32×3232\times 324 may be applied inside CAR after computing coupling coefficients, although it is omitted for SVHN in the reported experiments.

5. Training objective and implementation protocol

MSPCaps uses margin loss and omits reconstruction loss (Hu et al., 23 Aug 2025). For 32×3232\times 325 classes, class capsule 32×3232\times 326, and target 32×3232\times 327, the loss is

32×3232\times 328

with

32×3232\times 329

The paper does not numerically specify 16×1616\times 160, 16×1616\times 161, or 16×1616\times 162, and notes that defaults from the earlier capsule literature can be used if needed. Cross-entropy is not used; optimization targets capsule norms, and evaluation uses top-1 prediction by largest class capsule 16×1616\times 163 norm.

The reported implementation uses PyTorch 2.5.1, Python 3.12, and CUDA 12.4 on a single NVIDIA RTX 4090D GPU. Training typically runs for 16×1616\times 164 epochs, with an appendix note that MNIST was trained for 16×1616\times 165 epochs in one setting. The optimizer is AdamW with base learning rate 16×1616\times 166, weight decay 16×1616\times 167, batch size 16×1616\times 168, and a learning-rate schedule consisting of a 16×1616\times 169-epoch linear warmup from 8×88\times 80 of the base value followed by cosine annealing to 8×88\times 81.

Preprocessing and augmentation are dataset-specific. MNIST and FashionMNIST are resized to 8×88\times 82. Augmentations include random crop with padding, random horizontal flip except for SVHN, and random rotation of 8×88\times 83 for MNIST and SVHN. Normalization is 8×88\times 84, 8×88\times 85 for MNIST, FashionMNIST, and SVHN; CIFAR-10 uses channel-wise mean 8×88\times 86 and std 8×88\times 87. Initialization is Xavier normal for the Patchify 8×88\times 88 convolution and Kaiming for other convolutions and projection layers.

The paper does not report inference speed, latency, or FLOPs. This omission matters because CAR is presented as more efficient than iterative routing, but deployment under strict real-time constraints would still require explicit profiling.

6. Empirical performance, interpretation, and limitations

The reported benchmarks are MNIST, FashionMNIST, SVHN, and CIFAR-10, with classification accuracy computed from the largest class capsule 8×88\times 89 norm (Hu et al., 23 Aug 2025). MSPCaps-T, with u1,u2,u3u_1, u_2, u_30 parameters, achieves u1,u2,u3u_1, u_2, u_31 on MNIST, u1,u2,u3u_1, u_2, u_32 on SVHN, and u1,u2,u3u_1, u_2, u_33 on CIFAR-10. MSPCaps-L, with u1,u2,u3u_1, u_2, u_34 parameters, achieves u1,u2,u3u_1, u_2, u_35 on MNIST, u1,u2,u3u_1, u_2, u_36 on FashionMNIST, and u1,u2,u3u_1, u_2, u_37 on CIFAR-10.

Model Reported results
MSPCaps-T u1,u2,u3u_1, u_2, u_38 MNIST, u1,u2,u3u_1, u_2, u_39 SVHN, 32×3232\times 3200 CIFAR-10, 32×3232\times 3201 params
MSPCaps-L 32×3232\times 3202 MNIST, 32×3232\times 3203 FashionMNIST, 32×3232\times 3204 CIFAR-10, 32×3232\times 3205 params

The paper reports that MSPCaps-T outperforms CapsNet, DA-CapsNet, AA-CapsNet, Efficient-Caps, and OrthCaps-S on CIFAR-10, including a 32×3232\times 3206 gain over OrthCaps-S. MSPCaps-L is reported to outperform DeepCaps by 32×3232\times 3207 on CIFAR-10 and RS-CapsNet by 32×3232\times 3208, while also exceeding the listed results for AR-CapsNet and OrthCaps-D.

Ablation studies isolate the contribution of each design decision. For MSPCaps-T on CIFAR-10, using only the 32×3232\times 3209 scale yields 32×3232\times 3210, only 32×3232\times 3211 yields 32×3232\times 3212, only 32×3232\times 3213 yields 32×3232\times 3214, and all three scales together yield 32×3232\times 3215. The paper interprets this as evidence that 32×3232\times 3216 contributes global context while 32×3232\times 3217 refines fine detail. CAR is also compared against a Dynamic Routing baseline with four blocks and multi-scale independent routing plus concatenation: MSPCaps-T with CAR attains 32×3232\times 3218 using 32×3232\times 3219 parameters versus 32×3232\times 3220 with 32×3232\times 3221 for the DR baseline, and MSPCaps-L with CAR attains 32×3232\times 3222 with 32×3232\times 3223 parameters versus 32×3232\times 3224 with 32×3232\times 3225.

Weight sharing in CAR exhibits a scale-dependent tradeoff. In MSPCaps-T, sharing improves performance to 32×3232\times 3226 with 32×3232\times 3227 parameters versus 32×3232\times 3228 with 32×3232\times 3229 without sharing, suggesting that sharing is beneficial under tight parameter budgets. In MSPCaps-L, the non-sharing variant improves to 32×3232\times 3230 with 32×3232\times 3231 parameters versus 32×3232\times 3232 with 32×3232\times 3233, indicating that larger models benefit from additional projection expressivity.

Patch size is similarly nontrivial. For MSPCaps-T, 32×3232\times 3234 gives the best reported accuracy, 32×3232\times 3235, and the lowest parameter count among the tested settings, while 32×3232\times 3236 increases parameters to 32×3232\times 3237 and mildly reduces accuracy to 32×3232\times 3238, and 32×3232\times 3239 reduces accuracy to 32×3232\times 3240 due to uneven borders. For MSPCaps-L, 32×3232\times 3241 achieves 32×3232\times 3242 with 32×3232\times 3243 parameters, 32×3232\times 3244 yields 32×3232\times 3245 with 32×3232\times 3246 and overfitting risk, and 32×3232\times 3247 yields 32×3232\times 3248 with 32×3232\times 3249; the global choice remains 32×3232\times 3250 for consistency and efficiency.

The robustness study applies FGSM and BIM with 32×3232\times 3251 steps on CIFAR-10. MSPCaps-L is reported to exhibit strong stability across increasing 32×3232\times 3252, whereas MSPCaps-T degrades for 32×3232\times 3253 and eventually falls below original CapsNet. The paper attributes the stronger behavior of the large model to multi-scale agreement and progressive fusion, although this remains an empirical interpretation rather than a formal robustness guarantee.

Several limitations are explicitly acknowledged. Patchification with a patch size that does not evenly tile a feature map can lose border information and reduce accuracy. The Tiny variant is less robust under stronger adversarial perturbation. FLOPs and latency are not reported. Future work proposed in the paper includes adaptive or learned patch sizes per scale, deformable patch boundaries, alternative agreement metrics such as cosine similarity or learned bilinear forms, top-32×3232\times 3254 rather than top-1 within-group selection, integration of explicit equivariance modules, and calibration analyses.

Taken together, MSPCaps is best understood as a capsule architecture that recasts multi-scale fusion as selective agreement-based routing. Its empirical contribution lies not only in the reported accuracies and parameter tradeoffs, but also in the architectural claim that spatially aligned patchified capsules permit fine-to-coarse part-whole reasoning without iterative routing.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Multi-Scale Patchify Capsule Network (MSPCaps).