Search

Search papers and lessons

Fuzzy Simplicial Set

Level 4 · 13 min read

A fuzzy simplicial set is a simplicial complex in which every simplex carries a membership strength between 0 and 1, so that connections can be strong or weak instead of present or absent.

On this page

  • Colour = topic mix
  • Discrete math
  • ReadReady to readNot yet

TL;DR

A simplicial complex records which groups of points are joined, but only as yes or no. A fuzzy simplicial set keeps the same shape and gives every simplex a membership strength between 0 and 1, so a connection can be strong, weak, or anything in between. It solves the problem of building a faithful picture of a noisy point cloud where some neighbours are clearly close and others are only maybe close. It matters because it is the structure that the UMAP method uses to decide how points should be drawn in two dimensions.

Builds on: Simplicial Complex, Fuzzy Set · Leads to: UMAP

Where it's used

  • Dimension reduction for scientific data. UMAP, introduced in 2018 by Leland McInnes, John Healy and James Melville, turns a table of many measurements per sample into a two-dimensional scatter plot. It is widely used to look at single-cell gene-expression data, where each cell is described by thousands of numbers. The fuzzy simplicial set is the hidden object UMAP builds from the nearest-neighbour graph before it lays out the points.
  • Noisy neighbourhoods. Real data is not evenly spaced. A point may have one neighbour very close and three more at about the same larger distance. A yes-or-no Graph treats all four links alike. A fuzzy version gives the close link a strength near 1 and the far links lower strengths, so the layout reflects that difference.
  • Clustering with overlap. Fuzzy clustering, where a point belongs to several groups to different degrees, uses the same idea of partial membership. The fuzzy simplicial set adds the rule that a face of a simplex is never weaker than the simplex itself, which keeps the strengths consistent across dimensions.

How it works

Start with three points on a line: aa at position 0, bb at position 1, and cc at position 3. Distances are d(a,b)=1d(a,b) = 1, d(a,c)=3d(a,c) = 3 and d(b,c)=2d(b,c) = 2. We want a weighted picture of how strongly each pair is connected.

  1. Start from the nearest neighbours. Use k=2k = 2. Each point keeps its two nearest other points. For aa these are bb and cc. For bb they are aa and cc. For cc they are bb and aa. Check: each point has exactly two neighbours, and no point is its own neighbour.
  2. Record the nearest distance for each point. Let ρx\rho_x be the distance from xx to its closest other point. Here ρa=1\rho_a = 1 (to bb), ρb=1\rho_b = 1 (to aa) and ρc=2\rho_c = 2 (to bb). Check: ρc\rho_c is 2 because cc is 2 away from bb and 3 away from aa.
  3. Set a width for each point. Each point gets a width σx>0\sigma_x > 0 that controls how fast strength falls off with distance. The width is found by a search that depends on kk. This tiny example skips the search and sets σa=σb=σc=2\sigma_a = \sigma_b = \sigma_c = 2 by hand, because with k=2k = 2 the search has no finite answer (see the math). Check: all three widths are positive.
  4. Turn each directed link into a strength with the exponential. The strength of the link from xx to a neighbour yy is exp⁡(−(d(x,y)−ρx)/σx)\exp\bigl(-(d(x,y) - \rho_x)/\sigma_x\bigr). The nearest neighbour always gets strength exactly 1, because its distance minus ρx\rho_x is 0. Farther neighbours get smaller values. Check: aa to bb gives exp⁡(0)=1\exp(0) = 1.
  5. Compute the six directed strengths. From aa: to bb is 1, to cc is exp⁡(−(3−1)/2)=exp⁡(−1)≈0.3679\exp(-(3-1)/2) = \exp(-1) \approx 0.3679. From bb: to aa is 1, to cc is exp⁡(−(2−1)/2)=exp⁡(−0.5)≈0.6065\exp(-(2-1)/2) = \exp(-0.5) \approx 0.6065. From cc: to bb is exp⁡(0)=1\exp(0) = 1, to aa is exp⁡(−(3−2)/2)=exp⁡(−0.5)≈0.6065\exp(-(3-2)/2) = \exp(-0.5) \approx 0.6065. Check: every value is between 0 and 1.
  6. Make each pair symmetric. A pair such as {a,c}\{a, c\} has two directed strengths, one from each end. Combine them with the fuzzy union s=p+q−pqs = p + q - pq. For {a,b}\{a, b\} the two values are 1 and 1, so the union is 1+1−1=11 + 1 - 1 = 1. For {b,c}\{b, c\} the values are 0.60650.6065 and 11, so the union is 11. For {a,c}\{a, c\} the values are 0.36790.3679 and 0.60650.6065, so the union is 0.3679+0.6065−0.3679×0.6065≈0.75130.3679 + 0.6065 - 0.3679 \times 0.6065 \approx 0.7513. Check: the union is never smaller than either input and never larger than 1.
  7. Read the result. The final picture has three edges with strengths 11, 11 and about 0.750.75. The pair {a,c}\{a, c\} is connected, but more weakly than the other two pairs, which is what we expect because cc is far from aa.
