Abstract
Traditional discretization methods often struggle to capture complex dependencies in multi-dimensional data, typically relying on rigid grid structures that lead to overfitting or poor interpretability. We present PALM (Partitioning Alternately and Merging), a novel unsupervised 2D discretization algorithm grounded in the Minimum Description Length (MDL) principle. By alternating between partitioning and merging regions, PALM creates flexible, non-grid-based histograms that accurately model data density while resisting overfitting.
Introduction
Discretization—the transformation of continuous variables into discrete bins—is a foundational technique in data mining and machine learning. While 1D discretization is well-established, extending these techniques to two or more dimensions introduces significant complexity. Most existing multivariate methods either treat dimensions independently or produce adaptive grids composed of rectangular cells. These grid-based approaches often fail to capture "hotspots" or dependencies that do not align with axis-parallel boundaries, such as curved spatial patterns.
Furthermore, existing methods like Interaction-Preserving Discretization (IPD) often lack stability, producing an ever-increasing number of bins as dataset sizes grow. This leads to overly complex models that are difficult to interpret and prone to overfitting.
The PALM Algorithm
The proposed PALM algorithm addresses these limitations by utilizing the Minimum Description Length (MDL) principle for model selection. MDL treats the problem of finding the best discretization as a compression task: the optimal model is the one that minimizes the combined length of the model description and the data encoded by that model.
Theoretical Contributions
A key theoretical contribution of this work is the proof that the parametric complexity for histograms—a critical component of the MDL score—is independent of the number of dimensions. This allows for the application of 1D MDL mathematics to 2D and higher-dimensional spaces without a loss of theoretical rigor. PALM specifically employs the Refined MDL (Normalized Maximum Likelihood, or NML) encoding scheme, which provides an optimal trade-off between goodness-of-fit against model complexity.
Partitioning and Merging
PALM operates through a two-step heuristic search:
- Partitioning: The algorithm recursively splits regions alternately along horizontal and vertical axes.
- Merging: Following the partitioning phase, PALM greedily merges adjacent regions if the merge results in a lower (better) MDL score.
This merging step is crucial; it allows the algorithm to "correct" the rigid boundaries imposed during the initial partitioning, resulting in flexible, non-rectangular shapes that better mirror the underlying data distribution.
Experimental Evaluation
The performance of PALM was evaluated using both synthetic and large-scale real-world datasets. Synthetic tests included mixtures of Gaussians and data partitioned by sine curves to assess the algorithm's ability to recover non-linear boundaries. Real-world evaluations utilized spatial datasets, including Airbnb listings in Amsterdam, taxi destination GPS data from Chengdu (DiDi), and visitor movement data from the DinoFun Amusement Park (over 9 million records).
Results and Discussion
Experimental results demonstrate that PALM consistently outperforms traditional methods and state-of-the-art density estimators like Kernel Density Estimation (KDE) in terms of generalization.
- Accuracy and Generalization: On the DinoFun dataset, PALM achieved a 19% higher log-likelihood on unseen test data compared to KDE. This suggests that PALM captures the underlying distribution more effectively without the over-smoothing common in KDE.
- Convergence: Unlike IPD, PALM converges to a stable number of bins as the sample size increases. This self-adaptivity makes it a robust choice for large-scale data analysis, as it automatically determines the optimal number and size of bins without manual hyper-parameter tuning.
- Efficiency: PALM’s runtime scales linearly with the number of bins and quadratically with the number of candidate cut points, making it computationally feasible for datasets containing hundreds of thousands of points.
Conclusion
PALM represents a significant advancement in unsupervised 2D discretization. By moving beyond rigid grid structures and leveraging the MDL principle, it provides a highly flexible and interpretable way to model complex dependencies. While currently focused on 2D data, the underlying theory is dimension-agnostic. Future research will explore more efficient search strategies to extend PALM to three or more dimensions, which would be particularly valuable for analyzing spatio-temporal data.
Summary updated