Weight Clustering Reveals the Importance of Relative Rank in Large Language Models

arXiv:2603.17917 · cs.LG, cs.CL · Submitted 2026-03-18 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: I'm Tom, and with me are Jane, Lu, senior AI researcher at Tsinghua, Meng, lead engineer at a mysterious AI startup and Lalam, the in-house Large Language Model.

Jane: Today's paper: "Weight Clustering Reveals the Importance of Relative Rank in Large Language Models".

Tom: The gist The central finding is that what matters most in large language models is the relative rank of weights rather than their exact numerical values,

Jane: First, who's behind it and why it matters.

Title and authors: Tom: So we're looking at this paper called "Weight Clustering Reveals the Importance of Relative Rank in Large Language Models". It looks like the authors are Borja Aizpurua, Sukhbinder Singh, and Román Orús.

Jane: They are basically saying that for these huge language models, all those billions of exact weight values aren't actually that important. What really matters is how one connection compares to another—whether it's stronger or weaker than its neighbors.

Lu: It’s about using something called weight clustering to reduce the number of unique values in the weights by replacing them with just K shared values from K-means, which is a way of compressing the model on disk.

Meng: So, if you think about it, they are suggesting that we can get a lot of storage savings without having to retrain or fine-tune anything at all to keep the accuracy high.

Lalam: It’s interesting because it opens up a new way to look at model compression that focuses on these relative ranks instead of just trying to preserve every single number exactly, which is what we usually do in methods like post-training quantization.

The paper's summary: Tom: The paper goes into detail about how they apply weight clustering to models like Llama three point one-8B-Instruct and SmolLM2-135M, and they found that this method reduces each weight matrix to only sixteen to sixty-four distinct values <ref:2603.17917#pg1,Llama 3.1-8B-Instruct and SmolLM2-135M>.

Jane: They showed that even with these reduced values, the accuracy stays strong without needing any retraining whatsoever, which is a big deal for deployment.

Lu: The core finding here is that what matters most isn't the exact numerical value of those cluster means—the centroids—but their relative rank across all layer types they tested.

Meng: They systematically modified those centroid values while keeping the cluster assignments fixed, and the results clearly showed that keeping the rank order preserved causes far less damage than breaking it.

Lalam: The authors conclude that what really matters is "the global rank order matters more than sign structure" because the model keeps track of "the ranks of connection strengths — not merely their sign — and this is what must be preserved for the model to function correctly"

The paper's improvements: Tom: The paper points out some specific ways you can make these clustered models safer, like using affine maps where the transformation is f(w) equals a times w plus b, where a is greater than zero.

Jane: That specific type of transformation is important because it preserves both the rank order and the mean and variance of that reconstructed weight distribution.

Lu: This affine map works well because for any linear layer you have inside the network, that transform produces an output whose ranking across neurons stays unchanged, and those scale and offset adjustments are mostly handled by layer normalization.

Meng: They also found that when you perturb many layers at once, "scale drift—not rank distortion—is the dominant collapse mechanism" in standard randomization techniques.

Lalam: So, the affine correction helps because it can substantially delay that scale drift, which is a different problem than rank distortion, which they found is uncorrectable once introduced.

Conclusion: Tom: To wrap up this paper called "Weight Clustering Reveals the Importance of Relative Rank in Large Language Models", we see that weight clustering offers a way to compress models on disk while keeping accuracy high.

Jane: The main implication is that we don't need to worry about every single weight value being perfect; focusing on relative rank gives us a much more stable compression strategy.

Lu: The authors show that this approach allows for significant storage reduction, for example, with K equals thirty-two a fifty-eight point seven million weight MLP projection gets represented by only thirty-two shared values—a reduction of nearly six orders of magnitude in distinct values.

Meng: And they also showed that optional fine-tuning only the cluster means can recover an additional thirty to forty percent of the accuracy gap at minimal cost, which is very efficient for deployment.

Lalam: It confirms that this clustering method provides a clean framework because it separates the cluster labels and centroid values, which lets researchers test how changes in relative rank affect performance directly.

Tom: So, we're left with a clear picture: the importance of relative rank over exact magnitudes in these LLMs is what makes weight clustering work. That’s what we had for this episode on "Weight Clustering Reveals the Importance of Relative Rank in Large Language Models".

Multiverse Computing · Department of Basic Sciences, Tecnun - University of Navarra · Donostia International Physics Center · Ikerbasque Foundation for Science

