Consistent procedures for cluster tree estimation and pruning

Kamalika Chaudhuri, Sanjoy Dasgupta, Samory Kpotufe, Ulrike von Luxburg

Introduction

Our formalism of the cluster tree (Section 2.2) and our notion of consistency follow early work on clustering, in particular that of Hartigan (1981). Much subsequent work has been devoted to estimating the connected components of a single level set; see, for example, Polonik (1995), Tsybakov (1997) and, more recently, Maier et al. (2009), Rigollet and Vert (2009), Rinaldo and Wasserman (2010), and Singh et al. (2009). In contrast to these results, the present work is concerned with the simultaneous estimation of all level sets of an unknown density: recovering the cluster tree as a whole.

Are there hierarchical clustering algorithms which converge to the cluster tree? Previous theory work (Hartigan, 1981, Penrose, 1995) has provided partial consistency results for the well-known single-linkage clustering algorithm, while other work (Wishart, 1969) has suggested ways to overcome the deficiencies of this algorithm by making it more robust, but without proofs of convergence. In this paper, we propose a novel way to make single-linkage more robust, while retaining most of its elegance and simplicity (see Figure 3). We establish its finite-sample rate of convergence (Theorem 3.3); the centerpiece of our argument is a result on continuum percolation (Theorem 4.7). This also implies consistency in the sense of Hartigan.

We then give an alternative procedure based on the kk-nearest neighbor graph of the sample (see Figure 4). Such graphs are widely used in machine learning, and interestingly there is still much to understand about their expressiveness. We show that by successively removing points from this graph, we can create a hierarchical clustering that also converges to the cluster tree, at roughly the same rate as the linkage-based scheme (Theorem 3.4).

Next, we use tools from information theory to give a lower bound on the problem of cluster tree estimation (Theorem 6.1), which matches our upper bounds in its dependence on most of the parameters of interest.

The convergence results for our two hierarchical clustering procedures nevertheless leave open the possibility that the trees they produce contain spurious branching. This is a well-studied problem in the cluster tree literature, and we address it with a pruning method (Figure 9) that preserves the consistency properties of the tree estimators while providing finite-sample guarantees on the removal of false clusters (Theorem 7.5). This procedure is based on simple intuition that can carry over to other cluster tree estimators.

Definitions and previous work

We start by considering the more general context of clustering. While clustering procedures abound in statistics and machine learning, it remains largely unclear whether clusters in finite data—for instance, the clusters returned by a particular procedure—reveal anything meaningful about the underlying distribution from which the data is sampled. Understanding what statistical estimation based on a finite data set reveals about the underlying distribution is a central preoccupation of statistics and machine learning; however this kind of analysis has proved elusive in the case of clustering, except perhaps in the case of density-based clustering.

Consider for instance kk-means, possibly the most popular clustering procedure in use today. If this procedure returns kk clusters on an nn-sample from a distribution ff, what do these clusters reveal about ff? Pollard (1981) proved a basic consistency result: if the algorithm always finds the global minimum of the kk-means cost function (which, incidentally, is NP-hard and thus computationally intractable in general; see Dasgupta and Freund (2009), Theorem 3), then as n→∞n\rightarrow\infty, the clustering is the globally optimal kk-means solution for ff, suitably defined. Even then, it is unclear whether the best kk-means solution to ff is an interesting or desirable quantity in settings outside of vector quantization.

Our work, and more generally work on density-based clustering, relies on meaningful formalisms of how a clustering of data generalizes to unambiguous structures of the underlying distribution. The main such formalism is that of the cluster tree.

2 The cluster tree

We start with notions of connectivity. A path PP in S⊂XS\subset{\mathcal{X}} is a continuous function P:→SP:\rightarrow S. If x=P(0)x=P(0) and y=P(1)y=P(1), we write x⇝Pyx\stackrel{{\scriptstyle P}}{{\leadsto}}y and we say that xx and yy are connected in SS. This relation – “connected in SS” – is an equivalence relation that partitions SS into its connected components. We say S⊂XS\subset{\mathcal{X}} is connected if it has a single connected component.

The cluster tree is a hierarchy each of whose levels is a partition of a subset of X{\mathcal{X}}, which we will occasionally call a subpartition of X{\mathcal{X}}. Write \Pi({\mathcal{X}})=\{\mbox{subpartitions of{\mathcal{X}}}\}.

Pick any λ′≤λ\lambda^{\prime}\leq\lambda. Then:

3 Notion of convergence and previous work

For each ii, set r2(xi)r_{2}(x_{i}) to the distance from xix_{i} to its nearest neighbor.

Construct a graph GrG_{r} with nodes {xi:r2(xi)≤r}\{x_{i}:r_{2}(x_{i})\leq r\}.

Include edge (xi,xj)(x_{i},x_{j}) if ∥xi−xj∥≤r\|x_{i}-x_{j}\|\leq r.

Hartigan (1981) has shown that single linkage is consistent in one dimension (that is, for d=1d=1). But he also demonstrates, by a lovely reduction to continuum percolation, that this consistency fails in higher dimension d≥2d\geq 2. The problem is the requirement that A∩Xn⊂AnA\cap X_{n}\subset A_{n}: by the time the clusters are large enough that one of them contains all of AA, there is a reasonable chance that this cluster will be so big as to also contain part of A′A^{\prime}.

With this insight, Hartigan defines a weaker notion of fractional consistency, under which AnA_{n} (resp, An′A_{n}^{\prime}) need not contain all of A∩XnA\cap X_{n} (resp, A′∩XnA^{\prime}\cap X_{n}), but merely a sizeable chunk of it – and ought to be very close (at distance →0\rightarrow 0 as n→∞n\rightarrow\infty) to the remainder. He then shows that single linkage achieves this weaker consistency for any pair A,A′A,A^{\prime} for which the ratio

is sufficiently large. More recent work by Penrose (1995) closes the gap and shows fractional consistency whenever this ratio is >1>1.

A more robust version of single linkage has been proposed by Wishart (1969): when connecting points at distance rr from each other, only consider points that have at least kk neighbors within distance rr (for some k>2k>2). Thus initially, when rr is small, only the regions of highest density are available for linkage, while the rest of the data set is ignored. As rr gets larger, more and more of the data points become candidates for linkage. This scheme is intuitively sensible, but Wishart does not provide a proof of convergence. Thus it is unclear how to set kk, for instance.

