Rewrite the Stars
- Publication
- CVPR 2024Conference
- First submitted to arXiv
- arXiv:2403.19967
Cite this paper · BibTeX
The citation identifies the linked source version. It cites the original paper and its authors.
@misc{lightweightstarnet2024,
title = {{Rewrite the Stars}},
author = {Xu Ma and Xiyang Dai and Yue Bai and Yizhou Wang and Yun Fu},
year = {2024},
eprint = {2403.19967},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2403.19967}
}
An elementwise multiplication is often tucked inside the new architectures of recent years.
Replace a Transformer's FFN with a GLU and two branches multiply. Mamba has a gating branch. In vision, FocalNet, HorNet, and VAN multiply too. The multiplication symbol * looks like a star, so this paper calls it the “star operation.”
Each paper finds multiplication useful but offers a different explanation. FocalNet describes modulation or gating, HorNet points to higher-order features, and VAN calls it convolutional attention. This paper, from Northeastern University and Microsoft, tries to make the mechanism clear. What do two multiplied linear branches add?
Defining the Problem
How Much Separates Addition and Multiplication?
The authors start with a simple block. Input passes through LayerNorm and depthwise convolution, then splits into two fully connected branches, one with GELU. The branches combine by addition or multiplication, followed by a fully connected layer and a residual connection.

Stack 12 such blocks to make DemoNet. Change only how the branches combine and compare on ImageNet:
| Network width | Addition | Multiplication |
|---|---|---|
| 96 | 51.1% | 57.6% |
| 128 | 58.5% | 64.0% |
| 160 | 62.7% | 68.2% |
| 192 | 66.2% | 71.7% |
| 224 | 69.6% | 73.9% |
| 256 | 71.4% | 75.3% |
| 288 | 72.5% | 76.1% |
Multiplication wins at every width, with a larger gain in narrower networks: 6.5 percentage points at width 96, falling to 3.6 at 288. The authors also fix width and vary depth; the gap stays between 4 and 6.5 points rather than shrinking with depth.
Multiplication is particularly useful in narrow networks. That observation will matter later.
Solving the Problem
Expand the Product
First consider one output channel. Input has channels, with a 1 appended so the bias can be folded into the weights. Multiplying the two branches gives
The expansion is a linear combination of all terms. Since and are identical, merging them leaves terms, roughly . Computation takes place in dimensions, yet the result acts like a linear operation in a space of roughly dimensions, each a quadratic term of the input.
With , the expansion has 15 quadratic terms; at width 128, it has 8385.
This resembles the polynomial kernel in machine learning. The polynomial kernel computes in a high-dimensional polynomial feature space without explicitly expanding the features. The star operation similarly computes in low dimensions to obtain a high-dimensional representation.
Stack more layers and dimensionality keeps growing through repeated doubling. Multiplying the first layer's quadratic terms again in the second layer gives fourth-order terms. The authors calculate an implicit dimensionality of roughly for a width-128, 10-layer network, effectively infinite for practical purposes.
It is worth pausing here, though. Fifteen coefficients may sound like many, but they all come from two vectors, and , producing a coefficient matrix of rank only 2. One output channel cannot choose quadratic coefficients arbitrarily. The dimension is high, but the coefficients are tightly constrained. In the discussion, the authors also note that coefficients in the implicit dimensions cannot be adjusted as freely as ordinary network weights. This may explain why extremely high implicit dimensionality yields only moderate gains.

The authors plot decision boundaries on two-moons data. The additive network draws a straight line; the multiplicative network draws a curve resembling a polynomial-kernel SVM more closely than a Gaussian-kernel SVM.
Even Without Activation Functions
If multiplication itself supplies nonlinearity, what happens with no activation functions anywhere? Take XOR: quadrants one and three form one class; quadrants two and four form the other. No straight line can separate them. Adding two linear branches keeps the network linear from end to end, so it gets about half right. Multiplying them introduces the term, exactly what XOR needs.
The paper tries the same on DemoNet at width 192 and depth 12. Removing every activation drops the additive network from 66.2% to 32.4%, while the multiplicative network falls only from 71.7% to 70.5%.
StarNet
Since multiplication helps most in narrow networks, the authors build a lightweight network around it, called StarNet.

