REVIEW 3 major objections 5 minor 24 references
Wonderful Matrices: Combining for a More Efficient and Effective Foundation Model Architecture
T0 review · 3 major / 5 minor · reviewed 2026-08-11 · deepseek-v4-flash
Pith's one-line read Cheems, a hybrid of state space duality, dynamic mask attention, and cross-domain mixture of experts, is claimed to outperform LLaMA3, Mamba2, and Jamba on most evaluated benchmarks at 320M and 1.3B scale.
desk verdict The architecture has interesting pieces, but the central 'Cheems beats the baselines' claim is undercut by the authors' own disclosure of a training bug, so the paper is conditional at best. read the letter →
The pith
A machine-rendered reading of the paper's core claim, the machinery that carries it, and where it could break.
The reading
What carries the argument
The central mechanism is the semiseparable matrix identity $M = L \circ (CB^\top)$ that rewrites state space duality as causal linear attention, together with the proof that rotating $C$ and $B$ by position-dependent angles preserves relative position information, so $\langle f_C(x_m,m), f_B(x_n,n)\rangle = g(x_m,x_n,m-n)$. Dynamic mask attention adds a zero-order-hold mask, a mask whose value is held until the next non-continuous state, computed as $\exp(A\,\tau_\Delta([V_{\text{cache}},V]W_\Delta))$ on the attention score, letting the value state itself decide which past keys are attenuated or enhanced. Cross-domain mixture of experts projects each token against product keys, retrieves the top-$k$ expert rows from embedding tables, and adds a shared dense cross-domain path, so retrieval cost stays nearly flat as the expert count grows. The Cheems stack places one dynamic-mask attention layer after every seven SSD layers, with a CDMoE state transformation between modules.
What would settle it
Rerun the 320M and 1.3B training runs for Cheems, LLaMA3, Mamba2, and Jamba after the gradient-accumulation fix, using the same data, token counts, and hyperparameters, and compare the seven benchmark averages. If Cheems's margin over Mamba2 and Jamba shrinks or reverses, the central competitive claim is settled.
Extended reading notes
Core claim
On the paper's own terms, the discovery is that sequence transformation and state transformation can be unified through compatible matrix algorithms: RoPE applies to the $C$ and $B$ matrices of SSD so the semiseparable product $L\circ(CB^\top)$ and the attention product $L\circ(QK^\top)$ carry the same relative position information; dynamic mask attention gives quadratic causal attention a trainable, value-derived mask with the selectivity of a gated state space model; and cross-domain mixture of experts combines dense cross-domain linear layers with sparse product-key embedding retrieval so expert count can scale to thousands without linear retrieval slowdown. The paper reports that Cheems-1.3B averages 52.44 on seven downstream tasks versus 50.36 for LLaMA3, 49.07 for Mamba2, and 51.07 for Jamba, and Cheems-320M averages 45.22 versus 43.99, 43.07, and 44.31 respectively, under matched parameter counts. It also reports that Cheems trains faster than LLaMA3 and Jamba while remaining close to Mamba2 in throughput.
Load-bearing premise
The load-bearing premise is that the four Table 4 models were trained under conditions fair enough that their downstream score differences reflect the architectures; the paper itself says the runs predate a gradient-accumulation error fix and that perplexity is not comparable, yet the downstream claims come from those same runs.
Editorial extensions
If this is right
- At matched parameter counts, a hybrid SSD-attention-MoE stack can match or beat pure transformer, pure SSM, and transformer-SSM hybrid baselines on the evaluated downstream tasks, so hybridity is not just an efficiency compromise.
- Rotary position embedding can serve as the single position-encoding scheme for both attention and SSD branches, which simplifies hybrid models and enables linear-time generation with relative positions.
- Dynamic mask attention gives transformer-style attention a selectivity mechanism that preserves associative recall at sequence lengths where both quadratic causal attention and SSD degrade.
- Cross-domain mixture of experts keeps expert retrieval fast beyond 1024 experts, so the number of stored experts can grow without the linear retrieval slowdown seen in routing MoE.
- The same architecture that scores higher on average than the three baselines also trains and evaluates faster than LLaMA3 and Jamba, meaning efficiency and effectiveness are obtained together rather than traded off.
Reading between the lines
- Editorial extension: the architecture is only demonstrated at 320M and 1.3B, so the paper leaves open whether CDMoE's flat retrieval cost keeps its advantage at larger widths and longer contexts, where the reported efficiency gap suggests it might.
- Editorial extension: the Discussion's Doge variant—dynamic-mask attention with repeated CDMoE and no SSD—retains most benchmark scores, implying the SSD branch may be partly redundant; training Doge and Cheems under identical conditions would isolate SSD's contribution.
- Editorial extension: DMAttn's 100% accuracy on multi-query associative recall is shown only up to 2048-token sequences and $d_{\text{model}}=32$; longer sequences or smaller heads would test whether the mechanism generalizes beyond the reported range.
Signed reviews
Editorial analysis
A structured set of objections, weighed in public.
Referee Report
Summary. The paper proposes a hybrid foundation-model architecture called Cheems that combines State Space Duality (SSD) with quadratic causal self-attention, a new Dynamic Mask Attention (DMAttn), and a Cross Domain Mixture of Experts (CDMoE). It also proves that rotary position embedding can be applied to the SSD semiseparable matrix, reports perplexity and speed comparisons for the individual modules, and presents downstream benchmark results at the 320M and 1.3B scales claiming that Cheems outperforms LLaMA3, Mamba2, and Jamba on most evaluated tasks. The central architectural idea is to unify position encoding for hybrid sequence transformations, add a learnable mask to attention, and combine dense and embedding-based experts to improve parameter utilization and retrieval speed.
Significance. If the empirical claims were fully supported, the paper would make a useful contribution: a concrete hybrid architecture that combines the strengths of SSMs and attention, a clean proof that RoPE is compatible with SSD, and an expert-retrieval design that scales to thousands of experts at low activation cost. Credit is due for open-sourcing the code, for presenting a self-contained derivation in Appendix A, and for being transparent about a training bug that affects the reported results. However, the significance is currently limited by the fact that the main comparative claim rests on models trained before a known gradient-accumulation fix, with single runs and no error bars, so the headline ordering in Table 4 is not yet established.
major comments (3)
- [Table 4 caption and Section 4.2] The central claim that Cheems outperforms LLaMA3, Mamba2, and Jamba is load-bearing but is based on runs that the authors themselves state were trained before a gradient-accumulation error fix in the Transformers library. The caption says that pretraining perplexity is therefore not comparable and that reproduced runs 'may rise' on the verification metrics, yet Table 4 and Figure 8 are produced from exactly those pre-fix runs. Gradient accumulation changes effective batch size and optimizer noise, and the paper provides no evidence that the bug affected all four architectures identically. Given that the reported margins are small (e.g., Cheems-1.3B average 52.44 vs Jamba 51.07; MMLU 39.08 vs 37.43), the ordering in Table 4 could plausibly reverse under fair training conditions. This issue must be resolved by retraining the models with the fixed library or by providing a convincing argument that the bug is architecture-symmetric; otherwise the headline comparison is unsupported.
- [Section 3.2, Eqs. (5)-(7), and Appendix B.3, Listing 5] The mathematical description of DMAttn does not match the provided implementation. Equation (5) defines the dynamic mask as exp(τΔ(concat(V_cache, V) WΔ) A), and Eq. (7) applies it as a multiplicative, continuously attenuating or enhancing factor over the concatenated past and current value states. In Listing 5, however, dt is computed from the current V only (dt = self.dt_proj(rearrange(V, 'bhtp->btd'))), the dynamic mask is thresholded to a binary mask (dynamic_mask = ... < 1.0), and it is then added to the causal mask as -inf rather than multiplied with the attention scores. Because the reported MSE and MQAR results could correspond to either the equations or the code but not clearly to both, the method as presented is under-specified. The authors should align the description and the implementation, or explicitly state which version was evaluated.
- [Section 4.1 and Figure 6] The abstract claims that DMAttn 'maintains 100% accuracy' and improves by 'more than 150%' on the multi-query associative recall task, but Figure 6 shows only point estimates without error bars or multiple seeds, and no numerical table is provided from which these percentages can be verified. The same single-run limitation applies to Tables 1, 2, and 3 and to Figures 7 and 8. Given that some of the reported differences are small, the absence of variance information makes it difficult to assess whether the observed improvements are significant. Please provide seed-averaged results with confidence intervals, or at least state the number of runs and the observed spread.
minor comments (5)
- [Table 1] The column header 'a t' appears to be a typo; the caption refers to 'at' without explaining what this positional-encoding baseline is, and the table layout makes the comparison hard to parse.
- [Table 7] The column header 'learing rate' is misspelled as 'learing rate'; it should be 'learning rate'.
- [Appendix B.4, Listing 6] The variable name 'mamba_libray' in the SSD listing is a typo for 'mamba_library'.
- [Section 5 and Figure 9] The discussion claims that the Doge architecture 'has no significant decrease in most verification metrics' without presenting any corresponding table or figure; either add the supporting results or soften this claim to a qualitative observation.
- [Throughout] The model name is spelled inconsistently as 'LlaMa3' in tables and captions and 'Llama 3' in the references; please unify the spelling.
Circularity Check
No circularity: the RoPE-for-SSD proof is a direct algebraic derivation, and all claimed gains are empirical measurements on external benchmarks, not predictions forced by construction.
full rationale
No circular step is present. The RoPE-for-SSD argument in Appendix A is a self-contained algebraic proof that the inner product of rotated C and B vectors depends only on the relative position m-n; it assumes no target result and does not reduce to its own conclusion. DMAttn, CDMoE, and the combined Cheems architecture are evaluated on external benchmarks (multi-query associative recall, CEval, MMLU/TriviaQA/ARC/PIQA/HellaSwag/OBQA/Winogrande, and measured throughput), and no parameter fitted to those benchmarks is renamed as a prediction. The abstract's quantitative claims (over 4% perplexity reduction, 100% MQAR accuracy, 8-10x retrieval speed) are empirical readings of Table 1, Figure 6, and Figure 7, not consequences of definitions. There are no self-citations, no imported uniqueness theorem, and no ansatz smuggled through prior work by the same authors; the paper instead builds on external prior work (Mamba2, RoFormer, PEER, DeepSeek-MoE). The one serious caveat is a validity concern rather than circularity: the Table 4 caption explicitly states that all models were trained before a gradient-accumulation error fix in the Transformers library, that pretraining perplexity is therefore not comparable, and that reproduced runs may yield higher scores. That caveat reasonably undermines confidence in the reported benchmark ordering, but it does not make any derivation equivalent to its inputs, so the circularity score remains 0.
Assumptions & free parameters
free parameters (4)
- SSD-to-DMAttn block ratio =
7:1 per stack
- Dynamic-mask hard threshold =
1.0 (mask if exp(A*softplus(dt)) < 1)
- CDMoE expert count =
3072 (320M) and 8192 (1.3B)
- Cross-domain dimension d_cd =
not specified
assumptions (5)
- standard math SSD matrix equivalence M = L ◦ (C B^T) with scalar A
- standard math RoPE inner-product property for d=2 rotations
- standard math Extension of RoPE to even dimensions by block-diagonal rotations
- ad hoc to paper Zero-order hold assumption for dynamic mask: states contain continuous correlation
- domain assumption Product-key top-k retrieval is a valid sparse expert layer
invented entities (2)
-
Dynamic Mask Attention (DMAttn)
independent evidence
-
Cross Domain Mixture of Experts (CDMoE)
independent evidence
Cite this review
Pith. "Pith review of Wonderful Matrices: Combining for a More Efficient and Effective Foundation Model Architecture." pith.science (2026). https://pith.science/paper/HXAFYFGC
@misc{pith2026241211834,
author = {Pith},
title = {Pith review of: Wonderful Matrices: Combining for a More Efficient and Effective Foundation Model Architecture},
year = {2026},
howpublished = {\url{https://pith.science/paper/HXAFYFGC}},
note = {Machine review of arXiv:2412.11834}
}
read the original abstract
In order to make the foundation model more efficient and effective, our idea is combining sequence transformation and state transformation. First, we prove the availability of rotary position embedding in the state space duality algorithm, which reduces the perplexity of the hybrid quadratic causal self-attention and state space duality by more than 4%, to ensure that the combining sequence transformation unifies position encoding. Second, we propose dynamic mask attention, which maintains 100% accuracy in the more challenging multi-query associative recall task, improving by more than 150% compared to quadratic causal self-attention and state space duality, to ensure that the combining sequence transformation selectively filters relevant information. Third, we design cross domain mixture of experts, which makes the computational speed of expert retrieval with more than 1024 experts 8 to 10 times faster than the mixture of experts, to ensure that the combining state transformation quickly retrieval mixture. Finally, we summarize these matrix algorithms that can form the foundation model: Wonderful Matrices, which can be a competitor to popular model architectures.
Figures
Figures from the paper (7 more)
Reference graph
Works this paper leans on
-
[1]
Zoology: Measuring and Improving Recall in Efficient Language Models
Simran Arora, Sabri Eyuboglu, Aman Timalsina, Isys Johnson, Michael Poli, James Zou, Atri Rudra, and Christopher Ré. “Zoology: Measuring and Improving Recall in Efficient Language Models”. In: The International Conference on Learning Representations (ICLR). 2024
work page 2024
-
[2]
Loubna Ben Allal, Anton Lozhkov, Guilherme Penedo, Thomas Wolf, and Leandro von Werra.SmolLM-Corpus. 2024. url: https://huggingface.co/datasets/HuggingFaceTB/smollm-corpus
work page 2024
-
[3]
PIQA: Reasoning about Physical Commonsense in Natural Language
Yonatan Bisk, Rowan Zellers, Jianfeng Gao, Yejin Choi, et al. “PIQA: Reasoning about Physical Commonsense in Natural Language”. In: Proceedings of the AAAI conference on Artificial Intelligence . Vol. 34. 2020
2020
-
[4]
Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge
Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. “Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge”. In:arXiv preprint arXiv:1803.05457 (2018)
arXiv 2018
-
[5]
DeepSeek- MoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Models
Damai Dai, Chengqi Deng, Chenggang Zhao, R. X. Xu, Huazuo Gao, Deli Chen, Jiashi Li, Wangding Zeng, Xingkai Yu, Y. Wu, Zhenda Xie, Y. K. Li, Panpan Huang, Fuli Luo, Chong Ruan, Zhifang Sui, and Wenfeng Liang. “DeepSeek- MoE: Towards Ultimate Expert Specialization in Mixture-of-Experts Language Models”. In: CoRR abs/2401.06066 (2024). url: https://arxiv.or...
arXiv 2024
-
[6]
Tri Dao and Albert Gu. “Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Duality”. In: International Conference on Machine Learning (ICML) . 2024
work page 2024
-
[7]
A Framework for Few-shot Language Model Evaluation
Leo Gao, Jonathan Tow, Stella Biderman, Sid Black, Anthony DiPofi, Charles Foster, Laurence Golding, Jeffrey Hsu, Kyle McDonell, Niklas Muennighoff, Jason Phang, Laria Reynolds, Eric Tang, Anish Thite, Ben Wang, Kevin Wang, and Andy Zou. A Framework for Few-shot Language Model Evaluation . Version v0.0.1. Sept. 2021. doi: 10.5281/ zenodo.5371628. url: htt...
-
[8]
Aaron Grattafiori et al. The Llama 3 Herd of Models . 2024. arXiv: 2407.21783 [cs.AI]. url: https://arxiv.org/ abs/2407.21783
arXiv 2024
Show all 24 references
-
[9]
Mamba: Linear-Time Sequence Modeling with Selective State Spaces
Albert Gu and Tri Dao. “Mamba: Linear-Time Sequence Modeling with Selective State Spaces”. In: arXiv preprint arXiv:2312.00752 (2023)
2023 arXiv
-
[10]
Mixture of A Million Experts
Xu Owen He. “Mixture of A Million Experts”. In: arXiv preprint arXiv:2407.04153 (2024)
2024 arXiv
-
[11]
Mea- suring Massive Multitask Language Understanding
Dan Hendrycks, Collin Burns, Steven Basart, Andy Zou, Mantas Mazeika, Dawn Song, and Jacob Steinhardt. “Mea- suring Massive Multitask Language Understanding”. In: International Conference on Learning Representations. 2021
2021
-
[12]
C-Eval: A Multi-Level Multi-Discipline Chinese Evaluation Suite for Foundation Models
Yuzhen Huang, Yuzhuo Bai, Zhihao Zhu, Junlei Zhang, Jinghan Zhang, Tangjun Su, Junteng Liu, Chuancheng Lv, Yikai Zhang, Jiayi Lei, Yao Fu, Maosong Sun, and Junxian He. “C-Eval: A Multi-Level Multi-Discipline Chinese Evaluation Suite for Foundation Models”. In: Advances in Neur...
2023
-
[13]
Weld, and Luke Zettlemoyer
Mandar Joshi, Eunsol Choi, Daniel S. Weld, and Luke Zettlemoyer. TriviaQA: A Large Scale Distantly Supervised Challenge Dataset for Reading Comprehension . 2017. arXiv: 1705.03551 [cs.CL]
2017 arXiv
-
[14]
Transformers are RNNs: Fast Au- toregressive Transformers with Linear Attention
Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and François Fleuret. “Transformers are RNNs: Fast Au- toregressive Transformers with Linear Attention”. In: International Conference on Machine Learning . PMLR. 2020, pp. 5156–5165
2020
-
[15]
Large Mem- ory Layers with Product Keys
Guillaume Lample, Alexandre Sablayrolles, Marc’Aurelio Ranzato, Ludovic Denoyer, and Hervé Jégou. “Large Mem- ory Layers with Product Keys.” In: NeurIPS. 2019, pp. 8546–8557. url: http://papers.nips.cc/paper/9061- large-memory-layers-with-product-keys
2019
-
[16]
Jamba: A Hybrid Transformer-Mamba Language Model
Opher Lieber, Barak Lenz, Hofit Bata, Gal Cohen, Jhonathan Osin, Itay Dalmedigos, Erez Safahi, Shaked Meirom, Yonatan Belinkov, Shai Shalev-Shwartz, et al. “Jamba: A Hybrid Transformer-Mamba Language Model”. In: arXiv preprint arXiv:2403.19887 (2024)
2024 arXiv
-
[17]
Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answering
Todor Mihaylov, Peter Clark, Tushar Khot, and Ashish Sabharwal. “Can a Suit of Armor Conduct Electricity? A New Dataset for Open Book Question Answering”. In: arXiv preprint arXiv:1809.02789 (2018)
2018 arXiv
-
[18]
PyTorch Container Image
Meta NVIDIA. PyTorch Container Image . https : / / catalog . ngc . nvidia . com / orgs / nvidia / containers / pytorch. 2022
2022
-
[19]
Winogrande: An Adversarial Winograd Schema Challenge at Scale
Keisuke Sakaguchi, Ronan Le Bras, Chandra Bhagavatula, and Yejin Choi. “Winogrande: An Adversarial Winograd Schema Challenge at Scale”. In: Communications of the ACM 64.9 (2021), pp. 99–106
2021
-
[20]
GLU Variants Improve Transformer
Noam Shazeer. “GLU Variants Improve Transformer”. In: arXiv preprint arXiv:2002.05202 (2020)
2020 arXiv
-
[21]
Roformer: Enhanced Transformer with Rotary Position Embedding
Jianlin Su, Yu Lu, Shengfeng Pan, Ahmed Murtadha, Bo Wen, and Yunfeng Liu. “Roformer: Enhanced Transformer with Rotary Position Embedding”. In: arXiv preprint arXiv:2104.09864 (2021)
2021 arXiv
-
[22]
Attention Is All You Need
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. “Attention Is All You Need”. In:Advances in Neural Information Processing Systems (NeurIPS). 2017
2017
-
[23]
Transformers: State-of-the-Art Natural Language Processing
Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Rémi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mari...
2020
-
[24]
HellaSwag: Can a Machine Really Finish Your Sentence?
Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. “HellaSwag: Can a Machine Really Finish Your Sentence?” In: Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics . 2019. 13 A RoPE for SSD Proof of equation 2. by definit...
2019
Reviewed August 11, 2026 · model on record in the stance chip above.
Discussion (0). Continue with ORCID to comment.