Several papers (Rigollet and Vert, 2009, Maier et al., 2009, Singh et al., 2009, Rinaldo and Wasserman, 2010) have recently considered the problem of recovering the connected components of {x:f(x)≥λ}\{x:f(x)\geq\lambda\} for a user-specified λ\lambda: the flat version of our problem. Most similar to the work in this paper is the algorithm of Maier et al. (2009), which uses the kk-nearest neighbor graph of the data. These level set results invariably require niceness conditions on the specific level set being recovered, often stated in terms of the smoothness of the boundary of clusters , and/or regularity conditions on the density ff on clusters of the given level set. It is unclear whether these conditions hold for all level sets of a general density, in other words how restrictive these conditions are in the context of recovering the entire cluster tree. In contrast, under mild requirements on the distribution, our conditions on the recovered level sets hold for any level set as the sample size nn increases. The main distributional requirement for consistency is that of continuity of the density ff on a compact support X{\mathcal{X}}.

A related issue that has received quite a lot of attention is that of pruning a cluster tree estimate: removing spurious clusters. A recent result of Rinaldo et al. (2012) gives meaningful statistical guarantees, but is based on the cluster tree of an empirical density estimate, which is algorithmically problematic as discussed earlier. Stuetzle and Nugent (2010) have an appealing top-down scheme for estimating the cluster tree, along with a post-processing step (called runt pruning) that helps identify modes of the distribution. The consistency of this method has not yet been established. We provide a consistent pruning procedure for both our procedures.

The present results are based in part on earlier conference versions, namely Chaudhuri and Dasgupta (2010) and Kpotufe and von Luxburg (2011). The result of Chaudhuri and Dasgupta (2010) analyzes the consistency of the first cluster tree estimator (see next section) but provides no pruning method for the estimator. The result of Kpotufe and von Luxburg (2011) analyzes the second cluster tree estimator and shows how to prune it. However the pruning method is tuned to this second estimator and works only under strict Hölder continuity requirements on the density. The present work first provides a unified analysis of both estimators using techniques developed in Chaudhuri and Dasgupta (2010). Second, building on insight from Kpotufe and von Luxburg (2011), we derive a new pruning method which proveably works for either estimator without Hölder conditions on the distribution. In particular, the pruned version of either cluster tree estimate remains consistent under mild uniform continuity assumptions. The main finite-sample pruning result of Theorem 7.5 requires even milder conditions on the density than required for consistency.

Algorithms and results

The first algorithm we consider in this paper is a generalization of Wishart’s scheme and of single linkage, shown in Figure 3. It has two free parameters: kk and α\alpha. For practical reasons, it is of interest to keep these as small as possible. We provide finite-sample convergence rates for all 1≤α≤21\leq\alpha\leq 2 and we can achieve k∼dlog⁡nk\sim d\log n if α≥2\alpha\geq\sqrt{2}. Our rates for α=1\alpha=1 force kk to be much larger, exponential in dd. It is an open problem to determine whether the setting (α=1,k∼dlog⁡n\alpha=1,k\sim d\log n) yields consistency.

Conceptually, the algorithm creates a series of graphs Gr=(Vr,Er)G_{r}=(V_{r},E_{r}) satisfying a nesting property: r≤r′   ⇒   Vr⊂Vr′\mbox and Er⊂Er′.r\leq r^{\prime}\ \ \ \Rightarrow\ \ \ V_{r}\subset V_{r^{\prime}}\mbox{\ and \ }E_{r}\subset E_{r^{\prime}}. A point is admitted into GrG_{r} only if it has kk neighbors within distance rr; when rr is small, this picks out the regions of highest density, roughly. The edges of GrG_{r} are between all pairs of points within distance αr\alpha r of each other.

In practice, the only values of rr that matter are those corresponding to interpoint distances within the sample, and thus the algorithm is efficient. A further simplification is that the graphs GrG_{r} don’t need to be explicitly created. Instead, the clusters can be generated directly using Kruskal’s algorithm, as is done for single linkage.

The second algorithm we study (Figure 4) is based on the kk-nearest neighbor graph of the samples. There are two natural ways to define this graph, and we will analyze the sparser of the two, the mutual kk-NN graph, which we shall denote GNNG^{{\rm NN}}. Our results hold equally for the other variant.

One way to think about the second hierarchical clustering algorithm is that it creates the kk-nearest neighbor graph on all the data samples, and then generates a hierarchy by removing points from the graph in decreasing order of their kk-NN radius rk(xi)r_{k}(x_{i}). The resulting graphs GrNNG^{{\rm NN}}_{r} have the same nodes as the corresponding GrG_{r} but have potentially fewer edges: ErNN⊂ErE^{{\rm NN}}_{r}\subset E_{r}. This makes them more challenging to analyze.

The first consideration is that a cluster is hard to identify if it contains a thin “bridge” that would make it look disconnected in a small sample. To control this, we consider a “buffer zone” of width σ\sigma around the clusters.

ZσZ_{\sigma} is a full-dimensional set, even if ZZ itself is not.

Second, the ease of distinguishing two clusters AA and A′A^{\prime} depends inevitably upon the separation between them. To keep things simple, we’ll use the same σ\sigma as a separation parameter.

Under this definition, AσA_{\sigma} and Aσ′A^{\prime}_{\sigma} must lie within X{\mathcal{X}}, otherwise the right-hand side of the inequality is zero. SσS_{\sigma} need not be contained in X{\mathcal{X}}.

2 Consistency and rate of convergence

There is an absolute constant CC such that the following holds. Pick any 0<δ,ϵ<10<\delta,\epsilon<1, and run Algorithm 1 on a sample XnX_{n} of size nn drawn from ff, with settings

Then there is a mapping r:[0,∞)→[0,∞)r:[0,\infty)\rightarrow[0,\infty) such that the following holds with probability at least 1−δ1-\delta. Consider any pair of connected subsets A,A′⊂XA,A^{\prime}\subset{\mathcal{X}} such that A,A′A,A^{\prime} are (σ,ϵ)(\sigma,\epsilon)-separated for ϵ\epsilon and some σ>0\sigma>0. Let λ=inf⁡x∈Aσ∪Aσ′f(x)\lambda=\inf_{x\in A_{\sigma}\cup A^{\prime}_{\sigma}}f(x). If n ≥ kvd(σ/2)dλ(1+ϵ2), then:n\ \geq\ \frac{k}{v_{d}(\sigma/2)^{d}\lambda}\left(1+\frac{\epsilon}{2}\right),\text{ then:}

Separation. A∩XnA\cap X_{n} is disconnected from A′∩XnA^{\prime}\cap X_{n} in Gr(λ)G_{r(\lambda)}.

Connectedness. A∩XnA\cap X_{n} and A′∩XnA^{\prime}\cap X_{n} are each connected in Gr(λ)G_{r(\lambda)}.

The two parts of this theorem – separation and connectedness – are proved in Sections 4.1 and 4.2, respectively.

A similar result holds for Algorithm 2 under stronger requirements on kk.

