Computing persistent Stiefel-Whitney classes
of line bundles
Abstract.
We propose a definition of persistent Stiefel-Whitney classes of vector bundle filtrations. It relies on seeing vector bundles as subsets of some Euclidean spaces. The usual Čech filtration of such a subset can be endowed with a vector bundle structure, that we call a Čech bundle filtration. We show that this construction is stable and consistent. When the dataset is a finite sample of a line bundle, we implement an effective algorithm to compute its first persistent Stiefel-Whitney class. In order to use simplicial approximation techniques in practice, we develop a notion of weak simplicial approximation. As a theoretical example, we give an in-depth study of the normal bundle of the circle, which reduces to understanding the persistent cohomology of the torus knot (1,2). We illustrate our method on several datasets inspired by image analysis.
1 Introduction
The inference of relevant topological properties of data represented as point clouds in Euclidean spaces is a central challenge in Topological Data Analysis (TDA). Given a (finite) set of points in , persistent homology provides a now classical and powerful tool to construct persistence diagrams whose points can be interpreted as homological features of at different scales.
In this work, we aim at developing a similar theoretical framework for another topological invariant: the Stiefel-Whitney classes. These classes, and more generally characteristic classes, are a powerful tool from algebraic topology, that contains additional information to the cohomology groups. For the Stiefel-Whitney classes to be defined, the input topological space has to be endowed with an additional structure: a real vector bundle. They have been widely used in differential topology, for instance in the problem of deciding orientability of manifolds, of immersing manifolds in low-dimensional spaces, or in cobordism problems (Milnor and Stasheff, 2016). Our work is motivated by introducing this tool to the TDA community.
Previous work.
To our knowledge, the problem of estimating Stiefel-Whitney classes from a point cloud observation has received little attention. In the work of Aubrey (2011), one finds an algorithm to compute the Stiefel-Whitney classes in the particular case of the tangent bundle of a Euler mod- space (that is, a simplicial complex for which the link of each simplex has even Euler characteristic). Close to the subject, Perea (2018) proposes a dimensionality reduction algorithm, based on the choice of a Stiefel-Whitney class, seen as a persistent cohomology class.
Recently, Scoccola and Perea (2021) developed several notions of vector bundle adapted to finite simplicial complexes, one of which is used in this paper. They propose algorithms to compute the first two Stiefel-Whitney classes, which are conceptually different than the one presented here.
Our contributions.
Just as persistent homology allows to extract homological features from filtrations of topological spaces, we propose a framework that allows to extract Stiefel-Whitney classes features from filtrations of vector bundles. It is briefly motivated here.
In general, if is a topological space endowed with a vector bundle of dimension , there exists a collection of cohomology classes , the Stiefel-Whitney classes, such that is an element of the cohomology group over for . In order to define Stiefel-Whitney classes in a persistent-theoretic framework, we will use a convenient definition of vector bundles: defining a vector bundle over a compact space is equivalent (up to isomorphism of vector bundles) to defining a continuous map for large enough, where is the Grassmann manifold of -planes in . Such a map is called a classifying map for .
Given a classifying map of a vector bundle , the Stiefel-Whitney classes can be defined by pushing forward some particular classes of the Grassmannian via the induced map in cohomology . If denotes the Stiefel-Whitney class of the Grassmannian, then the Stiefel-Whitney class of the vector bundle is
(1) |
In order to translate these considerations in a persistent-theoretic setting, suppose that we are given a dataset of the form , where is a finite subset of , and is a map . Denote by the Čech filtration of , that is, the collection of the -thickenings of in the ambient space . It is also known as the offset filtration of . In order to define some persistent Stiefel-Whitney classes, one would try to extend the map to . However, we did not find any interesting way to extend this map. To overcome this issue, we propose to look at the dataset in a different way. Transform the vector bundle into a subset of via
The Grassmann manifold can be naturally embedded in , the space of matrices. From this viewpoint, can be seen as a subset of . Let denotes the Čech filtration of in the ambient space . A natural map can be defined: map a point to the projection of on , seen as a subset of :
The projection is well-defined if does not belong to the medial axis of . We show that this condition can be verified in practice (Lemma 3.1). The Čech filtration of , endowed with the extended projection maps , is called the Čech bundle filtration. Now we can define the persistent Stiefel-Whitney class as the collection of classes , where is the push-forward
and where is the Stiefel-Whitney class of the Grassmann manifold (compare with Equation (1)). We summarize the information given by a persistent Stiefel-Whitney class in a diagram, that we call a lifebar.
The construction we propose is defined for any subset of . We prove that this construction is stable, a result reminiscent of the usual stability theorem of persistent homology (Corollary 3.4). We also show that the persistent Stiefel-Whitney classes are consistent estimators of Stiefel-Whitney classes (Corollary 3.7).
Moreover, we propose a concrete algorithm to compute the persistent Stiefel-Whitney classes. This algorithm is based on several ingredients, including the triangulation of projective spaces, and the simplicial approximation method. The simplicial approximation, widely used in theory, can be applied only if the simplicial complex is refined enough, a property that is attested by the star condition. However, this condition cannot be verified in practice. We circumvent this problem by introducing the weak star condition, a variant that only depends on the combinatorial structure of the simplicial complex. When the simplicial complex is fine enough, the star condition and the weak star condition turn out to be equivalent notions (Proposition 5.5).
Numerical experiments.
A Python notebook, containing a concise demonstration of our method, can be found at https://github.com/raphaeltinarrage/PersistentCharacteristicClasses/blob/master/Demo.ipynb. Another notebook, containing experiments on datasets inspired by image analysis, can be found at https://github.com/raphaeltinarrage/PersistentCharacteristicClasses/blob/master/Experiments.ipynb.
Outline.
The rest of the paper is as follows. Sect. 2 gathers usual definitions related to vector bundles, Stiefel-Whitney classes, simplicial approximation and persistent cohomology. The definitions of vector bundle filtrations and persistent Stiefel-Whitney classes are given in Sect. 3, where their stability and consistency properties are established. In Sect. 4, we propose a sketch of algorithm to compute these classes, based on simplicial approximation techniques. In Sect. 5 we give a particular attention to some technical details needed to implement this algorithm. In Sect. 6 we apply our algorithm on concrete datasets. For the clarity of the paper, the proofs of some results have been postponed to the appendices.
2 Background
2.1 Stiefel-Whitney classes
In this subsection, we define vector bundles and Stiefel-Whitney classes. The reader may refer to Milnor and Stasheff (2016) for an extended presentation. Let be a topological space and an integer.
Vector bundles.
A vector bundle of dimension over consists of a topological space , the total space, a continuous map , the projection map, and for every , a structure of -dimensional vector space on the fiber . Moreover, must satisfy the local triviality condition: for every , there exists a neighborhood of and a homeomorphism such that for every , the map defines an isomorphism between the vector spaces and .
A bundle map between two vector bundles and with base spaces and is a continuous map which sends each fiber isomorphically into another fiber . If such a map exists, there exist a unique map which makes the following diagram commute:
If , and if is a homeomorphism, we say that is an isomorphism of vector bundles, and that and are isomorphic. The trivial bundle of dimension over , denoted , is defined with the total space , with the projection map being the projection on the first coordinate, and where each fiber is endowed with the usual vector space structure of . A vector bundle over is said trivial if it is isomorphic to .
Let . The Grassmann manifold is a set which consists of all -dimensional linear subspaces of . It can be given a smooth manifold structure. When , corresponds to the real projective space . In order to avoid mentioning , it is convenient to consider the infinite Grassmannian. The infinite Grassmann manifold is the set of all -dimensional linear subspaces of , where is the vector space of sequences with a finite number of nonzero terms.
Let be a paracompact space. There exists a correspondence between the vector bundles over (up to isomorphism) and the continuous maps (up to homotopy). Such a map is called a classifying map. When is compact, there exist an integer such that a classifying map factorizes through
Consequently, in the rest of this paper, we shall consider that vector bundles are given as a continuous maps or .
Axioms for Stiefel-Whitney classes.
To each vector bundle over a paracompact base space , one associates a sequence of cohomology classes
called the Stiefel-Whitney classes of . These classes satisfy:
-
•
Axiom 1: is equal to , and if is of dimension , then for .
-
•
Axiom 2: if is a bundle map, then , where is the map in cohomology induced by the underlying map between base spaces.
-
•
Axiom 3: if are bundles over the same base space , then for all , , where denotes the Withney sum, and denotes the cup product.
-
•
Axiom 4: if denotes the tautological bundle of the projective line , then .
If such classes exists, then one proves that they are unique. A way to show that they actually exist relies on the cohomology of the Grassmannians.
Construction of the Stiefel-Whitney classes.
The cohomology rings of the Grassmann manifolds admit a simple description: is the free abelian ring generated by elements . As a graded algebra, the degree of these elements are . Hence we can write
The generators can be seen as the Stiefel-Whitney classes of a particular vector bundle on , called the tautological bundle. Now, for any vector bundle , define
where is a classifying map for , and the induced map in cohomology. This construction yields the Stiefel-Whitney classes.
Interpretation of the Stiefel-Whitney classes.
The Stiefel-Whitney classes are invariants of isomorphism classes of vector bundles, and carry topological information. Their main interpretation is the following: the Stiefel-Whitney classes are obstructions to the existence of nowhere vanishing sections of vector bundles. Let us explain this result. A section of a vector bundle is a continuous map such that for all . It is nowhere vanishing if for all , where denotes the origin of the vector space . Given sections , we say that they are independent if the family is free for all . Then the following result holds: if a vector bundle of dimension admits independent and nowhere vanishing sections, then the top Stiefel-Whitney classes are zero.
Another property that we will use in this paper is the following: the first Stiefel-Whitney class detects orientability. More precisely, the first Stiefel-Whitney class is zero if and only if the vector bundle is orientable. In the same vein, if is a compact manifold and its tangent bundle, then the manifold is orientable if and only if .
In this paper, we will particularly study line bundles, that is, vector bundles of dimension . As a consequence of being an obstruction to nowhere vanishing sections, a line bundle on any topological space is trivial if and only if . More generally, the first Stiefel-Whitney class establishes a bijection between the isomorphism classes of line bundles over and its first cohomology group over . As an example, the circle has cohomology group , hence admits only two isomorphism classes of line bundles. As another example, the sphere has trivial cohomology group , hence only admits trivial line bundles.
2.2 Simplicial approximation
We start by defining the simplicial complexes and their topology. We then describe the technique of simplicial approximation, based on the book of Hatcher (2002).
Simplicial complexes.
A simplicial complex is a set such that there exists a set , the set of vertices, with a collection of finite and non-empty subsets of , and such that satisfies the following condition: for every and every non-empty subset , is in . The elements of are called faces or simplices of the simplicial complex .
For every simplex , we define its dimension . The dimension of , denoted , is the maximal dimension of its simplices. For every , the -skeleton is defined as the subset of consisting of simplices of dimension at most . Note that corresponds to the underlying vertex set , and that is a graph. Given a graph , the corresponding clique complex is the simplicial complex whose simplices are the sets of vertices of the cliques of . We say that a simplicial complex is a flag complex if it is the clique complex of its 1-skeleton .
Given a simplex , its (open) star is the set of all the simplices that contain . The open star is not a simplicial complex in general. We also define its closed star as the smallest simplicial subcomplex of which contains .
Geometric realizations.
For every , the standard -simplex is the topological space defined as the convex hull of the canonical basis vectors of , endowed with the subspace topology. To each simplicial complex is attached a geometric realization. It is a topological space, denoted , obtained by gluing the simplices of together. According to this construction, each simplex admits a geometric realization which is a subset of . The following set is a partition of :
This allows to define the face map of . It is the unique map that satisfies for every .
If is a face of of dimension at least 1, the subset is canonically homeomorphic to the interior of the standard -simplex , where . This allows to define on the barycentric coordinates: for every face , the points can be written as
with and .
If is any a topological space, a triangulation of consists of a simplicial complex together with a homeomorphism .
Simplicial approximation.
A simplicial map between simplicial complexes and is a map between geometric realizations which sends each simplex of to a simplex of by a linear maps that sends vertices to vertices. In other words, for every , the subset is a simplex of , and the map restricted to can be written in barycentric coordinates as
(2) |
A simplicial map is uniquely determined by its restriction to the vertex sets . Reciprocally, let be a map between vertex sets which satisfies the following condition:
(3) |
Then induces a simplicial map via barycentric coordinates, denoted . In the rest of this paper, a simplicial map shall either refer to a map which satisfies Equation (2), to a map which satisfies Equation (3), or to the induced map .
Let be any continuous map. The problem of simplicial approximation consists in finding a simplicial map with geometric realization homotopy equivalent to . A way to solve this problem is to consider the following property (Hatcher, 2002, Proof of Theorem 2C.1): we say that the map satisfies the star condition if for every vertex of , there exists a vertex of such that
If this is the case, let be any map between vertex sets such that for every vertex of , we have . Equivalently, satisfies
Such a map is called a simplicial approximation to . One shows that it is a simplicial map, and that its geometric realization is homotopic to .
In general, a map may not satisfy the star condition. However, there is always a way to subdivise the simplicial complex in order to obtain an induced map which does. We describe this construction in the following paragraph.
We point out that, for some authors, such as Munkres (1984), the star condition is defined by the property . The defintion we used above, although harder to satisfy than this one, will be enough for our purposes.
Barycentric subdivisions.
Let denote the standard -simplex, with vertices denoted . The barycentric subdivision of consists in decomposing into simplices of dimension . It is a simplicial complex, whose vertex set corresponds to the points for which some are zero and the other ones are equal. Equivalently, one can see this new set of vertices as a the power set of the set of vertices of .
More generally, if is a simplicial complex, its barycentric subdivision is the simplicial complex obtained by subdivising each of its faces. The set of vertices of can be seen as a subset of the power set of the set of vertices of .
If is any map, there exists a canonical extended map , still denoted . The simplicial approximation theorem states that for any two simplicial complexes with finite, and any a continuous map, there exists such that satisfies the star condition. As a consequence, such a map admits a simplicial approximation.
2.3 Persistent cohomology
In this subsection, we write down the definitions of persistence modules, and their associated pseudo-distances, in the context of cohomology. Compared to the standard definitions of persistent homology, the arrows go backward. Let be an interval that contains , let be a Euclidean space, and a field.
Persistence modules.
A persistence module over is a pair where is a family of -vector spaces, and is a family of linear maps such that:
-
•
for every , is the identity map,
-
•
for every such that , .
When there is no risk of confusion, we may denote a persistence module by instead of . Given , an -morphism between two persistence modules and is a family of linear maps such that the following diagram commutes for every :
If and each is an isomorphism, the family is an isomorphism of persistence modules. An -interleaving between two persistence modules and is a pair of -morphisms and such that the following diagrams commute for every :
The interleaving pseudo-distance between and is defined as
Persistence barcodes.
A persistence module is said to be pointwise finite-dimensional if for every , is finite-dimensional. This implies that we can define a notion of persistence barcode (Botnan and Crawley-Boevey, 2020). It comes from the algebraic decomposition of the persistence module into interval modules. Moreover, given two pointwise finite-dimensional persistence modules with persistence barcodes and , the so-called isometry theorem states that
where denotes the interleaving distance between persistence modules, and denotes the bottleneck distance between barcodes.
More generally, the persistence module is said to be -tame if for every such that , the map is of finite rank. The -tameness of a persistence module ensures that we can still define a notion of persistence barcode, even though the module may not be decomposable into interval modules. Moreover, the isometry theorem still holds (Chazal et al., 2016).
Filtrations of sets and simplicial complexes.
A family of subsets of is a filtration if it is non-decreasing for the inclusion, i.e. for any , if then . Given , two filtrations and of are -interleaved if, for every , and . The interleaving pseudo-distance between and is defined as the infimum of such :
Filtrations of simplicial complexes and their interleaving distance are similarly defined: given a simplicial complex , a filtration of is a non-decreasing family of subcomplexes of . The interleaving pseudo-distance between two filtrations and of is the infimum of the such that they are -interleaved, i.e., for any , we have and .
Relation between filtrations and persistence modules.
Applying the singular cohomology functor to a set filtration gives rise to a persistence module whose linear maps between cohomology groups are induced by the inclusion maps between sets. As a consequence, if two filtrations are -interleaved, then their associated persistence modules are also -interleaved, the interleaving homomorphisms being induced by the interleaving inclusion maps. As a consequence of the isometry theorem, if the modules are -tame, then the bottleneck distance between their persistence barcodes is upperbounded by . The same remarks hold when applying the simplicial cohomology functor to simplicial filtrations.
2.4 Notations
We adopt the following notations:
-
•
denotes a set, its cardinal and its complement.
-
•
if and are intergers such that , denotes the set of integers between and included.
-
•
and denote the Euclidean spaces of dimension and , denotes a Euclidean space.
-
•
denotes the vector space of matrices, the Grassmannian of -subspaces of , and the unit -sphere.
-
•
denotes the usual Euclidean norm on , the Frobenius norm on , the norm on defined as where is a parameter.
-
•
denotes a set filtration. denotes the corresponding persistent cohomology module. If is a subset of , then denotes the Čech set filtration of (also called the offset filtration).
-
•
denotes a persistence module over , with a family of vector spaces, and a family of linear maps.
-
•
denotes a cover of a topological space, and its nerve. denotes a simplicial filtration.
-
•
If is a topological space, denotes its cohomology ring over (the field with two elements), and its cohomology group over . If is a continuous map, is the map induced in cohomology.
-
•
If is a vector bundle, denotes its Stiefel-Whitney class.
-
•
If is a subset of , then denotes its medial axis, its reach and the distance to . The projection on is denoted or . denotes the Hausdorff distance between two sets of .
-
•
If is a simplicial complex, denotes its -skeleton. For every vertex , and denote its open and closed star. The geometric realization of is denoted , and the geometric realization of a simplex is . The face map is denoted .
-
•
If is a simplicial map, denotes its geometric realization. The barycentric subdivision of the simplicial complex is denoted .
3 Persistent Stiefel-Whitney classes
3.1 Definition
Let be a Euclidean space, and a set filtration of . Let us denote by the inclusion map from to . In order to define persistent Stiefel-Whitney classes, we have to give such a filtration a vector bundle structure. The infinite Grassmann manifold is denoted .
Definition 3.1.
A vector bundle filtration of dimension on is a couple where is a set filtration of and a family of continuous maps such that, for every with , we have . In other words, the following diagram commutes:
Note that for any , and by using the inclusion , one may define a vector bundle filtration by considering maps .
Following Subsect. 2.1, the induced map in cohomology, , allows to define the Stiefel-Whitney classes of this vector bundle. Let us introduce some notations. The Stiefel-Whitney classes of are denoted . The Stiefel-Whitney classes of the vector bundle are denoted , and can be defined as .
Let denote the persistence module associated to the filtration , with and . Explicitly, is the cohomology ring , and is the induced map . For every , the classes belong to the vector space . The persistent Stiefel-Whitney classes are defined to be the collection of such classes over .
Definition 3.2.
Let be a vector bundle filtration. The persistent Stiefel-Whitney classes of are the families of classes
Let , and consider a persistent Stiefel-Whitney class . Note that it satisfies the following property: for all such that , . As a consequence, if a class is given for a , one obtains all the others , with , by applying the maps . In particular, if , then for all such that .
Lifebar.
In order to visualize the evolution of a persistent Stiefel-Whitney class through the persistence module , we propose the following bar representation: the lifebar of is the set
According to the last paragraph, the lifebar of a persistent class is an interval of , of the form or , where
with the convention . In order to distinguish the lifebar of a persistent Stiefel-Whitney class from the bars of the persistence barcodes, we draw the rest of the interval hatched (see Figure 1).

