arXiv:2609.00084cs.LGAug 2026

Manuscript Offprint

arXiv:2609.00084

Stochastic complexity of vectors containing cluster structure

Daniel Nicorici, Olli Yli-Harja, Jaakko Astola

Abstract

This paper studies the problem of computing the stochastic probability (shortest code length) of the encoded vectors containing cluster structure using Normalized Maximum Likelihood (NML) model. This is of great theoretical and practical importance in data clustering based on Minimum Description Length (MDL) principle, such as for estimating the best number of clusters and best cluster structure for the data. Straightforward computation of the shortest code length of the vector containing cluster structure based on the NML model requires polynomial time with respect to the size of the vector and number of clusters. We show that this is a tractable problem by introducing a recursion formula for the efficient computation of normalizing constant from the NML model. The time complexity of the new formula is linear opposed to previous polynomial time with respect to the size of the vector and number of clusters.

Keywords: minimum description length, normalized maximum likelihood, stochastic complexity, MDL clustering, estimating number of clusters, finding cluster structure.

1 Introduction

The MDL principle for statistical model selection and statistical inference is based on the simple idea that the best way to capture regular features in data is to construct a model in a certain class which permits the shortest description of the data and the model itself [1, 2, 3, 4, 5]. This principle chooses a model such that it trades off between goodness-of-fit on the observed data with “complexity” of the model [6]. Also, the MDL approach fits models to the data and no assumption that the data are a sample from a “true” random variable is needed [3, 5]. This eliminates the difficulty in other approaches to modeling that the more complex model is fitted to the data the better estimate of the data one gets [3, 4]. The MDL principle [1, 3, 5] has been widely used in statistical inference in an asymptotically justified form [7].

Recently, a more efficient form of MDL principle based on the normalized maximum likelihood model, which effects a universal sufficient statistics decomposition to separate noise from the learnable information in data has been found [7]. The NML model provides a better yardstick for comparison of performance of different model classes than other alternative ways of computing the code length, e.g. two-part codes [3, 4, 7]. The stochastic complexity, based on the NML model, is the shortest description length of a given data for a given model class [8].

The scenario we follow is that the encoder and the decoder agree beforehand on the NML model for a specific class of models that is being used to design the codes for encoding the message, e.g. the vector containing the cluster structure. The optimal length of the message is well known in information theory and it can be achieved based on practical coding methods [7]. However, our goal is to compute the code length of the encoded message and not to write down the encoded message. We choose the model which gives the smallest encoded message based on the MDL principle.

Clustering is one of the central concepts in the field of unsupervised data analysis. The problem of finding the cluster structure and number of clusters for the given data, based on the MDL principle, when no information other than the observed values is available is known as MDL clustering and its goal is to partition the data into several non-hierarchical groups of items [9]. The approach of the MDL clustering is based on the idea that a good clustering is such that one can encode the cluster structure together with the data based on the NML models so that the resulting total code length is minimized [9]. The models, representing the different ways of clustering the data, are compared based on the code lengths. The problems of finding the number of clusters and the cluster structure are solved simultaneously by choosing the best model, which gives the shortest code length for the data.

The efficient encoding based on NML model of the vector containing the cluster structure, also called clustering vector throughout this study, is of great importance in the MDL clustering framework. Our previous study [10] introduced an efficient NML model for encoding the clustering vector and a polynomial time method to compute its NML code length. This had been used in our previous work [10, 11] for finding the number of clusters and the cluster structure in gene expression data from microarray experiments. The previously introduced polynomial time method, which is similar to Kontkanen et al. [9], is infeasible for large of even moderate size data sets. In this study, our main goal is to derive a linear time recursive method for the computation of the NML code length of the encoded clustering vector, based on properties of generating functions [12]. The properties of the generating functions have been previously used for finding asymptotic expansions for sums arising in coding theory [13, 14, 12] and for computing the stochastic complexity in the case of multinomial data [8].

In section 2 we introduce introduce the notation and review MDL clustering. The NML model for encoding clustering vector is presented in section 3. The properties of generating function is presented in section 4 and the new recursion formula for computing the NML code length of the encoded clustering vector is derived using a generating function in section 5. Finally, section 6 gives the concluding remarks.