Theorem 3.3 applies also to Algorithm 2, provided the following additional condition on kk is met: k≥Λλ⋅Cdlog⁡n⋅log⁡1δ,k\geq\frac{\Lambda}{\lambda}\cdot Cd\log n\cdot\log\frac{1}{\delta}, where Λ=sup⁡x∈Xf(x)\Lambda=\sup_{x\in{\mathcal{X}}}f(x).

In the analysis section, we give a lower bound (Lemma 5.3) that shows why this dependence on Λ/λ\Lambda/\lambda is needed.

Finally, we point out that these finite-sample results imply consistency (Definition 2.3): as n→∞n\rightarrow\infty, take kn=(dlog⁡n)/ϵn2k_{n}=(d\log n)/\epsilon_{n}^{2} with any schedule of {ϵn}\left\{\epsilon_{n}\right\} such that ϵn→0\epsilon_{n}\rightarrow 0 and kn/n→0k_{n}/n\rightarrow 0. Under mild uniform continuity conditions, any two connected components A,A′A,A^{\prime} of {f≥λ}\{f\geq\lambda\} are (σ,ϵ)(\sigma,\epsilon)-separated for some σ,ϵ>0\sigma,\epsilon>0 (see appendix); thus they are identified given large enough nn.

Analysis of Algorithm 1

We also invoke uniform convergence over half-balls: each of these is the intersection of a ball with a halfspace through its center. Using uniform Bernstein-type bounds, we derive basic inequalities which we use repeatedly.

We denote this uniform convergence over balls and half-balls as event EoE_{o}.

See appendix. Cδ=2Colog⁡(2/δ)C_{\delta}=2C_{o}\log(2/\delta), where CoC_{o} is the absolute constant from Lemma C.2. ∎

We will typically preface other results by a statement like “Assume EoE_{o}.” It is to be understood that EoE_{o} occurs with probability at least 1−δ1-\delta over the random sample XnX_{n}, where δ\delta is henceforth fixed. The constant CδC_{\delta} will keep reappearing through the paper.

For any cluster A⊂XA\subset{\mathcal{X}}, there is a certain scale rr at which every data point in AA appears in GrG_{r}. What is this rr?

Assume EoE_{o}. Pick any set A⊂XA\subset{\mathcal{X}}, and let λ=inf⁡x∈Aσf(x)\lambda=\inf_{x\in A_{\sigma}}f(x). If r<σr<\sigma and vdrdλ ≥ kn+Cδnkdlog⁡n,v_{d}r^{d}\lambda\ \geq\ \frac{k}{n}+\frac{C_{\delta}}{n}\sqrt{kd\log n}, then GrG_{r} contains every point in Aσ−r∩XnA_{\sigma-r}\cap X_{n}.

Any point x∈Aσ−rx\in A_{\sigma-r} has f(B(x,r))≥vdrdλf(B(x,r))\geq v_{d}r^{d}\lambda; and thus, by Lemma 4.1, has at least kk neighbors within radius rr. ∎

In order to show that two separate clusters AA and A′A^{\prime} get distinguished in the cluster tree, we need to exhibit a scale rr at which every point in AA and A′A^{\prime} is active, but there is no path from AA to A′A^{\prime}.

Assume EoE_{o}. Suppose sets A,A′⊂XA,A^{\prime}\subset{\mathcal{X}} are (σ,ϵ)(\sigma,\epsilon)-separated by set SS, and let λ=inf⁡x∈Aσ∪Aσ′f(x)\lambda=\inf_{x\in A_{\sigma}\cup A^{\prime}_{\sigma}}f(x). Pick 0<r<σ0<r<\sigma such that

GrG_{r} contains all points in (Aσ−r∪Aσ−r′)∩Xn(A_{\sigma-r}\cup A^{\prime}_{\sigma-r})\cap X_{n}.

GrG_{r} contains no points in Sσ−r∩XnS_{\sigma-r}\cap X_{n}.

If r<2σ/(α+2)r<2\sigma/(\alpha+2), then A∩XnA\cap X_{n} is disconnected from A′∩XnA^{\prime}\cap X_{n} in GrG_{r}.

Part (a) is directly from Lemma 4.2. For (b), any point x∈Sσ−rx\in S_{\sigma-r} has f(B(x,r))<vdrdλ(1−ϵ)f(B(x,r))<v_{d}r^{d}\lambda(1-\epsilon); and thus, by Lemma 4.1, has strictly fewer than kk neighbors within distance rr.

For (c), since points in Sσ−rS_{\sigma-r} are absent from GrG_{r}, any path from AA to A′A^{\prime} in that graph must have an edge across Sσ−rS_{\sigma-r}. But any such edge has length at least 2(σ−r)>αr2(\sigma-r)>\alpha r and is thus not in GrG_{r}. ∎

Define r(λ)r(\lambda) to be the value of rr for which vdrdλ=kn+Cδnkdlog⁡nv_{d}r^{d}\lambda=\frac{k}{n}+\frac{C_{\delta}}{n}\sqrt{kd\log n}.

The conditions of Lemma 4.3 are satisfied by r=r(λ)r=r(\lambda) if r(λ)<2σ/(α+2)r(\lambda)<2\sigma/(\alpha+2) and k≥4Cδ2(d/ϵ2)log⁡nk\geq 4C_{\delta}^{2}(d/\epsilon^{2})\log n.

2 Connectedness

We need to show that points in AA (and similarly A′A^{\prime}) are connected in Gr(λ)G_{r(\lambda)}. First we state a simple bound (proved in the appendix) that works if α=2\alpha=2 and k∼dlog⁡nk\sim d\log n; later we consider smaller α\alpha.

Assume EoE_{o}. Let AA be a connected set in X{\mathcal{X}} with λ=inf⁡x∈Aσf(x)\lambda=\inf_{x\in A_{\sigma}}f(x). Suppose 1≤α≤21\leq\alpha\leq 2. Then A∩XnA\cap X_{n} is connected in GrG_{r} whenever r≤2σ/(2+α)r\leq 2\sigma/(2+\alpha) and

Comparing this to the definition of r(λ)r(\lambda), we see that choosing α=1\alpha=1 would entail k≥2dk\geq 2^{d}, which is undesirable. We can get a more reasonable setting of k∼dlog⁡nk\sim d\log n by choosing α=2\alpha=2, but we’d like α\alpha to be as small as possible. A more refined argument shows that α≈2\alpha\approx\sqrt{2} is enough.

Assume EoE_{o}. Let AA be a connected set in X{\mathcal{X}} with λ=inf⁡x∈Aσf(x)\lambda=\inf_{x\in A_{\sigma}}f(x). Suppose α≥2\alpha\geq\sqrt{2}. Then A∩XnA\cap X_{n} is connected in GrG_{r} whenever r≤σ/2r\leq\sigma/2 and