3.2 Čech bundle filtrations
In this subsection, we propose a particular construction of vector bundle filtration, called the Čech bundle filtration. We shall work in the ambient space . Let be the usual Euclidean norm on the space , and the Frobenius norm on , the space of matrices. Let . We endow the vector space with the Euclidean norm defined for every as
(4) |
See Subsection 5.4 for a discussion about the parameter .
In order to define the Čech bundle filtration, we shall first study the usual embedding of the Grassmann manifold into the matrix space .
Embedding of .
We embed the Grassmannian into via the application which sends a -dimensional subspace to its orthogonal projection matrix . We can now see as a submanifold of . Recall that is endowed with the Frobenius norm. According to this metric, is included in the sphere of center 0 and radius of .
In the metric space , consider the distance function to , denoted . Let denote the medial axis of . It consists in the points which admit at least two projections on :
On the set , the projection on is well-defined:
The following lemma describes this projection explicitly.
Lemma 3.1.
For any , let denote the matrix , where is the transpose of , and let be the eigenvalues of in decreasing order. The distance from to is
If this distance is positive, the projection of on can be described as follows: consider the symmetric matrix , and let , with an orthogonal matrix, and the diagonal matrix containing the eigenvalues of in decreasing order. Let be the diagonal matrix whose first terms are 1, and the other ones are zero. We have
Proof.
Note that is contained in the linear subspace of symmetric matrices. Therefore, to project a matrix onto , we may project on first. It is well known that the projection of onto is the matrix .
Suppose now that we are given a symmetric matrix . Let it be diagonalized as with an orthogonal matrix. A projection of onto is a matrix which minimizes the following quantity:
(5) |
By applying the transformation , we see that this problem is equivalent to . Now, let denote the canonical basis of . We have
where is the Frobenius inner product, and the usual inner product on . Therefore, Equation (5) is a problem equivalent to
Since is an orthogonal projection, we have for all . Moreover, . Denoting , we finally obtain the following alternative formulation of Equation (5):
Using that , we see that this maximum is attained when and . Consequently, a minimizer of Equation (5) is , where is the diagonal matrix whose first terms are 1, and the other ones are zero. Moreover, it is unique if . As a consequence of these considerations, we obtain the following characterization: for every ,
(6) |
Let us now show that for every matrix , we have
First, remark that
(7) |
Indeed, if is a projection of on , then is still in according to Equation (6), and
Conversely, if is a projection of on , then is still in , and
We deduce Equation (7). Now, let and . Let be a basis of that diagonalizes . Writing , it is clear that the closest matrix must satisfy , with
-
•
for ,
-
•
.
We finally compute
which yields the result. ∎
Observe that, as a consequence of this lemma, every point of is at equal distance from , and this distance is equal to . Therefore the reach of the subset is
Čech bundle filtration.
Let be a subset of . Consider the usual Čech filtration , where denotes the -thickening of in the metric space . It is also known as the offset filtration. In order to give this filtration a vector bundle structure, consider the map defined as the composition
(8) |
where represents the projection on the second coordinate of , and the projection on . Note that is well-defined only when does not intersect . The supremum of such ’s is denoted . We have
(9) |
where is the distance between the point and the subspace , with respect to the norm . By definition of , Equation (9) rewrites as
where represents the distance between the matrix and the subset with respect to the Frobenius norm . Denoting the value for , we obtain
(10) |
Note that the values can be computed explicitly thanks to Lemma 3.1. In particular, if is a subset of , then . Accordingly,
(11) |
Definition 3.3.
Consider a subset of , and suppose that . The Čech bundle filtration associated to in the ambient space is the vector bundle filtration consisting of the Čech filtration , and the maps as defined in Equation (8). This vector bundle filtration is defined on the index set , where is defined in Equation (10).
The persistent Stiefel-Whitney class of the Čech bundle filtration , as in Definition 3.2, shall be denoted instead of .
Example 3.2.
Let . Let and be the subsets of defined as:
The set is to be seen as the normal bundle of the circle, and as the tautological bundle of the circle, also known as the Mobius strip. They are pictured in Figures 2 and 3. We have as in Lemma 3.1. Let .