flowchart LR
  A["a"] -- "1" --- B["b"]
  B -- "1" --- C["c"]
  A -- "0.75" --- C

The diagram shows the final weighted picture. Each edge carries its strength, and the layout later pulls strongly connected points closer together.

The math

Definition: Fuzzy simplicial complex

Let VV be a finite set. A fuzzy simplicial complex on VV is a function μ\mu that assigns to each non-empty subset σ⊆V\sigma \subseteq V a number μ(σ)∈[0,1]\mu(\sigma) \in [0, 1], such that μ(τ)≥μ(σ)\mu(\tau) \ge \mu(\sigma) whenever τ⊆σ\tau \subseteq \sigma and τ\tau is non-empty. The number μ(σ)\mu(\sigma) is the membership strength of the simplex σ\sigma. A face is never weaker than the simplex it belongs to.

Step 1 in symbols: the simplices and their strengths

The walkthrough uses the vertex set V={a,b,c}V = \{a, b, c\}. Its non-empty subsets are the vertices {a},{b},{c}\{a\}, \{b\}, \{c\}, the edges {a,b},{a,c},{b,c}\{a, b\}, \{a, c\}, \{b, c\}, and the triangle {a,b,c}\{a, b, c\}. Each one receives a strength. In UMAP only vertices and edges are used, so we set μ({x})=1\mu(\{x\}) = 1 for every vertex and give each edge its symmetrised strength.

Step 2 in symbols: nearest neighbours and the local distance

Let NxN_x be the set of kk nearest other points to xx, and let ρx=min⁡y≠xd(x,y)\rho_x = \min_{y \ne x} d(x, y) be the distance to the closest one. The value ρx\rho_x is the distance to the nearest neighbour, so it is the smallest distance that matters for xx. In the example, Na={b,c}N_a = \{b, c\} and ρa=1\rho_a = 1.

Step 3 in symbols: the width equation

The width σx\sigma_x is the solution of the following, where log⁡2\log_2 is the base-2 logarithm:

∑y∈Nxexp⁡ ⁣(−d(x,y)−ρxσx)=log⁡2k.\sum_{y \in N_x} \exp\!\left(-\frac{d(x, y) - \rho_x}{\sigma_x}\right) = \log_2 k.

The nearest neighbour always contributes exactly 1 to the sum. As σx\sigma_x shrinks toward 0 the sum falls to 1, and as σx\sigma_x grows the sum rises toward kk. So a solution exists whenever 1<log⁡2k<k1 < \log_2 k < k, and binary search finds it. For k=2k = 2 the target log⁡22=1\log_2 2 = 1 is the lower limit, so no finite width meets it; the walkthrough therefore sets the widths by hand and shows only how they are used once known.

Step 4 in symbols: directed strengths

For y∈Nxy \in N_x the directed strength is

μx→y=exp⁡ ⁣(−max⁡(0,  d(x,y)−ρx)σx).\mu_{x \to y} = \exp\!\left(-\frac{\max\bigl(0,\; d(x, y) - \rho_x\bigr)}{\sigma_x}\right).

The max⁡\max keeps the exponent at 0 or below, so the strength never exceeds 1. The nearest neighbour gives μx→y=1\mu_{x \to y} = 1. In the example, μa→c=exp⁡(−(3−1)/2)=exp⁡(−1)\mu_{a \to c} = \exp(-(3 - 1)/2) = \exp(-1).

Step 5 in symbols: symmetrising with the fuzzy union

A pair of points may have two different directed strengths, p=μx→yp = \mu_{x \to y} and q=μy→xq = \mu_{y \to x}. UMAP combines them as

μxy=p+q−pq=1−(1−p)(1−q).\mu_{xy} = p + q - pq = 1 - (1 - p)(1 - q).

The second form shows the meaning: 1−p1 - p and 1−q1 - q are the chances that each direction fails to connect, and μxy\mu_{xy} is the chance that at least one direction connects. This is the fuzzy union, which is the fuzzy version of "or" for membership strengths.

For aa and cc in the example, p=e−1≈0.36788p = e^{-1} \approx 0.36788 and q=e−1/2≈0.60653q = e^{-1/2} \approx 0.60653, so

