SOAP-Bubbles: Structured Uncertainty in Neural Network Weights

Learn how SOAP-Bubbles improves structured uncertainty estimation in neural networks with similar costs to SOAP. Ideal for deep learning

11 jul 2026 • 4 min read • Q2BSTUDIO Team

Optimization with non-diagonal uncertainty for deep learning

In the dizzying advance of artificial intelligence, one of the most complex challenges remains quantifying the uncertainty of deep models. We know that a neural network can offer accurate predictions, but how confident are you about them? Estimating uncertainty not only improves robustness, but allows for more informed decisions to be made in critical applications, from medical diagnostics to cybersecurity systems. Recently, a line of research known as SOAP-Bubbles has proposed a renewing approach to obtain more expressive subsequent distributions without skyrocketing computational costs. To understand its relevance, we must first place ourselves in the context of Bayesian inference applied to neural network weights.

The fundamental idea is that the parameters of a model should not be point values, but probability distributions that reflect epistemic and random uncertainty. Variational methods, such as IVON, approximate these distributions using diagonal covariances, which simplifies the calculation but limits the ability to capture correlations between weights. This is where the SOAP optimizer, known for its eigendecomposition-based preconditioning, comes in. The innovation of SOAP-Bubbles (and its EVON optimizer) is to run IVON on the eigenvector space of the SOAP preconditioner and then transform that diagonal estimate into a non-diagonal covariance. The result is a method that offers structured uncertainty with a complexity similar to that of SOAP, without requiring drastic changes in the training pipelines.

From a practical perspective, this technique opens the door to more reliable and explainable artificial intelligence models. In Q2BSTUDIO, where we develop custom software with high quality standards, we see in these advances an opportunity to improve products based on AI agents or recommendation systems. The ability to know the confidence of a prediction allows, for example, a virtual assistant to refrain from responding when it is unsure, or a fraud detection system to dynamically adjust its thresholds. This is especially valuable when we combine probabilistic models with AI for enterprises, where accuracy and transparency are currency.

But it is not only about theory. Efficient implementation of EVON allows these techniques to be scaled to models with hundreds of millions of parameters, such as those used in language model pretraining. In our internal testing, when integrating similar concepts into workflows based on AWS and Azure cloud services, we found that the balance between computational cost and uncertainty quality is much better than with traditional diagonal methods. This is relevant for companies that need to deploy artificial intelligence in production without incurring cost overruns.

Another fascinating aspect is the connection to cybersecurity. In environments where models can be attacked by adversarial examples, knowing the uncertainty allows detecting anomalies and inputs outside the training distribution. In fact, we are exploring how these principles can be integrated into our cybersecurity solutions to strengthen the detection of suspicious patterns. Structured uncertainty acts as an additional layer of defense, beyond the usual confidence metrics.

From a business intelligence perspective, tools like power bi can benefit from models that not only predict sales or behaviors, but also indicate the confidence level of each prediction. This transforms dashboards into more nuanced decision tools. At Q2BSTUDIO we offer business intelligence services that include these capabilities, helping our clients make data-driven decisions with probabilistic insight.

The SOAP-Bubbles methodology also has implications for the development of bespoke applications that require adaptability. For example, in cold start recommendation systems, uncertainty allows suggestions to be weighted according to the available evidence. Or in AI agent models that interact with users, where knowing when to ask for more information improves the experience. The key is that structured uncertainty is not a luxury, but a necessity for responsible systems.

The scientific community has validated EVON in logistic regression tasks, where it recovers the Gaussian covariance exactly, and in pretraining language models, surpassing diagonal methods. This suggests that the path to more transparent and trustworthy artificial intelligence goes through techniques like this. At Q2BSTUDIO we closely follow these developments to incorporate them into our solutions, always with the aim of offering cutting-edge technology that solves real problems.

In summary, the uncertainty structured in weights of neural networks, materialized in SOAP-Bubbles, represents a qualitative leap in practical Bayesian inference. Not only does it bridge the gap between theory and application, but it allows companies of all sizes to adopt more robust models without sacrificing efficiency. Whether through AWS and Azure cloud services, or by integrating these methods into custom software developments, the future of AI lies in understanding and managing uncertainty. And from Q2BSTUDIO, we are ready to accompany that journey.

A BREAK?

Play for a moment before you go

OUR SERVICES

How we can help you

Do you have a project in mind?

Tell us your vision and we'll turn it into a software solution. Whatever the scope, we make your idea real.