Search papers, labs, and topics across Lattice.
This paper introduces a data-aware static analysis technique designed to identify semantic faults in machine learning code during the coding phase, rather than post-training. By integrating data and control flow analysis with API contracts, the method enables developers to reason about potential data-related issues at a higher abstraction level. The authors demonstrate the effectiveness of their approach by analyzing real-world machine learning notebooks, revealing that it can successfully detect faults that traditional methods overlook.
Semantic faults in ML code can be detected during development rather than after model training, significantly improving efficiency and accuracy.
Semantic faults specific to the use of machine learning models are a common problem for machine learning developers, causing suboptimal predictions, high computational cost, or incorrect outputs. For example, one may erroneously use unscaled data to train a scale-sensitive model. Machine learning developers detect these faults after training their models and manually analyzing the results, making it an inefficient process. We propose a novel data-aware static analysis approach to detect semantic faults in machine learning code, allowing developers to reveal these bugs while writing code instead of after training the model. Our approach uses combined data and control flow analysis, and API contracts, enabling data-aware reasoning about machine learning code at a high level of abstraction. We highlight the potential of our solution by analyzing a sample of real-world machine learning notebooks, finding that we can detect faults that require a data-aware approach.