MSN: A Memory-based Sparse Activation Scaling Framework for Large-scale Industrial Recommendation

Shikang Wu, Hui Lu, Jinqiu Jin, Zheng Chai, Shiyong Hong, Junjie Zhang, Shanlei Mu, Kaiyuan Ma, Tianyi Liu, Yuchao Zheng, Zhe Wang, Jingjian Lin · DOI

TL;DR

MSN (Memory Scaling Network) is a novel framework that scales recommendation models by retrieving personalized representations from a massive, sparse memory table rather than relying on computationally expensive "experts." By using Product-Key Memory and a unique gating mechanism, it achieves the expressiveness of billion-parameter models while maintaining the strict low-latency requirements of industrial search engines like Douyin (TikTok China).

What Problem Does This Paper Address?

In the world of industrial recommendation, "bigger is usually better"—scaling up model parameters typically leads to better personalization and accuracy. However, we hit a wall called the latency constraint.

Standard scaling methods, like making neural networks deeper or wider, increase computational cost linearly. Sparse Mixture-of-Experts (SMoE) was the previous "gold standard" for scaling; it only activates a few "experts" (sub-networks) per request. But SMoE has a hidden flaw: each expert is a full Feed-Forward Network (FFN). Accessing these large parameter blocks creates a massive memory bandwidth bottleneck during inference. Furthermore, because experts are large, you can only afford to have a few of them, which limits how "fine-grained" the personalization can actually be.

The authors ask: Can we scale model capacity by orders of magnitude using lightweight memory lookups instead of heavy matrix multiplications?

Methods

The authors introduce MSN, which shifts the scaling axis from computation to parameter retrieval.

  1. Product-Key Memory (PKM): To support millions of memory slots without a slow linear search, MSN uses PKM. It factorizes the memory index into two sub-spaces. Instead of searching $N$ keys, the model searches $\sqrt{N}$ keys twice and takes their Cartesian product. This reduces complexity from $O(N)$ to $O(\sqrt{N})$, allowing for massive memory tables (e.g., $256^2$ or $512^2$ slots).
  2. Memory-Gated Fusion: Simply adding or concatenating retrieved memory values often performs poorly. MSN uses the retrieved memory vector as a gating signal to modulate the input features ($\tilde{x} = x_{in} \odot \tanh(v_o)$). This allows the memory to "fine-tune" the feature interactions dynamically for each user.
  3. Addressing "Memory Collapse": Large memories often suffer from a "rich-get-richer" problem where only a few slots are ever used. MSN prevents this using:
  4. Layer Normalization on queries and keys to stabilize distributions.
  5. Key Over-Parameterization: They apply a linear transformation to the keys. This ensures that even "unselected" keys receive gradient updates through the transformation matrix, improving training robustness.
  6. System Optimization: They developed a custom Sparse-Gather GPU operator and utilized AirTopK to ensure the overhead of searching and aggregating memory values is negligible (reducing P99 latency from 26ms to production-ready levels).

Datasets

The model was evaluated on massive, real-world industrial data:

  • Douyin Search Dataset: Contains over 1,000 heterogeneous features (user IDs, sequences, multimodal features) and billions of user-item interaction records.
  • Online A/B Testing: Conducted on the live Douyin Search Ranking System, serving hundreds of millions of users.

Key Insights and Ideas

  • Retrieval as Scaling: The core "aha" moment is that for recommendation, we don't necessarily need more neurons (math); we need more slots (memory) to store specific user patterns.
  • The Bandwidth Bottleneck: The paper highlights that in modern inference, memory access (moving data) is often a bigger bottleneck than FLOPs (doing math). MSN is designed to be "bandwidth-friendly."
  • Gating is Key: The discovery that memory should act as a modulator rather than just extra data is crucial. It suggests that the memory's role is to provide context for how other features should interact.
  • Gradient Flow for Dead Keys: The over-parameterization trick is a clever way to solve the "dead neuron" equivalent in memory networks, ensuring the entire memory table stays "alive" and useful during training.

Key Results

  • Offline Performance: MSN-FFN outperformed state-of-the-art models like Wukong and SMoE on QAUC (Query-Level AUC). Specifically, it achieved higher accuracy with a similar "activated" parameter budget.
  • Online Impact: In live A/B tests on Douyin Search, MSN delivered:
  • +0.0503% increase in Active Days (user retention).
  • -0.1337% decrease in Query Change Rate (meaning users found what they wanted faster without needing to refine their search).
  • +0.2958% increase in Watch Time.
  • Efficiency: Despite adding millions of parameters, the custom operators kept the latency overhead comparable to the existing production baseline.

Limitations and Future Work

  • Stacking Complexity: The authors noted that combining MSN with SMoE (MSN-SMoE) didn't provide a significant boost over MSN-FFN. This suggests that "stacking" different types of sparsity might lead to optimization difficulties or diminishing returns.
  • Fixed Memory Size: While the memory is large, it is still a fixed size. Future work could explore "infinite" or dynamic memory that grows with the user base.
  • Dynamic Depth: The authors suggest exploring how memory-based scaling could be combined with dynamic computation depth (skipping layers for "easy" queries) to further improve efficiency.

Summary updated

BibTeX
@misc{wu2026msn,
  author = {Shikang Wu and Hui Lu and Jinqiu Jin and Zheng Chai and Shiyong Hong and Junjie Zhang and Shanlei Mu and Kaiyuan Ma and Tianyi Liu and Yuchao Zheng and Zhe Wang and Jingjian Lin},
  title = {{MSN: A Memory-based Sparse Activation Scaling Framework for Large-scale Industrial Recommendation}},
  year = {2026},
  eprint = {2602.07526},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2602.07526},
}
Figure