ScenicNL: Generating Probabilistic Scenario Programs from Natural Language

Fuente: arXiv
Enregistré dans:
Détails bibliographiques
Auteurs principaux: Elmaaroufi, Karim, Shanker, Devan, Cismaru, Ana, Vazquez-Chanlatte, Marcell, Sangiovanni-Vincentelli, Alberto, Zaharia, Matei, Seshia, Sanjit A.
Format: Preprint
Publié: 2024
Sujets:
Accès en ligne:
Tags: Ajouter un tag
Pas de tags, Soyez le premier à ajouter un tag!
_version_ 1866910630090375168
author Elmaaroufi, Karim
Shanker, Devan
Cismaru, Ana
Vazquez-Chanlatte, Marcell
Sangiovanni-Vincentelli, Alberto
Zaharia, Matei
Seshia, Sanjit A.
author_facet Elmaaroufi, Karim
Shanker, Devan
Cismaru, Ana
Vazquez-Chanlatte, Marcell
Sangiovanni-Vincentelli, Alberto
Zaharia, Matei
Seshia, Sanjit A.
contents For cyber-physical systems (CPS), including robotics and autonomous vehicles, mass deployment has been hindered by fatal errors that occur when operating in rare events. To replicate rare events such as vehicle crashes, many companies have created logging systems and employed crash reconstruction experts to meticulously recreate these valuable events in simulation. However, in these methods, "what if" questions are not easily formulated and answered. We present ScenarioNL, an AI System for creating scenario programs from natural language. Specifically, we generate these programs from police crash reports. Reports normally contain uncertainty about the exact details of the incidents which we represent through a Probabilistic Programming Language (PPL), Scenic. By using Scenic, we can clearly and concisely represent uncertainty and variation over CPS behaviors, properties, and interactions. We demonstrate how commonplace prompting techniques with the best Large Language Models (LLM) are incapable of reasoning about probabilistic scenario programs and generating code for low-resource languages such as Scenic. Our system is comprised of several LLMs chained together with several kinds of prompting strategies, a compiler, and a simulator. We evaluate our system on publicly available autonomous vehicle crash reports in California from the last five years and share insights into how we generate code that is both semantically meaningful and syntactically correct.
format Preprint
id arxiv_https___arxiv_org_abs_2405_03709
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle ScenicNL: Generating Probabilistic Scenario Programs from Natural Language
Elmaaroufi, Karim
Shanker, Devan
Cismaru, Ana
Vazquez-Chanlatte, Marcell
Sangiovanni-Vincentelli, Alberto
Zaharia, Matei
Seshia, Sanjit A.
Software Engineering
Artificial Intelligence
Machine Learning
Programming Languages
For cyber-physical systems (CPS), including robotics and autonomous vehicles, mass deployment has been hindered by fatal errors that occur when operating in rare events. To replicate rare events such as vehicle crashes, many companies have created logging systems and employed crash reconstruction experts to meticulously recreate these valuable events in simulation. However, in these methods, "what if" questions are not easily formulated and answered. We present ScenarioNL, an AI System for creating scenario programs from natural language. Specifically, we generate these programs from police crash reports. Reports normally contain uncertainty about the exact details of the incidents which we represent through a Probabilistic Programming Language (PPL), Scenic. By using Scenic, we can clearly and concisely represent uncertainty and variation over CPS behaviors, properties, and interactions. We demonstrate how commonplace prompting techniques with the best Large Language Models (LLM) are incapable of reasoning about probabilistic scenario programs and generating code for low-resource languages such as Scenic. Our system is comprised of several LLMs chained together with several kinds of prompting strategies, a compiler, and a simulator. We evaluate our system on publicly available autonomous vehicle crash reports in California from the last five years and share insights into how we generate code that is both semantically meaningful and syntactically correct.
title ScenicNL: Generating Probabilistic Scenario Programs from Natural Language
topic Software Engineering
Artificial Intelligence
Machine Learning
Programming Languages
url https://arxiv.org/abs/2405.03709