Recall that a half-ball is the intersection of an open ball and a halfspace through the center of the ball. Formally, it is defined by a center μ\mu, a radius rr, and a unit direction uu:

We will describe any such set as “the half of B(μ,r)B(\mu,r) in direction uu”. If the half-ball lies entirely in AσA_{\sigma}, its probability mass is at least (1/2)vdrdλ(1/2)v_{d}r^{d}\lambda. By uniform convergence bounds (Lemma 4.1), if vdrdλ≥(4Cδdlog⁡n)/nv_{d}r^{d}\lambda\geq(4C_{\delta}d\log n)/n, then every such half-ball within AσA_{\sigma} contains at least one data point.

Pick any x,x′∈A∩Xnx,x^{\prime}\in A\cap X_{n}; there is a path PP in AA with x⇝Px′x\stackrel{{\scriptstyle P}}{{\leadsto}}x^{\prime}. We’ll identify a sequence of data points x0=x,x1,x2,…x_{0}=x,x_{1},x_{2},\ldots, ending in x′x^{\prime}, such that for every ii, point xix_{i} is active in GrG_{r} and ∥xi−xi+1∥≤αr\|x_{i}-x_{i+1}\|\leq\alpha r. This will confirm that xx is connected to x′x^{\prime} in GrG_{r}.

To begin with, recall that PP is a continuous function from $intointoA.Foranypoint. For any pointy\in{\mathcal{X}},define, defineN(y)tobetheportionofto be the portion ofwhoseimageunderwhose image underPliesinlies inB(y,r):thatis,: that is,N(y)=\{0\leq z\leq 1:P(z)\in B(y,r)\}.If. Ifyiswithindistanceis within distancerofofP,then, thenN(y)isnonempty.Defineis nonempty. Define\pi(y)=P(\sup N(y)),thefurthestpointalongthepathwithindistance, the furthest point along the path within distancerofofy$ (Figure 5, left).

The sequence {xi}\left\{x_{i}\right\} is defined iteratively; x0=xx_{0}=x, and for i=0,1,2,…:i=0,1,2,\ldots:

If ∥xi−x′∥≤αr\|x_{i}-x^{\prime}\|\leq\alpha r, set xi+1=x′x_{i+1}=x^{\prime} and stop.

By construction, xix_{i} is within distance rr of path PP and hence N(xi)≠∅N(x_{i})\neq\emptyset.

Let BB be the open ball of radius rr around π(xi)\pi(x_{i}). The half of BB in direction xi−π(xi)x_{i}-\pi(x_{i}) contains a data point; this is xi+1x_{i+1} (Figure 5, right).

The process eventually stops since each π(xi+1)\pi(x_{i+1}) is further along path PP than π(xi)\pi(x_{i}); formally, sup⁡N(xi+1)>sup⁡N(xi)\sup N(x_{i+1})>\sup N(x_{i}). This is because ∥xi+1−π(xi)∥<r\|x_{i+1}-\pi(x_{i})\|<r, so by continuity of the function PP, there are points further along PP (beyond π(xi)\pi(x_{i})) whose distance to xi+1x_{i+1} is still <r<r. Thus xi+1x_{i+1} is distinct from x0,x1,…,xix_{0},x_{1},\ldots,x_{i}. Since there are finitely many data points, the process must terminate, so the sequence {xi}\left\{x_{i}\right\} constitutes a path from xx to x′x^{\prime}.

Each xix_{i} lies in Ar⊆Aσ−rA_{r}\subseteq A_{\sigma-r} and is thus active in GrG_{r} under event EoE_{o} (Lemma 4.2). Finally, the distance between successive points is ∥xi−xi+1∥2\displaystyle\|x_{i}-x_{i+1}\|^{2}

where the second-last inequality is from the definition of half-ball. ∎

To complete the proof of Theorem 3.3, take k≥4Cδ2(d/ϵ2)log⁡nk\geq 4C_{\delta}^{2}(d/\epsilon^{2})\log n. The relationship that defines r=r(λ)r=r(\lambda) (Definition 4.4) then implies

This shows that clusters at density level λ\lambda emerge when the growing radius rr of the cluster tree algorithm reaches roughly (k/(λvdn))1/d(k/(\lambda v_{d}n))^{1/d}. In order for (σ,ϵ)(\sigma,\epsilon)-separated clusters to be distinguished, the one additional requirement of Lemma 4.3 and Theorem 4.7 is that r=r(λ)r=r(\lambda) be at most σ/2\sigma/2; this is what yields the final lower bound on nn.

Analysis of Algorithm 2

The second cluster tree estimator (Figure 4), based on the kk-nearest neighbor graph of the data points, satisfies the same guarantees as the first, under a more generous setting of kk.

Let GrNNG^{{\rm NN}}_{r} be the kk-NN graph at radius rr. We have already observed that GrNNG^{{\rm NN}}_{r} has the same vertices as GrG_{r}, and a subset of its edges. Therefore, if clusters are separated in GrG_{r}, they are certainly separated in GrNNG^{{\rm NN}}_{r}: the separation properties of Lemma 4.3 carry over immediately to the new estimator. What remains is to establish a connectedness property, an analogue of Theorem 4.7, for these potentially much sparser graphs.

We’ll first confirm that ror_{o} is, indeed, a lower bound on the radii rk(⋅)r_{k}(\cdot).

Assume EoE_{o}. If k≥4Cδ2dlog⁡nk\geq 4C_{\delta}^{2}d\log n, then rk(x)>ror_{k}(x)>r_{o} for all xx.

Pick any xx and consider the ball B(x,ro)B(x,r_{o}). By definition of ror_{o},

where the last inequality is from the condition on kk. Under EoE_{o} (Lemma 4.1), we then get fn(B(x,ro))<k/nf_{n}(B(x,r_{o}))<k/n; therefore rk(x)>ror_{k}(x)>r_{o}. ∎

Now we present an analogue of Theorem 4.7.

Assume EoE_{o}. Let AA be a connected set in X{\mathcal{X}}, with λ=inf⁡x∈Aσf(x)\lambda=\inf_{x\in A_{\sigma}}f(x). Suppose α≥2\alpha\geq\sqrt{2}. Then A∩XnA\cap X_{n} is connected in GrNNG^{{\rm NN}}_{r} whenever r+ro≤σr+r_{o}\leq\sigma and

We’ll consider events at two different scales: a small radius ror_{o}, and the potentially larger radius rr from the theorem statement.

Let’s start with the small scale. The lower bound on kk yields

As in Theorem 4.7, this implies that every half-ball of radius ror_{o} within AσA_{\sigma} contains at least one data point.

