The Catalog Problem: Clustering and Ordering Variable-Sized Sets

Mateusz Maria Jurewicz, Graham W. Taylor, Leon Derczynski

Abstract

Prediction of a varying number of ordered clusters from sets of any cardinality is a challenging task for neural networks. Researchers have formalized this as the Catalog Problem, a novel challenge requiring models to simultaneously group items into clusters and order those clusters. To solve it, they developed Neural Ordered Clusters (NOC), the first fully differentiable model capable of learning variable cluster sizes and sequences end-to-end. NOC significantly outperforms existing set-to-sequence and neural clustering baselines.

Introduction: The Catalog Problem

In many real-world scenarios—from medical triage to organizing a product catalog—it is not enough to merely group similar items; these groups must also be placed in a specific, meaningful sequence. While deep learning has made significant strides in neural clustering (grouping items) and set-to-sequence models (ordering individual items), existing architectures struggle to perform both tasks simultaneously for sets of varying sizes.

The authors term this the Catalog Problem. It is particularly challenging because the number of clusters ($k$) is not fixed, the number of items within each cluster varies, and the "correct" order often depends on complex relational rules rather than just the properties of individual items. Existing methods frequently fail at "cardinality constraints"—determining exactly when a cluster is "full" or how many items should belong to it.

Methodology: Neural Ordered Clusters (NOC)

To tackle the Catalog Problem, the authors propose Neural Ordered Clusters (NOC), a modular, end-to-end differentiable architecture. Its effectiveness stems from a three-step process:

  1. Iterative Clustering (NOC1): Using a "Set Interdependence Transformer" (SIT), the model generates representations for unassigned items and existing clusters. It selects an "anchor" item and predicts which other items belong in a cluster with it.
  2. Cardinality Prediction (NOC2): A dedicated regression module predicts the target size (cardinality) for the current cluster. If the clustering module selects too many items, NOC trims the least-confident assignments to fit this predicted threshold, directly addressing the cardinality constraint problem.
  3. Cluster Ordering (NOC3): Once all clusters are formed, an Enhanced Pointer Network sequences them. This module uses both "global orientation" (how all clusters relate to one another) and "local coherence" (how the next cluster fits with the previously selected ones) to determine the final order.

By combining these modules into a single joint loss function, the model learns to cluster in a way that facilitates ordering, and vice versa.

Datasets and Evaluation

The NOC model was evaluated on three distinct benchmarks designed to test different aspects of the Catalog Problem:

  • Ordered Mixtures of 2D Gaussians: A synthetic task where points from different distributions must be clustered and then ordered based on their distance from the origin.
  • Procedural Catalogs: A synthetic dataset where clusters and their order are governed by strict compositional (e.g., "red and yellow items in a 1:1 ratio") and structural (e.g., "start with an all-red section") rules.
  • PROCAT: A massive, real-world dataset of over 1.5 million products organized into catalogs by human experts. This represents the most challenging "in-the-wild" test of the model's reasoning capabilities.

Key Results and Insights

NOC consistently achieved state-of-the-art results across all datasets, demonstrating the value of its joint-training approach. Treating clustering and ordering as a unified task proved superior to pipeline approaches (clustering first, then ordering), as the model develops a shared representation respecting the constraints of both sub-tasks.

  • Overcoming the Cardinality Gap: The authors discovered that standard neural clustering models fail primarily because they lack a stopping mechanism for adding items to a group. By introducing an explicit cardinality regression step (NOC2), NOC successfully overcomes this "fuzzy" boundary problem.
  • Relational Reasoning: The Set Interdependence Transformer (SIT) allows the model to capture higher-order interactions between items more efficiently than standard transformers, which is crucial for following complex organizational rules.
  • Performance Gains: On the Procedural Catalogs, NOC outperformed the next-best models by +8.47 points in clustering quality (V-Measure) and +3.71 points in ordering accuracy (Kendall’s $\tau$). On the difficult PROCAT dataset, NOC showed its biggest lead, exceeding the best baselines by +11.46% in clustering and +12.28% in ordering. Furthermore, NOC was significantly better at respecting $n$-th order relational rules in procedural tests.

Limitations and Future Work

While NOC represents a major step forward, the PROCAT dataset remains a significant challenge. Scores on this real-world dataset are lower than on synthetic data, likely due to the fluidity of human decision-making and the existence of many reasonable substitutions for products.

Currently, the model is trained to predict a single "ground truth" catalog. The authors suggest that future work could move toward a generative formulation, allowing the model to produce multiple valid ways to cluster and order the same set of items, better reflecting the subjective and flexible nature of human organization.

Summary updated

BibTeX
@inproceedings{jurewicz2023catalog,
  author = {Mateusz Maria Jurewicz and Graham W. Taylor and Leon Derczynski},
  title = {{The Catalog Problem: Clustering and Ordering Variable-Sized Sets}},
  booktitle = {International Conference on Machine Learning},
  year = {2023},
  url = {https://openreview.net/forum?id=buf57y56R4},
}
Figure