Scenic: a language for scenario specification and data generation
Open accessAbstract
We propose a new probabilistic programming language for the design and analysis of cyber-physical systems, especially those based on machine learning. We consider several problems arising in the design process, including training a system to be robust to rare events, testing its performance under different conditions, and debugging failures. We show how a probabilistic programming language can help address these problems by specifying distributions encoding interesting types of inputs, then sampling these to generate specialized training and test data. More generally, such languages can be used to write environment models, an essential prerequisite to any formal analysis. In this paper, we focus on systems such as autonomous cars and robots, whose environment at any point in time is a scene , a configuration of physical objects and agents. We design a domain-specific language, Scenic , for describing scenarios that are distributions over scenes and the behaviors of their agents over time. Scenic combines concise, readable syntax for spatiotemporal relationships with the ability to declaratively impose hard and soft constraints over the scenario. We develop specialized techniques for sampling from the resulting distribution, taking advantage of the structure provided by Scenic ’s domain-specific syntax. Finally, we apply Scenic in multiple case studies for training, testing, and debugging neural networks for perception both as standalone components and within the context of a full cyber-physical system.
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Integrity signals
Registry
Cites
Statistics
Claims the paper makes
The claims and statistics of this paper haven’t been checked yet.
Run the check — free, no account needed. It reads the open-access text and checks the sources it cites.
Claims other papers make about this one
Each is checked against this paper’s own text: does it say what the citing paper says it does?
Probabilistic programming languages (e.g. Scenic) offer one mechanism for world modelling for autonomous vehicle safety and have had some success in practice.
“Probabilistic programming languages (e.g.Scenic, Fremont et al., 2022) offer one mechanism for world modelling for this application and have had some success in practice.”
From Towards Guaranteed Safe AI: A Framework for Ensuring Robust and Reliable AI Systems (2024) · cites this paper as Fremont et al., 2022
Self-check
Percentages, sums and reported differences re-computed from the paper’s own numbers.
The self-check needs the paper’s full text.
Cites
Explaining and Harnessing Adversarial Examples
Goodfellow, I. J., Shlens, J., & Szegedy, C. (2014) · arXiv · doi:10.48550/arxiv.1412.6572 · Cited by 10,381 · see citing works
CARLA: An open urban driving simulator
Dosovitskiy, A., Ros, G., Codevilla, F., Lopez, A., & Koltun, V. (2017) · arXiv · doi:10.48550/arxiv.1711.03938 · Cited by 3,718 · see citing works
Domain randomization for transferring deep neural networks from simulation to the real world
Tobin, J., Fong, R., Ray, A., Schneider, J., Zaremba, W., & Abbeel, P. (2017) · 2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS) · doi:10.1109/iros.2017.8202133 · Cited by 3,124 · cited 2× · see citing works
“There has been a large amount of work on generating synthetic data for specific applications, including text recognition [28], text localization [27], robotic object grasping [57], and autonomous driving [30,11].”
BackgroundRos, G., Sellart, L., Materzynska, J., Vazquez, D., & Lopez, A. M. (2016) · 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) · doi:10.1109/cvpr.2016.352 · Cited by 2,338 · see citing works
Cyberbotics Ltd. Webots <sup>™</sup> : Professional Mobile Robot Simulation
Michel, O. (2004) · International Journal of Advanced Robotic Systems · doi:10.5772/5618 · Cited by 1,261 · see citing works
Flagged first, then by citations
Research works printed but not linked: 55
- Amodei, D., Olah, C., Steinhardt, J., Christiano, P. F., Schulman, J., & Mané, D. (2016). Concrete problems in AI safety. CoRR. arXiv:abs/1606.06565
- Arlot, S., & Celisse, A. (2010). A survey of cross-validation procedures for model selection. Statistics Surveys, 4, 40-79. https://doi.org/10.1214/09-SS054 · DOI · Paper page
- Azad, A. S., Kim, E., Wu, Q., Lee, K., Stoica, I., Abbeel, P., Seshia, S. A. (2021). Scenic4rl: Programmatic modeling and generation of reinforcement learning environments. CoRR. arXiv:abs/2106.10365 Baidu. (2020). Apollo. https://apollo.auto/
- Broy, M., Jonsson, B., Katoen, J. P., Leucker, M., & Pretschner, A. (2005). Model-based testing of reactive systems: Advanced lectures (lecture notes in computer science). Springer.
- Claret, G., Rajamani, S. K., Nori, A. V., Gordon, A. D., & Borgström, J. (2013). Bayesian inference using data flow analysis. In Proceedings of the 2013 9th joint meeting on foundations of software engineering (pp. 92-102). ACM.
- Dreossi, T., Donzé, A., & Seshia, S. A. (2017). Compositional falsification of cyber-physical systems with machine learning components. In NASA formal methods, NFM (pp. 357-372). https://doi.org/10.1007/ 978-3-319-57288-8_26 · DOI
- Dreossi, T., Fremont, D. J., Ghosh, S., Kim, E., Ravanbakhsh, H., Vazquez-Chanlatte, M., & Seshia, S. A. (2019). VerifAI: A toolkit for the formal design and analysis of artificial intelligence-based systems. In I. Dillig, & S. Tasiran (Eds.), Computer aided verification-31st international conference, CAV 2019, New York City, NY, USA, July 15-18, 2019, proceedings, part I, lecture notes in computer science (Vol. 11561, pp. 432-442). Springer. https://doi.org/10.1007/978-3-030-25540-4_25 · DOI
- Dreossi, T., Ghosh, S., Yue, X., Keutzer, K., Sangiovanni-Vincentelli, A. L., & Seshia, S. A. (2018). Counterexample-guided data augmentation. In J. Lang (Ed.), Proceedings of the 27th international joint conference on artificial intelligence, IJCAI 2018, July 13-19, 2018, Stockholm, Sweden (pp. 2071-2078). ijcai.org. https://doi.org/10.24963/ijcai.2018/286 · DOI · Paper page
- Dreossi, T., Jha, S., & Seshia, S. A. (2018). Semantic adversarial deep learning. In 30th international conference on computer aided verification (CAV).
- Elmas, T., Burnim, J., Necula, G., & Sen, K. (2013). CONCURRIT: A domain specific language for reproducing concurrency bugs. In: Proceedings of the 34th ACM SIGPLAN conference on programming language design and implementation, PLDI '13 (pp. 153-164). Association for Computing Machinery. https://doi. org/10.1145/2491956.2462162 · DOI
- Fisher, M., Ritchie, D., Savva, M., Funkhouser, T., & Hanrahan, P. (2012). Example-based synthesis of 3d object arrangements. In ACM SIGGRAPH 2012, SIGGRAPH Asia '12.
- Fremont, D. J. (2019). Algorithmic improvisation. Ph.D. thesis, University of California. https://escholarship. org/uc/item/3812m6wx
- Fremont, D. J., Chiu, J., Margineantu, D. D., Osipychev, D., & Seshia, S. A. (2020). Formal analysis and redesign of a neural network-based aircraft taxiing system with VerifAI. In 32nd international conference on computer aided verification (CAV).
- Fremont, D. J., Donzé, A., Seshia, S. A., & Wessel, D. (2015). Control improvisation. In 35th IARCS annual conference on foundation of software technology and theoretical computer science (FSTTCS), LIPIcs (Vol. 45, pp. 463-474).
- Fremont, D. J., Dreossi, T., Ghosh, S., Yue, X., Sangiovanni-Vincentelli, A. L., & Seshia, S. A. (2019). Scenic: A language for scenario specification and scene generation. In K. S. McKinley, & K. Fisher (Eds.), Pro- ceedings of the 40th ACM SIGPLAN conference on programming language design and implementation (PLDI) (pp. 63-78). ACM. https://doi.org/10.1145/3314221.3314633 · DOI
- Fremont, D. J., Kim, E., Dreossi, T., Ghosh, S., Yue, X., Sangiovanni-Vincentelli, A. L., & Seshia, S. A. (2020). Scenic: A language for scenario specification and data generation. https://arxiv.org/abs/2010.06580 · arXiv
- Fremont, D. J., Kim, E., Pant, Y. V., Seshia, S. A., Acharya, A., Bruso, X., Wells, P., Lemke, S., Lu, Q., & Mehta, S. (2020). Formal scenario-based testing of autonomous vehicles: From simulation to the real world. In 2020 IEEE intelligent transportation systems conference, ITSC 2020 (pp. 913-920). IEEE. arxiv:2003.07739 · arXiv
- Geiger, A., Lenz, P., & Urtasun, R. (2012). Are we ready for autonomous driving? the Kitti vision benchmark suite. In Computer vision and pattern recognition, CVPR (pp. 3354-3361). https://doi.org/10.1109/ CVPR.2012.6248074 · DOI · Paper page
- Goldberg, A., & Robson, D. (1983). Smalltalk-80: The language and its implementation. Addison-Wesley.
- Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., Bengio, Y. (2014). Generative adversarial nets. In Advances in neural information processing systems (pp. 2672- 2680).
- Goodman, N., Mansinghka, V. K., Roy, D., Bonawitz, K., Tenenbaum, J. B. (2008). Church: A universal language for generative models. In Uncertainty in artificial intelligence 24 (UAI) (pp. 220-229).
- Gordon, A. D., Henzinger, T. A., Nori, A. V., & Rajamani, S. K. (2014). Probabilistic programming. In FOSE 2014 (pp. 167-181). ACM.
- Gupta, A., Vedaldi, A., & Zisserman, A. (2016). Synthetic data for text localisation in natural images. In Computer vision and pattern recognition, CVPR (pp. 2315-2324). https://doi.org/10.1109/CVPR.2016. 254 · DOI · Paper page
- Jaderberg, M., Simonyan, K., Vedaldi, A., & Zisserman, A. (2014). Synthetic data and artificial neural networks for natural scene text recognition. CoRR. arXiv:abs/1406.2227
- Jiang, C., Qi, S., Zhu, Y., Huang, S., Lin, J., Yu, L. F., Terzopoulos, D., & Zhu, S. C. (2018). Configurable 3d scene synthesis and 2d image rendering with per-pixel ground truth using stochastic grammars. International Journal of Computer Vision, 1-22.
- Johnson-Roberson, M., Barto, C., Mehta, R., Sridhar, S. N., Rosaen, K., & Vasudevan, R. (2017). Driving in the matrix: Can virtual worlds replace human-generated annotations for real world tasks? In Interna- tional conference on robotics and automation, ICRA (pp. 746-753). https://doi.org/10.1109/ICRA.2017. 7989092 · DOI
- Kim, E., Gopinath, D., Pasareanu, C. S., & Seshia, S. A. (2020). A programmatic and semantic approach to explaining and debugging neural network based object detectors. In 2020 IEEE/CVF conference on computer vision and pattern recognition, CVPR 2020 (pp. 11125-11134). IEEE. https://doi.org/10.1109/ CVPR42600.2020.01114 · DOI
- Koymans, R. (1990). Specifying real-time properties with metric temporal logic. Real-Time Systems, 2(4), 255-299.
- Kulkarni, T., Kohli, P., Tenenbaum, J. B., & Mansinghka, V. K. (2015). Picture: A probabilistic programming language for scene perception. In IEEE conference on computer vision and pattern recognition (CVPR) (pp. 4390-4399).
- Liang, X., Hu, Z., Zhang, H., Gan, C., & Xing, E. P. (2017). Recurrent topic-transition GAN for visual paragraph generation. ArXiv preprint. arXiv:1703.07022 · arXiv
- Liebelt, J., & Schmid, C. (2010). Multi-view object class detection with a 3d geometric model. In Computer vision and pattern recognition, CVPR (pp. 1688-1695). https://doi.org/10.1109/CVPR.2010.5539836 · DOI
- Majumdar, R., Mathur, A. S., Pirron, M., Stegner, L., & Zufferey, D. (2019). Paracosm: A language and tool for testing autonomous driving systems. CoRR. arxiv:1902.01084 · arXiv
- Marchesi, M. (2017). Megapixel size image creation using generative adversarial networks. ArXiv preprint (2017). arXiv:1706.00082 · arXiv
- Michel, O. (2004). Webots: Professional mobile robot simulation. International Journal of Advanced Robotic Systems, 1(1), 39-42.
- Milch, B., Marthi, B., & Russell, S. (2004). Blog: Relational modeling with unknown objects. In ICML 2004 workshop on statistical relational learning and its connections to other fields (pp. 67-73).
- Moosavi-Dezfooli, S., Fawzi, A., & Frossard, P. (2016). Deepfool: A simple and accurate method to fool deep neural networks. In Computer Vision and Pattern Recognition, CVPR (pp. 2574-2582). https://doi.org/ 10.1109/CVPR.2016.282 · DOI · Paper page
- Müller, P., Wonka, P., Haegler, S., Ulmer, A., & Gool, L. V. (2006). Procedural modeling of buildings. ACM Transactions Graphics, 25(3), 614-623. https://doi.org/10.1145/1141911.1141931 · DOI
- Naveh, Y., Rimon, M., Jaeger, I., Katz, Y., Vinov, M., Marcus, E., & Shurek, G. (2006). Constraint-based random stimuli generation for hardware verification. In Proc. of AAAI (pp. 1720-1727).
- Nguyen, A. M., Yosinski, J., & Clune, J. (2015). Deep neural networks are easily fooled: High confidence predictions for unrecognizable images. In Computer vision and pattern recognition, CVPR (pp. 427-436). https://doi.org/10.1109/CVPR.2015.7298640 · DOI · Paper page
- Nori, A. V., Hur, C. K., Rajamani, S. K., & Samuel, S. (2014). R2: An efficient MCMC sampler for probabilistic programs. In AAAI (pp. 2476-2482).
- Pei, K., Cao, Y., Yang, J., & Jana, S. (2017). Deepxplore: Automated whitebox testing of deep learning sys- tems. In Symposium on operating systems principles, SOSP (pp. 1-18). https://doi.org/10.1145/3132747. 3132785 · DOI
- Ritchie, D. (2014). Quicksand: A lightweight embedding of probabilistic programming for procedural mod- eling and design. In 3rd NIPS workshop on probabilistic programming. https://dritchie.github.io/pdf/qs. pdf
- Ritchie, D. (2016). Probabilistic programming for procedural modeling and design. Ph.D. thesis, Stanford University. https://purl.stanford.edu/vh730bw6700 Rockstar Games. (2015). Grand theft auto v. Windows PC version. https://www.rockstargames.com/games/ info/V Rong, G., Shin, B. H., Tabatabaee, H., Lu, Q., Lemke, S., Možeiko, M., Boise, E., Uhm, G., Gerow, M., Mehta, S., Agafonov, E., Kim, T. H., Sterner, E., Ushiroda, K., Reyes, M., Zelenkovsky, D., Kim, S. (2020). LGSVL simulator: A high fidelity simulator for autonomous driving. arxiv:2005.03778 · arXiv
- Rubinstein, R. Y., & Kroese, D. P. (2004). The cross-entropy method: A unified approach to combinatorial optimization, Monte-Carlo simulation, and machine learning. Springer. https://doi.org/10.1007/978-1- 4757-4321-0 · DOI
- Saheb-Djahromi, N. (1978). Probabilistic LCF. In Mathematical foundations of computer science (pp. 442- 451). Springer.
- Seshia, S. A., Sadigh, D., & Sastry, S. S. (2016). Towards verified artificial intelligence. ArXiv e-prints.
- Stark, M., Goesele, M., & Schiele, B. (2010). Back to the future: Learning shape models from 3d CAD data. In British machine vision conference, BMVC (pp. 1-11). https://doi.org/10.5244/C.24.106 · DOI
- Sutton, M., Greene, A., & Amini, P. (2007). Fuzzing: Brute force vulnerability discovery. Addison-Wesley.
- Szegedy, C., Zaremba, W., Sutskever, I., Bruna, J., Erhan, D., Goodfellow, I., & Fergus, R. (2014). Intriguing properties of neural networks. In International conference on learning representations (ICLR).
- Szegedy, C., Zaremba, W., Sutskever, I., Bruna, J., Erhan, D., Goodfellow, I. J., & Fergus, R. (2013). Intriguing properties of neural networks. CoRR. arxiv:1312.6199 · arXiv
- Vazquez, D., Lopez, A. M., Marin, J., Ponsa, D., & Geronimo, D. (2014). Virtual and real world adaptation for pedestrian detection. IEEE Transactions on Pattern Analysis and Machine Intelligence, 36(4), 797-809.
- Wong, S. C., Gatt, A., Stamatescu, V., & McDonnell, M. D. (2016). Understanding data augmentation for classification: when to warp? In Digital image computing: Techniques and applications (DICTA), 2016 international conference on (pp. 1-6). IEEE.
- Wood, F., Meent, J. W., & Mansinghka, V. (2014). A new approach to probabilistic programming inference. In Artificial intelligence and statistics (pp. 1024-1032).
- Wu, B., Iandola, F. N., Jin, P. H., & Keutzer, K. (2017). Squeezedet: Unified, small, low power fully convolu- tional neural networks for real-time object detection for autonomous driving. In Conference on computer vision and pattern recognition workshops, CVPR workshops (pp. 446-454). https://doi.org/10.1109/ CVPRW.2017. · DOI · Paper page
- Xu, Y., Jia, R., Mou, L., Li, G., Chen, Y., Lu, Y., & Jin, Z. (2016). Improved relation classification by deep recurrent neural networks with data augmentation. ArXiv preprint. arXiv:1601.03651 · arXiv
Cited by
Sorted by citations
Towards Guaranteed Safe AI: A Framework for Ensuring Robust and Reliable AI Systems
Dalrymple, D. "., Skalse, J., Bengio, Y., Russell, S., Tegmark, M., Seshia, S., Omohundro, S., Szegedy, C., Goldhaber, B., Ammann, N., et al. (2024) · arXiv · doi:10.48550/arxiv.2405.06624 · Cited by 12 · see citing works
Self-citation
- Authors
- Fremont, D. J., Kim, E., Dreossi, T., Ghosh, S., Yue, X., Sangiovanni-Vincentelli, A. L., & Seshia, S. A.
- Affiliations
- University of California, Santa Cruz (US)
- University of California, Berkeley (US)
- insitro, inc. (United States) (US)
- Corresponding author
- Fremont, Daniel J.
- ORCID
- Venue
- Machine Learning
- Published
- 2022-02-02
- Volume
- 112
- Issue
- 10
- Pages
- 3805-3849
- ISSN
- 0885-6125 (ISSN-L)
- 1573-0565
- OpenAlex
- W4210496774
- Cited by
- 112
- References
- 5
- Citations by year
- 2026: 19 · 2025: 24 · 2024: 31 · 2023: 25 · 2022: 9 · 2021: 4
- FWCI
- 7.32
- Type
- journal article
- Language
- en
- Open access
- hybrid
- doi.org
- Locations
- Machine Learning (publishedVersion, cc-by)
- arXiv (Cornell University) (submittedVersion)
- arXiv (Cornell University)
- Funders
- National Science Foundation (DGE-1106400, CNS-1545126, CNS-1646208, CNS-1739816, CCF-1837132)
- Defense Advanced Research Projects Agency (FA8750-16-C0043, FA8750-20-C-0156)
- Berkeley Deep Drive
- Semiconductor Research Corporation (TerraSwarm)
- iCyPhy
- Topics
- Physical Sciences › Computer Science › Artificial Intelligence › Bayesian Modeling and Causal Inference
- Physical Sciences › Computer Science › Artificial Intelligence › Adversarial Robustness in Machine Learning
- Physical Sciences › Computer Science › Artificial Intelligence › Logic, programming, and type systems
- Keywords
- SCENIC, probabilistic programming languages, scenario specification, data generation, cyber-physical systems, domain-specific languages, spatio-temporal constraints, sampling from distributions, autonomous vehicles, robot perception, environment modeling
About these checks
Registry, retraction, Cites and statistics results are computed, not judged, with one exception: a printed reference that no index lists is read once by a model before it counts as a citation error. Claims are extracted by a model and kept only when their quote appears verbatim in the text; each cited source is then checked, with a model’s help, for whether it says what the claim relies on. Those verdicts can be wrong — read the claim’s quote and the cited source before relying on one.
Statistics and arithmetic are recomputed, not judged.
Confidence bands are shown only for fields calibrated on our annotated test set. None is calibrated yet, so no band is shown.
What counts as a claim ›How we measure confidence ›How we check this ›
Are you an author, or do you see a problem with this page? Request a review