Let xx and x′x^{\prime} be any two points in A∩XnA\cap X_{n}. As in Theorem 4.7, we can find a finite sequence of data points x=x0,x1,…,xp=x′x=x_{0},x_{1},\ldots,x_{p}=x^{\prime} such that for each ii, two key conditions hold: (i) ∥xi−xi+1∥≤αro\|x_{i}-x_{i+1}\|\leq\alpha r_{o} and (ii) xix_{i} lies within distance ror_{o} of AA.

Now let’s move to a different scale r≤σ−ror\leq\sigma-r_{o}. Since each xix_{i} lies in Aro⊆Aσ−rA_{r_{o}}\subseteq A_{\sigma-r}, we know from Lemma 4.2 that all xix_{i} are active in GrNNG^{{\rm NN}}_{r} given the lower bound on vdrdλv_{d}r^{d}\lambda. The edges (xi,xi+1)(x_{i},x_{i+1}) are also present, because

using Lemma 5.1 and the bound on kk. Hence xx is connected to x′x^{\prime} in GrNNG^{{\rm NN}}_{r}. ∎

It is straightforward to check that r(λ)r(\lambda) is always ≥ro\geq r_{o}, and Theorem 3.4 follows immediately.

2 A lower bound on neighborhood cardinality

The result for kk-nearest neighbor graphs requires a larger setting of kk than our earlier result; in particular, kk needs to exceed the ratio Λ/λ\Lambda/\lambda. We now show that this isn’t just a looseness in our bound, but in fact a necessary condition for these types of graphs.

Recall that the mutual kk-NN graph contains all the data points, and puts an edge between points xx and x′x^{\prime} if ∥x−x′∥≤αmin⁡(rk(x),rk(x′))\|x-x^{\prime}\|\leq\alpha\min(r_{k}(x),r_{k}(x^{\prime})) (the α\alpha is our adaptation). We will assume 1≤α≤21\leq\alpha\leq 2, as is the case in all our upper bounds.

Consider the density shown in Figure 6, consisting of two dense regions, AA and CC, bridged by a less dense region BB. Each region is of width L=1/(λ+2Λ)L=1/(\lambda+2\Lambda). We’ll show that the mutual kk-NN graph of a sample from this distribution is likely to be disconnected. Specifically, with probability at least 1/21/2, there will be no edges between AA and B∪CB\cup C.

To this end, fix any n≥Λ/λn\geq\Lambda/\lambda, and define Δ=1/(4nλ)<L\Delta=1/(4n\lambda)<L. Consider the leftmost portion of BB of length Δ\Delta. The probability that a random draw from ff falls in this region is Δλ=1/(4n)\Delta\lambda=1/(4n). Therefore, the probability that no point falls in this region is (1−1/(4n))n≥3/4(1-1/(4n))^{n}\geq 3/4. Call this event E1E_{1}.

Next, divide AA into intervals of length Δ,2Δ,4Δ\Delta,2\Delta,4\Delta, and so on, starting from the right. We’ll show that with probability at least 3/43/4, the right half of each such interval contains at least k+1k+1 points; call this event E2E_{2}. To see why, let’s focus on one particular interval, say that of length 2iΔ2^{i}\Delta. The probability that a random point falls in the right half of this interval is 2i−1ΔΛ≥2i+3k/n2^{i-1}\Delta\Lambda\geq 2^{i+3}k/n. Therefore, the number of points in this region is ≥2i+3k\geq 2^{i+3}k in expectation, and by a Chernoff bound, is ≥k+1\geq k+1 except with probability <exp⁡(−2i+1k)<\exp(-2^{i+1}k). Taking a union bound over all the intervals yields an overall failure probability of at most 1/41/4.

With probability at least 1/21/2, events E1E_{1} and E2E_{2} both occur. Whereupon, for any point in AA, its nearest neighbor in B∪CB\cup C is at least twice as far as its kk nearest neighbors in AA. Thus the mutual kk-NN graph has no edges between AA and B∪CB\cup C. ∎

This constraint on kk is unpleasant, and it would be interesting to either find mild smoothness assumptions on ff, or better, modified notions of kk-NN graph, that render it unnecessary.

Lower bound

We have shown that the two cluster tree algorithms distinguish pairs of clusters that are (σ,ϵ)(\sigma,\epsilon)-separated. The number of samples required to capture clusters at density ≥λ\geq\lambda is, by Theorem 3.3,

We’ll now show that this dependence on σ\sigma, λ\lambda, and ϵ\epsilon is optimal. The only room for improvement, therefore, is in constants involving dd.

Consider any algorithm that is given n≥100n\geq 100 i.i.d. samples XnX_{n} from some fi∈Ff_{i}\in F and, with probability at least 3/43/4, outputs a tree in which the smallest cluster containing Ai∩XnA_{i}\cap X_{n} is disjoint from the smallest cluster containing Ai′∩XnA_{i}^{\prime}\cap X_{n}. Then

Given the parameters d,σ,ϵ,λd,\sigma,\epsilon,\lambda, we will construct a space X{\mathcal{X}} and a finite family of densities F={fi}F=\{f_{i}\} on X{\mathcal{X}}. We will then argue that any cluster tree algorithm that is able to distinguish (σ,ϵ)(\sigma,\epsilon)-separated clusters must be able, when given samples from some fif_{i}, to determine the identity of II. The sample complexity of this latter task can be lower-bounded using Fano’s inequality (Appendix D): it is Ω((log⁡∣F∣)/θ)\Omega((\log|F|)/\theta), for

where K(⋅,⋅)K(\cdot,\cdot) is Kullback-Leibler divergence.

𝑐1𝜎4(c+1)\sigma4σ<spanclass="katex−display"><spanclass="katex"><spanclass="katex−mathml"><mathxmlns="http://www.w3.org/1998/Math/MathML"display="block"><semantics><mrow><mn>8</mn><mi>σ</mi></mrow><annotationencoding="application/x−tex">8σ</annotation></semantics></math></span><spanclass="katex−html"aria−hidden="true"><spanclass="base"><spanclass="strut"style="height:0.6444em;"></span><spanclass="mord">8</span><spanclass="mordmathnormal"style="margin−right:0.0359em;">σ</span></span></span></span></span>12σ<spanclass="katex−display"><spanclass="katex"><spanclass="katex−mathml"><mathxmlns="http://www.w3.org/1998/Math/MathML"display="block"><semantics><mrow><mi>τ</mi><mi>σ</mi></mrow><annotationencoding="application/x−tex">τσ</annotation></semantics></math></span><spanclass="katex−html"aria−hidden="true"><spanclass="base"><spanclass="strut"style="height:0.4306em;"></span><spanclass="mordmathnormal"style="margin−right:0.1132em;">τ</span><spanclass="mordmathnormal"style="margin−right:0.0359em;">σ</span></span></span></span></span>x14\sigma<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mn>8</mn><mi>σ</mi></mrow><annotation encoding="application/x-tex">8\sigma</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.6444em;"></span><span class="mord">8</span><span class="mord mathnormal" style="margin-right:0.0359em;">σ</span></span></span></span></span>12\sigma<span class="katex-display"><span class="katex"><span class="katex-mathml"><math xmlns="http://www.w3.org/1998/Math/MathML" display="block"><semantics><mrow><mi>τ</mi><mi>σ</mi></mrow><annotation encoding="application/x-tex">\tau\sigma</annotation></semantics></math></span><span class="katex-html" aria-hidden="true"><span class="base"><span class="strut" style="height:0.4306em;"></span><span class="mord mathnormal" style="margin-right:0.1132em;">τ</span><span class="mord mathnormal" style="margin-right:0.0359em;">σ</span></span></span></span></span>x_{1}axis A family of densities on X{\mathcal{X}}. The family FF contains c−1c-1 densities f1,…,fc−1f_{1},\ldots,f_{c-1} which coincide on most of the support X{\mathcal{X}} and differ on parts of X0{\mathcal{X}}_{0}. Each density fif_{i} is piecewise constant as described below. Items (ii) and (iv) describe the pieces that are common to all densities in FF.

