Papers
Topics
Authors
Recent
Search
2000 character limit reached

Symmetric Average Minimum Distance (SAMD)

Updated 5 July 2026
  • SAMD is a metric that quantifies semantic change by enforcing a one-to-one matching between contextualized embeddings, ensuring symmetry and mitigating hub dominance.
  • In coding theory, SAMD represents the minimum average Hamming distance for binary codes, framed as a linear programming extremal problem with bounds derived using Krawtchouk polynomials.
  • Empirical analyses highlight SAMD's robustness under dimensionality reduction and its computational efficiency with greedy matching, outperforming traditional global averaging metrics.

Searching arXiv for the cited papers to ground the article in the relevant literature. Symmetric Average Minimum Distance (SAMD) denotes two distinct quantities in recent arXiv literature. In lexical semantic change detection (LSCD), SAMD is introduced as a measure that quantifies semantic change via local correspondence between word usages across time periods (Goworek et al., 17 Feb 2026). In coding theory, SAMD(n,M)\mathrm{SAMD}(n,M) denotes the minimum average Hamming distance of binary codes with length nn and size MM (Yu et al., 2019). The acronym therefore has domain-specific meanings: a one-to-one matching score over contextualised embeddings in lexical semantics, and an extremal quantity over binary codes in Hamming space.

1. Terminological scope and domain-specific meanings

In LSCD, the relevant objects are two sets of contextualised embeddings for a target word ww from two time periods. The purpose of SAMD in that setting is to quantify semantic change via local correspondence between word usages across time periods, in contrast to metrics that operate on global averages or prototypes (Goworek et al., 17 Feb 2026).

In coding theory, the relevant object is a binary code A{1,1}nA\subset\{-1,1\}^n of size MM. There, SAMD is not a matching algorithm or an embedding-space score, but the extremal quantity

SAMD(n,M):=minA{±1}nA=MD(A),\mathrm{SAMD}(n,M):=\min_{\substack{A\subset\{\pm1\}^n\|A|=M}} D(A),

where D(A)D(A) is the average Hamming distance of the code (Yu et al., 2019).

This suggests a terminological overlap rather than a shared formalism. The two uses of SAMD are mathematically independent, despite the identical acronym.

2. SAMD in lexical semantic change detection

Let A={a1,,am}RDA=\{a_1,\dots,a_m\}\subset\mathbb{R}^D and B={b1,,bn}RDB=\{b_1,\dots,b_n\}\subset\mathbb{R}^D be two sets of contextualised embeddings for a target word nn0 from time periods 1 and 2. Using cosine distance nn1, Symmetric Average Minimum Distance enforces a one-to-one matching between nn2 and nn3 after sampling both sets to the same size nn4 (Goworek et al., 17 Feb 2026).

Denote the selected subsets by nn5 and nn6. Let nn7 be a bijection between indices of nn8 and nn9 chosen to minimize total distance. Then

MM0

The paper contrasts SAMD with two established LSCD metrics. Average Pairwise Distance (APD) computes

MM1

and is described as global, sensitive to bulk distribution shifts, and liable to dilute signal from small emerging senses. Average Minimum Distance (AMD) is directional,

MM2

with symmetric AMD defined as MM3; it is sensitive to local correspondences, but can map multiple points in MM4 to the same point in MM5 under many-to-one matching (Goworek et al., 17 Feb 2026).

SAMD differs from AMD by enforcing one-to-one matching, thereby mitigating hubness, described as the case where a few points act as nearest neighbours for many. The paper states two reasons why symmetry matters: one-to-one alignment prevents over-representation of dominant “hub” embeddings in local-neighbour matches, and it guarantees the same number of matches in both periods and a truly symmetric notion of change. The method is also said to capture both distributional shifts and changes in concentration of usage clusters (Goworek et al., 17 Feb 2026).

3. Computation, hyperparameters, and complexity in LSCD

The step-by-step computation of SAMD begins with two sets of embeddings MM6 and MM7, and a distance function MM8, with cosine distance as the default (Goworek et al., 17 Feb 2026). The sets are equalized by setting MM9; if ww0, randomly sample ww1 embeddings from ww2, and if ww3, sample ww4 from ww5. The resulting sets are ww6 and ww7.

A pairwise distance matrix ww8 is then built with entries ww9. The paper gives a greedy one-to-one matching procedure: initialize unmatched row and column sets, flatten all triples A{1,1}nA\subset\{-1,1\}^n0, sort ascending by distance, and iterate through the sorted list, accepting a pair only if both its row and column remain unmatched. The normalized sum A{1,1}nA\subset\{-1,1\}^n1 is the SAMD score. As an alternative, one may solve the linear assignment problem via the Hungarian algorithm for the exact minimum total matching (Goworek et al., 17 Feb 2026).

