Papers
Topics
Authors
Recent
2000 character limit reached

Geometric Alignment Score (GAS)

Updated 5 December 2025
  • Geometric Alignment Score (GAS) is a metric that compares the topological features of real and generated data manifolds using Betti curves and relative living time.
  • It leverages computational topology constructs like simplicial complexes and persistent homology to detect GAN failures such as mode collapse and local geometric distortions.
  • GAS computes a mean relative living time (MRLT) via witness complexes, offering a robust, topology-based alternative to conventional metrics like Inception Score and FID.

The Geometric Alignment Score (GAS), also known as the Geometry Score, is a quantitative and qualitative metric for comparing generative models, specifically Generative Adversarial Networks (GANs), via the topological properties of the data manifolds they generate. GAS evaluates the degree to which the model-generated sample manifold matches the topological “shape” of the manifold underlying real data, providing a distinctive perspective compared to conventional GAN evaluation metrics centered on perceptual similarity or feature distributions. This framework is grounded in computational algebraic topology and is applicable to datasets of arbitrary nature, including non-image domains (Khrulkov et al., 2018).

1. Manifold Hypothesis and Topological Motivation

In generative modeling, the manifold hypothesis posits that real-world data, such as natural images, resides on a low-dimensional, nonlinear submanifold MdataRD\mathcal M_{\mathrm{data}}\subset \mathbb R^D within high-dimensional ambient space. A GAN generator induces its own model manifold Mmodel\mathcal M_{\mathrm{model}}. Traditional metrics, including Inception Score and Fréchet Inception Distance, are contingent on neural network feature extractors and Gaussian approximations, thereby rendering them insensitive to certain structural pathologies such as mode collapse or local geometric distortions.

Topology is uniquely robust to smooth deformations—meaning connected components, loops, and higher-dimensional “holes” persist under continuous transformations—making GAS an invariant measure for comparing real and generated data distributions by their intrinsic shape characteristics. The objective is to detect topological defects introduced by model failures, complementing existing metrics by identifying qualitative discrepancies missed by network-based or distributional comparisons.

2. Mathematical Framework

GAS draws upon four constructs from computational topology: simplicial complexes, the Vietoris–Rips filtration, Betti numbers, and persistent homology.

  • Simplicial Complexes: Given a finite vertex set Z={z1,,zn}Z = \{z_1, \dots, z_n\}, an abstract simplicial complex S\mathcal S is a collection Σ\Sigma of subsets of ZZ that includes every subset of each simplex and every singleton {zi}\{z_i\}.
  • Vietoris–Rips Filtration: For metric space (X,d)(X, d) and scale parameter ε0\varepsilon \geq 0, Rε(X)={σX:d(x,x)ε  x,xσ}R_\varepsilon(X) = \{\sigma \subset X : d(x, x’) \leq \varepsilon \;\forall x, x’ \in \sigma\} forms nested complexes as ε\varepsilon increases, yielding a filtration.
  • Betti Numbers: The kk-th Betti number βk(S)=dimHk(S)\beta_k(\mathcal S) = \dim H_k(\mathcal S) quantifies the number of independent kk-dimensional holes (β0\beta_0: connected components; β1\beta_1: loops).
  • Persistent Homology: As ε\varepsilon varies, holes “appear” (birth bib_i) and “disappear” (death did_i), forming intervals Ik={[bi,di]}i=1N\mathcal I_k = \{[b_i, d_i]\}_{i=1}^N. The Betti curve βk(ε)\beta_k(\varepsilon) counts active kk-dimensional features at scale ε\varepsilon.

3. Derivation and Construction of GAS

The metric construction focuses on k=1k=1 (loops). The sequence of steps is as follows:

  • Betti Curves and Relative Living Time (RLT): The instantaneous Betti-1 count is β1(ε)\beta_1(\varepsilon). For integer j0j \geq 0,

RLT(j;X)=Lebesgue{ε[0,εmax]:β1(ε)=j}εmax\mathrm{RLT}(j; X) = \frac{ \text{Lebesgue}\{\varepsilon \in [0, \varepsilon_{\max}]: \beta_1(\varepsilon) = j\} }{\varepsilon_{\max}}

computes the proportion of scale ε\varepsilon where the complex sustains exactly jj loops.

  • Witness Complex and Mean RLT (MRLT): For scalable computation, a small random subset of L0L_0 landmarks is selected uniformly from XX to build a witness complex. Repeating NtrialsN_{\mathrm{trials}} draws yields

pX(j)EL[RLT(j;X,L)]p_X(j) \triangleq \mathbb{E}_{L}\big[\mathrm{RLT}(j; X, L)\big]