Density λ(1−ϵ)\lambda(1-\epsilon) on (4σi+σ,4σi+3σ)×τσBd−1(4\sigma i+\sigma,4\sigma i+3\sigma)\times\tau\sigma B_{d-1}.

Balls of mass 1/(2c)1/(2c) centered at locations 4σ,8σ,…,4cσ4\sigma,8\sigma,\ldots,4c\sigma along the x1x_{1}-axis: each such ball is of radius τ−1<σ\tau-1<\sigma, and the density on these balls is 1/(2c⋅vd(τ−1)d)≥λ1/(2c\cdot v_{d}(\tau-1)^{d})\geq\lambda. We refer to these as mass balls.

Density λ\lambda on the remainder of X0{\mathcal{X}}_{0}: this is the union of the cylinder segments [0,4σi+σ]×τσBd−1[0,4\sigma i+\sigma]\times\tau\sigma B_{d-1} and [4σi+3σ,4(c+1)σ]×τσBd−1[4\sigma i+3\sigma,4(c+1)\sigma]\times\tau\sigma B_{d-1} minus the mass balls. Since the cross-sectional area of the cylinder is vd−1(τσ)d−1v_{d-1}(\tau\sigma)^{d-1}, the total mass here is at most λτd−1vd−1σd(4(c+1)−2)\lambda\tau^{d-1}v_{d-1}\sigma^{d}(4(c+1)-2).

The remaining mass is at least 1/2−8λvd−1σd(c+1)1/2-8\lambda v_{d-1}\sigma^{d}(c+1); we will be careful to choose cc so that this is nonnegative. The remaining mass is placed on X1{\mathcal{X}}_{1} in some fixed manner that does not vary between densities in FF.

Here is a sketch of fif_{i}. The low-density region of width 2σ2\sigma is centered at 4σi+2σ4\sigma i+2\sigma on the x1x_{1}-axis, and contains no mass balls.

For any i≠ji\neq j, the densities fif_{i} and fjf_{j} differ only on the cylindrical sections (4σi+σ,4σi+3σ)×σBd−1(4\sigma i+\sigma,4\sigma i+3\sigma)\times\sigma B_{d-1} and (4σj+σ,4σj+3σ)×σBd−1(4\sigma j+\sigma,4\sigma j+3\sigma)\times\sigma B_{d-1}, which are disjoint, contain no mass ball, and each have volume 2τd−1vd−1σd2\tau^{d-1}v_{d-1}\sigma^{d}. Thus

(using ln⁡(1−x)≥−2x\ln(1-x)\geq-2x for 0<x≤1/20<x\leq 1/2). This is an upper bound on the θ\theta in the Fano bound.

Clusters and separators. Now define the clusters and separators as follows: for each 1≤i≤c−11\leq i\leq c-1,

AiA_{i} is the tubular segment [σ,4σi]×(τ−1)σ[\sigma,4\sigma i]\times(\tau-1)\sigma,

Ai′A_{i}^{\prime} is the tubular segment [4σ(i+1),4(c+1)σ−σ]×(τ−1)σ[4\sigma(i+1),4(c+1)\sigma-\sigma]\times(\tau-1)\sigma, and

Si={4σi+2σ}×σBd−1S_{i}=\{4\sigma i+2\sigma\}\times\sigma B_{d-1} is the cross-section of the cylinder at location 4σi+2σ4\sigma i+2\sigma.

Thus AiA_{i} and Ai′A_{i}^{\prime} are dd-dimensional sets while SiS_{i} is a (d−1)(d-1)-dimensional set. It can be seen that, for density fif_{i}, AiA_{i} and Ai′A_{i}^{\prime} are (σ,ϵ)(\sigma,\epsilon)-separated, and inf⁡x∈Ai,σ∪Ai,σ′fi(x)≥λ\inf_{x\in A_{i,\sigma}\cup A^{\prime}_{i,\sigma}}f_{i}(x)\geq\lambda.

Now that the various structures are defined, we still need to argue that if an algorithm is given a sample XnX_{n} from some fif_{i} (where ii is unknown), and is able to separate Ai∩XnA_{i}\cap X_{n} from Ai′∩XnA^{\prime}_{i}\cap X_{n}, then it can effectively infer the identity of ii. This has sample complexity Ω((log⁡c)/θ)\Omega((\log c)/\theta).

Let’s set cc to be a small constant, say c=6c=6. Then, even a small sample XnX_{n} of n≥100n\geq 100 points is likely (with probability at least 3/43/4, say), to contain points from all of the cc mass balls, each of which has mass 1/(2c)1/(2c). Suppose the algorithm even knows in advance that the underlying density is one of the c−1c-1 choices in FF, and is subsequently able (with probability at least 3/43/4) to separate AiA_{i} from Ai′A_{i}^{\prime}. To do this, it must connect all the points from mass balls within AiA_{i}, and all the points from mass balls within Ai′A_{i}^{\prime}, and yet keep these two groups apart. In short, this algorithm must be able to determine (with overall probability at least 1/21/2) the segment (4σi+σ,4σi+3σ)(4\sigma i+\sigma,4\sigma i+3\sigma) of lower density, and hence the identity of ii.

We can thus apply Fano’s inequality to conclude that we need

for some absolute constant C2C_{2}. The last equality comes from the formula vd=πd/2/Γ((d/2)+1)v_{d}=\pi^{d/2}/\Gamma((d/2)+1), whereupon vd−1=O(vdd1/2)v_{d-1}=O(v_{d}d^{1/2}).

This is almost the bound in the theorem statement, short a logarithmic term. To finish up, we now switch to a larger value of cc:

