Papers
Topics
Authors
Recent
Search
2000 character limit reached

Adjusted Mutual Information (AMI)

Updated 24 January 2026
  • Adjusted Mutual Information (AMI) is a validation metric that quantifies clustering similarity by correcting mutual information for chance using permutation-based models.
  • It addresses computational challenges with approximations like PAMI and FastAMI, enabling scalable analysis on large or granular datasets.
  • AMI provides statistical significance through normalization and standardization, making it integral for evaluating clustering performance in diverse applications.

Adjusted Mutual Information (AMI) quantifies the similarity between two clusterings, correcting the raw mutual information between partitions for chance similarities under a permutation-based null model. AMI is ubiquitous as an external validation metric in clustering analysis due to its normalization and correction for cluster-size marginal effects. The metric is theoretically grounded in the permutation model for cluster assignments and is embedded within the broader family of information-theoretic and pair-counting indices. Computational challenges associated with the exact calculation of AMI on large or highly granular datasets have motivated the development of efficient approximations, notably the pairwise permutation AMI (PAMI) and Monte Carlo-based FastAMI.

1. Formal Definition and Permutation Null Model

Given partitions U={u1,,ur}U = \{u_1, \dots, u_r\} and V={v1,,vc}V = \{v_1, \dots, v_c\} of a set of NN objects, let nij=uivjn_{ij} = |u_i \cap v_j|, ai=jnija_i = \sum_j n_{ij}, and bj=inijb_j = \sum_i n_{ij}. The empirical marginal probabilities are P(i)=ai/NP(i) = a_i/N, Q(j)=bj/NQ(j) = b_j/N, and joint probabilities P(i,j)=nij/NP(i, j) = n_{ij}/N. The mutual information (MI) is

MI(U,V)=i=1rj=1cP(i,j)logP(i,j)P(i)Q(j)=H(U)+H(V)H(U,V)\mathrm{MI}(U, V) = \sum_{i=1}^r \sum_{j=1}^c P(i, j) \log \frac{P(i, j)}{P(i) Q(j)} = H(U) + H(V) - H(U,V)

where V={v1,,vc}V = \{v_1, \dots, v_c\}0, V={v1,,vc}V = \{v_1, \dots, v_c\}1, V={v1,,vc}V = \{v_1, \dots, v_c\}2.

AMI corrects the MI for chance by subtracting its expectation under the fixed-marginals permutation model, where cluster sizes V={v1,,vc}V = \{v_1, \dots, v_c\}3 are preserved and item labels are permuted. The expectation V={v1,,vc}V = \{v_1, \dots, v_c\}4 is given by summing over hypergeometric distributions for each V={v1,,vc}V = \{v_1, \dots, v_c\}5 cell: V={v1,,vc}V = \{v_1, \dots, v_c\}6 for V={v1,,vc}V = \{v_1, \dots, v_c\}7 between V={v1,,vc}V = \{v_1, \dots, v_c\}8 and V={v1,,vc}V = \{v_1, \dots, v_c\}9. The expected MI is thus

NN0

The standard symmetric normalization of the maximum attainable MI is NN1. The AMI is finally: NN2 This normalization ensures NN3 for identical clusterings and zero for independent clusterings under the null.

2. Exact Expectation, Variance, and Standardization

Under the permutation model, it is possible to compute both the exact expectation and variance of NN4 analytically. The variance is required for the Standardized Mutual Information (SMI), defined as: NN5 which quantifies statistical significance by expressing the deviation of observed MI in units of its null standard deviation. Small variance under the null implies that even moderate observed MI yields large SMI, indicating stable and statistically significant similarity.

The exact computation of NN6 and NN7 involves multi-level sums with hypergeometric probabilities, leading to computational costs NN8 and NN9, respectively, for nij=uivjn_{ij} = |u_i \cap v_j|0 and nij=uivjn_{ij} = |u_i \cap v_j|1 clusters in nij=uivjn_{ij} = |u_i \cap v_j|2 and nij=uivjn_{ij} = |u_i \cap v_j|3 (Romano et al., 2015, Klede et al., 2023).

3. Generalizations: Tsallis Entropy and Relation to Other Indices

Romano et al. (Romano et al., 2015) unify AMI with pair-counting-based indices via the Tsallis nij=uivjn_{ij} = |u_i \cap v_j|4-entropy framework. The Tsallis entropy of partition nij=uivjn_{ij} = |u_i \cap v_j|5,

nij=uivjn_{ij} = |u_i \cap v_j|6

and its analogs for nij=uivjn_{ij} = |u_i \cap v_j|7 and the joint distribution interpolate between Shannon entropy (nij=uivjn_{ij} = |u_i \cap v_j|8, recovering Shannon-based AMI) and quadratic entropy (nij=uivjn_{ij} = |u_i \cap v_j|9, coinciding with Adjusted Rand Index). Within this framework,

ai=jnija_i = \sum_j n_{ij}0

with AMI recovered at ai=jnija_i = \sum_j n_{ij}1 and ARI at ai=jnija_i = \sum_j n_{ij}2. This formalism connects information-theoretic and pair-counting measures, making explicit the spectrum of biases and sensitivities entailed by ai=jnija_i = \sum_j n_{ij}3.

4. Computationally Tractable Approximations: Pairwise-AM and FastAMI