We now compute the persistence barcodes of the Čech filtrations of and in the ambient space , as represented in Figure 4.




Consider the first persistent Stiefel-Whitney classes and of the corresponding Čech bundle filtrations. We compute that their lifebars are for , and for . This is illustrated in Figure 5. One reads these bars as follows: is zero for every , while is nonzero.


3.3 Stability
In this subsection we derive a straightforward stability result for persistent Stiefel-Whitney classes. We start by defining a notion of interleavings for vector bundle filtrations, in the same vein as the usual interleavings of set filtrations.
Definition 3.4.
Let , and consider two vector bundle filtrations , of dimension on with respective index sets and . They are -interleaved if the underlying filtrations and are -interleaved, and if the following diagrams commute for every and :
The following theorem shows that interleavings of vector bundle filtrations give rise to interleavings of persistence modules which respect the persistent Stiefel-Whitney classes.
Theorem 3.3.
Consider two vector bundle filtrations , of dimension with respective index sets and . Suppose that they are -interleaved. Then there exists an -interleaving between their corresponding persistent cohomology modules which sends persistent Stiefel-Whitney classes on persistent Stiefel-Whitney classes. In other words, for every , and for every and , we have
and |
Proof.
Define to be the -interleaving between the cohomology persistence modules and given by the -interleaving between the filtrations and . Explicitly, if denotes the inclusion and denotes the inclusion , then is given by the induced maps in cohomology , and is given by .
Now, by fonctoriality, the diagrams of Definition 3.4 give rise to commutative diagrams in cohomology:
Let . By definition, the persistent Stiefel-Whitney classes and are equal to and , where is the Stiefel-Whitney class of . The previous commutative diagrams then translates as and , as wanted. ∎
Consider two vector bundle filtrations , such that there exists an -interleaving between their persistent cohomology modules , which sends persistent Stiefel-Whitney classes on persistent Stiefel-Whitney classes. Let . Then the lifebars of their persistent Stiefel-Whitney classes and are -close in the following sense: if we denote and , then . This can be seen from their lifebar representations, as shown in Figure 6.


Let us apply this result to the Čech bundle filtrations. Let and be two subsets of . Suppose that the Hausdorff distance , with respect to the norm , is lower than , meaning that the -thickenings and satisfy and . It is then clear that the vector bundle filtrations are -interleaved, and we can apply Theorem 3.3 to obtain the following result.
Corollary 3.4.
If two subsets satisfy , then there exists an -interleaving between the persistent cohomology modules of their corresponding Čech bundle filtrations which sends persistent Stiefel-Whitney classes on persistent Stiefel-Whitney classes.
Example 3.5.
In order to illustrate Corollary 3.4, consider the sets and represented in Figure 7. They are noisy samples of the sets and defined in Example 3.2. They contain 50 points each.
Figure 8 represents the barcodes of the Čech filtrations of the sets and , together with the lifebar of the first persistent Stiefel-Whitney class of their corresponding Čech bundle filtrations. We see that they are close to the original descriptors of and (Figure 5). Experimentally, we computed that the Hausdorff distances between and are approximately and . We observe that this is coherent with the lifebar of , which is -close to the lifebar of with .