and apply the same construction. We have already established that we need n=Ω(c/ϵ2)n=\Omega(c/\epsilon^{2}) samples, so assume nn is at least this large. Then, for small enough ϵ\epsilon, it is very likely that when the underlying density is fif_{i}, the sample XnX_{n} will contain the four point masses at 4σ4\sigma, 4σi4\sigma i, 4σ(i+1)4\sigma(i+1), and 4(c+1)σ4(c+1)\sigma. Therefore, the clustering algorithm must connect the point at 4σ4\sigma to that at 4σi4\sigma i and the point at 4σ(i+1)4\sigma(i+1) to that at 4(c+1)σ4(c+1)\sigma, while keeping the two groups apart. Therefore, this algorithm can determine ii. Applying Fano’s inequality gives n=Ω((log⁡c)/θ)n=\Omega((\log c)/\theta), which is the bound in the theorem statement. ∎

Pruning

Hartigan’s notion of consistency (Definition 2.3) requires distinct clusters to be distinguished, but does not guard against fragmentation within a cluster. Consider, for instance, the density shown in Figure 6. Under Hartigan-consistency, in the limit, the cluster tree must include a cluster that contains all of AA and a separate, disjoint cluster that contains all of CC. But the tree is allowed to break AA into further subregions. To be concrete, suppose we draw a sample from that density and receive four points from each of AA and CC. Figure 7, left, shows a possible cluster tree on these samples that meets the consistency requirement. However, we’d prefer the one on the right. Formally we want to avoid or remove false clusters as defined below.

Let AnA_{n} and An′A_{n}^{\prime} be the vertices of two separate connected components (potentially at different levels) in the cluster tree returned by an algorithm. We call AnA_{n} and An′A_{n}^{\prime} false clusters if they are part of the same connected component of the level set {x:f(x)≥min⁡x′∈An∪An′f(x′)}\left\{x:f(x)\geq\min_{x^{\prime}\in A_{n}\cup A_{n}^{\prime}}f(x^{\prime})\right\}.

This problem is generally addressed in the literature by making assumptions about the size of true clusters. Real clusters are assumed to be large in some sense, for instance in terms of their mass (Maier et al., 2009), or excess massThe excess mass of a component AA at level λ\lambda is generally defined as ∫A(f(x)−λ) dx\int_{A}(f(x)-\lambda)\,dx. (Stuetzle and Nugent, 2009). However, relying on size can be misleading in practice, as is illustrated in Figure 8. It turns out that, building on the results of the previous sections, there is a simple way to treat spurious clusters independent of their size.

The above intuition is likely to extend to cluster tree procedures other than the ones discussed here. The main requirement on the cluster tree estimate is that points in AA (as discussed above) be connected at some nearby level in the tree.

2 Separation

Assume EoE_{o}. Consider two sets A,A′⊂XA,A^{\prime}\subset{\mathcal{X}}, and let λ=inf⁡x∈Aσ∪Aσ′f(x)\lambda=\inf_{x\in A_{\sigma}\cup A^{\prime}_{\sigma}}f(x). Suppose there exists a separator set SS such that

Any path in X{\mathcal{X}} from AA to A′A^{\prime} intersects SS.

3 Connectedness

We now turn to the main result of this section, namely that the pruning procedure reconnects incorrectly fragmented clusters. Recall the intuition detailed above. We first have to argue that points with similar density make their first appearance at nearby levels rr of the empirical tree. From the analysis of the previous sections, we know that a point xx is present at level r(f(x))r(f(x)), roughly speaking. We now need to show that it cannot appear at a level too much smaller than this.

These assertions about single points are true only if the density doesn’t vary too dramatically in their vicinity. In what follows, we will quantify the smoothness at scale σ\sigma by the constant

Assume EoE_{o}. Pick any xx and let fσ(x)=inf⁡x′∈B(x,σ)f(x′)f_{\sigma}(x)=\inf_{x^{\prime}\in B(x,\sigma)}f(x^{\prime}). Suppose

Then r≤σ/2r\leq\sigma/2, implying f(B(x,r))≤vdrd(fσ(x)+Lσ)f(B(x,r))\leq v_{d}r^{d}(f_{\sigma}(x)+L_{\sigma}). Using the first inequality and Lemma 4.1, we have fn(B(x,r))<k/nf_{n}(B(x,r))<k/n, that is r<rk(x)r<r_{k}(x). ∎

Next, by combining the above lower-bound on rk(x)r_{k}(x) with our previous results on connectedness for both types of algorithms, we obtain the following pruning guarantees.

Let AA be any connected component of {x∈X:f(x)≥λ}\{x\in{\mathcal{X}}:f(x)\geq\lambda\}. We’ll show that A∩XnA\cap X_{n} is connected in GrG_{r} (or GrNNG^{\rm NN}_{r}) after pruning, from which the lemma follows immediately.

Define λσ=inf⁡x∈Aσf(x)≥inf⁡x∈Af(x)−Lσ≥λ−Lσ\lambda_{\sigma}=\inf_{x\in A_{\sigma}}f(x)\geq\inf_{x\in A}f(x)-L_{\sigma}\geq\lambda-L_{\sigma}. Recall from Definition 4.4 that r(λσ)r(\lambda_{\sigma}) is the value of rr for which vdrdλσ=kn+Cδnkdlog⁡nv_{d}r^{d}\lambda_{\sigma}=\frac{k}{n}+\frac{C_{\delta}}{n}\sqrt{kd\log n}. The first condition in the lemma statement thus implies that r(λσ)≤σ/2r(\lambda_{\sigma})\leq\sigma/2. The second condition, together with Theorem 4.7 or Theorem 5.2, implies that A∩XnA\cap X_{n} is connected at level r(λσ)r(\lambda_{\sigma}) of GG or GNNG^{\rm NN}.

The separation and connectedness results of this section can now be combined into the following theorem.

Then the following holds with probability at least 1−δ1-\delta. Define

or in the case of Algorithm 2, the maximum of this quantity and (Λ/k)Cdlog⁡n⋅log⁡(1/δ)(\Lambda/k)Cd\log n\cdot\log(1/\delta), where Λ=sup⁡x∈Xf(x)\Lambda=\sup_{x\in{\mathcal{X}}}f(x).

Recovery of true clusters: Consider any two sets A,A′⊂XA,A^{\prime}\subset{\mathcal{X}}, and suppose λ=inf⁡x∈Aσ∪Aσ′f(x)≥λo\lambda=\inf_{x\in A_{\sigma}\cup A^{\prime}_{\sigma}}f(x)\geq\lambda_{o}. Suppose there exists a set SS such that

Any path in X{\mathcal{X}} from AA to A′A^{\prime} intersects SS.

Final remarks