The design space includes several explicit choices. The distance function can be cosine distance or Euclidean distance, with the choice affecting sensitivity to vector norms. The sampling strategy can be random uniform down-sampling to size A{1,1}nA\subset\{-1,1\}^n2, or stratified sampling if there is sense imbalance. The matching algorithm can be greedy, with complexity A{1,1}nA\subset\{-1,1\}^n3 dominated by sorting all pairs, or the Hungarian algorithm with complexity A{1,1}nA\subset\{-1,1\}^n4; greedy is described as faster and empirically near-identical. Dimensionality reduction may use full embeddings with A{1,1}nA\subset\{-1,1\}^n5, PCA to A{1,1}nA\subset\{-1,1\}^n6 dimensions, definition-space projection, or random subspace. Optional outlier handling may clip distances above a threshold or remove outlier embeddings before matching; it is stated not to be required in practice, but may improve stability if a few usages are extreme (Goworek et al., 17 Feb 2026).

The stated computational complexity uses A{1,1}nA\subset\{-1,1\}^n7 for the equalized number of embeddings per period and A{1,1}nA\subset\{-1,1\}^n8 for the embedding dimension. Pairwise distance computation costs A{1,1}nA\subset\{-1,1\}^n9, sorting all MM0 distances costs MM1, and the greedy matching pass costs MM2 in the worst case, for total complexity MM3. For very large MM4 exceeding MM5k, the paper suggests approximate nearest neighbour structures to avoid the full distance matrix, further subsampling or clustering usages first, or using the Hungarian algorithm only on a top-MM6 nearest-neighbour graph per point to reduce matrix size (Goworek et al., 17 Feb 2026).

4. Empirical behavior of SAMD in lexical semantic change benchmarks

The LSCD study reports that, across multiple languages, encoder models, and representation spaces, AMD often provides more robust performance, particularly under dimensionality reduction and with non-specialised encoders, while SAMD excels with specialised encoders (Goworek et al., 17 Feb 2026). The paper’s broader conclusion is that LSCD may benefit from considering alternative semantic change metrics beyond APD and PRT, with AMD offering a robust option for contextualised embedding-based analysis.

At the metric level, one reported result is that SAMD with PCA + XL-LEXEME achieves Spearman MM7, compared with APD at MM8 and PRT at MM9 on full embeddings. Under progressive PCA or random dimension reduction, SAMD is reported to maintain SAMD(n,M):=minA{±1}nA=MD(A),\mathrm{SAMD}(n,M):=\min_{\substack{A\subset\{\pm1\}^n\|A|=M}} D(A),0 even at SAMD(n,M):=minA{±1}nA=MD(A),\mathrm{SAMD}(n,M):=\min_{\substack{A\subset\{\pm1\}^n\|A|=M}} D(A),1–SAMD(n,M):=minA{±1}nA=MD(A),\mathrm{SAMD}(n,M):=\min_{\substack{A\subset\{\pm1\}^n\|A|=M}} D(A),2 dimensions, while APD and PRT collapse near SAMD(n,M):=minA{±1}nA=MD(A),\mathrm{SAMD}(n,M):=\min_{\substack{A\subset\{\pm1\}^n\|A|=M}} D(A),3–SAMD(n,M):=minA{±1}nA=MD(A),\mathrm{SAMD}(n,M):=\min_{\substack{A\subset\{\pm1\}^n\|A|=M}} D(A),4. Across SAMD(n,M):=minA{±1}nA=MD(A),\mathrm{SAMD}(n,M):=\min_{\substack{A\subset\{\pm1\}^n\|A|=M}} D(A),5 languages and monolingual versus multilingual encoders, SAMD consistently outperforms or matches AMD, and both surpass APD and PRT, especially under dimensionality constraints (Goworek et al., 17 Feb 2026).

The paper also isolates a representation-dependent distinction. In definition-space with SAMD(n,M):=minA{±1}nA=MD(A),\mathrm{SAMD}(n,M):=\min_{\substack{A\subset\{\pm1\}^n\|A|=M}} D(A),6–SAMD(n,M):=minA{±1}nA=MD(A),\mathrm{SAMD}(n,M):=\min_{\substack{A\subset\{\pm1\}^n\|A|=M}} D(A),7 dimensions, AMD slightly outperforms SAMD for non-specialised encoders, whereas SAMD excels with specialised ones due to its one-to-one constraint. This makes the one-to-one constraint central to the interpretation of the metric’s empirical profile, rather than a merely algorithmic detail (Goworek et al., 17 Feb 2026).

Practical implementation guidance follows the same pattern. The workflow is: extract usage embeddings for each target word and time period using the chosen encoder; optionally apply PCA or a semantic projection; equalize sizes with SAMD(n,M):=minA{±1}nA=MD(A),\mathrm{SAMD}(n,M):=\min_{\substack{A\subset\{\pm1\}^n\|A|=M}} D(A),8; compute a distance matrix or KNN-filtered distances; run greedy matching or the Hungarian algorithm; and return the average matched distance. The paper’s implementation advice includes setting max_samples to control runtime on very large usage sets, using sklearn.decomposition.PCA to reduce dimension to SAMD(n,M):=minA{±1}nA=MD(A),\mathrm{SAMD}(n,M):=\min_{\substack{A\subset\{\pm1\}^n\|A|=M}} D(A),9, and pre-clustering usages and matching cluster centroids to reduce D(A)D(A)0 for large-scale discovery (Goworek et al., 17 Feb 2026).