3.4 Consistency
In this subsection we describe a setting where the persistent Stiefel-Whitney classes of the Čech bundle filtration of a set can be seen as consistent estimators of the Stiefel-Whitney classes of some underlying vector bundle.
Let be a compact -manifold, and an immersion. Suppose that is given a -dimensional vector bundle structure . Let , and consider the set
(12) |
where denotes the orthogonal projection matrix onto the subspace . The set is called the lift of . Consider the lifting map defined as
(13) |
We make the following assumption: is an embedding. As a consequence, is a submanifold of , and and are diffeomorphic.
The persistent cohomology of can be used to recover the cohomology of . To see this, select , and denote by the reach of , where is endowed with the norm . Since is a -submanifold, is positive. Note that it depends on . Let be the Čech set filtration of in the ambient space , and let be the corresponding persistent cohomology module. For every such that , we know that the inclusion maps are homotopy equivalences. Hence the persistence module is constant on the interval , and is equal to the cohomology .
Consider the Čech bundle filtration of . The following theorem shows that the persistent Stiefel-Whitney classes are also equal to the usual Stiefel-Whitney classes of the vector bundle .
Theorem 3.6.
Let be a compact -manifold, an immersion and a continuous map. Let be the lift of (Equation (12)) and the lifting map (Equation (13)). Suppose that is an embedding.
Let and consider the Čech bundle filtration of . Its maximal filtration value is . Denote by its persistent Stiefel-Whitney classes, . Denote also by the inclusion , for .
Let be such that . Then the map induces an isomorphism which maps the persistent Stiefel-Whitney class of to the Stiefel-Whitney class of .
Proof.
Consider the following commutative diagram, defined for every :
We obtain a commutative diagram in cohomology:
Since , the map is an isomorphism. So is since is an embedding. As a consequence, the map induces an isomorphism .
Let denotes the Stiefel-Whitney class of . By definition, the Stiefel-Whitney class of is , and the persistent Stiefel-Whitney class of is . By commutativity of the diagram, we obtain under the identification . ∎
We deduce an estimation result.
Corollary 3.7.
Let be any subset such that . Define . Then for every , the composition of inclusions induces an isomorphism which sends the persistent Stiefel-Whitney class of the Čech bundle filtration of to the Stiefel-Whitney class of .
Proof.
As a consequence of this corollary, on the set , the persistent Stiefel-Whitney class of the Čech bundle filtration of is zero if and only if the Stiefel-Whitney class of is.
Example 3.8.
In order to illustrate Corollary 3.7, consider the torus and the Klein bottle, immersed in as in Figure 9.


Let them be endowed with their normal bundles. They can be seen as submanifolds of . We consider two samples of , represented in Figure 10. They contain respectively 346 and 1489 points. We computed experimentally the Hausdorff distances and , with respect to the norm where .


Figure 11 represents the barcodes of the persistent cohomology of and , and the lifebars of their first persistent Stiefel-Whitney classes and . Observe that is always zero, while is nonzero for . This is an indication that , the underlying manifold of , is orientable, while is not. Lemma 3.9, stated below, justifies this assertion. Therefore, one interprets these lifebars as follows: is sampled on an orientable manifold, while is sampled on a non-orientable one.








Lemma 3.9.
Let be an immersion of a manifold in a Euclidean space. Then is orientable if and only if the first Stiefel-Whitney class of its normal bundle is zero.
Proof.
Let and denote the tangent and normal bundles of . The Whitney sum is a trivial bundle, hence its first Stiefel-Whitney class is . Using Axioms 1 and 3 of the Stiefel-Whitney classes, we obtain
Therefore, , hence is zero if and only if is zero. Besides, it is known that the first Stiefel-Whitney class of the tangent bundle of a manifold is zero if and only if the manifold is orientable. We deduce the result. ∎
4 Computation of persistent Stiefel-Whitney classes
In order to build an effective algorithm to compute the persistent Stiefel-Whitney classes, we have to find an equivalent formulation in terms of simplicial cohomology. We will make use of the well-known technique of simplicial approximation, as described in Subsect. 2.2.
4.1 Simplicial approximation to Čech bundle filtrations
Let be a subset of . Let us recall Definition 3.3: the Čech bundle filtration associated to is the vector bundle filtration whose underlying filtration is the Čech filtration , with , and whose maps are given by the following composition, as in Equation (8):
Let . The aim of this subsection is to describe a simplicial approximation to . To do so, let us fix a triangulation of . It comes with a homeomorphism . We shall now triangulate the thickenings of the Čech set filtration. The thickening is a subset of the metric space which consists in a union of closed balls centered around points of :
where denotes the closed ball of center and radius for the norm . Let denote the cover of , and let be its nerve. By the nerve theorem for convex closed covers (Boissonnat et al., 2018, Theorem 2.9), the simplicial complex is homotopy equivalent to its underlying set . That is to say, there exists a continuous map which is a homotopy equivalence.
As a consequence, in cohomological terms, the map is equivalent to the map defined as .
(14) |
This gives a way to compute the induced map algorithmically:
-
•
Subdivise until satisfies the star condition.
-
•
Choose a simplicial approximation to .
-
•
Compute the induced map between simplicial cohomology groups .
By correspondence between simplicial and singular cohomology, the map corresponds to . Hence the problem of computing is solved, if it were not for the following issue: in practice, the map given by the nerve theorem is not explicit. The rest of this subsection is devoted to showing that can be chosen canonically as the shadow map.
Shadow map.
We still consider , the corresponding cover and its nerve . The underlying vertex set of the simplicial complex is the set itself. The shadow map is defined as follows: for every simplex and every point of written in barycentric coordinates, associate the point of :
The following lemma states that this map is a homotopy equivalence. We are not aware whether the general position assumption can be removed.
Lemma 4.1.
Suppose that is finite and in general position. Then the shadow map is a homotopy equivalence. Consequently, it induces an isomorphism .
Proof.
Recall that . Let us consider a smaller cover. For every , let denote the Voronoi cell of in the ambient metric space , and define
The set is a cover of , and its nerve is known as the Delaunay complex. Let denote the shadow map of . The Delaunay complex is a subcomplex of the Čech complex, hence we can consider the following diagram:
Now, Edelsbrunner (1993, Theorem 3.2) has proven that the shadow map is a homotopy equivalence (it is required here that is in general position). Moreover, we know from Bauer and Edelsbrunner (2017, Theorem 5.10) that collapses to . Therefore the inclusion also is a homotopy equivalence. By the 2-out-of-3 property of homotopy equivalences, we conclude that is a homotopy equivalence. ∎
4.2 A sketch of algorithm
Suppose that we are given a finite set . Choose and . Consider the Čech bundle filtration of dimension of . Let , and . From the previous discussion we can infer an algorithm to solve the following problem:
Compute the persistent Stiefel-Whitney class of the Čech bundle filtration of , using a cohomology computation software.
Denote:
-
•
the Čech set filtration of ,
-
•
the Čech simplicial filtration of , and the shadow map,
-
•
a triangulation of and a homeomorphism,
-
•
the Čech bundle filtration of ,
-
•
the persistent cohomology module of ,
-
•
the Stiefel-Whitney class of the Grassmannian.
Let and consider the map , as defined in Equation (14):
We propose the following algorithm:
-
•
Subdivise barycentrically until satisfies the star condition. Denote the number of subdivisions needed.
-
•
Consider a simplicial approximation to .
-
•
Compute the class .
The output is equal to the persistent Stiefel-Whitney class at time , seen in the simplicial cohomology group . In the following section, we gather some technical details needed to implement this algorithm in practice.
Note that this also gives a way to compute the lifebar of . This bar is determined by the value . This quantity can be approximated by dichotomic search, by computing the classes for several values of . We point out that, in order to compute the value , there may exist a better algorithm than evaluating the class several times.
Let us describe briefly such an algorithm when , that is, when the first persistent Stiefel-Whitney class is to be computed. First, we remind the reader that the first cohomology group of the Grassmannian is generated by one element, the first Stiefel-Whitney class . For any , consider the map as above, and the map induced in cohomology, . Since , and since has dimension 1, we have that is nonzero if and only if is nonzero.
Next, let denotes the mapping cone of . This is a usual construction in algebraic topology. In a few words, the mapping cone of a map is a topological space that contains information about the map. The mapping cone comes with a long exact sequence
from which we deduce the formula
On the simplicial side, is not complicated to build a triangulation of the mapping cone , nor to build a simplicial filtration of . It relies on finding simplicial approximations to the maps , as in the proof of Hatcher (2002, Theorem 2C.5). We point out that, just as in the previous algorithm, we may have to apply barycentric subdivisions to here. Now, the previous formula translates in simplicial cohomology as
All these terms can be computed efficiently by applying the persistent homology algorithm to the filtrations , and . Finally, we identify the value as the first value of such that is nonzero.
5 An algorithm when
Even though the last sections described a theoretical way to compute the persistent Stiefel-Whitney classes, some concrete issues are still to be discussed:
-
•
verifying that the star condition is satisfied,
-
•
the Grassmann manifold has to be triangulated,
-
•
in practice, the Vietoris-Rips filtration is preferred to the Čech filtration,
-
•
the parameter has to be tuned.
The following subsections will elucidate these points. Concerning the first one, we are not aware of a computational-explicit process to triangulate the Grassmann manifolds , except when , which corresponds to the projective spaces . We shall then restrict to the case . Note that, in this case, the only nonzero Stiefel-Whitney classes are the first two (by Axiom 1 of Stiefel-Whitney classes). Since is always equal to 1, the only class to estimate is .
5.1 The star condition in practice
Let us get back to the context of Subsect. 2.2: are two simplicial complexes, is finite, and is a continuous map. We have seen that finding a simplicial approximation to reduces to finding a small enough barycentric subdivision of such that satisfies the star condition, that is, for every vertex of , there exists a vertex of such that
In practice, one can compute the closed star from the finite simplicial complex . However, computing requires to evaluate on the infinite set . In order to reduce the problem to a finite number of evaluations of , we shall consider a related property that we call the weak star condition.
Definition 5.1.
A map between geometric realizations of simplicial complexes and satisfies the weak star condition if for every vertex of , there exists a vertex of such that
where denotes the 0-skeleton of , i.e. its vertices.
Observe that the practical verification of the condition requires only a finite number of computations. Indeed, one just has to check whether every neighbor of in the graph , included, satisfies . The following lemma rephrases this condition by using the face map . We remind the reader that the face map is defined by the relation for all .
Lemma 5.1.
The map satisfies the weak star condition if and only if for every vertex of , there exists a vertex of such that for every neighbor of in , we have
Proof.
Let us show that the assertion “” is equivalent to “”. Recall that the open star consists of the simplices of that contain . Moreover, the geometric realization is the union of the for . As a consequence, belongs to if and only if it belongs to for some simplex that contains . Equivalently, the face map contains . ∎
Suppose that satisfies the weak star condition. Let be a map, between vertex sets, such that for every ,
According to the proof of Lemma 5.1, an equivalent formulation of this condition is: for all neighbor of in ,
(15) |
Such a map is called a weak simplicial approximation to . It plays a similar role as the simplicial approximations to .
Lemma 5.2.
If is a weak simplicial approximation to , then is a simplicial map.
Proof.
Let be a simplex of . We have to show that is a simplex of . Note that each closed star contains . Therefore each contains . Using the weak simplicial approximation property of , we deduce that each contains . Using Lemma 5.3 stated below, we obtain that is a simplex of . ∎
Lemma 5.3 (Hatcher, 2002, Lemma 2C.2).
Let be vertices of a simplicial complex . Then if and only if is a simplex of .
As one can see from the definitions, the weak star condition is weaker than the star condition. Consequently, the simplicial approximation theorem admits the following corollary.
Corollary 5.4.
Consider two simplicial complexes with finite, and let be a continuous map. Then there exists such that satisfies the weak star condition.
However, some weak simplicial approximations to may not be simplicial approximations, and may not even be homotopic to . Figure 12 gives such an example.