cs.LG, cs.CL

Submitted: 2026-03-18

Updated: 2026-10-09

Comments: 19 pages, 4 figures, 17 tables

License: http://arxiv.org/licenses/nonexclusive-distrib/1.0/

Importance score: 90/100

The gist: The gist The central finding is that what matters most in large language models is the relative rank of weights rather than their exact numerical values, and this rank-based perspective offers a new

Key concepts

Weight Clustering
This technique groups all weight values in a large matrix into K distinct clusters using K-means. Instead of storing every unique number, the matrix is represented by only K representative 'centroid' values, significantly reducing storage while keeping most of the model's function intact.
Relative Rank Preservation
The paper found that what matters most for accuracy is not the exact numerical value of a weight, but its position relative to other weights—its rank. Changing the order (e.g., making a stronger connection weaker) causes severe performance drops, whereas preserving this ordering is vital for the model's correct operation.
Scale Drift vs. Rank Distortion
During compression, two main failures occur: scale drift (changes in weight magnitude) and rank distortion (changes in relative order). The research indicates that scale drift is the dominant cause of cumulative failure when many layers are modified, but rank distortion is also a major issue that needs careful management.

Terminology

Summary

The gist The central finding is that what matters most in large language models is the relative rank of weights rather than their exact numerical values, and this rank-based perspective offers a new lens on model compression and robustnessPage 1

Weight Clustering for Compression

The paper introduces weight clustering as a method to reduce the number of unique weight values by replacing every weight matrix with K shared values from K-meansPage 1 For Llama 3.1-8B-Instruct and SmolLM2-135M, reducing each matrix to only 16–64 distinct values preserves strong accuracy without retraining, providing a simple, training-free method to compress LLMs on diskPage 1 Optionally fine-tuning only the cluster means (centroids) recovers 30–40% of the remaining accuracy gap at minimal costPage 1 The method involves assigning all entries of a weight matrix W to K clusters and replacing each value with its cluster representative, resulting in a (clustered) matrix Wˆ given by Wˆ [d, o] = cL[d,o], where ck is the centroid (mean) of the kth clusterPage 3 This process allows for significant storage reduction; for example, with K = 32, a 58.7M-weight MLP projection is represented by 32 shared values—a reduction of nearly six orders of magnitudePage 3

The Importance of Rank Preservation

The study systematically modifies the cluster means while keeping the cluster assignments fixed to investigate what preserves accuracyPage 4 The results show that the exact numerical values of the cluster means are not what preserve accuracy; instead, What matters most is their relative rank across all layer types testedPage 4 Rank-preserving changes consistently cause far less damage than rank-breaking onesPage 4 For a mid-network layer, all three models are largely indifferent to the exact centroid values as long as the corresponding cluster ranks are preservedPage 4 The authors conclude that the global rank order matters more than sign structure because the model maintains the ranks of connection strengths — not merely their sign — and this is what must be preserved for the model to function correctlyPage 4

Safe Transformations and Scale Drift

The paper identifies a class of “safe” centroid transformations as affine maps f(w) = aw + b with a > 0, which preserve both rank order and the mean (µ) and variance (σ2) of the reconstructed weight distributionPage 5 These affine maps are particularly effective because for any linear layer W inside the network, an affine weight transform w → aw + b produces an output whose ranking across neurons is unchanged, and the resulting scale and offset are approximately absorbed by layer normalizationPage 5 Furthermore, when many layers are perturbed simultaneously, progressive layer-by-layer replacement reveals that scale drift—not rank distortion—is the dominant collapse mechanism in standard randomizationPage 6 However, an affine correction w′ = aw + b with a > 0 can substantially delay this driftPage 5 The paper demonstrates that scale drift is the dominant mechanism of cumulative failure when many layers are perturbed, and affine correction can substantially delay this collapsePage 6

Layer Depth Sensitivity

The dependence of randomization on layer depth shows that rank-breaking at early layers is catastrophic across all tested modelsPage 4 For the early layer (layer 1), even rank-preserving randomization gives a considerable hit to perplexity, and the sign-scramble pushes PPL to 117.39 on Llama-InstructPage 4 The results confirm that rank-breaking is the main failure mode at every depth; rank-preserving replacements can still hurt via cumulative scale drift, and the penalty grows as the randomized layer sits earlier in the networkPage 6

