bibtext: @inproceedings{
  elmaaroufi2024scenicnl,
  title={Scenic{NL}: Generating Probabilistic Scenario Programs from Natural Language},
  author={Karim Elmaaroufi and Devan Shanker and Ana Cismaru and Marcell Vazquez-Chanlatte and Alberto Sangiovanni-Vincentelli and Matei Zaharia and Sanjit A. Seshia},
  booktitle={First Conference on Language Modeling},
  year={2024},
  url={https://openreview.net/forum?id=MNLAbfZwh2}
  }
abstract: For cyber-physical systems, including robotics and autonomous vehicles, mass deployment has been hindered by fatal errors that occur when operating in rare events. To better understand failure modes, companies meticulously recreate rare crash events in simulation, but current methods do not easily allow for exploring ”what if” scenarios which could reveal how accidents might have been avoided. We present ScenicNL, an AI system that generates probabilistic scenario programs from natural language. Given the abundance of documented failures of autonomous vehicles due to regulatory requirements, we apply ScenicNL to police crash reports, providing a data-driven approach to capturing and understanding these failures. By using a probabilistic language such as Scenic, we can clearly and concisely represent such scenarios of interest and easily ask “what if” questions. We demonstrate how commonplace prompting techniques with Large Language Models are incapable of generating code for low-resource languages such as Scenic. We propose an AI system via the composition of several prompting techniques to extract the reasoning abilities needed to model probability distributions around the uncertainty in the crash events. Our system then uses Constrained Decoding and tools such as a compiler and simulator to produce scenario programs in this low-resource setting. 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. Finally, we release our code and a collection of over 500 crash reports from the California Department of Motor Vehicles.
title: ScenicNL: Generating Probabilistic Scenario Programs from Natural Language
authors: Karim Elmaaroufi Devan Shanker Ana Cismaru Marcell Vazquez-Chanlatte Alberto Sangiovanni-Vincentelli Matei Zaharia Sanjit A. Seshia