Buglab AI model for searching and correcting bugs in the code
- May 10
Microsoft has an interesting article on Neurips: the Buglab AI model to search and correct bugs in the code.
Microsoft trained a Gan-like model for searching and correcting bugs in software code. The model consists of two neural networks and studies in the UNSUPERVISED mode: without marked data. The first neural network takes the code and introduces a bug into it: changes some line. The second model takes the changed code, tries to find a bug in it and fix it. The photo shows the code from the Open Source of the project on GitHub, in which the trained model found a bug and corrected it.
The developers say that such a system will be able to increase the performance of developers and switch their attention from searching for small bugs to more complex and interesting tasks. Well, now Copilot will write a code for us, and Buglab will correct his errors😄
So far, Buglab works only with Python and simple bugs, such as confused signs of comparison ("<=" instead of "> ="), logical operators ("or", "and") and the names of variables ("j" instead of "i ").
But the most interesting is the architecture of the model. Usually the neural networks that work with the code perceive the code as a set of tokens. In fact, work with the code is carried out as work with text in NLP. But Buglab is a graphum neural network. It uses graphic structure to better reflect the relationship between variables, expressions and semantic parts of the code. This idea of perception of code is not as a text, but as a count, Microsoft was already offered in their past work.
In experiments, C Bu #Paper #Tech T compared two chain architectures that have a Graph-Like structure: this is GNN (Graph Neural Network) and Relational Transformers. Both architectures showed good results.
More about the model:
Microsoft blogpost with gifs