Both cluster tree algorithms are variations on standard estimators, but carefully control the neighborhood size kk and make use of a novel parameter α\alpha to allow more edges at every scale rr. The analysis relies on α\alpha being at least 2\sqrt{2}, and on kk being at least dlog⁡nd\log n. Is it possible to dispense with α\alpha (that is, to use α=1\alpha=1) while maintaining this setting of kk?

There remains a discrepancy of 2d2^{d} between the upper and lower bounds on the sample complexity of building a hierarchical clustering that distinguishes all (σ,ϵ)(\sigma,\epsilon)-separated clusters. Can this gap be closed, and if so, what is needed, a better analysis or a better algorithm?

Appendix A Plug-in estimation of the cluster tree

The problem, however, is that computing the level sets of fnf_{n} is usually not an easy task. Hence we adopt a different approach in this paper.

Appendix B Consistency

The following is a straightforward exercise in analysis.

Let A1,A2,…,AkA_{1},A_{2},\ldots,A_{k} be the connected components of {f≥λ}\{f\geq\lambda\}, with A=A1A=A_{1} and A′=A2A^{\prime}=A_{2}.

First, each AiA_{i} is closed and thus compact. To see this, pick any x∈X∖Aix\in{\mathcal{X}}\setminus A_{i}. There must be some x′x^{\prime} on the shortest path from xx to AiA_{i} with f(x′)<λf(x^{\prime})<\lambda (otherwise x∈Aix\in A_{i}). By continuity of ff, there is some ball B(x′,r)B(x^{\prime},r) on which f<λf<\lambda; thus this ball doesn’t touch AiA_{i}. Then B(x,r)B(x,r) doesn’t touch AiA_{i}.

Let Δ=min⁡i≠jΔij>0\Delta=\min_{i\neq j}\Delta_{ij}>0, and define SS to be the set of points at distance exactly Δ/2\Delta/2 from AA: S={x∈X:inf⁡y∈A∥x−y∥=Δ/2}.S=\{x\in{\mathcal{X}}:\inf_{y\in A}\|x-y\|=\Delta/2\}. SS separates AA from A′A^{\prime}. Moreover, it is closed by continuity of ∥⋅∥\|\cdot\|, and hence is compact. Define λo=sup⁡x∈Sf(x)\lambda_{o}=\sup_{x\in S}f(x). Since SS is compact, ff (restricted to SS) is maximized at some xo∈Sx_{o}\in S. Then λo=f(xo)<λ\lambda_{o}=f(x_{o})<\lambda.

To finish up, set δ=(λ−λo)/3>0\delta=(\lambda-\lambda_{o})/3>0. By uniform continuity of ff, there is some σ>0\sigma>0 such that ff doesn’t change by more than δ\delta on balls of radius σ\sigma. Then f(x)≤λo+δ=λ−2δf(x)\leq\lambda_{o}+\delta=\lambda-2\delta for x∈Sσx\in S_{\sigma} and f(x)≥λ−δf(x)\geq\lambda-\delta for x∈Aσ∪Aσ′x\in A_{\sigma}\cup A^{\prime}_{\sigma}.

Thus SS is a (σ,δ/(λ−δ))(\sigma,\delta/(\lambda-\delta))-separator for A,A′A,A^{\prime}. ∎

Appendix C Proof details

We start with a standard generalization result due to Vapnik and Chervonenkis; the following version is a paraphrase of Theorem 5.1 of Bousquet et al. (2004).

where βn=(4/n)(dln⁡2n+ln⁡(8/δ))\beta_{n}=\sqrt{(4/n)(d\ln 2n+\ln(8/\delta))}.

By applying this bound to the class G\mathcal{G} of indicator functions over balls (or half-balls), we get the following:

The bound f(B)−fn(B)≤βnf(B)f(B)-f_{n}(B)\leq\beta_{n}\sqrt{f(B)} from Theorem C.1 yields f(B)>βn2  ⟹  fn(B)>0.f(B)>\beta_{n}^{2}\implies f_{n}(B)>0. For the second bound, we use f(B)−fn(B)≤βn2+βnfn(B)f(B)-f_{n}(B)\leq\beta_{n}^{2}+\beta_{n}\sqrt{f_{n}(B)}. It follows that

For the last bound, we rearrange f(B)−fn(B)≥−(βn2+βnf(B))f(B)-f_{n}(B)\geq-(\beta_{n}^{2}+\beta_{n}\sqrt{f(B)}) to get

Lemma 4.1 now follows immediately, by taking k≥dlog⁡nk\geq d\log n. Since the uniform convergence bounds have error bars of magnitude (dlog⁡n)/n(d\log n)/n, it doesn’t make sense, when using them, to take kk any smaller than this.

C.2 Proof of Lemma 4.6

Consider any x,x′∈A∩Xnx,x^{\prime}\in A\cap X_{n}. Since AA is connected, there is a path PP in AA with x⇝Px′x\stackrel{{\scriptstyle P}}{{\leadsto}}x^{\prime}. Fix any 0<γ<10<\gamma<1. Because the density of AσA_{\sigma} is lower bounded away from zero, it follows by a volume and packing-covering argument that AA, and thus PP, can be covered by a finite number of balls of diameter γr\gamma r. Thus we can choose finitely many points z1,z2,…,zk∈Pz_{1},z_{2},\ldots,z_{k}\in P such that x=z0x=z_{0}, x′=zkx^{\prime}=z_{k} and ∥zi+1−zi∥≤γr.\|z_{i+1}-z_{i}\|\leq\gamma r.

Under EoE_{o} (Lemma 4.1), any ball centered in AA with radius (α−γ)r/2(\alpha-\gamma)r/2 contains at least one data point if

Assume for the moment that this holds. Then, every ball B(zi,(α−γ)r/2)B(z_{i},(\alpha-\gamma)r/2) contains at least one point; call it xix_{i}.

By the upper bound on rr, each such xix_{i} lies in Aσ−rA_{\sigma-r}; therefore, by Lemma 4.1, the xix_{i} are all active in GrG_{r}. Moreover, consecutive points xix_{i} are close together:

Thus all edges (xi,xi+1)(x_{i},x_{i+1}) exist in GrG_{r}, whereby xx is connected to x′x^{\prime} in GrG_{r}.

All this assumes that equation (C.1) holds for some γ>0\gamma>0. Taking γ→0\gamma\rightarrow 0 gives the lemma.

Appendix D Fano’s inequality

Player is given nn i.i.d. samples X1,…,XnX_{1},\ldots,X_{n} from fif_{i}.

Dasgupta is grateful to the National Science Foundation for support under grant IIS-0347646, and von Luxburg acknowledges funding of the German Research Foundation (individual grant LU1718/1-1 and Research Unit 1735 ”Structural Inference in Statistics: Adaptation and Efficiency”).

References