TL;DR
NN-LINKAGE is a new neural hierarchical clustering model that is "algorithmically aligned" with classical linkage rules. By mirroring the recursive structure of the Lance-Williams recurrence, it learns custom, data-driven merge strategies that generalize to large datasets while maintaining the $O(n^2 \log n)$ efficiency of traditional algorithms.
What Problem Does This Paper Address?
Hierarchical Clustering (HC) is a cornerstone of data analysis, used in everything from building evolutionary trees in biology to routing clock signals in microchips. Traditionally, researchers use hand-designed "linkage rules" (like Single Linkage or Complete Linkage) to decide which clusters to merge next. However, these rules are fixed and often fail to capture the nuances of complex, real-world data.
While deep learning offers a way to learn better rules from data, most neural HC models struggle with two things: efficiency and size generalization. They are often too slow for large datasets and fail to work correctly on problems larger than the ones they were trained on. The authors aim to bridge this gap by creating a model that is as flexible as a neural network but as robust and efficient as a classical algorithm.
Methods
The core innovation is algorithmic alignment. The authors designed NN-LINKAGE to follow the computational blueprint of the Lance-Williams (LW) recurrence, a generalized framework that encompasses most classical linkage methods.
Instead of just updating a single distance value between clusters, NN-LINKAGE maintains learned merge embeddings (vectors) for every pair of candidate clusters. The process works as follows:
- Point Encoding: Input points are turned into initial embeddings using an MLP or a Transformer.
- Initialization:
MLP_initcreates initial merge embeddings for all pairs of individual points. - Recursive Update: When two clusters $A$ and $B$ are merged,
MLP_updatecalculates new embeddings for the new cluster $\{A \cup B\}$ relative to all other clusters $C$. This mirrors the LW update step. - Scoring: A linear layer turns these embeddings into a scalar score used to rank merges in a priority queue, ensuring $O(n^2 \log n)$ time complexity.
Datasets
The authors evaluated the model across three distinct domains:
- Rings and Disks: A synthetic "toy" problem where different parts of the dataset require different clustering strategies (Single Linkage for rings, Complete Linkage for disks).
- Clock-Tree Routing (VLSI): A critical engineering task in chip design. The model was trained on optimal solutions for 20-point sets and tested on benchmarks with up to 1,000 points (BST-DME and ISPD collections).
- Phylogenetic Reconstruction: Inferring evolutionary trees from Multiple Sequence Alignment (MSA) data. They used synthetic data generated via AliSim and real-world molecular sequences from the Zhou et al. (2018) dataset.
Key Insights and Ideas
- Universal Approximation: The authors prove that NN-LINKAGE can approximate any continuous linkage function. More impressively, it can exactly realize standard algorithms like Single Linkage or Ward’s method across all input sizes.
- Local Adaptability: Unlike fixed rules, NN-LINKAGE can learn to apply different logic to different parts of the same dataset. In the "Rings and Disks" experiment, it automatically switched between SL-like and CL-like behavior based on the local point configuration.
- Size Generalization via Alignment: Because the model's structure is tied to a recursive algorithm, it generalizes remarkably well. A model trained only on 20 points outperformed industry-standard heuristics on 500-point VLSI problems.
- Global Context: By using a Transformer as the initial encoder, the model can incorporate global information (like $k$-nearest neighbor distances) into its local merge decisions, allowing it to approximate advanced rules like "Robust Single Linkage."
Key Results
- VLSI Design: NN-LINKAGE outperformed Complete Linkage (the state-of-the-art heuristic) on average across all tested sizes. When used as a refinement tool, it extended the Pareto frontier, achieving better objective values than classical methods in less time.
- Biology: In phylogenetic reconstruction, NN-LINKAGE achieved a 5x speedup over the previous leading neural method (NeuralNJ) while maintaining comparable accuracy on synthetic data and slightly improving accuracy on real-world data.
- Rings and Disks: The model achieved 99.6% accuracy, far surpassing the 85.18% achieved by the best-tuned classical baseline.
Limitations and Future Work
- Memory Constraints: While computationally efficient in terms of operations, the model ran out of GPU memory on a small number of extremely large phylogenetic instances (those with very long sequences).
- Supervision Requirements: The current model requires "target trees" for training. Future work could explore training the model to minimize explicit cost functions (like Dasgupta’s HC cost) directly, which are often NP-hard to optimize.
- Theoretical Bounds: The authors suggest investigating whether learned rules can provide better theoretical approximation guarantees for combinatorial optimization problems than existing hand-designed heuristics.
Summary updated