Papers
Topics
Authors
Recent
Search
2000 character limit reached

SWAP-Score: Permutation Optimality

Updated 4 July 2026
  • 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 nn distinct elements, there are N=n!N=n! possible permutations. The permutohedron of order nn is the graph whose vertices are these permutations π\pi, and where two vertices π\pi and π\pi' are connected by an edge exactly when π\pi' is obtained from π\pi by swapping two adjacent elements (Ferrer-i-Cancho, 2 Apr 2026).

The swap distance d(π,σ)d(\pi,\sigma) 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 i,j[1N]i,j\in[1\ldots N], then

N=n!N=n!0

with diameter

N=n!N=n!1

For N=n!N=n!2, the six permutations of N=n!N=n!3, N=n!N=n!4, and N=n!N=n!5 form a hexagon. N=n!N=n!6 differ by swapping N=n!N=n!7 and therefore have distance N=n!N=n!8, whereas N=n!N=n!9 require two adjacent swaps and therefore have distance nn0. Here nn1 (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 nn2 over the nn3 orderings. The average swap distance of this distribution is

nn4

It measures expected cost if one randomly selects two orders according to nn5 and then counts how many adjacent swaps separate them (Ferrer-i-Cancho, 2 Apr 2026).

A raw nn6 is difficult to interpret because it depends on nn7 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 nn8's to the permutohedron vertices uniformly at random. If nn9 denotes the expected π\pi0 under this random-permutation null model, then

π\pi1

where π\pi2 is the Simpson index of π\pi3, 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 π\pi4: π\pi5 For π\pi6, a closed-form expression is reported as

π\pi7

The SWAP-Score, or degree of optimality π\pi8, is then

π\pi9

Interpretatively, π\pi0 means π\pi1, so the arrangement is globally optimal; π\pi2 means π\pi3, so the observed cost is what one would expect by chance; and π\pi4 indicates worse-than-chance ordering (Ferrer-i-Cancho, 2 Apr 2026).

3. Reduction to the Quadratic Assignment Problem

The optimization problem for π\pi5 can be written in matrix terms. Let π\pi6 be the π\pi7 matrix with entries π\pi8, and let π\pi9 be the permutohedron distance matrix π\pi'0. Then

π\pi'1

where π\pi'2 is a permutation matrix. Finding π\pi'3 is therefore a Koopmans–Beckmann quadratic assignment problem: π\pi'4 Since general QAP is NP-hard, exact solution is infeasible for large π\pi'5 (Ferrer-i-Cancho, 2 Apr 2026).

The computational regimes stated for this formulation are threefold. Brute-force enumeration is only possible up to π\pi'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 π\pi'7, the paper gives an efficient simplification. The two globally optimal assignments arrange probabilities in breadth-first traversal of the permutohedron, assigning π\pi'8 to one vertex, π\pi'9 to an adjacent vertex, π\pi'0 to the other neighbour, π\pi'1 to a distance-π\pi'2 vertex, π\pi'3 to the other distance-π\pi'4 vertex, and π\pi'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

π\pi'6

Using these values, the paper reports π\pi'7, π\pi'8, π\pi'9, π\pi0, and finally

π\pi1

(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, π\pi2, so the distributions are at least π\pi3 optimal; half of the eight conditions attain π\pi4, that is, perfect global optimality; Wilcoxon tests confirm π\pi5 with π\pi6; and a Poisson-binomial test gives π\pi7 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 π\pi8 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,

π\pi9

or equivalently d(π,σ)d(\pi,\sigma)0, where d(π,σ)d(\pi,\sigma)1 is the probability mass at distance d(π,σ)d(\pi,\sigma)2 (Franco-Sánchez et al., 2024). In that treatment, d(π,σ)d(\pi,\sigma)3, with equality precisely when all mass is on a single permutation. For d(π,σ)d(\pi,\sigma)4, and conjecturally for all d(π,σ)d(\pi,\sigma)5,

d(π,σ)d(\pi,\sigma)6

and equality holds, for instance, when d(π,σ)d(\pi,\sigma)7 is uniform or when d(π,σ)d(\pi,\sigma)8 puts mass d(π,σ)d(\pi,\sigma)9 on two permutations at maximal distance i,j[1N]i,j\in[1\ldots N]0 (Franco-Sánchez et al., 2024).

That paper studies three null hypotheses. Under the die-rolling null hypothesis,

i,j[1N]i,j\in[1\ldots N]1

Under the Polya-urn null hypothesis, no closed form is given and i,j[1N]i,j\in[1\ldots N]2 is estimated by Monte Carlo. Under random permutation of the empirical i,j[1N]i,j\in[1\ldots N]3-vector,

i,j[1N]i,j\in[1\ldots N]4

where i,j[1N]i,j\in[1\ldots N]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

i,j[1N]i,j\in[1\ldots N]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 i,j[1N]i,j\in[1\ldots N]7 but weaker evidence for i,j[1N]i,j\in[1\ldots N]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 i,j[1N]i,j\in[1\ldots N]9.

6. Extensions, limitations, and scope conditions

The framework generalizes conceptually to N=n!N=n!00 by redefining the permutohedron in higher dimensions, but this incurs the full QAP hardness for computing N=n!N=n!01. Approximate heuristics or problem-specific bounds are therefore required in larger cases (Ferrer-i-Cancho, 2 Apr 2026).

Tied probabilities N=n!N=n!02 slightly complicate ranking and formulas for N=n!N=n!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 N=n!N=n!04, design matrix N=n!N=n!05, current support N=n!N=n!06, and residual loss N=n!N=n!07, a swap removes N=n!N=n!08 and inserts N=n!N=n!09, producing N=n!N=n!10. The SWAP-Score is the gain

N=n!N=n!11

and the algorithm selects the pair maximizing N=n!N=n!12. The global objective is N=n!N=n!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 N=n!N=n!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 N=n!N=n!15 with fixed random parameters N=n!N=n!16, mini-batch size N=n!N=n!17, and N=n!N=n!18 scalar pre-activations, one forms binary vectors N=n!N=n!19 by thresholding each pre-activation across the batch, collects the set N=n!N=n!20, and defines

N=n!N=n!21

A regularised version multiplies N=n!N=n!22 by N=n!N=n!23, where N=n!N=n!24 is the number of parameters. The paper reports Spearman’s rank correlation coefficient of N=n!N=n!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 N=n!N=n!26 minutes and N=n!N=n!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.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to SWAP-Score.