μac=0.36788+0.60653−0.36788×0.60653≈0.7513.\mu_{ac} = 0.36788 + 0.60653 - 0.36788 \times 0.60653 \approx 0.7513.

Step 6 in symbols: the cut at a level

For a level α\alpha with 0<α≤10 < \alpha \le 1, the set Kα={σ:μ(σ)≥α}K_\alpha = \{\sigma : \mu(\sigma) \ge \alpha\} is an ordinary simplicial complex. It is closed under faces because μ\mu never gets smaller on a face than on the simplex containing it. This is why the fuzzy object is a generalisation of the crisp one: each cut is a simplicial complex, and the fuzzy version keeps all the cuts at once.

Worked examples

Example
Example 1: two points
  1. Take V={p,q}V = \{p, q\} with d(p,q)=4d(p, q) = 4. Each point has one neighbour, so Np={q}N_p = \{q\} and Nq={p}N_q = \{p\}.
  2. The nearest distances are ρp=ρq=4\rho_p = \rho_q = 4.
  3. The directed strength from pp to qq is exp⁡(−(4−4)/σp)=exp⁡(0)=1\exp(-(4 - 4)/\sigma_p) = \exp(0) = 1. The same holds from qq to pp.
  4. The union is 1+1−1×1=11 + 1 - 1 \times 1 = 1.
  5. Interpretation: with only two points, the single edge is fully present, with strength 1.
Example
Example 2: the standard case with unequal widths
  1. Use the three points aa, bb, cc from the walkthrough, with σa=2\sigma_a = 2, σb=2\sigma_b = 2 and σc=1\sigma_c = 1.
  2. The directed strengths from aa and bb are unchanged: μa→c=exp⁡(−1)≈0.36788\mu_{a \to c} = \exp(-1) \approx 0.36788 and μb→c=exp⁡(−0.5)≈0.60653\mu_{b \to c} = \exp(-0.5) \approx 0.60653.
  3. From cc to aa the new width gives μc→a=exp⁡(−(3−2)/1)=exp⁡(−1)≈0.36788\mu_{c \to a} = \exp(-(3 - 2)/1) = \exp(-1) \approx 0.36788.
  4. For the pair {a,c}\{a, c\} the union is 0.36788+0.36788−0.36788×0.36788≈0.73576−0.13534=0.600420.36788 + 0.36788 - 0.36788 \times 0.36788 \approx 0.73576 - 0.13534 = 0.60042.
  5. The union is about 0.60040.6004. This is larger than either directed value, as the union always is.
  6. Interpretation: making cc's width smaller made cc less willing to link to aa, so the direct strength from cc dropped from 0.60650.6065 to 0.36790.3679. The union fell from 0.75130.7513 to 0.60040.6004, and it stayed above 0.50.5 because aa still links to cc firmly.
Example
Example 3: a realistic cut of a noisy neighbourhood
  1. Keep the three points with σa=2\sigma_a = 2, σb=2\sigma_b = 2, and change only σc\sigma_c to 0.50.5.
  2. The directed strength from cc to aa becomes μc→a=exp⁡(−(3−2)/0.5)=exp⁡(−2)≈0.13534\mu_{c \to a} = \exp(-(3 - 2)/0.5) = \exp(-2) \approx 0.13534.
  3. The union for {a,c}\{a, c\} is 0.36788+0.13534−0.36788×0.13534≈0.50322−0.04979=0.453430.36788 + 0.13534 - 0.36788 \times 0.13534 \approx 0.50322 - 0.04979 = 0.45343.
  4. The strength 0.45340.4534 is below 0.50.5, so the pair {a,c}\{a, c\} is not in the cut at level α=0.5\alpha = 0.5.
  5. The other pairs have strengths 1 and about 0.60650.6065, so the cut at α=0.5\alpha = 0.5 keeps the edges {a,b}\{a, b\} and {b,c}\{b, c\}.
  6. Interpretation: in a layout, the strength acts like a spring. Dropping the {a,c}\{a, c\} edge below the cut means aa and cc are pulled together only through bb. Try it: the same setup with σc=0.5\sigma_c = 0.5 and the pair {b,c}\{b, c\} has directed values μb→c=0.60653\mu_{b \to c} = 0.60653 and μc→b=1\mu_{c \to b} = 1. What is the union, and is the pair in the cut at α=0.5\alpha = 0.5? Answer: the union is 0.60653+1−0.60653×1=10.60653 + 1 - 0.60653 \times 1 = 1, so yes, the pair is in the cut.

Common mistakes and tradeoffs