Relation to Existing Methods

Weight clustering provides a cleaner framework for this analysis because it stores cluster labels L and centroid values c as explicit separate objects, allowing them to be perturbed independentlyPage 4 This separation allows the researchers to directly test how changes in relative rank affect performance, unlike post-training quantization (PTQ) methods which do not readily admit this separationPage 4 The paper notes that codebook-based methods, such as AQLM [7], VPTQ [8], and SqueezeLLM [9], can achieve higher compression but typically require specialised kernels, whereas the proposed approach is applied post-training and requires no custom inference kernelsPage 4 The authors also show that weight clustering provides a clean framework for this analysis because cluster assignments and their representative values are stored separatelyPage 4

Practical Implications

As a practical compression method, weight clustering applied to the original Llama 3.1-8B-Instruct achieves PPL 9.32 at 6.9 GB disk without any fine-tuningPage 8 This is comparable in accuracy to INT4 quantization, and optional centroid-only fine-tuning recovers 30–40% of the accuracy gap at minimal costPage 5 The paper concludes that the two degradation mechanisms—scale drift and rank distortion—differ in their correctability, with scale drift being correctable by affine correction while rank distortion is notPage 6 Future work includes formalising the conjecture that centroid rank acts as an approximate sufficient statistic for model performancePage 8 The paper also confirms that the model maintains the ranks of connection strengths — not merely their sign — and this is what must be preserved for the model to function correctlyPage 4 The final practical recommendation is to use the rebuild-to-dense path, which is reliable, immediately deTABLE IXPage 8 The paper also shows that Clustered models use rebuild-to-dense execution, so GPU RAM matches the dense baselinePage 8 The compression and clustering approach achieves a storage reduction of 4.7× when combined with pre-compression and INT4 quantizationPage 8 The optional centroid-only fine-tuning recovers an additional 30–40% of the accuracy gap at minimal costPage 5

How it works

The method involves applying scalar K-means clustering to a weight matrix W ∈ R D×O to assign all the weights in W to K clusters of distinct values, resulting in a (clustered) matrix Wˆ given by Wˆ [d, o] = cL[d,o], where ck is the centroid (mean) of the kth clusterPage 3 The clustered weights can be stored compactly on disk: Cluster labels are stored as packed ⌈log2 K⌉-bit integers, while the typically short centroid vector adds negligible overheadPage 3 For instance, with K = 32, a 58.7M-weight MLP projection is represented by 32 shared values—a reduction of nearly six orders of magnitude in distinct valuesPage 3

Experimental Setup and Findings

Experiments were performed on three different models: (1) Llama 3.

Improvements for AI systems

  1. Robust weight perturbation analysis for compression schemes can be significantly improved by focusing on rank preservation rather than exact magnitude preservation, as what matters most is the relative rank of weights—whether one connection is stronger or weaker than another—rather than precise magnitudes. This allows for effective model compression, as rank-preserving randomizations cause almost no loss at mid and late layers, which ensures performance stability during weight clustering.

  2. Development of a systematic mechanism to correct scale drift during layer-wise perturbation can enhance model robustness; the paper suggests that "an affine correction w′ = aw + b with a > 0 (which preserves both rank order and overall weight distribution) can substantially delay this drift. This correction is vital because scale drift—not rank distortion—is the dominant collapse mechanism" when many layers are perturbed simultaneously.

  3. Implementation of a conditional fine-tuning strategy can maximize compression gains; optional fine-tuning only the cluster means (centroids) recovers 30–40% of the remaining accuracy gap at minimal cost. This allows for highly compressed models to be optimized efficiently by only training a small subset of parameters, reducing the computational cost associated with full model retraining.

  4. Design of compression methods that explicitly maintain both mean and variance during centroid transformation can yield more reliable results; a broad class of 'safe' transformations of the cluster means, namely, maps f: ck 7→ f(ck) are precisely those that preserve both ordering and the mean (µ) and variance (σ2) of the reconstructed weight distribution. This ensures that the overall weight distribution must also be preserved to avoid catastrophic performance degradation.

  5. Creation of a layer-depth dependent sensitivity map can optimize compression for specific model architectures; Table III shows that rank-breaking conditions are consistently more damaging than order-preserving ones at every layer, allowing researchers to strategically choose which layers to prioritize for rank preservation based on their known sensitivity.

Sources

Related papers