Sqrank: Partition Statistic & LoRA Scaling
- Sqrank is a technical term with dual meanings, defining a combinatorial statistic on integer partitions and a scaling rule in parameter-efficient fine-tuning.
- In partition theory, sqrank is computed via Durfee squares, rim-hook removals, and Frobenius coordinates, linking its distribution to odd minimal excludants and Gaussian q-binomials.
- In LoRA fine-tuning, sqrank refers to the rank-stabilized scaling factor (α/√r) that maintains stable activation and gradient moments during training.
Searching arXiv for papers relevant to “Sqrank,” including partition-theoretic and LoRA-related usages. I’m going to look up the most relevant arXiv entries for “sqrank” and closely related usages. Sqrank is a polysemous technical term in current arXiv literature. In partition theory, it denotes a recently introduced statistic on integer partitions defined through the Durfee square, repeated rim-hook removal, and Frobenius coordinates; its distribution is linked to odd minimal excludants, Gaussian -binomials, configuration sums, and affine-crystal combinatorics (Takagi, 2024). In parameter-efficient fine-tuning for LLMs, “Sqrank” is also used for the rank-stabilized LoRA scaling rule that replaces the original factor by in low-rank adapters (Kalajdzievski, 2023). These usages are distinct, and both should also be separated from “stable rank” in representation-geometry-based alignment and from classical rank queries in succinct data structures [(Tang et al., 2 Dec 2025); (0907.1103)].
1. Partition-theoretic definition
For an integer partition with Ferrers diagram , the partition-theoretic sqrank is defined from the Durfee square of side
Let be the subdiagram consisting of the first rows of outside 0. From 1, one repeatedly removes the longest of the rightmost rim hooks of arm-length 2 until the residual diagram 3 has fewer than 4 columns. If the Frobenius representation of 5 is
6
with
7
then
8
The same source states an equivalent interpretation: sqrank measures how “deep” one can strip horizontal–vertical rim-hooks of length 9 from the subdiagram to the right of the Durfee square, and then reads off the maximal difference of leg–arm lengths in the residual shape plus an offset (Takagi, 2024).
A later affine-crystal treatment restates the same statistic as
0
and adds an equivalent characterization in terms of a 1–2 encoding of 3. If 4 is encoded as a binary string 5 of length 6 via
7
then sqrank is the unique 8 with 9 such that the Kashiwara function satisfies 0 (Miyazawa et al., 29 May 2026).
2. Enumerative formulas and the odd minimal excludant
Fix 1, and define
2
The generating function given for this distribution is
3
where
4
The same generating function is also written in closed form as
5
This leads to the principal equidistribution statement: if 6 is the smallest positive odd integer not appearing as a part of 7, then
8
The paper presents this as Theorem 2.1(1) and proves it by deriving the same generating function from mex-count arguments and from an energy-preserving bijection through restricted partitions and bit-sequences (Takagi, 2024).
The crystal-theoretic treatment gives the same one-variable generating function in the notation
9
namely
0
and also records the two-variable series
1
From the identical generating function for odd mex, it concludes that for each 2, partitions of 3 with sqrank 4 are equinumerous with those of odd mex 5, and in particular that 6 (Miyazawa et al., 29 May 2026).
3. Bosonic polynomials, bit-paths, and affine crystals
A central structural feature of sqrank is its appearance in a polynomial bosonic form. The polynomial
7
enumerates length-8 bit sequences with 9 ones by the energy
0
The unrefined configuration sum satisfies
1
while the refined form
2
counts paths of fixed path-minimum 3. The same source states that these exactly match the statistical-mechanics configuration sums of an integrable box–ball automaton, and that sqrank arises via an energy-preserving mapping from partitions to bit-paths (Takagi, 2024).
The same work isolates the special case
4
with recursion
5
boundary conditions
6
and solution
7
This places sqrank within a family of Gaussian-polynomial identities rather than as an isolated partition statistic (Takagi, 2024).
In affine-crystal language, sqrank controls the position of a partition inside 8 representation-theoretic structure. For 9, the level-0 crystal, there is an explicit bijection
1
such that the image path is 2-highest, lies in the 3-node 4-component, and has left-energy
5
The construction proceeds by encoding 6 as a binary string, applying 7 to obtain an 8-highest element in a tensor crystal, inflating adjacent 9, and then inserting blocks of type 0 or 1 according to the remaining partition data. The resulting bijection preserves grading (Miyazawa et al., 29 May 2026).
The 2026 paper also interprets the same structure in the Bernard–Pasquier–Serban spinon picture. For a vacuum-sector path, if the 2-th string carries two spinons of momenta
3
then
4
It then states that sqrank enters as 5 in the 6-dimensional component and controls the total number of spinon excitations and the form of the Virasoro generator 7 spectrum in the spinon basis (Miyazawa et al., 29 May 2026).
4. Worked examples and source-level discrepancies
The supplied literature contains incompatible worked examples for partitions of 8. One source lists the five partitions of 9 and assigns the following sqrank values: 0, 1, 2, 3, and 4 (Takagi, 2024). A later source gives instead: 5, 6, 7, 8, and 9 (Miyazawa et al., 29 May 2026).
| Partition of 0 | Value in (Takagi, 2024) | Value in (Miyazawa et al., 29 May 2026) |
|---|---|---|
| 1 | 2 | 3 |
| 4 | 5 | 6 |
| 7 | 8 | 9 |
| 00 | 01 | 02 |
| 03 | 04 | 05 |
The 2026 source explicitly flags a correction issue for 06 by first writing a computation that would suggest a different value and then stating: “Careful,” followed by the assertion that the explicit bijection in Section 1 yields 07 (Miyazawa et al., 29 May 2026). A plausible implication is that small-08 examples require consultation of the full combinatorial convention being used, especially for the empty residual diagram 09 and its interaction with the crystal-theoretic normalization.
5. “Sqrank” in rank-stabilized LoRA
In large-language-model fine-tuning, “Sqrank” is used as a name for the rank-stabilized LoRA scaling factor. For a pre-trained linear layer
10
LoRA adds a trainable low-rank adapter
11
where
12
The original LoRA choice is
13
Kalajdzievski studies the limit 14 and defines “rank-stabilized” to mean that both activations and gradients remain 15. Under initialization 16, 17 iid, and adapter
18
the only choice of 19 as 20 that makes all forward-pass moments 21 and all backward-pass moments 22 remain 23 for every fixed 24 is
25
The derivation uses the expansions
26
and hence
27
Because 28, the dominant term scales like 29, so stability requires
30
The paper refers to the resulting method as rank-stabilized LoRA, or rsLoRA (Kalajdzievski, 2023).
The practical prescription is correspondingly simple: replace the usual 31 scaling by 32, leaving the training loop and optimizer step unchanged. At inference, one folds 33 into 34 exactly as in standard LoRA, so there is zero extra cost at inference time (Kalajdzievski, 2023).
The empirical results summarized for this usage are specific. On Llama 2 7B with OpenOrca instruction tuning on 35K examples, using ranks 36 and AdamW with learning rate 37, original LoRA produces perplexity curves that “essentially overlap,” while rsLoRA improves perplexity monotonically with rank. The same study reports that, at step 38, LoRA gradient norms drop roughly like 39, whereas rsLoRA keeps all ranks within the same order of magnitude throughout training. Additional ablations report the same pattern with SGD, with GPT-J 6B on GSM8K using Adafactor, when adapters are inserted only in attention, and in learning-rate sweeps where LoRA rank 40 cannot match rsLoRA rank 41 even at the best learning rate (Kalajdzievski, 2023).
6. Distinction from neighboring “rank” notions
Two nearby notions are easily conflated with Sqrank but are mathematically separate.
First, “stable rank” in SR-GRPO is a geometric statistic of hidden-state matrices, not the partition statistic and not the rsLoRA scaling rule. For a response with final hidden activations assembled into 42 and singular values 43, stable rank is
44
which lies in 45 and measures effective dimensionality. In SR-GRPO it is used as an intrinsic reward, with the reported figures of 46 accuracy on RewardBench and an average improvement of 47 percentage points over greedy decoding via Best-of-48 sampling (Tang et al., 2 Dec 2025).
Second, “rank” in succinct data structures is the prefix-sum query
49
on a static bit-vector 50. In the cell-probe model with 51-bit cells, the lower bound states that any data structure answering rank in 52 probes must use at least
53
bits of space, matching the upper bound up to the distinction between 54 and 55 when 56 (0907.1103).
This separation matters because the shared word “rank” masks unrelated objects: a partition statistic derived from Ferrers diagrams, a scaling law for low-rank adaptation, a matrix effective-dimensionality functional, and a prefix-sum query primitive.