Contacts

The Algorithm That Doesn’t Slow Down

, by Andrea Costa
A discovery that allows Bayesian models to scale up without losing efficiency

As data increases, almost everything slows down. The more information you put into a model, the more the number of parameters grows, and the more computationally intensive the calculations become. And in some cases, the time required to obtain reliable results can become extremely long. It is one of the major challenges of the big data era: how can we build sophisticated models without the computational cost becoming unmanageable?

A new study (“Scalability of Metropolis-within-Gibbs schemes for high-dimensional Bayesian models”) published in the Journal of the Royal Statistical Society: Series B addresses precisely this challenge. The authors, Giacomo Zanella (Department of Decision Sciences and BIDSA, Bocconi), Filippo Ascolani (Duke University), and Gareth O. Roberts (University of Warwick), demonstrate that, in many relevant cases, there is a way to increase the model’s complexity without incurring a growing cost in terms of computation time. The focus of the research is an algorithm called Metropolis-within-Gibbs, a tool widely used in Bayesian inference.

The problem with hierarchical models

Hierarchical models are frequently used in economics, healthcare, marketing, and the social sciences. These are models that organize data into groups: for example, patients distributed across different hospitals, students in different schools, or customers in different markets. Each group has its own features but also shares common parameters with the others. As the number of groups increases, the number of parameters to be estimated automatically increases as well. In theory, this should make calculations increasingly slower.

And indeed, many algorithms suffer precisely from this: they work well on small problems but slow down drastically as the scale increases. Over the years, however, statisticians have noticed something interesting: in many hierarchical models, the Metropolis-within-Gibbs algorithm seemed to handle the impact of increased scale much better than expected. The problem was the absence of a solid theoretical explanation.

Speed can remain stable

The study by Zanella, Ascolani, and Roberts finally provides that explanation. The authors demonstrate that, under realistic conditions typical of practical applications, the number of iterations required to obtain reliable results does not increase as the number of clusters in the model grows.

In other words, even if the model becomes much larger, the algorithm does not become slower at “mixing” the information and producing correct estimates. From a practical standpoint, this means one very concrete thing: the time required to obtain an accurate sample grows proportionally to the size of the problem, and no more than proportionally. There is thus no “avalanche effect”.

This is an important result, because many alternative algorithms—including some widely used in machine learning—tend instead to slow down more markedly as dimensionality increases.

Why it works

The central insight is that the algorithm updates the parameters one group at a time. If each local update is sufficiently effective, the overall quality of the process remains under control even as the number of groups grows. The key point is that the “loss of efficiency” relative to an ideal version of the algorithm does not automatically increase with the total number of parameters. As long as the local updates are well-designed, the system as a whole remains stable. This goes against the intuitive idea that greater complexity inevitably means slower speed.

What are the implications

In computational terms, this means that the cost of obtaining reliable estimates increases linearly with the number of clusters. It is a manageable, predictable increase that is compatible with large-scale applications. In a world where companies, institutions, and research centers work with increasingly large databases, knowing that truly scalable algorithms exist is not a technical detail: it is a necessary condition for applying advanced models in real-world contexts.

Data complexity does not necessarily mean unmanageable computational complexity. With the right mathematical framework, scalability is possible.

Zanella

GIACOMO ZANELLA

Bocconi University
Department of Decision Sciences