The exact computation of AMI is computationally demanding for large or highly granular datasets. Lazarenko and Bonald (Lazarenko et al., 2021) introduce the pairwise permutation AMI (PAMI), which replaces full permutation averaging with pairwise swaps. Given ai=jnija_i = \sum_j n_{ij}4 and ai=jnija_i = \sum_j n_{ij}5 as before, for each swap only four contingency cells can change, leading to an explicit formula: ai=jnija_i = \sum_j n_{ij}6 PAMI retains theoretical properties of AMI but reduces computational complexity to ai=jnija_i = \sum_j n_{ij}7, enabling its application to large-scale clustering tasks. On both synthetic and real benchmarks, PAMI matches the AMI cluster ranking in 93%–98% of cases, with near-perfect Spearman correlations (ai=jnija_i = \sum_j n_{ij}8) for most real datasets, and achieves an order-of-magnitude runtime improvement for large ai=jnija_i = \sum_j n_{ij}9 (Lazarenko et al., 2021).

FastAMI (Klede et al., 2023) further addresses scalability by employing Monte Carlo estimation for the expectation (and variance) under the permutation null. The method generates samples of cluster sizes and overlaps via fast sampling schemes—such as Walker's alias method and hypergeometric generators—incorporating an error-tunable stopping criterion: bj=inijb_j = \sum_i n_{ij}0 With bj=inijb_j = \sum_i n_{ij}1 samples required for relative precision bj=inijb_j = \sum_i n_{ij}2, FastAMI provides unbiased, precision-adjustable AMI (and SMI) estimates at scales where exact and pairwise methods become computationally infeasible, achieving sub-millisecond or few-millisecond times for large datasets with median absolute errors below bj=inijb_j = \sum_i n_{ij}3 and perfect or near-perfect rank recovery (Klede et al., 2023).

5. Empirical Evaluation and Guidelines for Use

Empirical studies comparing exact AMI, PAMI, and FastAMI on synthetic chains, triplet-ordering tests, and a wide suite of real datasets establish several findings:

  • PAMI achieves bj=inijb_j = \sum_i n_{ij}4 Spearman rank correlation (mean bj=inijb_j = \sum_i n_{ij}5) with AMI and provides speed-ups of bj=inijb_j = \sum_i n_{ij}6 or more on large datasets (bj=inijb_j = \sum_i n_{ij}7).
  • FastAMI achieves perfect rank correlation (bj=inijb_j = \sum_i n_{ij}8) with exact AMI at modest computational cost, outperforming PAMI in accuracy especially for highly granular partitions.
  • For SMI, direct contingency table Monte Carlo sampling yields bj=inijb_j = \sum_i n_{ij}9 correlation where the exact variant times out or becomes computationally prohibitive.

Practical guidelines synthesized from Tsallis-P(i)=ai/NP(i) = a_i/N0 analysis (Romano et al., 2015):

  • Shannon-based AMI (P(i)=ai/NP(i) = a_i/N1) favors pure clusters and is most appropriate when the reference clustering P(i)=ai/NP(i) = a_i/N2 is unbalanced and contains small clusters requiring precise recovery.
  • ARI (P(i)=ai/NP(i) = a_i/N3) is preferred for balanced clusterings with large, equal-sized clusters.
  • For model selection or situations sensitive to chance overlap (e.g., multiple candidate clusterings P(i)=ai/NP(i) = a_i/N4), SMI should be employed for uniform null selection probability.

6. Theoretical Properties and Limitations

AMI possesses symmetry, invariance to cluster label permutations, and achieves the normalization P(i)=ai/NP(i) = a_i/N5 for perfectly matching clusterings and P(i)=ai/NP(i) = a_i/N6 for baseline overlap under the null. However, the correction for bias is meaningful only under the fixed-marginals permutation null; interpretation under different clustering-generation mechanisms is not straightforward.

A notable limitation is the computational complexity bottleneck in the exact calculation, especially with unbalanced clusters or when P(i)=ai/NP(i) = a_i/N7 are all large. Pairwise permutation adjustments and Monte Carlo approaches are thus essential for scalability but may entail small but nonzero divergence from exact AMI in rare or adversarial cases (PAMI can disagree with AMI in 2%–7% of triplet-ordering scenarios; FastAMI achieves arbitrarily small error at corresponding computational cost).

7. Implementation Considerations and Best Practices

Computing AMI and its approximations entails attention to clustering encoding, nontrivial cluster-size marginals, and null sampling. Notable implementation findings:

Method Complexity Empirical Accuracy
Exact AMI P(i)=ai/NP(i) = a_i/N8 Baseline
PAMI P(i)=ai/NP(i) = a_i/N9 Spearman Q(j)=bj/NQ(j) = b_j/N0 with AMI
FastAMI Q(j)=bj/NQ(j) = b_j/N1 Spearman Q(j)=bj/NQ(j) = b_j/N2 with AMI at Q(j)=bj/NQ(j) = b_j/N3

Use cluster-size distributions drawn from uniform integer partitions, not uniform label assignments, to avoid empty cluster artifacts in random partition baselines. FastAMI’s parallelizable Monte Carlo samples and error-based stopping criteria enable robust large-scale use. Relative error criteria are recommended for MI estimates above unity; absolute error for low-MI regimes. Chan's two-pass variance update algorithm extends SMI estimation to distributed settings. For most AMI use cases, Q(j)=bj/NQ(j) = b_j/N4 delivers sufficient accuracy; for SMI, Q(j)=bj/NQ(j) = b_j/N5 restricts absolute errors to acceptable levels (Klede et al., 2023, Lazarenko et al., 2021, Romano et al., 2015).

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 Adjusted Mutual Information (AMI).