The architecture is deliberately plain. Four stages each begin with a stride-2, 3×3 convolution to downsample and double channels. The blocks modify DemoNet in a few ways. BatchNorm replaces LayerNorm and moves after the depthwise convolution so it can be merged at inference. GELU becomes MobileNetV2's ReLU6. Another depthwise convolution is added at the block's end, and both branches expand channels by 4.
The authors use none of the familiar extras—reparameterization, attention, or SE—to avoid obscuring the star operation's contribution. Four sizes vary only the first-stage channel count and blocks per stage. The smallest S1 has 2.9M parameters and 425M FLOPs; the largest S4 has 7.5M and 1075M.
Discussion
ImageNet
Training follows the DeiT recipe for 300 epochs. Batch-1 latency is measured on an iPhone 13, a P100 GPU, and an Intel E5-2680 CPU.
| Model | top-1 | Params | FLOPs | iPhone | GPU | CPU |
|---|---|---|---|---|---|---|
| MobileOne-S0 | 71.4% | 2.1M | 275M | 0.7 | 1.1 | 2.2 |
| FasterNet-T0 | 71.9% | 3.9M | 338M | 0.7 | 2.5 | 5.7 |
| StarNet-S1 | 73.5% | 2.9M | 425M | 0.7 | 2.3 | 4.3 |
| MobileOne-S1 | 75.9% | 4.8M | 825M | 0.9 | 1.5 | 6.0 |
| EfficientNet-B0 | 77.1% | 5.3M | 390M | 1.6 | 3.4 | 8.8 |
| StarNet-S3 | 77.3% | 5.8M | 757M | 0.9 | 2.7 | 6.7 |
| MobileOne-S2 | 77.4% | 7.8M | 1299M | 1.0 | 2.0 | 8.9 |
| EdgeViT-XS | 77.5% | 6.8M | 1166M | 3.5 | 12.1 | 18.3 |
| StarNet-S4 | 78.4% | 7.5M | 1075M | 1.0 | 3.7 | 9.4 |
StarNet looks good on the iPhone 13. At the same 0.7 ms, S1 gains 2.1 percentage points over MobileOne-S0. S4 gains 0.9 points over EdgeViT-XS and runs 3.5 times as fast.
GPU and CPU results differ. StarNet-S4 takes 3.7 ms on the P100 against MobileOne-S2's 2.0 ms; on CPU, 9.4 versus 8.9 ms also favors MobileOne slightly. StarNet's strength lies on phones. It is much faster than hybrid architectures such as EdgeViT on all three devices, while its comparison with MobileOne depends on the device.
Where to Put Multiplication
The authors replace multiplication with addition in selected StarNet-S4 stages:
| Stage 1 | Stage 2 | Stage 3 | Stage 4 | top-1 |
|---|---|---|---|---|
| Add | Add | Add | Add | 75.3% |
| Multiply | Multiply | Add | Add | 75.2% |
| Multiply | Multiply | Multiply | Add | 76.8% |
| Add | Add | Multiply | Multiply | 78.4% |
| Multiply | Multiply | Multiply | Multiply | 78.4% |
Replacing all multiplication costs 3.1 percentage points. Yet multiplication in the first two stages makes little difference: using it only in the last two matches using it throughout. The authors suggest that the first two stages are too narrow and ReLU6 zeros many features, also zeroing their quadratic products, so the high-dimensional benefit cannot emerge.
They also test activation placement. No activations gives 75.6%; one branch gives 78.4%; both branches give 78.0%; activation after multiplication gives 77.0%. Applying it to just one branch works best.
Transforming only one branch and leaving the other as the input , written , drops accuracy to 74.4% at matched compute. Both branches need linear transformations to generate enough quadratic terms in the expansion.
The Cost of Speed
Multiplication is theoretically a little costlier than addition. Measurements find equal speed on iPhone and GPU; multiplication is slightly slower on CPU, with StarNet-S4 taking 9.4 versus 8.4 ms.
There is another issue the paper leaves open. When a GitHub user asks about quantization, the author replies that it has not been tried. Another user notes that multiplying two features can push values outside the INT8 range. That step needs your own validation before phone deployment.
Conclusion
This paper turns a widely used operation with competing explanations into one readable expansion. Multiplying two linear branches forms a linear combination of roughly quadratic terms; stacking layers keeps increasing the implicit dimension. It also explains why multiplication helps narrow networks most: dimension is exactly what they lack.
The rank-2 coefficient matrix shows the constraint as well. There are many expanded terms but few freely adjustable coefficients. In DemoNet and StarNet, “near-infinite dimensions” translate into gains of 3 to 6.5 percentage points.
timm provides pretrained weights from starnet_s1 to starnet_s4. If your lightweight model needs better accuracy, find an addition sign in its blocks and try replacing it with multiplication.