Infrared - a meta bug detector
Source Infrared is an algorithm to detect bugs.
Summaryβ
While the algorithm looks promising, its implementation is challenging as it uses a lot of submodules with various algorithm from parameters and is not open-source. The main improvement is the fact that it requires less training data.
Overviewβ
Instead of detecting bugs using examples of buggy code, it detect bugs as outliers, code that does not look like the rest. For the anomaly detection to work, infrared represents a program as a graph using the AST.
They use a GNN, a neural network designed to take graphs as input and with an internal infrastructure that matches the graph provided as input.
They still need to classify code as inconsistent (buggy) or correct for the system to work but need fewer examples (about 200)
They use syntactic analysis (AST) to deduce from a line of buggy code what amount of contexte surrounding this line should be given. They also use syntactic analysis to find similar pieces of code that have the same structure but are not buggy for the training process.
Infrared combines a lot of complex ideas. Graph neural networks are challenging to implement in the general case. They combine them with an LSTM (long-short term memory) style neural network to encode the bits of code as vectors in relation to other pieces of code to pay attention to the important parts of a program that way contain a bug.
The model is not open-source so their results are hard to replicate.