SWAP-Score: Permutation Optimality
- The paper introduces SWAP-Score as a quantitative index defined by normalizing the difference between the chance and minimum average swap distances on a permutohedron.
- It derives optimality using a quadratic assignment formulation, showing that while exact computation is NP-hard for large permutations, efficient solutions exist for small n.
- Empirical studies on word and gesture orders reveal high levels of optimality and contiguous probability structures, indicating strong alignment with swap-distance minimization principles.
to=arxiv_search.search 全民彩票 оЄjson {"query":"id:(Ferrer-i-Cancho, 2 Apr 2026) OR id:(Franco-Sánchez et al., 2024) OR id:(Peng et al., 2024) OR id:(Vats et al., 2013)","max_results":10,"sort_by":"relevance"} to=arxiv_search.search 微信的天天中彩票്ലjson {"query":"(Ferrer-i-Cancho, 2 Apr 2026)","max_results":5,"sort_by":"relevance"} to=arxiv_search.search 凤凰大参考 天天中彩票可以json {"query":"How to measure the optimality of word or gesture order with respect to the principle of swap distance minimization","max_results":5,"sort_by":"relevance"} to=arxiv_search.search 老时时彩 大发快三是json {"query":"SWAP-NAS: Sample-Wise Activation Patterns for Ultra-fast NAS","max_results":5,"sort_by":"relevance"} SWAP-Score is a quantitative index of how “optimal” a given ordering of elements is with respect to the principle that variants should minimize the number of adjacent swaps needed to reach a reference order. In the formulation developed for word order and gesture order, its theoretical foundations rest on viewing all orderings as vertices of a permutohedron graph and defining cost as the average swap distance from that source (Ferrer-i-Cancho, 2 Apr 2026). Closely related work formalizes the underlying cost as average swap distance and studies its behavior under several null models (Franco-Sánchez et al., 2024). The label “SWAP-Score” also appears in unrelated senses in sparse regression and in training-free neural architecture search, where it denotes a local loss-reduction gain and a count of unique sample-wise activation patterns, respectively [(Vats et al., 2013); (Peng et al., 2024)].
1. Permutohedron model and swap distance
Given a sequence of distinct elements, there are possible permutations. The permutohedron of order is the graph whose vertices are these permutations , and where two vertices and are connected by an edge exactly when is obtained from by swapping two adjacent elements (Ferrer-i-Cancho, 2 Apr 2026).
The swap distance between two permutations is the length of the shortest path between them in the permutohedron, that is, the minimum number of adjacent-element swaps needed to transform one into the other. If all permutations are indexed by , then
0
with diameter
1
For 2, the six permutations of 3, 4, and 5 form a hexagon. 6 differ by swapping 7 and therefore have distance 8, whereas 9 require two adjacent swaps and therefore have distance 0. Here 1 (Ferrer-i-Cancho, 2 Apr 2026).
This construction supplies the graph-theoretic substrate for treating order variation as a geometric distribution over permutations rather than as an unordered frequency table. A plausible implication is that optimality is not attached to a single order alone, but to the alignment between a probability distribution over orders and the topology of the permutohedron.
2. Formal derivation of the degree of optimality
Assume a probability distribution 2 over the 3 orderings. The average swap distance of this distribution is
4
It measures expected cost if one randomly selects two orders according to 5 and then counts how many adjacent swaps separate them (Ferrer-i-Cancho, 2 Apr 2026).
A raw 6 is difficult to interpret because it depends on 7 and on the concentration of the probability mass. The normalization therefore uses two benchmarks. The first is a chance baseline obtained by shuffling the assignment of the 8's to the permutohedron vertices uniformly at random. If 9 denotes the expected 0 under this random-permutation null model, then
1
where 2 is the Simpson index of 3, equivalent to probability-mass at distance zero (Ferrer-i-Cancho, 2 Apr 2026).
The second benchmark is the minimum attainable cost over all assignments of the same multiset of probabilities 4: 5 For 6, a closed-form expression is reported as
7
The SWAP-Score, or degree of optimality 8, is then
9
Interpretatively, 0 means 1, so the arrangement is globally optimal; 2 means 3, so the observed cost is what one would expect by chance; and 4 indicates worse-than-chance ordering (Ferrer-i-Cancho, 2 Apr 2026).
3. Reduction to the Quadratic Assignment Problem
The optimization problem for 5 can be written in matrix terms. Let 6 be the 7 matrix with entries 8, and let 9 be the permutohedron distance matrix 0. Then
1
where 2 is a permutation matrix. Finding 3 is therefore a Koopmans–Beckmann quadratic assignment problem: 4 Since general QAP is NP-hard, exact solution is infeasible for large 5 (Ferrer-i-Cancho, 2 Apr 2026).
The computational regimes stated for this formulation are threefold. Brute-force enumeration is only possible up to 6. Beyond that, one must turn to specialized QAP solvers such as QAPLIB or to integer-programming formulations, or else to approximation or heuristics such as greedy local improvements (Ferrer-i-Cancho, 2 Apr 2026).
For 7, the paper gives an efficient simplification. The two globally optimal assignments arrange probabilities in breadth-first traversal of the permutohedron, assigning 8 to one vertex, 9 to an adjacent vertex, 0 to the other neighbour, 1 to a distance-2 vertex, 3 to the other distance-4 vertex, and 5 to the antipode (Ferrer-i-Cancho, 2 Apr 2026). This suggests that, in the smallest nontrivial case, global optimality is tightly coupled to the local metric structure of the graph.
4. Worked example and empirical gesture results
A concrete example is given for English gestures in reversible events. The reported relative frequencies for the six orders are
6
Using these values, the paper reports 7, 8, 9, 0, and finally
1
(Ferrer-i-Cancho, 2 Apr 2026).
The broader empirical application concerns a dataset of unconventional gestures across four languages—English, Russian, Irish, and Tagalog—and two verb-reversibility conditions. The reported results are that, in every sub-case, 2, so the distributions are at least 3 optimal; half of the eight conditions attain 4, that is, perfect global optimality; Wilcoxon tests confirm 5 with 6; and a Poisson-binomial test gives 7 for the number of perfect cases (Ferrer-i-Cancho, 2 Apr 2026).
Moreover, all eight empirical probability arrangements are contiguous on the permutohedron, meaning that the non-zero orders form a single path. The paper characterizes this as a structural epiphenomenon of swap-distance minimization and reports 8 against chance (Ferrer-i-Cancho, 2 Apr 2026). A plausible implication is that swap-distance minimization constrains not only aggregate cost but also the support geometry of the observed distribution.
5. Relation to average swap distance and entropy minimization
Ferrer-i-Cancho et al. formalize the underlying quantity as average swap distance,
9
or equivalently 0, where 1 is the probability mass at distance 2 (Franco-Sánchez et al., 2024). In that treatment, 3, with equality precisely when all mass is on a single permutation. For 4, and conjecturally for all 5,
6
and equality holds, for instance, when 7 is uniform or when 8 puts mass 9 on two permutations at maximal distance 0 (Franco-Sánchez et al., 2024).
That paper studies three null hypotheses. Under the die-rolling null hypothesis,
1
Under the Polya-urn null hypothesis, no closed form is given and 2 is estimated by Monte Carlo. Under random permutation of the empirical 3-vector,
4
where 5 is Simpson’s index (Franco-Sánchez et al., 2024).
The same work compares swap-distance minimization with entropy minimization, where block entropy is
6
It reports strong evidence of entropy minimization and swap distance minimization with respect to a die rolling experiment, strong evidence for both forces with respect to a Polya urn process for 7 but weaker evidence for 8, and evidence of swap distance minimization when word order frequencies are shuffled, indicating that swap distance minimization effects are beyond pressure to minimize word order entropy (Franco-Sánchez et al., 2024). The bridge between the two perspectives is the Simpson index, which links quadratic diversity to the Rényi entropies through 9.
6. Extensions, limitations, and scope conditions
The framework generalizes conceptually to 00 by redefining the permutohedron in higher dimensions, but this incurs the full QAP hardness for computing 01. Approximate heuristics or problem-specific bounds are therefore required in larger cases (Ferrer-i-Cancho, 2 Apr 2026).
Tied probabilities 02 slightly complicate ranking and formulas for 03 but do not invalidate the approach. At the same time, the SWAP-Score is strictly comparative: it tells us how close an observed distribution is to the best possible under the swap-distance principle, but it does not identify why human or gestural systems approximate that optimum (Ferrer-i-Cancho, 2 Apr 2026).
The stated domain of extension goes beyond linguistic word order and gestures to any permutation-based phenomenon where cost is measured in adjacent exchanges, including dependency-distance minimization and biological sequence rearrangements (Ferrer-i-Cancho, 2 Apr 2026). This suggests that the framework is best understood as a general optimization template for distributions over permutations rather than as a language-specific statistic.
7. Other uses of the label in arXiv literature
In sparse regression, Vats and Baraniuk use the label for a different object. There, with response 04, design matrix 05, current support 06, and residual loss 07, a swap removes 08 and inserts 09, producing 10. The SWAP-Score is the gain
11
and the algorithm selects the pair maximizing 12. The global objective is 13, the score is computed efficiently via rank-one updates of orthogonal projectors, and recovery guarantees are given under restricted eigenvalues and a generalized coherence parameter 14 (Vats et al., 2013).
In training-free neural architecture search, the label denotes a zero-cost proxy based on Sample-Wise Activation Patterns. For a ReLU network 15 with fixed random parameters 16, mini-batch size 17, and 18 scalar pre-activations, one forms binary vectors 19 by thresholding each pre-activation across the batch, collects the set 20, and defines
21
A regularised version multiplies 22 by 23, where 24 is the number of parameters. The paper reports Spearman’s rank correlation coefficient of 25 between regularised SWAP-Score and CIFAR-100 validation accuracies on NAS-Bench-201 networks, and states that SWAP-NAS achieves competitive performance on CIFAR-10 and ImageNet in approximately 26 minutes and 27 minutes of GPU time respectively (Peng et al., 2024).
These usages are mathematically unrelated. In one case SWAP-Score is a degree of optimality on a permutohedron; in another it is a local improvement criterion for support swaps; in a third it is the cardinality of a set of activation patterns. This suggests that, in technical writing, the term is not self-identifying and must be interpreted through the paper-specific formal definition.