Debloating ML Systems

measuring and reducing code bloat in AI platforms

Today's machine learning systems are growing wildly in size every year. Of course, most of this code is not actually required for the intended use cases of the system - it is bloat. This code bloat can have a significant impact on the performance of ML systems, as it can increase the memory footprint, the startup time, and the energy consumption of the system - and, of course, the larger the code base, the larger the attack surface for security vulnerabilities.

In our research, we study the existence of code bloat in machine learning systems, and how it can be measured and reduced (Zhang et al., 2024). We find that most machine learning containers in most use cases exhibit 50% or more bloat.

Example growth of a real-life machine learning system

In collaboration with the Computer and Network Systems research unit at Chalmers we are working on methods to reduce machine learning bloat, while at the same time guaranteeing uninterrupted functioning of the system (something that state of the art debloating tools, such as docker-slim, sometimes struggle with).

Contacts:

Huaifeng Zhang, CNS unit, Chalmers

Dr. Ahmed Ali-Eldin Hassan, CNS unit, Chalmers

Dr. Philipp Leitner


  1. Machine Learning Systems are Bloated and Vulnerable
    Huaifeng Zhang, Mohannad Alhanahnah, Fahmi Abdulqadir Ahmed, Dyako Fatih, Philipp Leitner, and Ahmed Ali-Eldin
    Proceedings of SIGMETRICS, Feb 2024