5. SAMD in coding theory: minimum average Hamming distance

In coding theory, let D(A)D(A)1 be a binary code of size D(A)D(A)2. Its average Hamming distance is

D(A)D(A)3

where

D(A)D(A)4

The extremal quantity

D(A)D(A)5

is called the Symmetric Average Minimum Distance of a D(A)D(A)6 code (Yu et al., 2019).

A key fact in the Yu–Tan treatment is that D(A)D(A)7 can be re-expressed in terms of the dual distance distribution D(A)D(A)8, D(A)D(A)9, satisfying A={a1,,am}RDA=\{a_1,\dots,a_m\}\subset\mathbb{R}^D0 with A={a1,,am}RDA=\{a_1,\dots,a_m\}\subset\mathbb{R}^D1. The paper states

A={a1,,am}RDA=\{a_1,\dots,a_m\}\subset\mathbb{R}^D2

so minimizing A={a1,,am}RDA=\{a_1,\dots,a_m\}\subset\mathbb{R}^D3 is equivalent to minimizing A={a1,,am}RDA=\{a_1,\dots,a_m\}\subset\mathbb{R}^D4 under MacWilliams–Delsarte/Krawtchouk constraints (Yu et al., 2019).

Relaxing to an arbitrary nonnegative vector A={a1,,am}RDA=\{a_1,\dots,a_m\}\subset\mathbb{R}^D5 yields a pair of finite-dimensional linear programs, identified as Fu–Wei–Yeung’s primal and dual LPs. The dual is written over variables A={a1,,am}RDA=\{a_1,\dots,a_m\}\subset\mathbb{R}^D6, with nonnegativity constraints and inequalities involving A={a1,,am}RDA=\{a_1,\dots,a_m\}\subset\mathbb{R}^D7, where A={a1,,am}RDA=\{a_1,\dots,a_m\}\subset\mathbb{R}^D8 is the A={a1,,am}RDA=\{a_1,\dots,a_m\}\subset\mathbb{R}^D9-th Krawtchouk polynomial in an B={b1,,bn}RDB=\{b_1,\dots,b_n\}\subset\mathbb{R}^D0-cube. By strong duality, B={b1,,bn}RDB=\{b_1,\dots,b_n\}\subset\mathbb{R}^D1, and hence for any code B={b1,,bn}RDB=\{b_1,\dots,b_n\}\subset\mathbb{R}^D2 of relative size B={b1,,bn}RDB=\{b_1,\dots,b_n\}\subset\mathbb{R}^D3,

B={b1,,bn}RDB=\{b_1,\dots,b_n\}\subset\mathbb{R}^D4

This reformulation makes SAMD a linear-programming extremal problem rather than a direct combinatorial search over codes (Yu et al., 2019).

6. Improved coding-theoretic bounds, asymptotic optimality, and Fourier consequences

Yu and Tan improve the coding-theoretic SAMD bound by exhibiting an explicit two-sparse dual feasible solution

B={b1,,bn}RDB=\{b_1,\dots,b_n\}\subset\mathbb{R}^D5

whose only nonzero entries are chosen so that the endpoint constraints B={b1,,bn}RDB=\{b_1,\dots,b_n\}\subset\mathbb{R}^D6 and B={b1,,bn}RDB=\{b_1,\dots,b_n\}\subset\mathbb{R}^D7 tighten to equality (Yu et al., 2019). The construction solves two linear equations in closed form, and the paper states that Krawtchouk-polynomial comparison lemmas on roots, monotonicity, and magnitude bounds imply that all other constraints are automatically satisfied for sufficiently large B={b1,,bn}RDB=\{b_1,\dots,b_n\}\subset\mathbb{R}^D8. Positivity of B={b1,,bn}RDB=\{b_1,\dots,b_n\}\subset\mathbb{R}^D9 and nn00 holds when nn01 and nn02.

Substituting nn03 into the dual objective and letting nn04 yields

nn05

with the closed-form piecewise function

nn06

Plugging this into the lower bound on nn07 and using a mild monotonicity lemma gives the final bound

nn08

The paper states that, as nn09, this is tight in the sense that no larger nn10 can arise from any feasible dual (Yu et al., 2019).

The same paper gives a Fourier-analytic interpretation. If nn11 has nn12 and nn13, then the degree-1 Fourier weight satisfies

nn14

The improved SAMD bound is therefore equivalent to

nn15

with the same piecewise nn16. The paper further states asymptotically optimal bounds for higher-degree Fourier weights: nn17 Historically, the work is framed as an improvement over Fu, Wei, and Yeung’s lower bound, originally derived via linear programming duality after Ahlswede and Katona posed the underlying isodiametric problem in Hamming spaces (Yu et al., 2019).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (2)

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 Symmetric Average Minimum Distance (SAMD).