Manuscript Offprint

arXiv:2610.30520

NEST: Nested Embedding Representation for Multiscale Clustering

Zhanqi Zhang, Mikio Aoi, Gal Mishne

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Real-world data often exhibits cluster structure at multiple resolutions, yet existing methods typically learn a single partition or construct an explicit hierarchy. Inspired by Matryoshka Representation Learning, we introduce Nested Embedding RepreSentation for MulTiscale Clustering (NEST), an unsupervised framework that encodes coarse-to-fine structure within a single embedding. NEST jointly optimizes clustering and separation across nested prefix subspaces, enabling progressively finer distinctions as embedding dimensionality increases, with rank and within-cluster regularization that keep the embedding from collapsing. Empirically, distances in the learned embedding follow the hierarchy distance more closely than those of the input, although the hierarchy is never observed during training. On synthetic hierarchies, NEST recovers multiscale structure given only the number of clusters per level. Experiments on vision, text and single-cell data further demonstrate multiscale organization across real-world representations. By making clustering granularity an intrinsic property of the representation, NEST provides a unified approach to multiscale structure discovery.

1 INTRODUCTION

Clustering is a fundamental tool for unsupervised structure discovery, yet real-world data often admits meaningful organization at multiple levels of resolution. Images, for example, may separate into broad semantic groups such as animals and vehicles, and further into individual object categories. Likewise, biological populations can be organized into broad cell classes, subclasses, and increasingly specialized cell types. A useful representation should therefore support structure discovery across several resolutions, rather than only a single partition.

Classical clustering methods typically operate directly on a fixed feature space. Flat methods such as k-means (Hartigan and Wong, 1979) recover a partition at a specified resolution, while hierarchical methods recover nested partitions across multiple resolutions, either agglomeratively or divisively (Ward, 1963; Steinbach et al., 2000). Other approaches, such as spectral or hyperbolic embedding methods (Ng et al., 2001; Nickel and Kiela, 2017), first transform the data into a representation in which cluster structure is then identified. Across these settings, clustering quality depends on how well the representation preserves the distinctions required at each resolution. Clustering with deep learning (Xie et al., 2016; Yang et al., 2016; Caron et al., 2019) addresses the representation problem by jointly learning embeddings and cluster assignments, but is typically optimized for a single clustering resolution. Thus, hierarchical clustering provides multiscale structure without representation learning, while deep clustering provides representation learning without explicitly organizing multiple resolutions.

We ask whether these two capabilities can be learned jointly, such that a single representation captures cluster structure at both coarse and fine resolutions simultaneously. Inspired by Matryoshka Representation Learning (Kusupati et al., 2024), we introduce Nested Embedding RepreSentation for MulTiscale Clustering (NEST). NEST learns a single embedding whose nested prefixes are jointly optimized for progressively finer cluster structure. Unlike conventional MRL, where prefixes of different lengths are trained for the same downstream objective, for example, the same classification or retrieval task at different embedding sizes, NEST assigns each prefix a different clustering resolution. Shorter prefixes capture coarser structure, while longer prefixes

(a)

(b)

Figure

Figure 1: NEST. (a) Fine clusters C3C_3 nest inside C2C_2 and C1C_1; the prefix z1:mℓz_{1:m_\ell} resolves level ℓ\ell, with longer prefixes supporting progressively finer clustering. (b) A trainable map fθf_\theta adapts frozen features hi=g(xi)h_i = g(x_i) through a residual correction. Each prefix is optimized with a level-specific clustering and separation objective (LDEC(ℓ)+Lsep(ℓ))(\mathcal{L}_{\mathrm{DEC}}^{(\ell)} + \mathcal{L}_{\mathrm{sep}}^{(\ell)}), while the rank and within-cluster regularizers Lrank\mathcal{L}_{\mathrm{rank}} and Lwithin\mathcal{L}_{\mathrm{within}} keep the embedding from collapsing.

capture progressively finer structure.

By encoding clustering resolution directly in the representation, NEST can learn multiscale cluster structure without access to a ground-truth hierarchy or explicit construction of a cluster tree during training. Instead, coarse-to-fine organization is learned through the nested subspaces themselves. We show empirically that distances in the learned embedding correlate more strongly with the hierarchy distance than those of the input, connecting the learned representation to hierarchical geometry. We validate NEST on synthetic, visual, text, and single-cell data, where it recovers coarse-to-fine cluster structure given only the number of clusters at each resolution. Together, these results introduce a simple representation-based approach to multiscale clustering and demonstrate that hierarchical organization can emerge from nested subspaces without explicitly learning a tree.

References (38)