It is tempting to think that a fuzzy simplicial set is just a weighted graph. In fact it is more than that: the weights on faces must respect the rule that a face is never weaker than the simplex containing it. A weighted graph with no such rule can have an edge stronger than the triangle built on it, which is not a fuzzy simplicial complex. For the edge-only graphs used in UMAP the rule is easy to keep, because the vertices have strength 1.

It is also tempting to think that the strengths are probabilities. They are not: the strengths do not need to sum to 1 across a point's neighbours, and in UMAP each point's neighbours are scaled separately by its own width. The union formula looks like a probability, but the object is a membership structure, not a distribution.

Use the fuzzy version when neighbourhoods are uneven, when one point's neighbours differ widely in distance, or when you want a single object that can be cut at different strengths. Do not use it when the data has clean, well-separated groups and you only need a yes-or-no graph. Alternatives include a plain k-nearest-neighbour graph, which is simpler but loses the local scale, and a Vietoris-Rips complex at a fixed distance, which keeps the simplicial structure but has no strengths and needs a single global distance.

History

Lotfi Zadeh introduced fuzzy sets in 1965 to describe classes whose boundaries are vague, such as "tall" or "warm". The idea was widely used in control engineering and fuzzy logic in the following decades. Its use on the simplicial structure of point clouds came much later.

Simplicial complexes were developed in algebraic topology to describe shapes by gluing simple pieces along shared faces. Combining the two ideas, a weighted simplicial structure with membership strengths, became practical when data scientists needed a way to describe the local geometry of high-dimensional data. The UMAP paper of 2018 is the widely used example: it builds a fuzzy simplicial set from nearest neighbours, and then lays out the points by matching its strengths in two dimensions. Its success made the fuzzy simplicial set a standard object in dimension reduction.

Recap

  • A simplicial complex is a collection of simplices closed under taking faces.
  • A fuzzy set gives each element a membership strength between 0 and 1.
  • A fuzzy simplicial complex gives each simplex a strength, with faces never weaker than the simplices containing them.
  • UMAP builds the strengths from nearest neighbours, using a local distance ρx\rho_x and a width σx\sigma_x found from log⁡2k\log_2 k.
  • The fuzzy union p+q−pqp + q - pq merges the two directions of an edge, and each cut at a level α\alpha is an ordinary simplicial complex.
  • Read next: UMAP, which uses this object to lay points out in two dimensions.

Check yourself

QuestionIn the walkthrough, why does the nearest neighbour of a point always get directed strength exactly 1?Show answer

The strength is exp⁡(−(d(x,y)−ρx)/σx)\exp\bigl(-(d(x,y) - \rho_x)/\sigma_x\bigr). For the nearest neighbour, d(x,y)=ρxd(x,y) = \rho_x, so the exponent is −0/σx=0-0/\sigma_x = 0, and exp⁡(0)=1\exp(0) = 1. Every point is therefore linked to its closest neighbour with full strength.

QuestionTwo directed strengths are p=0.5p = 0.5 and q=0.5q = 0.5. What is the fuzzy union p+q−pqp + q - pq?Show answer

The union is 0.5+0.5−0.5×0.5=1−0.25=0.750.5 + 0.5 - 0.5 \times 0.5 = 1 - 0.25 = 0.75. This is larger than either input, which is the expected behaviour of the union.

QuestionWhy is the cut at level α\alpha of a fuzzy simplicial complex an ordinary simplicial complex?Show answer

Take a simplex σ\sigma in the cut, so μ(σ)≥α\mu(\sigma) \ge \alpha. For any non-empty face τ⊆σ\tau \subseteq \sigma, the rule gives μ(τ)≥μ(σ)≥α\mu(\tau) \ge \mu(\sigma) \ge \alpha, so τ\tau is also in the cut. A collection closed under taking non-empty faces is a simplicial complex.

QuestionA point has nearest distance ρ=2\rho = 2. Its neighbour is at distance 55 with width σ=3\sigma = 3. What is the directed strength to that neighbour?Show answer

The strength is exp⁡(−(5−2)/3)=exp⁡(−1)≈0.3679\exp(-(5 - 2)/3) = \exp(-1) \approx 0.3679.

QuestionA data scientist says: the strengths in a fuzzy simplicial set are probabilities, so each point's strengths should sum to 1. Is this right, and why?Show answer

No. The strengths are membership degrees, not probabilities. In UMAP each point's directed strengths are computed with its own width, and nothing forces them to sum to 1. The fuzzy union looks like a probability of "at least one link", but the object as a whole is a weighted simplicial structure, and the strengths are read as degrees of connection.

Sources