Mapper Algorithm

Research
Introduced by
Singh, Mémoli & Carlsson
Year
2007
Type
Graph-based topological summarization
Family
Topological data analysis

What does it do?

The Mapper algorithm is a method in topological data analysis (TDA) that summarises a high-dimensional point cloud as a simplicial complex, usually drawn as a graph.

Introduced by Singh, Mémoli, and Carlsson in 2007 at the Eurographics Symposium on Point-Based Graphics, it builds this summary by clustering the data partially, within overlapping pieces defined by a user-chosen filter function. The clustering step can use any clustering algorithm, but the output still depends on the distance used inside that clustering.

The intuition behind the method

Imagine examining a mountain range through a series of overlapping horizontal slices at different altitudes. Within each slice you group nearby peaks together, and then you connect groups from neighboring slices that share points. The resulting network of nodes and edges is a compressed map of the terrain's shape. Mapper applies this same idea to any high-dimensional dataset: the 'altitude' is replaced by a user-chosen filter function, and the grouping is performed by any standard clustering algorithm.

History

Singh, Mémoli and Carlsson introduced Mapper in their 2007 paper, 'Topological methods for the analysis of high dimensional data sets and 3D object recognition', presented at the Eurographics Symposium on Point-Based Graphics. The paper describes Mapper as a method for extracting simple descriptions of high-dimensional data in the form of simplicial complexes, based on partial clustering guided by functions defined on the data. The authors implemented the method and presented a few sample applications in which the simple descriptions revealed important information about the structure of the data.

When to use it

Choose Mapper when you have a high-dimensional point cloud whose global arrangement is of interest, such as separated groups, branches, or loops, and you want an exploratory, visual summary that does not assume a parametric model. You need to specify a filter function that reflects a direction of variation relevant to your question, a cover (the number of intervals and the gain), a clustering algorithm, and the distance that algorithm uses. Do not use Mapper alone when you need a formal test of whether a detected feature is real, or when you need a result that does not change with parameter choices; persistent homology is the better fit for rigorous topological inference. Mapper is also a poor fit when no meaningful filter can be proposed, because the summary then has no guiding axis.

Limitations and considerations

  • Results depend on the filter function, the number of intervals, the gain, and the clustering algorithm. No single setting of these is universally correct, so each must be justified for the data at hand.
  • The graph is one of many possible summaries of the same data, so two parameter settings can produce graphs with different topology.
  • Each cover element is clustered separately, so the total cost grows with the number of cover elements and with the cost of the chosen clustering method on each preimage.
  • Mapper has no built-in significance test, so a branch or loop in the graph may arise from noise or from parameter choices rather than from structure in the data.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • The output is a graph that can be inspected and annotated with per-node information, without first computing a global embedding of the data.
  • The clustering step is a free choice, since the originating paper states that any clustering algorithm may be used with Mapper; the same construction can therefore be adapted to different data types.
  • Because cover elements overlap, a data point can belong to more than one cluster, which allows the graph to connect groups that a single global partition would separate.
  • The construction can represent branches, loops and flares in the data, structures that a single linear projection does not represent directly.

Applications

  • Analysis of 3D objects and object recognition, the application area named in the title of the originating paper
  • Exploratory summaries of high-dimensional point clouds in which the arrangement of groups, rather than a single cluster partition, is of interest
  • Identifying branches, loops or flares in data where groups connect along a continuum
  • Annotating the nodes of a Mapper graph with external variables (for example, clinical or time measurements) to compare regions of the graph

How it works

How it works

1

A scalar- or vector-valued filter function (also called a lens) is applied to the point cloud X. Common choices in later practice include a coordinate projection, a PCA component, eccentricity, and a density estimate; the originating abstract does not name specific filters. The filter maps the data into a reference space, usually of low dimension, and this map determines how the data are sliced in the following steps.

Formula
f: X \to \mathbb{R}^k, \quad \text{choose a filter (lens) function } f \text{ on the point cloud } X
2

The image of the filter function is covered by overlapping intervals (hypercubes when the filter has several components). The gain, the overlap between adjacent intervals, controls how much neighbouring intervals intersect. The number of intervals and the gain are the main parameters that set the resolution of the resulting graph. Because the cover is a free choice, the graph should be built for several interval counts and gains, and the features discussed below compared across those settings.

Formula
\mathcal{U} = \{U_i\}_{i \in I}, \quad f(X) \subseteq \bigcup_{i} U_i, \quad U_i = (a_i, b_i) \text{ overlapping intervals}
3

For each interval, the preimage (the subset of data points whose filter values fall in that interval) is extracted and clustered independently. Single-linkage clustering and DBSCAN are frequently used choices; the originating abstract states only that any clustering algorithm may be used with Mapper. Each resulting cluster becomes a node, so the number of nodes depends on both the cover and the local cluster structure.

Formula
C_{ij} = \text{cluster}(f^{-1}(U_i)), \quad \text{apply clustering algorithm to each pullback } f^{-1}(U_i)
4

Two nodes are joined by an edge when their clusters share at least one data point. Because overlapping intervals place some points in two preimages, clusters from neighbouring intervals can be linked. The connected components, loops and branches of the resulting graph are candidate features of the data. Before one is interpreted as structure, check that it persists across reasonable choices of filter, cover and clustering and, where the question requires it, test it with a formal method such as persistent homology.

Formula
G = (V, E), \quad V = \{C_{ij}\}, \quad E = \{(C_{ij}, C_{kl}) : C_{ij} \cap C_{kl} \neq \emptyset\}

Common pitfalls

  • A filter chosen without a domain reason can produce a graph that reflects the geometry of the filter rather than the structure of the data.
  • Wide intervals (high gain) can merge distinct clusters into one node, while narrow intervals can split a genuine cluster into several nodes.
  • Mapper output is a topological summary, not a network in the social or physical sense, so graph centrality measures computed on it have no direct interpretation without further justification.
  • When the data lie on a curved manifold, Euclidean distance inside the clustering step can distort which points are grouped together within each preimage.

Frequently asked questions

How does Mapper differ from persistent homology?

Persistent homology tracks how topological features such as connected components, loops and voids appear and disappear across a range of scales, and summarises them in a persistence diagram. Mapper instead produces a graph that can be inspected and annotated directly, but by itself it has no built-in significance test. The two methods are often used together: Mapper for exploration, persistent homology for more formal topological inference.

What filter function should I choose?

The filter should encode a direction of variation that matters for your question. Common choices include eccentricity, density estimates, PCA projections, and domain quantities such as a clinical score or a time index. No filter is best in general; the choice needs a domain justification, and comparing several filters is usually necessary.

Is Mapper sensitive to outliers?

Mapper can be sensitive to outliers, because clustering is run locally within each cover element. An isolated point may form a singleton node, and an outlier lying in the overlap of two intervals can link clusters that would otherwise be separate. Outlier handling is not part of the basic construction; any treatment is a separate choice, and its effect on the graph should be checked on the data.

Related methods

Sources

  1. Singh, G., Mémoli, F., & Carlsson, G. (2007). Topological methods for the analysis of high dimensional data sets and 3D object recognition. Eurographics Symposium on Point-Based Graphics, 91–100.

    Open DOI reference