Machine Learning algorithms, particularly Convolutional Neural Networks (CNNs), play a fundamental role in SW stacks for autonomous driving. Machine Learning is essential for recognizing other traffic participants, can substantially improve localization and prediction, and even show great potential for decision-making and path planning.
CNNs have already made it to series production, but they are not directly responsible for safety-critical car features, since they do not comply with the current version of the automotive functional safety standard ISO26262. While the development process and measures for ensuring quality, reliability and safety are well-defined for conventional software development, corresponding practices are still missing for the development of Machine Learning-based automotive software modules.
This article aims to highlight the fundamental differences between conventional software development and Machine Learning. These differences show the need for novel development practices in order to reach automotive grade Machine Learning implementation.
Conventional software development
In conventional software development, code is implemented according to requirements, and implementation (and even requirements) are adapted if verification resp. validation fails. If everything goes well, the implementation is released.
In Machine Learning, things are a bit different: according to requirements, data is sourced, a model is designed, and the training code (data preprocessing, ) is implemented. The model is then trained, and performance is measured on validation and test data sets. The result of the training of a model is not only the trained model itself, but also the performance indicators (accuracy, MSE, ROC, IoU, etc.) that the model was optimized against during training. If the performance of the model is completely off, it might be necessary to adapt the implementation (architecture + training code) or even the requirements. If on the other hand the model’s performance is just not sufficient, more training data can be acquired, and the exact same implementation can be retrained.
Ideally, the Machine Learning proess can be fully automated, data is being continuously collected and the model’s performance increases with the training data – developers wouldn’t have to contribute to the improvement of the model anymore. Therefore, machine learning is also interpreted as data driven development.
Machine Learning models as a part of an application
In practice, however, Machine Learning models don’t live as isolated entities that feed on data, increase in performance, and directly perform a task, but they are embedded into applications that consist of conventional code. If a model is – for example – trained to recognize faces, it is still necessary to develop and maintain the conventional code that fetches the camera images, feeds them into the framework that runs the model, have the model process it, and react according to the model’s output.
For software applications, Machine Learning models are a static resource with defined interfaces, that is embedded into conventional code in the implementation stage. Verification is then performed on the implementation including the model. If verification fails, the issues must be traced back to their origin and the conventional code resp. the model must be adapted.
Conclusion and up next
Although conventional software development and Machine Learning show some similarities, they are essentially two entirely different approaches, that must be combined with respect to their individual characteristics to develop reliable Machine Learning-powered software applications. In the coming articles, we’ll get more into detail and see what can be done to design highly reliable software for Machine Learning-powered automotive software, particularly in the context of autonomous driving.