Pruning a neural network to 50% zeros makes it smaller on paper but rarely faster in practice. Graphics processors are built for dense arithmetic, and skipping scattered zeros costs more than multiplying by them. The one format with real hardware speedup is "2:4 sparsity": in every group of four consecutive weights, exactly two are zero, and recent NVIDIA tensor cores skip those zeros natively. The price is accuracy. When several important weights land in the same group of four, some must be removed. The standard fix is to reorder input channels before pruning so important weights spread out across groups. The reordering is absorbed into the previous layer, so it costs nothing at inference.
Today that reordering is found in one of two ways. The first is greedy search on a proxy score. The second is a two-and-a-half-hour gradient procedure. In both cases it is fit to a handful of calibration sequences, and nobody checks whether it stays good when the input distribution changes. We propose to write the permutation choice as an exact mixed-integer linear program, meaning a linear optimization in which some variables must be integers. We make it robust by letting an adversary perturb the activation statistics that decide which weights matter, within a budget. Standard duality then collapses the adversary into extra linear constraints. The result is a permutation that protects the weights most likely to matter under drift, and a solver-certified bound on how far each heuristic falls from the optimum.
Core Claim
Channel permutation for N:M sparsity has the structure of an assignment problem. The per-row "keep the top two of four" rule can be written with the same linking constraints that Basciftci et al. use as McCormick envelopes, a standard way to linearize products of a binary variable with a bounded one. Their setting was a facility-location model with decision-dependent demand. Two consequences follow. First, the permutation problem can be solved to certified optimality on the window sizes that current methods already use, so for the first time we can measure the optimality gap of greedy and relaxation-based permutations. Second, activation-norm uncertainty with a cardinality budget can be dualized exactly into the same program. The robust permutation is therefore no harder to solve than the nominal one.
Our claim is that the robust permutation lowers worst-case and cross-domain degradation of 2:4-pruned models relative to nominal permutations. The hypothesis is conditional: it should hold only if the budget structure matters, and not merely because we use pessimistic scores. The proposal is built to falsify it.
The Formulation
Take one layer with weights $W$ (rows $r$ are outputs, columns $c$ are input channels) and a window of $B$ input channels, split into $G = B/4$ groups. The Wanda-style saliency of a weight is $|W_{rc}|\,a_c$, where $a_c$ is the calibration activation norm of channel $c$; this saliency comes from Wanda.
The program has three kinds of variables. A binary $z_{cg}$ assigns channel $c$ to group $g$, with each channel in exactly one group and each group holding four channels. A continuous $k_{rcg}\in[0,1]$ marks weight $(r,c)$ as kept in group $g$, subject to $k_{rcg}\le z_{cg}$ and $\sum_c k_{rcg}\le 2$. Once $z$ is fixed, the keep constraints form an integral polytope, so $k$ needs no integrality. Write $v_c=\sum_{r,g}|W_{rc}|k_{rcg}$ for the preserved mass in channel $c$.
The nominal objective maximizes $\sum_c a_c v_c$. The robust version lets the adversary lower up to $\Gamma$ channel norms from $\bar a_c$ to $\bar a_c-d_c$. Here $\bar a_c$ and $d_c$ come from bootstrap resampling of the calibration set. The worst case of this linear inner problem dualizes to
$$\max_{z,k,\theta,\pi}\;\sum_c \bar a_c v_c-\Gamma\theta-\sum_c \pi_c\quad\text{s.t.}\quad \pi_c+\theta\ge d_c v_c,\;\;\pi_c,\theta\ge 0,$$
with $\theta$ and $\pi_c$ the dual variables of the budget and box constraints. Two limits bracket the method. At $\Gamma=0$ it is the nominal problem. At $\Gamma=B$ it simply replaces every norm by its pessimistic value $\bar a_c-d_c$.
Intermediate $\Gamma$ gives a different objective from either limit. The adversary spends its budget on the channels carrying the most preserved mass, so the program is pushed away from permutations whose accuracy hinges on a few fragile high-norm channels. This is the design choice that separates the proposal from simply "using conservative scores."
Relation to Prior Work
Three works supply the permutation problem and define the baselines, and all three optimize against one static calibration snapshot. Channel Permutations for N:M Sparsity introduced offline, latency-free input/output channel swaps and searches for them with greedy swaps and bounded regressions on a magnitude "efficacy" score. It reports that local search gets trapped and cannot be exhaustive. PermLLM replaces the heuristics with a Sinkhorn-relaxed permutation, rounded by the Hungarian algorithm and trained through a straight-through estimator over block windows. It shows that magnitude proxies can produce worse loss than no permutation. Gyro-Permutation handles hierarchical N:M with a clustering-plus-assignment heuristic that comes with no bounds. Our exact program differs from all three in the same way: it returns a certified optimum or a gap for the stated objective, and it has an explicit robust counterpart.
PermLLM's negative finding constrains our design. Exactly optimizing a bad proxy is pointless. For that reason we use an activation-weighted proxy rather than raw magnitude, and we treat proxy-versus-loss agreement as a decisive check rather than an assumption.
Two works show that calibration fragility is real and motivate the proposal, but neither touches the discrete structure. RobOP robustifies one-shot pruning against Hessian uncertainty. Its worst case collapses to diagonal dampening $H+\gamma I$, masks are chosen by existing greedy pruners, permutations are untouched, and $\gamma$ is found by grid search. DRPruning reweights training domains during recovery of structurally pruned models. Its robustness lives in the data schedule, not in a dualized program. We borrow the robust-counterpart idea from the tractable-reformulation literature, for example the LP reductions of Bortfeld et al., but apply it to a discrete hardware-alignment decision.
The sparsity-overhead literature explains why the target is 2:4 rather than unstructured sparsity. Sparse GPU Kernels for Deep Learning reports that even its tuned unstructured kernel beats dense matrix multiplication only above 71% sparsity. At the 50% level typical of LLM one-shot pruning, unstructured masks buy no speed. Native 2:4 support gives a theoretical 2x (Zhou et al.).
Research Program
We will build the window-level program. Windows are $B\in\{16,32,64\}$ channels, matching PermLLM's block-wise strategy, and cross-window moves are handled by alternating between fixed partitions. The program is solved with an off-the-shelf branch-and-cut solver, warm-started from the Pool–Yu permutation, with a per-window time limit, and we log the certified gap. To strengthen the relaxation we will add symmetry-breaking constraints, since group labels are interchangeable, and valid inequalities in the spirit of Basciftci et al.
After permutation, masks are selected by the permuted 2:4 rule, and the kept weights are optionally updated with SparseGPT-style reconstruction (SparseGPT). This separates the permutation question from the weight-update question.
The uncertainty set is built from $K$ bootstrap resamples of the calibration data. $\bar a_c$ is the median norm and $d_c$ a lower-quantile deviation. $\Gamma$ is selected once per model on a held-out calibration split and then frozen across all evaluation domains, and we report the full $\Gamma$ curve. This does not remove RobOP's tuning problem. It does reduce the choice to one interpretable integer, the number of channels the adversary may perturb.
The study moves up in scale. It starts on ImageNet CNNs and DeiT, where layers are small enough that we expect near-zero gaps, and ends on LLaMA-3.1-8B and Qwen-2.5-7B.
Baselines
The naive reference point is 2:4 pruning with no permutation, using the same Wanda saliency and the same optional SparseGPT update. It shows how much any permutation buys. For LLaMA-3.1-8B, the file reports Wanda at 23.42 WikiText2 perplexity, taken from PermLLM's comparison.
The classical permutation baseline is the greedy/bounded-regression search of Channel Permutations for N:M Sparsity. It is the cheapest serious competitor, at about one minute per model on one GPU, and it also serves as our warm start. Any gain we report therefore sits on top of it, never beside it.
The strongest existing method is PermLLM. It reports WikiText2 perplexity 14.03 on LLaMA-3.1-8B, against Wanda's 23.42, and average zero-shot accuracy of 52.17% on Qwen-2.5-7B, against 51.25% for SparseGPT and 47.91% for Wanda. We will rerun PermLLM from its released description on the same calibration sequences, with the same window size and the same post-permutation update. We give it at least as much wall-clock compute as our solver: its reported 2.5 hours on 4 GPUs is the ceiling for both. If we cannot reproduce its reported numbers within a small tolerance, we will report both theirs and ours.
Beating PermLLM in-distribution is not required. The success criterion has two parts. The robust program must match PermLLM in-distribution, within roughly the seed-to-seed spread. And it must reduce worst-domain perplexity and the variance across calibration draws by more than that spread.
The ablation that isolates the key ingredient is the nominal exact program at $\Gamma=0$ alongside the fully pessimistic program at $\Gamma=B$. The first isolates exactness. The second isolates "conservative scores" without the budget structure. We also run RobOP-style dampening in the weight update (RobOP), with and without our permutation, to check that robustness in the permutation adds to robustness in the update rather than duplicating it.
Why not just…?
Why not just calibrate on more, or more diverse, data and keep the existing heuristics? Averaging activation norms over a larger mixed-domain pool is sample-average approximation, and it is the most serious threat to this proposal. Our program uses exactly the same pool. The experiment gives the pooled-data version of PermLLM and of Pool–Yu the full union of our bootstrap samples. If they match our worst-domain results, the robust formulation adds nothing beyond more data, and we will say so. Our expectation, which we have not verified, is that averaging protects the typical case while the budgeted adversary protects the channels whose norms swing most across domains.
Why not just use pessimistic (lower-quantile) activation norms in the greedy search? This is exactly the $\Gamma=B$ limit of our program, and we run it with both the greedy solver and the exact solver. If intermediate $\Gamma$ never beats both endpoints, the budget structure is unnecessary. The honest conclusion would then be that "use conservative scores" is enough, and the remaining contribution is the certified optimality gap.
Why not just keep PermLLM's gradient relaxation, which optimizes true loss rather than a proxy? PermLLM's advantage is that it sees the real loss, and our program optimizes a linear proxy. We address this directly by measuring rank correlation between proxy value and post-pruning layer reconstruction error across many candidate permutations. If the correlation is weak for the activation-weighted proxy, as PermLLM found for magnitude, exactness on the proxy should lose to PermLLM. In that case we would switch to a hybrid that uses the exact robust solution to initialize PermLLM's score matrix.
Why not skip permutation and run unstructured 50% sparsity with a custom kernel? The Sputnik measurements show unstructured kernels overtake dense matrix multiplication only above 71% sparsity (Sparse GPU Kernels for Deep Learning). At 50% that route gives accuracy but no speed. We include unstructured Wanda/SparseGPT only as an accuracy ceiling.
Proposed Experiments
Calibration uses C4 with $N\in\{8,32,128\}$ sequences and five calibration seeds each. The in-distribution evaluation is WikiText2 perplexity and the zero-shot suite of BoolQ, WinoGrande, PIQA, OpenBookQA, HellaSwag (Zellers et al.) and ARC-Easy/Challenge (Clark et al.).
Drift is measured in two ways. First, we calibrate on C4 and evaluate on WikiText2 and each zero-shot task separately, reporting the worst task rather than the average. Second, we swap roles and calibrate on WikiText2 while evaluating on C4. On vision, we prune DeiT and ResNet-50 on ImageNet-1K, where the reference points in the file are dense ResNet-50 at 77.3% and SR-STE 2:4 at 77.0% (Zhou et al.). We also include SqueezeNet, where Pool and Yu report a 4.01% drop without permutation. Neither the file nor Lacuna reports any drift-specific result for permutation methods, so there is no prior number to beat on the worst-domain metric.
There are four decisive checks. The first is the certified-gap study: the optimality gap of Pool–Yu and PermLLM permutations under our objective, by window size and layer type. This result stands whatever the robustness outcome. The second is proxy validity: rank correlation between our objective and layer reconstruction error, plus end-to-end perplexity, for nominal-exact versus Pool–Yu. The third is the $\Gamma$ curve, where we need a strict interior optimum on worst-domain metrics with in-distribution loss inside the seed spread. The fourth is cost and latency: solver time per model against PermLLM's 2.5 GPU-hours. Linear-layer speed is measured on Ampere with the permuted 2:4 weights, where we should see no latency beyond plain 2:4, since the permutation folds into the previous layer. The file's only end-to-end LLM figure is PermLLM's 1.67x across linear layers.
If exact solves time out on 64-channel LLM windows, we will report the gap at the time limit and fall back to 32-channel windows. That trade-off is itself a result about where exact combinatorial methods stop being practical for hardware-aligned sparsity.
References
- Distributionally robust facility location problem under decision-dependent stochastic demand
- A Simple and Effective Pruning Approach for Large Language Models
- Channel Permutations for N:M Sparsity
- PermLLM: Learnable Channel Permutation for N:M Sparse Large Language Models
- Toward Efficient Permutation for Hierarchical N:M Sparsity on GPUs
- A Robust Optimization Guided Pruning Framework for Vision and Large Language Models
- DRPruning: Efficient Large Language Model Pruning through Distributionally Robust Optimization
- Robust Management of Motion Uncertainty in Intensity-Modulated Radiation Therapy
- Sparse GPU Kernels for Deep Learning
- Learning N: M Fine-grained Structured Sparse Neural Networks From Scratch
- SparseGPT: Massive Language Models Can be Accurately Pruned in One-Shot
- HellaSwag: Can a Machine Really Finish Your Sentence?
- Think you have Solved Question Answering? Try ARC, the AI2 Reasoning Challenge.