Cohomology: The Dual Theory and Its Uses in TDA

3 minute read

Published:

TL;DR: Cohomology replaces chains (formal sums of simplices) with cochains (functions assigning values to simplices), and boundary maps with coboundary maps going in the opposite direction. Over a field, H^n โ‰… H_n, so the hole-counting is the same โ€” but the cup product gives extra structure, and persistent cohomology runs faster in practice due to its column-reduction direction.

From Chains to Cochains

Given a simplicial complex \(K\) and a field \(\mathbb{F}\), the \(n\)-cochain group is the dual space:

$$C^n(K; \mathbb{F}) = \mathrm{Hom}(C_n(K;\mathbb{F}),\, \mathbb{F})$$

A cochain \(\varphi \in C^n\) assigns a value in \(\mathbb{F}\) to each \(n\)-simplex. Over \(\mathbb{F}_2\), a 1-cochain assigns a bit to each edge; evaluating it on a path sums the bits along the path.

The coboundary map \(\delta_n: C^n \to C^{n+1}\) is the transpose of the boundary map:

\[(\delta_n \varphi)(\sigma) = \varphi(\partial_{n+1} \sigma) \quad \text{for all } (n+1)\text{-simplices } \sigma\]

Just as \(\partial \circ \partial = 0\), we have \(\delta \circ \delta = 0\), giving the cochain complex:

\[0 \xrightarrow{\delta_{-1}} C^0 \xrightarrow{\delta_0} C^1 \xrightarrow{\delta_1} C^2 \xrightarrow{\delta_2} \cdots\]

Cohomology Groups

  • Cocycles: \(Z^n = \ker(\delta_n)\) โ€” cochains in the kernel of the coboundary map.
  • Coboundaries: \(B^n = \mathrm{im}(\delta_{n-1})\).
  • Cohomology: \(H^n = Z^n / B^n\).

Universal Coefficients Theorem: Over a field \(\mathbb{F}\), \(H^n(K;\mathbb{F}) \cong H_n(K;\mathbb{F})\). So cohomology computes the same Betti numbers as homology โ€” they are algebraically equivalent over fields.

The Cup Product

Cohomology has extra structure: the cup product \(\smile: H^p \times H^q \to H^{p+q}\) defined by:

\[(\varphi \smile \psi)([v_0,\ldots,v_{p+q}]) = \varphi([v_0,\ldots,v_p]) \cdot \psi([v_p,\ldots,v_{p+q}])\]

The cup product turns the cohomology ring \(H^*(X;\mathbb{F}) = \bigoplus_n H^n(X;\mathbb{F})\) into a graded ring. This structure distinguishes spaces that have the same Betti numbers but different ring structures โ€” cohomology is strictly more powerful than homology as a topological invariant.

Key Insight: The torus $$T^2 = S^1 \times S^1$$ and the Klein bottle $$K$$ have the same Betti numbers over $$\mathbb{F}_2$$ ($$\beta_0 = 1, \beta_1 = 2, \beta_2 = 1$$), but their cohomology rings differ. The cup product structure distinguishes them โ€” demonstrating that cohomology is a finer invariant than just the Betti numbers.

Persistent Cohomology and Circular Coordinates

The most important TDA application of cohomology is circular coordinates (de Silva, Vejdemo-Johansson, Carlsson 2011). The algorithm:

  1. Compute \(H^1\) (first cohomology) of a point cloud using persistent cohomology.
  2. Find a persistent 1-cocycle \(\varphi\) with long lifetime (a robust circular feature).
  3. Integrate \(\varphi\) to produce a map \(f: X \to S^1\) โ€” a circular coordinate on the data.

This parameterises periodic or circular structure in data without any embedding assumptions. Applications include motion capture data (which lives on tori), gene expression data with periodic patterns, and neural activity with circular place-field topology.

Computational advantage: Ripser (the standard TDA library) is faster using cohomology than homology, because the cohomology reduction operates in the opposite direction and allows for efficient โ€œclearingโ€ optimisations (each column is cleared by exactly one pivot).

References

  • V. de Silva, D. Vejdemo-Johansson, J. Carlsson, โ€œPersistent Cohomology and Circular Coordinates,โ€ Discrete & Computational Geometry, 2011. arXiv:0905.4887.
  • U. Bauer, โ€œRipser: Efficient Computation of Vietoris-Rips Persistence Barcodes,โ€ Journal of Applied and Computational Topology, 2021.