Fortunately, these two notions coincides under the star condition assumption:
Proposition 5.5.
Suppose that satisfies the star condition. Then every weak simplicial approximation to is a simplicial approximation.
Proof.
Let be a weak simplicial approximation to , and any simplicial approximation. Let us show that and are contiguous simplicial maps. Let be a simplex of . We have to show that is a simplex of . As we have seen in the proof of Lemma 5.2, each contains . Therefore, by definition of weak simplicial approximations and simplicial approximations, each and contains . We conclude by applying Lemma 5.3. ∎
Remark that the proof of this proposition can be adapted to obtain the following fact: any two weak simplicial approximations are equivalent—as well as any two simplicial approximations.
Let us comment Proposition 5.5. If is subdivised enough, then every weak simplicial approximation to is homotopic to . We face the following problem in practice: the number of subdivisions needed by the star condition is not known. In order to work around this problem, we propose to subdivise the complex until it satisfies the weak star condition, and then use a weak simplicial approximation to . However, such a weak simplicial approximation may not be homotopic to , and our algorithm would output a wrong result.
To close this subsection, we state a lemma that gives a quantitative idea of the number of subdivisions needed by the star condition. We say that a Lebesgue number for an open cover of a compact metric space is a positive number such that every subset of with diameter less than is included in some element of the cover .
Lemma 5.6.
Let be endowed with metrics. Suppose that is -Lipschitz with respect to these metrics. Let be a Lebesgue number for the open cover of . Let be the dimension of and an upper bound on the diameter of its faces. Then for , the map satisfies the star condition.
Proof.
The map satisfies the star condition if for every vertex of , there exists a vertex of such that . Since the cover admits as a Lebesgue number, it is enough for to satisfy the following inequality:
(16) |
Since is -Lipschitz, we have . Using the hypothesis , Equation (16) leads to the condition . Now, we use the fact that a barycentric subdivision reduces the diameter of each face by a factor . After barycentric subdivision, the last inequality rewrites . It admits as a solution. ∎
5.2 Triangulating the projective spaces
As we described in Subsect. 5.1, the algorithm we propose rests on a triangulation of the Grassmannian , together with the map , where is a homeomorphism and is the face map. In the following, we also call the face map.
We shall use the triangulation of the projective space by von Kühnel (1987). It uses the fact that the quotient of the sphere by the antipodal relation gives . Let denote the standard -simplex, its vertices, and its boundary. The simplicial complex is a triangulation of the sphere . Denote its first barycentric subdivision as . The vertices of are in bijection with the non-empty proper subsets of . Consider the equivalence relation on these vertices which associates a vertex to its complement. The quotient simplicial complex under this relation, , is a triangulation of . Figures 13 and 14 represent this construction.



Equivalence relation

Quotient complex
Let us now describe how to define the homeomorphism . First, embed in via , where sits at the coordinate. Its image lies on a -dimensional affine subspace , with origin being the barycenter of . Seen in , the vertices of now belong to the sphere centered at the origin and of radius (see Figure 14). Let us denote this sphere as . Next, subdivise barycentrically once, and project each vertex of on . By taking the convex hulls of its faces, we now see as a subset of . Define an application as follows: for every , the image is the unique intersection point between the segment and the set . The application can also be seen as the inverse function of the projection on , written . As a consequence, we can factorize as
Using Lemma 5.7 stated below, we can identify these spaces with
giving the desired triangulation.

is included in

and

