Why Topology Needs More Than a Small Error
A density excursion set at threshold \(\lambda\) is the region where the density is at least \(\lambda\). Estimation error bounds often show that an estimated excursion set lies between two nearby population excursion sets. That is useful, but it does not by itself ensure that the estimated set has the same number of connected components or the same boundary shape. A small-amplitude perturbation can oscillate rapidly and introduce many extra components.
Topological stability needs conditions on the density near the threshold and, for a general smooth perturbation, control of how its derivatives change. The key geometric condition is that the threshold lies in a band containing no critical points. In that band, moving the threshold slightly cannot pass through a critical point where the level set might be born, disappear, split, or merge.
Regular Levels and Excursion-Set Boundaries
Let \(M\) be a compact smooth manifold without boundary, equipped with a Riemannian metric. One may take \(M\) to be a compact region with no relevant level-set points on its boundary, but the boundaryless setting avoids additional boundary conditions. Let \(f:M\to\mathbb{R}\) be a density or another scalar function. Its excursion set at level \(\lambda\) is
A point \(x\) is a critical point of \(f\) if its gradient \(\nabla f(x)\) is zero. A value \(\lambda\) is a regular value if \(\nabla f(x)\neq 0\) for every \(x\) satisfying \(f(x)=\lambda\). If there are no such points, the level is empty and the regular-value condition holds vacuously.
When \(\lambda\) is regular, the boundary of \(A_f(\lambda)\) is exactly the level set \(f^{-1}(\{\lambda\})\). Indeed, points on the level have nonzero gradient, so locally the function takes values on both sides of \(\lambda\); points not on the level are either in the interior of the excursion set or in the interior of its complement.
For stability, a single regular level is not quite enough. We use a regular band: there are constants \(\delta>0\) and \(c>0\) such that
This says that every level in the band is regular and uniformly separated from critical points. The lower bound controls how far one must move in space to change the function value by a given small amount.
What Uniform Error Gives
Suppose an estimate \(\hat f\) satisfies \(\|\hat f-f\|_\infty\leq\varepsilon\), where \(\|h\|_\infty=\sup_{x\in M}|h(x)|\). Then the estimated and population excursion sets obey the sandwich bound
For the first inclusion, \(f(x)\geq\lambda+\varepsilon\) implies \(\hat f(x)\geq f(x)-\varepsilon\geq\lambda\). For the second, \(\hat f(x)\geq\lambda\) implies \(f(x)\geq\hat f(x)-\varepsilon\geq\lambda-\varepsilon\). This argument requires only a uniform bound; it says nothing by itself about the topology of the set in the middle.
If \(f\) has a regular band, the population sets at levels \(\lambda-\varepsilon\) and \(\lambda+\varepsilon\) are ambiently isotopic for sufficiently small \(\varepsilon\). Informally, one can slide one boundary to the other without tearing or gluing it. But a set lying between two isotopic sets need not itself have the same topology. Derivative control on the perturbation supplies the missing condition.
Worked Example: A Density Perturbation With Stable Components
Use the circle with angle coordinate \(\theta\), and write densities relative to arc length. Set
This is a density because its integral over the circle is \(1\), and it is positive because its minimum is \(0.4/(2\pi)\). The level equation \(f(\theta)=\lambda\) is \(\cos\theta=0\), with two solutions. At either solution, \(\left|f'(\theta)\right|=0.6/(2\pi)\), so the level is regular. The set \(A_f(\lambda)\) is the closed semicircle where \(\cos\theta\geq0\); it is connected and its boundary consists of two points.
Now perturb the density to
It still integrates to \(1\). It is positive because the oscillating part has amplitude \(\sqrt{0.6^2+0.08^2}=\sqrt{0.3664}<1\). The uniform error is at most \(0.08/(2\pi)\), and the derivative error is at most \(0.08/(2\pi)\).
To verify a regular band, take \(\delta=0.1/(2\pi)\). If \(|f(\theta)-\lambda|\leq\delta\), then \(|\cos\theta|\leq 1/6\), and hence \(|\sin\theta|\geq\sqrt{35/36}\). Thus \(|f'(\theta)|\geq0.6\sqrt{35/36}/(2\pi)>0.59/(2\pi)\). The uniform error is smaller than \(\delta\), and the derivative error is smaller than this gradient bound. The interpolation from \(f\) to \(g\) therefore stays regular at \(\lambda\). Its excursion sets have the same connected-component structure, and their boundaries are carried to one another by an ambient isotopy.
A Stability Theorem
Here an ambient isotopy means a continuous deformation of the whole ambient space by diffeomorphisms, not merely a correspondence between the two boundaries. The theorem uses both value control and derivative control. The value bound locates every intermediate level point inside the regular band; the derivative bound prevents the interpolation from acquiring a critical point there.
Proof. Define \(f_t=f+t(g-f)\). If \(f_t(x)=\lambda\), then \[ |f(x)-\lambda|=|f(x)-f_t(x)|\leq t\|g-f\|_\infty\leq\varepsilon<\delta. \] Also, \[ \|\nabla f_t(x)-\nabla f(x)\| =t\|\nabla g(x)-\nabla f(x)\|\leq\eta. \] The triangle inequality therefore gives \[ \|\nabla f_t(x)\|\geq\|\nabla f(x)\|-\eta\geq c-\eta>0 \quad\text{whenever } f_t(x)=\lambda. \] Thus every intermediate level is regular.
For completeness, the isotopy can be constructed by a time-dependent vector field. Choose a smooth cutoff \(\chi:\mathbb{R}\to[0,1]\) that equals \(1\) near \(0\) and is zero outside a sufficiently small interval around \(0\). Choose that interval so that \(|f_t(x)-\lambda|\) in its support implies \(|f(x)-\lambda|<\delta\); this is possible since \(|f_t-f|\leq\varepsilon<\delta\). On this support define
and set \(X_t=0\) where the cutoff vanishes. This is a smooth vector field, since its denominator is nonzero wherever it is used. Compactness of \(M\) ensures its flow \(\phi_t\) exists through \(t=1\) and each \(\phi_t\) is a diffeomorphism. Along a trajectory \(x(t)=\phi_t(x(0))\) that lies on the moving level,
because \(\chi=1\) on the level. The flow therefore carries the level set at time \(0\) to the level set at time \(t\). It also preserves the two sides of the level: in a neighborhood of the level the same derivative calculation keeps \(f_t(\phi_t(x))-\lambda\) constant, so a trajectory cannot cross the moving boundary. Consequently \(\phi_t(A_f(\lambda))=A_{f_t}(\lambda)\). A diffeomorphism preserves connected components and carries boundaries to boundaries, proving the claims. \(\square\)
The regular band also explains why changing the threshold alone does not alter topology within that band. Apply the same flow argument to the family \(f_t=f+t a\), for a constant \(a\) with \(|a|\leq\delta\), at level \(\lambda\). Equivalently, this compares \(f\) at levels \(\lambda\) and \(\lambda-a\). Thus nearby population excursion sets are isotopic as long as the intervening levels remain in the regular band.
Worked Example: A Nonregular Threshold Can Change Topology
On the circle, let \(f(\theta)=\cos\theta\) and set \(\lambda=1\). The excursion set is the single point \(\theta=0\), since \(\cos\theta\geq1\) only there. But \(\lambda\) is not regular: \(f'(0)=0\).
For any \(a>0\), define \(g(\theta)=\cos\theta-a\). Then \(\|g-f\|_\infty=a\), which can be arbitrarily small. Yet \(A_g(1)\) is empty, because \(\cos\theta-a\leq1-a<1\) everywhere. The component disappears under an arbitrarily small perturbation. The failure is consistent with the theorem: the level is critical, so no regular band with a positive gradient lower bound surrounds it.
Worked Example: Uniform Convergence Can Still Create Many Components
On the interval \([-1,1]\), consider \(f(x)=x\) at threshold \(0\). Its nonnegative excursion set is \([0,1]\), with one component. Define smooth perturbations
They converge uniformly to \(f\), since \(\|g_n-f\|_\infty\leq1/n\). Let \(x_{j,n}=(j+\tfrac12)\pi/n^3\). At these points, \(\sin(n^3x_{j,n})=(-1)^j\), so \[ g_n(x_{j,n})=x_{j,n}+\frac{(-1)^j}{n}. \] Whenever \(|x_{j,n}|\leq1/(2n)\), the sign of this value is the sign of \((-1)^j\): the oscillating term has magnitude \(1/n\), while \(|x_{j,n}|\leq1/(2n)\). There are on the order of \(n^2\) consecutive such points, with alternating signs. Between each consecutive pair the intermediate value theorem gives a zero of \(g_n\); the alternating signs also force repeated entries into and exits from the nonnegative set. Thus the estimated excursion set has a growing number of components, despite uniform convergence. The derivative perturbation is \(n^2\cos(n^3x)\), which is not small. This is exactly the kind of behavior excluded by the theorem’s derivative condition.
Common Mistake and Practical Interpretation
Mistake: “The estimated density is uniformly close to the true density, so their excursion sets must have the same number of components.” Uniform closeness proves the sandwich inclusions, not a topological equivalence. The oscillatory example shows that the set between the two population sets can have extra components.
Correction: Check whether the threshold lies in a band free of critical points, and whether the perturbation is controlled in both value and gradient. Under those conditions, interpolation cannot create or remove a level-set component, and the excursion sets are related by an ambient isotopy. Without the gradient condition, even a very small perturbation can change topology.
These conditions are sufficient rather than necessary. A particular estimate may happen to preserve topology without satisfying the theorem’s derivative bound. But uniform error alone cannot certify that fact. For density level-set inference, it is therefore useful to report geometric and topological guarantees separately: a small symmetric difference or a small boundary displacement is not automatically a guarantee of the correct number of components.
Check Your Understanding
Use the definitions and stability conditions above to answer the following.
- Why does a uniform bound \(\|\hat f-f\|_\infty\leq\varepsilon\) imply the excursion-set sandwich, and why does that sandwich alone not guarantee matching component counts?
- State the regular-band condition at threshold \(\lambda\). What role does its gradient lower bound play in the stability theorem?
- In the theorem, explain why every point on the level set of \(f_t\) lies in the regular band of \(f\).
- Why does a \(C^1\) function with nonzero gradient on a level set yield a \(C^1\) hypersurface, rather than necessarily a smooth one?
- Which condition fails in the example \(f(\theta)=\cos\theta\) at \(\lambda=1\), allowing an arbitrarily small perturbation to remove the excursion set?