Level 0: Foundation
★☆☆☆☆ Introductory⏱ 5 minGeneral audience. No mathematics required.Split the channels into teams
In a grouped convolution the channels are divided into teams. Each team of output channels looks only at the matching team of input channels, as if several small convolutions ran side by side. That cuts the weights and computation by the number of teams. The catch is that teams never talk to each other unless something mixes them, such as a 1×1 convolution or a channel shuffle.
Grouped convolutions give accuracy for less compute in ResNeXt, ShuffleNet and RegNet backbones used for perception on embedded hardware. They also map naturally onto parallel hardware, which is how AlexNet first used them to fit on two GPUs.
- 1. In a grouped conv, an output channel sees…
- 2. With G groups, weights shrink by a factor of…
- 3. Grouped convolutions first appeared in…
Level 1: Beginner
★★☆☆☆ Basic⏱ 15 minSecondary-school mathematics: arithmetic and elementary algebra.By hand
- Weights: C_out·(C_in/G)·k². For 256 → 256, 3 × 3, G = 32: 18 432, against 589 824 for G = 1 (32 times fewer).
- Extremes: G = 1 is a standard convolution; G = C_in = C_out is a depthwise convolution (576 weights for 64 channels, 3 × 3).
- Connectivity: each output channel connects to C_in/G inputs: 8 for 256 channels in 32 groups.
- Block-diagonal kernel: viewed as a C_out × C_in matrix of k × k filters, only the G diagonal blocks are non-zero.
- Channel shuffle: reshape the C channels to (G, C/G), transpose, flatten. For 6 channels and 3 groups the order becomes 0, 2, 4, 1, 3, 5.
- ResNeXt: a block with cardinality 32 and width 4 uses a grouped 3 × 3 convolution on 128 channels with 32 groups: 128 × 4 × 9 = 4608 weights.
- 1. Weights for 256 → 256, 3 × 3, 32 groups:
- 2. Grouped conv with G = C is…
- 3. Shuffle order of 4 channels, 2 groups:
Level 2: Intermediate
★★★☆☆ Intermediate⏱ 20 minUndergraduate students and practising engineers.Grouped convolutions in code
Exercise 1.
- A 4-group convolution equalled a standard convolution with a block-diagonal kernel.
- Changing input channel 0 affected only output channels 0 and 1, its own group.
- Channel shuffle reordered 8 channels in 4 groups to 0, 2, 4, 6, 1, 3, 5, 7.
Practice.
nn.Conv2d(C_in, C_out, k, groups=G)(C_in and C_out divisible by G).- Follow grouped layers by a 1×1 convolution (ResNeXt) or a channel shuffle (ShuffleNet) so groups exchange information.
- Many groups make each layer memory-bound on GPUs; measure speed, not just operation counts.
def channel_shuffle(x, g): # x: (N, C, H, W)
n, c, h, w = x.shape; return x.view(n, g, c // g, h, w).transpose(1, 2).reshape(n, c, h, w)- 1. ResNeXt mixes groups with…
- 2. ShuffleNet mixes groups with…
- 3. Many groups can make GPU kernels…
Level 3: Advanced
★★★★☆ Advanced⏱ 25 minGraduate level, with full derivations and proofs.Theory
Block-diagonal structure. A grouped convolution is a standard convolution constrained to a block-diagonal kernel over channels. Its expressiveness per layer is that of G independent convolutions with C/G channels each.
Information flow. In a stack of grouped layers with the same grouping, the channels of group g depend only on the input channels of group g: the network splits into G separate subnetworks. Mixing requires an operation that crosses blocks: a dense 1×1 convolution, a channel permutation (shuffle) or a different grouping in the next layer.
Cardinality. Xie et al. (2017) found that, at a fixed computational budget, increasing the number of groups (cardinality) and widening the layers improved accuracy more than going deeper or wider alone: many cheap parallel paths are a good use of compute.
AlexNet’s accident. Krizhevsky et al. split their network across two GPUs, so some layers saw only half the channels; the two halves learned different kinds of filters (colour-agnostic versus colour-specific), an early observation that groups specialise.
- 1. Stacked same-group layers form…
- 2. ResNeXt found cardinality is…
- 3. AlexNet's two GPU halves learned…
Level 4: Expert
★★★★★ Expert⏱ 25 minResearchers: original papers and open problems.Do groups talk to each other?
History.
- A. Krizhevsky, I. Sutskever and G. Hinton (2012) split AlexNet across two GPUs.
- S. Xie et al. (2017) introduced ResNeXt and cardinality.
- X. Zhang et al. (2018) introduced ShuffleNet and the channel shuffle; I. Radosavovic et al. (2020) RegNet used grouped convolutions throughout.
Exercise 2. Per-pixel data with 4 channels in two groups (A: channels 0–1, B: channels 2–3); the label is whether channels 0 and 2 have the same sign. Two grouped 1×1 layers (2 groups, 16 hidden channels, ReLU) and a head that reads only group A’s channels, trained with Adam; three seeds:
| channel shuffle between layers | test accuracy |
|---|---|
| no | 0.506 |
| yes | 0.992 |
- Without shuffle, group A’s branch never saw channel 2 and was at chance.
- One shuffle let information cross groups, and the branch learned the rule.
- Lesson: grouped layers need explicit mixing; otherwise they are several independent networks.
Grouped convolutions in AI, robotics and aerospace
- Efficient backbones (ResNeXt, RegNet, ShuffleNet) in detection and segmentation for robots and vehicles.
- Multi-sensor fusion: groups can keep sensor-specific channels apart before deliberate mixing.
- Hardware partitioning: groups map onto parallel compute units, as in AlexNet’s two GPUs.
References
- A. Krizhevsky, I. Sutskever, G. Hinton (2012). “ImageNet classification with deep convolutional neural networks.” Advances in NeurIPS.
- S. Xie, R. Girshick, P. Dollár, Z. Tu, K. He (2017). “Aggregated residual transformations for deep neural networks.” Proc. CVPR.
- X. Zhang, X. Zhou, M. Lin, J. Sun (2018). “ShuffleNet: an extremely efficient convolutional neural network for mobile devices.” Proc. CVPR.