Lemma 5.7.
For any vertex , denote by its embedding in . Let denote the image of by the antipodal relation on . Denote by the image of by the relation on . Then .
More generally, pulling back the antipodal relation onto via gives the relation we defined on .
Proof.
Pick a vertex of . It can be described as a proper subset of the vertex set , where . According to the relation on , the vertex is in relation with the vertex described by the proper subset . The point can be written in barycentric coordinates as . Seen in , can be written . Similarly, can be written .
Now, denote by 0 the origin of the hyperplane , and embed the vertices in . Observe that
Hence , and we deduce that
Applying the same reasoning, one obtains the following result: for every simplex of , if denotes the image of by the relation on , then the image of by the antipodal relation is also . As a consequence, these two relations coincide. ∎
At a computational level, let us describe how to compute the face map . Since can be obtained as a quotient, it is enough to compute the face map of the sphere, , which corresponds to the homeomorphism . It is given by the following lemma, which can be used in practice.
Lemma 5.8.
For every , the image of by is equal to the intersection of all maximal faces of that satisfies the following conditions: denoting by any point of the affine hyperplane spanned by , and by a vector orthogonal to the corresponding linear hyperplane,
-
•
the inner product has the same sign as ,
-
•
the point , which is included in the affine hyperplane spanned by , has nonnegative barycentric coordinates.
Proof.
Recall that for every , the image is defined as the unique intersection point between the segment and the set . Besides, the face map is the unique simplex such that . Equivalently, is equal to the intersection of all maximal faces such that belongs to the closure .
Consider any maximal face of . The first condition of the lemma ensures that the segment intersects the affine hyperplane spanned by . In this case, a computation shows that this intersection consists of the point . Then, the second condition of the lemma tests whether this point belongs to the convex hull of . In conclusion, if satisfies these two conditions, then . ∎
As a remark, let us point out that the verification of the conditions of this lemma is subject to numerical errors. In particular, the point may have nonnegative coordinates, yet mathematical softwares may return (small) negative values. Consequently, the algorithm may recognize less maximal faces that satisfy these conditions, hence return a simplex that strictly contains the wanted simplex . Nonetheless, such an error will not affect the output of the algorithm. Indeed, if we denote by the face map computed by the algorithm, we have that for all . As a consequence of Lemma 5.1, satisfies the weak star condition if does, and Equation (15) shows that every weak simplicial approximations for are weak simplicial approximations for . Since every weak simplicial approximations are homotopic, we obtain that the induced maps in cohomology are equal, therefore the output of the algorithm is unchanged.
5.3 Vietoris-Rips version of the Čech bundle filtration
We still consider a subset . Denote by the corresponding Čech set filtration, and by the simplicial Čech filtration. For every , let be the flag complex of , i.e. the clique complex of the 1-skeleton of . It is known as the Vietoris-Rips complex of at time . The collection is called the Vietoris-Rips filtration of . The simplicial filtrations and are multiplicatively -interleaved (Bell et al., 2019, Theorem 3.1). In other words, for every , we have
Let and consider the Čech bundle filtration of . Suppose that its maximal filtration value is positive. Let denote the geometric realization of the Vietoris-Rips filtration. We can give a vector bundle filtration structure with defined as
where denotes the maps of the Čech bundle filtration , and denotes the inclusion . These maps fit in the following diagram:
This new vector bundle filtration is defined on the index set .
It is clear from the construction that the vector bundle filtrations and are multiplicatively -interleaved, with an interleaving that preserves the persistent Stiefel-Whitney classes. This property is a multiplicative equivalent of Theorem 3.3. Remember that if is a subset of , then the maximal filtration value of the Čech bundle filtration on is (see Equation (11)). Consequently, the maximal filtration value of its Vietoris-Rips version is .
From an application perspective, we choose to work with the Vietoris-Rips filtration since it is easier to compute. Indeed, its construction only relies on computing pairwise distances, and finding cliques in graphs.
5.4 Choice of the parameter
This subsection is devoted to discussing the influence of the parameter . Recall that affects the norm we chose on :
Let . If are two positive real numbers, the corresponding Čech filtrations and , as well as the Čech bundle filtrations and , are -interleaved multiplicatively. This comes from the straightforward inequality
Note that we also have the additive inequality
One deduces that the Čech bundle filtrations and are -interleaved additively, where is the maximal filtration value when . As a consequence of these interleavings, when the values and are close, the persistence barcodes and the lifebars of the persistent Stiefel-Whitney classes are close (see Theorem 3.3).
As a general principle, one would choose the parameter to be large, since it would lead to large filtrations. More precisely, if and denote respectively the maximal filtration values of and , then and , as in Equation (10). Moreover, we have the following inclusion:
where denotes the thickening of with respect to the norm , and with respect to . This inclusion can be proven from the following fact, valid for every and such that :
Hence larger parameters lead to larger maximal filtration values and larger filtrations.
However, as we show in the following examples, different values of may result in different behaviours of the persistent Stiefel-Whitney classes. In Example 5.10, large values of highlight properties of the dataset that are not consistent with the underlying vector bundle, which is orientable. Notice that, so far, we always picked the value , for it seemed experimentally relevant with the datasets we chose.
Example 5.9.
Consider the set representing the Mobius strip, as in Example 3.2 of Subsect. 3.2:
As we show in Appendix A.1, is a circle, included in a 2-dimensional affine subspace of . Its radius is . As a consequence, the persistence of the Čech filtration of consists of two bars: one -feature, the bar , and one -feature, the bar .
For any , the maximal filtration value of the Čech bundle filtration of is . Moreover, the persistent Stiefel-Whitney class is nonzero all along the filtration. In this example, we see that the parameter does not influence the qualitative interpretation of the persistent Stiefel-Whitney class. It is always nonzero where it is defined. The following example shows a case where does influence the persistent Stiefel-Whitney class.
Example 5.10.
Consider the set representing the normal bundle of the circle , as in Example 3.2:
As we show in Appendix A.2, is a subset of a 2-dimensional flat torus embedded in , hence can be seen as a torus knot.
Before studying the Čech bundle filtration of , we discuss its Čech filtration . Its behaviour depends on :
-
•
if , then retracts on a circle for , retracts on a 3-sphere for , and retracts on a point for .
-
•
if , then retracts on a circle for , retracts on another circle for , retracts on a 3-sphere for , and has the homotopy type of a point for .
Let us interpret these facts. If , then the persistent cohomology of looks similar to the persistent cohomology of the underlying set , but with a cohomology feature added. Besides, if , a new topological feature appears in the -barcode: the bar . These barcodes are depicted in Figures 15 and 16.
Let us now discuss the corresponding Čech bundle filtrations. For any , the maximal filtration value of the Čech bundle filtration of is . We observe two behaviours: if , then is zero all along the filtration, and if , then is nonzero from . This in proven in Appendix A.2. To conclude, this persistent Stiefel-Whitney class is consistent with the underlying bundle—the normal bundle of the circle, which is trivial—only for .
















6 Numerical experiments
In this last section, we propose to apply our algorithm on synthetic datasets, inspired by image analysis. We aim at illustrating how the first persistent Stiefel-Whintey class may reveal two properties: when the datasets contain certain symmetries, and when the datasets are close to non-orientables vector bundles. A Python notebook gathering these experiments can be found at https://github.com/raphaeltinarrage/PersistentCharacteristicClasses/blob/master/Experiments.ipynb.
6.1 Datasets with symmetries
Giraffe moving forward.
Let us start with a simple dataset: it consists in a picture of a giraffe, that we translate to the right via cyclic permutations. The dataset contains of 150 images, each of size pixels, in RGB format. Since , the dataset can be enbedded in . Some of these images can be seen in Figure 17.



By performing a Principal Component Analysis (PCA), we project the dataset on the three principal axes. The result is a subset of . As a last pre-processing step, we divide each point of by the value , so that becomes a subset of the unit ball . The point cloud is represented on Figure 18. Next to it, we give the persistence barcodes of its Rips filtration (we choose the coefficient field , and represent in red and in green). Note that actually lies close to the unit sphere of , and moreover that it describes a circle.



Let us consider on two -dimensional bundles, defined via classifying maps :
and
where represents the orthogonal projection matrix on the 1-dimensional subspace of spanned by . The vector bundle is to be seen as the normal bundle of restricted to , and is to be seen as the tangent bundle of the circle. These two theoretical bundles — restriction of the normal bundle of the sphere, and tangent bundle of a circle — are trivial. This follows from the general fact that 1-dimensional bundles on the sphere are trivial.
We represent on Figure 19 the vector bundles and , seen in . One observes that, while going around the circle, the lines make a complete twist. This is the same behavior as the trivial bundle of the circle, that we studied earlier (see Figure 2).


Next, let , and consider the lifted sets and . We remind the reader that this construction has been studied in Subsection 3.4. We represent the point clouds and on Figure 20, projected in via PCA, as well as the persistence barcodes of their Rips filtration. On these two barcodes, one observes one prominent -feature, and one prominent -feature. Below, we plot the lifebars of their first persistent Stiefel-Whitney classes, up to the maximal filtration value (see Subsection 5.3). Both are empty, meaning that the persistent Stiefel-Whitney classes are zero all along the filtration. This is consistent with the fact that the underlying vector bundles are trivial.








Giraffe moving behind two trees.
We will now study a variation of this dataset. As before, we consider a giraffe walking straight, but now with two trees on the foreground. The dataset consists of 150 images, each of size pixels, in RGB format. Since , the dataset can be seen as a subset of . Some of the images can be seen in Figure 21.



Just as before, we project the point cloud in via PCA, and renormalize it. The corresponding point cloud, that we denote , and the barcode of its Rips filtration can be seen on Figure 22.



Note that, in this collection, the images where the giraffe goes behind the trees are close to each other. Indeed, only a few pixels differ between them. As a consequence, the point cloud , though lying close to a circle, seems to come closer to itself at some point. This behavior translates in its persistent cohomology as two prominent -features.
We now consider the vector bundles and defined as before:
and
They are represented on Figure 23. Let , and consider the lifted sets and . We represent them on Figure 24, as well as the persistence barcode of their Rips filtration, and the lifebars of their first Stiefel-Whitney classes, up to their maximal filtration value. We read that the second one is empty, while the first one is not.










Let us explain this phenomenon. In both cases, as we can see on Figure 23, the lines make a full twist while turning around the circle. This corresponds to a trivial bundle. However, in the case of , the points close to the almost self-intersection of corresponds to lines close to each other. As a consequence, in the Rips filtration of the lifted set , these points will connect early. Hence the filtration behaves as if were composed of two loops. But, on these loops, the lines make only a half-twist. This correspond to the Mobius bundle on the circle (see Figure 2). Therefore we obtain a non-trivial Stifel-Whitney class.
The bundle does not reflect this property. This is because the points close to the self-intersection of does not correspond to lines that are close to each other. In the Rips filtration of the lifted set , the two loops connect late, hence the non-orientability does not appear on its persistent Stiefel-Whitney class.
Rotating cylinders.
We now propose a dataset whose tangent bundle reflects non-orientability. Consider the union of two cylinders in , as represented on Figure 25. By applying rotations, we obtain a dataset of 100 pictures, in RGB format, of pixels.





As before, we embed them into , project them into via PCA, and renormalize them. The corresponding point cloud, denoted , and the barcodes of its Rips filtration are represented on Figure 26.



Define on the tangent bundle . Let and consider the lifted set . The persistence barcodes of its Rips filtration, and the lifebar of its first persistent Stiefel-Whitney class are represented on Figure 27. We see that the lifebar is not trivial.



