ReplaceMe: Network Simplification via Depth Pruning and Transformer Block Linearization
ELVIA analysis
Independent review pending
The first reported finding concerns “Adjacent unmerged transforms omit the transformed residual”. The nondefault adjacent-unmerged option is not algebraically equivalent to its fit.
Problem 1. Adjacent unmerged transforms omit the transformed residual
MinorEvidence and reasoning
Problem statement
The fitted full-state target is but the unmerged fusion applies both transforms only to the MLP contribution.
Proof
The fused expression is missing In the scalar three-block example with the result is rather than The default merged fit uses one residual transform and returns so this witness does not accuse that default route.
Possible revision
Merge adjacent cuts before fitting, as the passing default does, or explicitly transform the residual contribution. No blanket removal of fusion is justified.
An explicit local correction is described; author adoption and a corresponding published erratum are not established.
Problem 2. Padding rows change the least-squares calibration target
MinorEvidence and reasoning
Problem statement
The tokenizer supplies an attention mask, but flattened calibration activations enter the fit without masking padded positions.
Proof
Valid scalar rows fit Adding a masked row changes the unweighted fit to giving valid-row squared error The model’s attention mask does not automatically exclude a saved padded activation from a later regression.
Possible revision
Apply the same valid-token mask to every aligned activation tensor, giving weighted regression with zero weights on padding.
An explicit local correction is described; author adoption and a corresponding published erratum are not established.
Problem 3. The elasticnet branch penalizes activations rather than the matrix
MinorEvidence and reasoning
Problem statement
Equation (9) regularizes the transform matrix The released `utils.py`, `adam_method`, instead applies its elasticnet-like term to transformed activations.
Proof
With input and target row matrices and produce the same transformed row and released loss, approximately but very different matrix norms. An activation penalty cannot generally implement the stated matrix penalty.
Possible revision
Define the matrix regularizer and reduction explicitly and apply it to the matrix. Keep ordinary unregularized cosine and least-squares ridge paths distinct.
An explicit local correction is described; author adoption and a corresponding published erratum are not established.
Supporting record & provenance
Work status
Current version
Version 1
Minhao Liu · Initial report · Version 1
Independent review pending
Original claim and review scope
To promote sparsity in the transformation matrix and encourage a more balanced distribution of feature importance, we use both and regularization terms when we use the cosine distance as our objective.
arXiv:2505.02819v4 (current author version; updated 2026-02-19T18:32:53Z); PDF p. 4
Actual review scope
The recorded inspection concerns these source locations: Current arXiv v4 Section 2.2, PDF pp.3–4, Eq.(5); Appendix A.16, PDF pp.23–24; ReplaceMe/lstsq.py, lines 195–246; Current author ReplaceMe/lstsq.py and ReplaceMe/cosine_dist.py, flattened calibration activation accumulation; Section 2.3, p. 4, Eq. (9); Section 3.3.2/Table 5, p. 8; utils.py lines 254–260.