publications
2025
- NeSyGenerating Safety-Critical Automotive C-programs using LLMs with Formal VerificationMerlijn Sevenhuijsen, Minal Suresh Patil, Mattias Nyberg, and Gustav UngIn Proceedings of The 19th International Conference on Neurosymbolic Learning and Reasoning, 2025
We evaluate the feasibility of generating formally verified C code that adheres to both functional and non-functional requirements using Large Language Models (LLMs) for three real industrial, automotive safety-critical software modules. We explore the capabilities of ten LLMs and four prompting techniques — Zero-Shot, Zero-Shot Chain-of-Thought, One-Shot, and One-Shot Chain-of-Thought — to generate C programs for the three modules. Functional correctness of generated programs is assessed through functional verification, and adherence to non-functional requirements is evaluated using an industrial static analyzer, along with human evaluation. The results demonstrate that it is feasible for LLMs to generate functionally correct code, with success rates of 540/800, 59/800, and 46/800 for the three modules. Additionally, the generated programs frequently adhere to the defined non-functional requirements. In the cases where the LLM-generated programs did not adhere to the non-functional requirements, deviations typically involve violations of single-read and single-write access patterns or minimal variable scope constraints. These findings highlight the promise and limitations of using LLMs to generate industrial safety-critical C programs, providing insight into improving automated LLM-based program generation in the automotive safety-critical domain.
@inproceedings{sevenhuijsen2025generating, title = {Generating Safety-Critical Automotive C-programs using LLMs with Formal Verification}, author = {Sevenhuijsen, Merlijn and Patil, Minal Suresh and Nyberg, Mattias and Ung, Gustav}, booktitle = {Proceedings of The 19th International Conference on Neurosymbolic Learning and Reasoning}, pages = {353--378}, year = {2025}, publisher = {PMLR}, series = {Proceedings of Machine Learning Research}, volume = {284}, }
2024
- AISoLATowards Specification-Driven LLM-Based Generation of Embedded Automotive SoftwareMinal Suresh Patil, Gustav Ung, and Mattias NybergIn International Conference on Bridging the Gap Between AI and Reality (AISoLA), 2024
The paper studies how code generation by LLMs can be combined with formal verification to produce critical embedded software. The first contribution is a general framework, spec2code, in which LLMs are combined with different types of critics that produce feedback for iterative backprompting and fine-tuning. The second contribution presents a first feasibility study, where a minimalistic instantiation of spec2code, without iterative backprompting and fine-tuning, is empirically evaluated using three industrial case studies from the heavy vehicle manufacturer Scania. The goal is to automatically generate industrial-quality code from specifications only. Different combinations of formal ACSL specifications and natural language specifications are explored. The results indicate that formally correct code can be generated even without the application of iterative backprompting and fine-tuning.
@inproceedings{patil2024towards, title = {Towards Specification-Driven LLM-Based Generation of Embedded Automotive Software}, author = {Patil, Minal Suresh and Ung, Gustav and Nyberg, Mattias}, booktitle = {International Conference on Bridging the Gap Between AI and Reality (AISoLA)}, pages = {125--144}, year = {2024}, publisher = {Springer}, series = {Lecture Notes in Computer Science}, volume = {15217}, doi = {10.1007/978-3-031-75434-0_9}, } - IJCNNEnhancing Vulnerable Class Robustness in Adversarial Machine LearningMinal Suresh Patil, and Kary FrämlingIn 2024 International Joint Conference on Neural Networks (IJCNN), 2024
Recent advancements in machine learning, particularly in the field of adversarial training, have underscored the necessity for models that are not only accurate but also robust against adversarial attacks. However, a critical challenge lies in the unequal vulnerability of different classes within these models, often leading to a ‘weakest-link’ phenomenon where certain classes are more susceptible to adversarial perturbations. This paper presents a novel approach to improving the robustness of machine learning models against adversarial attacks, focusing on classes identified as vulnerable. The core of our methodology involves generating adversarial examples specifically tailored to these vulnerable classes, a process we term class-specific perturbations. We integrate this adversarial training into the learning process, aiming to enhance the model’s robustness specifically for these at-risk classes. Motivated by this finding, we propose Balanced Adversarial Training (BAT) to facilitate adversarial training for the vulnerable class. Experimental evaluations across different datasets show that our proposed framework not only improves the robustness of the vulnerable class against adversarial attacks but also maintains overall model performance. Our work highlights the importance of moving beyond average accuracy, which is particularly important in safety-critical applications.
@inproceedings{patil2024vulnerable, title = {Enhancing Vulnerable Class Robustness in Adversarial Machine Learning}, author = {Patil, Minal Suresh and Främling, Kary}, booktitle = {2024 International Joint Conference on Neural Networks (IJCNN)}, pages = {1--7}, year = {2024}, publisher = {IEEE}, doi = {10.1109/IJCNN60899.2024.10650931}, }
2023
- ICSRSInvestigating Lipschitz Constants in Neural Ensemble Models to Improve Adversarial RobustnessMinal Suresh Patil, and Kary FrämlingIn 2023 7th International Conference on System Reliability and Safety (ICSRS), 2023
This work investigates the relationship between adversarial robustness and the local Lipschitz constant in ensemble neural network frameworks, namely bagging and stacking. Capitalising on this, we introduce an ensemble neural network design that improves both accuracy and adversarial resilience. We theoretically obtain the local Lipschitz constants for both ensembles, offering insights into their susceptibility to adversarial attacks and identifying architectures optimal for adversarial defense. Notably, our approach negates the need for specific adversarial attack and accommodates any number of pre-trained networks for an ensemble architecture. Evaluations on the MNIST and CIFAR-10 datasets against white-box attacks, specifically FGSM and PGD, show our approach is adversarially robust compared to standalone networks and vanilla ensemble architectures.
@inproceedings{patil2023lipschitz, title = {Investigating Lipschitz Constants in Neural Ensemble Models to Improve Adversarial Robustness}, author = {Patil, Minal Suresh and Främling, Kary}, booktitle = {2023 7th International Conference on System Reliability and Safety (ICSRS)}, pages = {434--438}, year = {2023}, publisher = {IEEE}, doi = {10.1109/ICSRS59833.2023.10381066}, } - ICANNImproving Neural Network Verification Efficiency Through Perturbation RefinementMinal Suresh Patil, and Kary FrämlingIn Artificial Neural Networks and Machine Learning – ICANN 2023, 2023
@inproceedings{patil2023improving, title = {Improving Neural Network Verification Efficiency Through Perturbation Refinement}, author = {Patil, Minal Suresh and Främling, Kary}, booktitle = {Artificial Neural Networks and Machine Learning -- ICANN 2023}, pages = {504--515}, year = {2023}, publisher = {Springer}, series = {Lecture Notes in Computer Science}, volume = {14254}, doi = {10.1007/978-3-031-44207-0_42}, } - xAIDo Intermediate Feature Coalitions Aid Explainability of Black-Box Models?Minal Suresh Patil, and Kary FrämlingIn Explainable Artificial Intelligence – xAI 2023, 2023
This work introduces the notion of intermediate concepts based on levels structure to aid explainability for black-box models. The levels structure is a hierarchical structure in which each level corresponds to features of a dataset (i.e., a player-set partition). The level of coarseness increases from the trivial set, which only comprises singletons, to the set, which only contains the grand coalition. In addition, it is possible to establish meronomies, i.e., part-whole relationships, via a domain expert that can be utilised to generate explanations at an abstract level. We illustrate the usability of this approach in a real-world car model example and the Titanic dataset, where intermediate concepts aid in explainability at different levels of abstraction.
@inproceedings{patil2023intermediate, title = {Do Intermediate Feature Coalitions Aid Explainability of Black-Box Models?}, author = {Patil, Minal Suresh and Främling, Kary}, booktitle = {Explainable Artificial Intelligence -- xAI 2023}, pages = {115--130}, year = {2023}, publisher = {Springer}, series = {Communications in Computer and Information Science}, volume = {1901}, doi = {10.1007/978-3-031-44064-9_7}, }
2022
- AAAI WorkshopExplainability in Autonomous Pedagogically Structured ScenariosMinal Suresh PatilIn Explainable Agency in Artificial Intelligence Workshop, 36th AAAI Conference on Artificial Intelligence (AAAI-22), 2022
We present the notion of explainability for decision-making processes in a pedagogically structured autonomous environment. Multi-agent systems that are structured pedagogically consist of pedagogical teachers and learners that operate in environments in which both are sometimes not fully aware of all the states in the environment and beliefs of other agents thus making it challenging to explain their decisions and actions with one another. This work emphasises the need for robust and iterative explanation-based communication between the pedagogical teacher and the learner. Explaining the rationale behind multi-agent decisions in an interactive, partially observable environment is necessary to build trustworthy and reliable communication between pedagogical teachers and learners. Ongoing research is primarily focused on explanations of the agents’ behaviour towards humans, and there is a lack of research on inter-agent explainability.
@inproceedings{patil2022explainability, title = {Explainability in Autonomous Pedagogically Structured Scenarios}, author = {Patil, Minal Suresh}, booktitle = {Explainable Agency in Artificial Intelligence Workshop, 36th AAAI Conference on Artificial Intelligence (AAAI-22)}, pages = {79--82}, year = {2022}, publisher = {AAAI Press}, }