Here, the same phenomenon as before occurs: there are two images of the collection which are almost equal (when the cylinders are one in front of the other), resulting in a point cloud that almost intersect itself. Moreover, points close to the area where almost intersect itself correspond to lines that are close to each other. Consequently, the persistent homology of shows two prominent loops, whose corresponding vector bundles are non-orientable.
In these two last experiments, we observed the following fact: trivial vector bundles, but whose underlying point clouds present self-similarity, or self-intersection, may result in a shortcut of the vector bundle, implying a non-trivial persistent Stiefel-Whitney class.
6.2 Datasets with intrisic (non-)orientability
We will now present three datasets which reflect some underlying theoretical orientability or non-orientability.
Gorilla on a torus.
Let us consider a picture of a gorilla, that we translate to the right and downwards via cyclic permutations (see Figure 28). Each image has size pixels, in RGB format. The dataset consists of 3900 images (65 vertical permutations and 60 horizontal permutations).
Note that the images behave as if the gorilla was on a torus. Indeed, the torus can be obtained from the square by gluing its opposite edges. Hence the various images can be seen as translations of the original image, whose gluing pattern follows the one of the torus.
Since , the dataset can be seen as a point cloud of , that we project into via PCA. The resulting subset is denoted . The first index correponds to translations downwards, and the second index corresponds to translations to the right.















Consider on the vertical tangent bundle and the horizontal tangent bundle, defined respectively as
and
where we recall that is the orthogonal projection matrix on the line spanned by . The vector bundle is to be seen as the vertical component of the tangent bundle of a torus, and as the horizontal one. Both are trivial bundles.
Now, let , and consider the corresponding lifted sets and . We represent on Figure 29 the barcodes of the Rips filtrations of the sets and , and the lifebars of their first persistent Stiefel-Whitney classes. We read that they are zero all along the filtration. This is consistent with the underlying line bundles on the torus being trivial.






Gorilla on a Klein bottle.
We will modify this dataset: we still translate the gorilla, but while translating it to the right, we inverse the part that arrives at the left (see Figure 30). It behaves as if the picture was glued to itself according to the gluing of a Klein bottle. Just as before, the dataset consists of 3900 images of size pixels. We embed the images into and project them into via PCA. The resulting subset is denoted .
Again, consider the vector bundles and . They correspond to the horizontal and vertical components of the tangent bundle of a Klein bottle. Only one of them is non-trivial. Let , and consider the corresponding lifted sets and . We represent on Figure 31 the barcodes of their Rips filtrations, and the lifebars of their first persistent Stiefel-Whitney classes. The first lifebar is non-empty, reflecting the non-triviality of the underlying bundle.





















Gorilla on the projective plane.
We close this subsection with a last variation of the dataset: the gorilla is translated to the right, with an inversion of the left part, and translated downwards, with also an inversion of the upper part (see Figure 32). It behaves as if the image was glued to itself according to the gluing of the projective plane . The dataset still consists of 3900 images of size pixels, that we embed into and project into via PCA. The resulting subset is denoted .
We still consider the vector bundles and . Let , and consider the corresponding lifted sets and . We represent on Figure 33 the barcodes of their Rips filtrations, and the lifebars of their first persistent Stiefel-Whitney classes. Both lifebars are non-empty. We deduce that the underlying line bundles are non-trivial.





















In these various experiments, we applied the same method: in ordered datasets, indexed by only one value , two values or more, one can consider directional line bundles by approximating partial derivatives, such as . The first persistent Stiefel-Whitney classes of such bundles deliver information about the dataset in this particular direction.
7 Conclusion
In this paper we defined the persistent Stiefel-Whitney classes of vector bundle filtrations. We proved that they are stable with respect to the interleaving distance between vector bundle filtrations. We studied the particular case of Čech bundle filtrations of subsets of , and showed that they yield consistent estimators of the usual Stiefel-Whitney classes of some underlying vector bundle.
Moreover, when the dimension of the bundle is 1 and is finite, we proposed an algorithm to compute the first persistent Stiefel-Whitney class. We also described a way to compute their lifebars via mapping cones.
Our algorithm is limited to the bundles of dimension 1 since we only implemented triangulations of the Grassmannian when . However, any other triangulation of , with a computable face map, could be included in the algorithm without any modification. As far as we know, no triangulation of a Grassmannian with has never been given explicitely (i.e., as a list of simplices stored in a computer). This is a problem of interest, which will be adressed in a further work. A strategy could consist in using the usual CW-structures of the Grassmannians, and converting them into simplicial complexes, as done theoretically in Hatcher (2002, Theorem 2C.5). A recent result of Govc et al. (2020) gives an idea about the complexity of this problem: the number of simplices of minimal triangulations of must grow exponentially in both and .
Acknowledgements.
I wish to thank Frédéric Chazal and Marc Glisse for fruitful discussions and corrections, as well as the anonymous reviewers for corrections and clarifications. I also thank Luis Scoccola for pointing out a strengthening of Lemma 4.1.
Appendix A Supplementary material for Sect. 5
A.1 Study of Example 5.9
We consider the set
In order to study the Čech filtration of , we shall apply the following affine transformation: let be the subset of defined as
and let be the Čech filtration of in endowed with the norm . We recall that the Čech filtration of , denoted , is defined with respect to the norm . It is clear that, for every , the thickenings and are homeomorphic via the application
As a consequence, the persistence cohomology modules associated to and are isomorphic.
Next, notice that is a subset of the affine subspace of dimension 2 of with origin and spanned by the vectors and , where
Indeed, using the equality
we obtain
We see that is a circle, of radius .
Let denotes the affine space with origin and spanned by the vectors and . Lemma A.1, stated below, shows that the persistent cohomology of , seen in the ambient space , is the same as the persistent cohomology of restricted to the subspace . As a consequence, has the same persistence as a circle of radius in the plane. Hence its barcode can be described as follows:
-
•
one -feature: the bar ,
-
•
one -feature: the bar .
Lemma A.1.
Let be any subset, and define . Let these spaces be endowed with the usual Euclidean norms. Then the Čech filtrations of and yields isomorphic persistence modules.
Proof.
Let be the projection on the first coordinates. One verifies that, for every , the map is a homotopy equivalence. At cohomology level, these maps induce an isomorphism of persistence modules. ∎
Let us now study the Čech bundle filtration of , denoted . According to Equation (11), its filtration maximal value is . Note that is lower than , which is the radius of the circle . Hence, for , the inclusion is a homotopy equivalence. Consider the following commutative diagram:
It induces the following diagram in cohomology:
The horizontal arrow is an isomorphism. Hence the map is equal to . We only have to understand .
Remark that the map can be seen as the tautological bundle of the circle. It is then a standard result that is nontrivial. Alternatively, can be seen as a map between two circles. It is injective, hence its degree (modulo 2) is 1. We still deduce that is nontrivial. As a consequence, the persistent Stiefel-Whitney class is nonzero for every .
A.2 Study of Example 5.10
We consider the set
As we explained in the previous subsection, the Čech filtration of with respect to the norm yields the same persistence as the Čech filtration of with respect to the norm , where
Notice that is a subset of the affine subspace of dimension 4 of with origin and spanned by the vectors and , where
Indeed, can be written as
This comes from the equality
Observe that is a torus knot, i.e. a simple closed curve included in the torus , defined as
The curve winds one time around the first circle of the torus, and two times around the second one, as represented in Figure 34. It is known as the torus knot .
Let denotes the affine subspace with origin and spanned by . Since is a subset of , it is equivalent to study the Čech filtration of restricted to (as in Lemma A.1). We shall denote the coordinates of points with respect to the orthonormal basis . That is, a tuple shall refer to the point of . Seen in , the set can be written as
Moreover, for every , we shall denote .