and pX={pX(j)}j=0jmaxp_X = \{p_X(j)\}_{j=0}^{j_{\max}} is a probability distribution over loop counts.

  • Geometry Score Computation: Given two datasets (real X1X_1, generated X2X_2), compare their MRLTs using squared L2L_2 distance:

GeomScore(X1,X2)=j=0jmax[pX1(j)pX2(j)]2\mathrm{GeomScore}(X_1, X_2) = \sum_{j=0}^{j_{\max}} [p_{X_1}(j) - p_{X_2}(j)]^2

Optionally, use Earth-Mover’s Distance (EMD) for distributional divergence. Lower scores indicate superior topological alignment.

4. Algorithmic Procedure and Computational Complexity

Key parameters and workflow:

  • XRDX \subset \mathbb R^D, X=N|X| = N
  • Number of landmarks L0L_0 (typically 50–100)
  • Number of trials NtrialsN_{\mathrm{trials}} (at least 10310^310410^4)
  • Maximal loop count jmaxj_{\max}
  • Scale factor γ\gamma for εmax\varepsilon_{\max} (set as γ1/100\gamma \approx 1/100)

The algorithm proceeds:

1
2
3
4
5
6
7
8
9
10
11
for t = 1N_trials:
    L = random subset of X, size L0
    compute pairwise distances d(L, X)
    ε_max = γ · max_{u, v  L} d(u, v)
    build witness_complex W for ε  [0, ε_max], dim  2
    compute persistence intervals I1 = {[b_i, d_i]} in H1
    form Betti curve β1(ε) from I1
    for j = 0j_max:
        RLT_t[j] = (Lebesgue measure of {ε: β1(ε) = j}) / ε_max
p_X = average of RLT_t over t
return GeomScore(p_X_real, p_X_gen)

Per trial, distance matrix computation is O(NL0D)O(N \cdot L_0 \cdot D). Witness complex and persistence for dimension ≤ 2 scales subcubically in L0L_0 and is independent of DD. Overall complexity is linear in DD and the product NL0N \cdot L_0 times the number of trials.

5. Diagnostic Utility for GAN Evaluation

GAS is designed to detect GAN mode collapse and topological anomalies:

  • Mode Collapse: Generated data lacking loops yields MRLT concentrated at j=0j=0, resulting in high geometry score versus real data.
  • Partial Collapse or Missing Modes: Shifts in MRLT mass across different jj bins indicate nuanced topological mismatches.
  • Empirical Examples: On synthetic circles with variable loop counts, GAS recovers correct β1\beta_1 values. In the CelebA “bad-DCGAN,” forced mode collapse yields MRLT peaked at j=0j=0. On MNIST, WGAN-GP achieves MRLT distributions closer to real samples than vanilla WGAN.

This suggests that GAS can flag model-specific failures not captured by perceptual metrics.

6. Implementation and Practical Considerations

Library choices include:

  • GUDHI (Python): Fully supports witness complexes and persistent homology.
  • Ripser, Dionysus: Efficient for Vietoris–Rips complexes and fast persistence computation, but lack dedicated witness-complex support.

Implementation heuristics:

  • Random, uniform landmark selection.
  • Sufficient trial repetitions for MRLT stability (103\gtrsim 10^3).
  • εmax\varepsilon_{\max} scaling via γmaxu,vLd(u,v)\gamma \cdot \max_{u, v \in L} d(u, v).
  • Finely bin Betti curves or compute exact Lebesgue measures for numerical robustness.
  • Computational bottleneck is pairwise distance calculation for high data dimensionality; persistent homology computation is negligible for simplex dimension 2\leq 2.

7. Relationship to Other Metrics and Combined Usage

A comparison of principal GAN quality metrics is summarized as follows:

Metric Measures Limitations
Inception Score Sharpness, diversity Requires pretrained net; topology-insensitive
FID Feature Gaussian fit Fast; overlooks topological error
Geometry Score/GAS Topological alignment No visual fidelity; only β1\beta_1; higher compute cost

IS and FID characterize perceptual quality and diversity but fail to identify topological pathologies. GAS operates without pretrained nets, is sensitive to mode collapse and topological mismatches, and extends to non-image domains, but does not directly address visual fidelity, is limited to first-order topology, and is computationally intensive.

In practice, joint application of GAS and perceptual metrics offers a more thorough diagnostic, with GAS highlighting topological defects and IS/FID reporting perceptual congruity (Khrulkov et al., 2018).

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

Whiteboard

Follow Topic

Get notified by email when new papers are published related to Geometric Alignment Score (GAS).