We now state two lemmas that will be useful in what follows.
Lemma A.2.
For every , the map admits the following critical points:
-
•
and if ,
-
•
, , and if .
They correspond to the values
-
•
if ,
-
•
if ,
-
•
if .
Moreover, we have when .
Proof.
Let . One computes that
Consider the map . Its derivative is
It vanishes when , , or if . To conclude, a computation shows that , and . ∎
Lemma A.3.
For every such that , the map admits at most two local maxima and two local minima.
Proof.
Consider the map . It can be written as
Let us show that its derivative vanishes at most four times on , which will prove the result. Using the expression of , we see that can be written as
where are not all zero. Denoting and , we have , and . Hence
Now, if , we get
(17) |
Squaring this equality yields . This degree four equation, with variable , admits at most four roots. To each of these , there exists a unique that satisfies Equation (17). In other words, the corresponding such that is unique. We deduce that vanishes at most four times on . ∎
Before studying the Čech filtration of , let us describe some geometric quantities associated to it. Using a symbolic computation software, we see that the curvature of is constant and equal to
In particular, we have if , and if . We also have an expression for the diameter of :
It is a consequence of Lemma A.2. We now describe the reach of :
(18) |
To prove this, we first define a bottleneck of as pair of distinct points such that the open ball does not intersect . Its length is defined as . According to the results of Aamari et al. (2019, Theorem 3.4), the reach of is equal to
where is the inverse curvature of , and is the minimal length of bottlenecks of . As we computed, is equal to . Besides, according to Lemma A.2, a bottleneck has to satisfy or . The smallest length is attained when , for which . It is straightforward to verify that the pair is indeed a bottleneck. Therefore we have , and we deduce the expression of .
Last, the weak feature size of does not depend on and is equal to 1:
(19) |
We shall prove it by using the characterization of Boissonnat et al. (2018): is the infimum of distances , where is a critical point of the distance function . In this context, is a critical point if it lies in the convex hull of its projections on . Remark that, if , then admits at most two projections on . This follows from Lemma A.3. As a consequence, if is a critical point, then there exists such that lies in the middle of the segment , and the open ball does not intersect . Therefore is a critical point of , hence Lemma A.2 gives that . We deduce the result.
We now describe the thickenings . They present four different behaviours:
-
•
: is homotopy equivalent to a circle,
-
•
: is homotopy equivalent to a circle,
-
•
: is homotopy equivalent to a 3-sphere,
-
•
: is homotopy equivalent to a point.
Recall that, in the case where , we have . Consequently, the interval is empty, and the second point does not appear in this case.
Study of the case . For , let us show that deform retracts on . According to Equation (19), we have . Moreover, Equation (18) gives that . Using the results of Boissonnat et al. (2018), we deduce that is isotopic to .
Study of the case . Denote , and define the circle . It is repredented in Figure 35.

We claim that deform retracts on . To prove so, we shall define a continuous application such that, for every , the segment is included in . This would lead to a deformation retraction of onto , via
Equivalently, we shall define an application such that the segment is included in .
Let . According to Lemma A.3, admits at most two projection on . We start with the case where admits only one projection, namely with . Let be the reduction of modulo , and consider the point of . A computation shows that the distance is equal to 1. Besides, since , the distance is at most . By convexity, the segment is included in the ball , which is a subset of . We then define .
Now suppose that admits exactly two projection and . According to Lemma A.2, these angles must satisfy . Indeed, the case does not occur since we chose . The angles and correspond to the same reduction modulo , denoted , and we also define .
Study of the case . Let denotes the unit sphere of . For every , we shall denote by the linear subspace spanned by , and by the cone . Moreover, we define the quantity
and the set
The situation is depicted in Figure 36. We claim that is a subset of , and that deform retracts on it. This follows from the two following facts: for every ,
-
1.
is not greater than ,
-
2.
consists of one connected component: an interval centered on , that does not contain the point 0.
Suppose that these assertions are true. Then one defines a deformation retraction of on by retracting each fiber linearly on the singleton . We shall now prove the two items.

Item 1. Note that Item 1 can be reformulated as follows:
(20) |
Let us justify that the pairs that attain this maximum-minimum are the same as in
(21) |
From the definition of , we see that . A vector being fixed, let us show that is minimized when is. Let . Since is a unit vector, the projection of on can be written as . Hence , and expanding this norm yields
Expanding the norm and using that , we get . We inject this relation in the preceding equation to obtain
Now we can deduce that is minimized when is minimized. Indeed, the map is increasing on . But .
We deduce that studying the left hand term of Equation (20) is equivalent to studying Equation (21). We shall denote by the map
(22) |
Let that attains the maximum of , and let be a corresponding point that attains the minimum of . The points and attains the quantity in Equation (20). In order to prove that , let denotes the projection of on . We shall show that there exists another point such that is equal to Consequently, we would have , i.e.
Remark the following fact: if is a unit vector such that , then for small enough, we have
Equivalently, this statement reformulates as . Let us show that
(23) |
where , and where is the little-o notation. Note that . We also have
Expanding the inner product in Equation (23) gives
and we obtain the result.
Next, let us prove that is not the only point of that attains the minimum in Equation (22). Suppose that it is the case by contradiction. Let be a unit vector such that . For small enough, let us prove that the vector of contradicts the maximality of . That is, let us prove that . Let be a minimizer . We have to show that . This would lead to , hence the contradiction.
Expanding the norm yields
Using and by definition of , we obtain
We have to show that is positive for small enough. By writing we get
According to Equation (23), . Besides, using , we get . Last, Cauchy-Schwarz inequality gives . Therefore, , where is the big-o notation. Gathering these three equalities, we obtain
As we can read from this equation, if goes to zero as does, then is positive for small enough. Observe that goes to when goes to 0. By assumption is the only minimizer in Equation (22). By continuity of , we deduce that goes to .
By contradiction, we deduce that there exists another point which attains the minimum in . Note that it is the only other one, according to Lemma A.3. Let us show that lies in the middle of the segment . Suppose that it is not the case. Then is not equal to , where denotes the projection of on . Consequently, the half-spaces and intersects. Let be any vector in the intersection. For , denote . If is small enough, the same reasoning as before shows that contradicts the maximality of . The situation is represented in Figure 37.


Item 2. Let . The set can be described as
Let such that . Denote by the projection of on . It is equal to . Using Pythagoras’ theorem, we obtain that the set is equal to the interval
Using the identity , we can write this interval as
where and . Seen as functions of , the map is decreasing, and the map is increasing (see Figure 38). Let that minimizes . Equivalently, maximizes . It follows that the corresponding interval contains all the others. We deduce that the set is equal to this interval.


Study of the case . For every , we have . Therefore, if , then is star shaped around the point 0, hence it deform retracts on it.
To close this subsection, let us study the Čech bundle filtration of . According to Equation (11), its filtration maximal value is . Note that is lower than . Consequently, only two cases are to be studied: , and .
The same argument as in Subsect. A.2 yields that for every , the persistent Stiefel-Whitney class is equal to . Accordingly, for every , the class is equal to . Let us show that is zero, and that is not.
First, remark that the map can be seen as the normal bundle of the circle. Hence is nontrivial, and we deduce that . As a consequence, the persistent Stiefel-Whitney class is nonzero for every .
Next, consider . Recall that deform retracts on the circle
Seen in , we have
Notice that the map , the projection on , is injective. Seen as a map between two circles, it has degree (modulo 2) equal to 1. We deduce that is nontrivial. Now, remark that the map factorizes through :
It induces the following diagram in cohomology:
Since is nontrivial, this commutative diagram yields that the persistent Stiefel-Whitney class is nonzero. As a consequence, the persistent Stiefel-Whitney class is nonzero for every .
References
- Aamari et al. (2019) Aamari E, Kim J, Chazal F, Michel B, Rinaldo A, Wasserman L (2019) Estimating the Reach of a Manifold. Electronic journal of statistics
- Aubrey (2011) Aubrey H (2011) Persistent cohomology operations. PhD thesis, Duke University
- Bauer and Edelsbrunner (2017) Bauer U, Edelsbrunner H (2017) The Morse theory of Čech and Delaunay complexes. Transactions of the American Mathematical Society 369(5):3741–3762
- Bell et al. (2019) Bell G, Lawson A, Martin J, Rudzinski J, Smyth C (2019) Weighted persistent homology. Involve, a Journal of Mathematics 12(5):823–837
- Boissonnat et al. (2018) Boissonnat JD, Chazal F, Yvinec M (2018) Geometric and topological inference, vol 57. Cambridge University Press
- Botnan and Crawley-Boevey (2020) Botnan M, Crawley-Boevey W (2020) Decomposition of persistence modules. Proceedings of the American Mathematical Society 148(11):4581–4596
- Chazal et al. (2009) Chazal F, Cohen-Steiner D, Lieutier A (2009) A sampling theory for compact sets in Euclidean space. Discrete & Computational Geometry 41(3):461–479
- Chazal et al. (2016) Chazal F, de Silva V, Glisse M, Oudot S (2016) The Structure and Stability of Persistence Modules. SpringerBriefs in Mathematics
- Edelsbrunner (1993) Edelsbrunner H (1993) The union of balls and its dual shape. In: Proceedings of the ninth annual symposium on Computational geometry, pp 218–231
- Govc et al. (2020) Govc D, Marzantowicz W, Pavešić P, et al. (2020) How many simplices are needed to triangulate a Grassmannian? Topological Methods in Nonlinear Analysis
- Hatcher (2002) Hatcher A (2002) Algebraic Topology. Cambridge University Press
- von Kühnel (1987) von Kühnel W (1987) Minimal triangulations of kummer varieties. In: Abhandlungen aus dem Mathematischen Seminar der Universität Hamburg, Springer, vol 57, pp 7–20
- Milnor and Stasheff (2016) Milnor J, Stasheff JD (2016) Characteristic Classes.(AM-76), vol 76. Princeton university press
- Munkres (1984) Munkres JR (1984) Elements of Algebraic Topology. Addison-Wesley
- Perea (2018) Perea JA (2018) Multiscale projective coordinates via persistent cohomology of sparse filtrations. Discrete & Computational Geometry 59(1):175–225
- Scoccola and Perea (2021) Scoccola L, Perea JA (2021) Approximate and discrete euclidean vector bundles. arXiv preprint arXiv:210407563