Skip to main content

Reusable Contracts for Safe Integration of Reinforcement Learning in Hybrid Systems

  • Conference paper
  • First Online:
Automated Technology for Verification and Analysis (ATVA 2022)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 13505))

Abstract

Deductive verification is a powerful approach for establishing crucial safety properties of intelligent hybrid systems. However, deductive verification requires abstract formal descriptions, e.g. properties, contracts, and invariants. Defining these requires a high level of expertise and an enormous amount of manual effort, in particular if the system contains intelligent components such as reinforcement learning agents. In this paper, we propose reusable contract patterns for the safe integration of reinforcement learning in hybrid systems. Our key ideas are threefold: First, we identify recurring verification problems for intelligent hybrid systems that contain reinforcement learning agents. Second, we provide a set of contract patterns that ease the definition of contracts for the safe integration of reinforcement learning agents. Third, we indicate how to derive invariants from the contract patterns. Our contract patterns together with the invariant derivation enable systematic reuse of manually defined hybrid contracts and invariants and reduce the manual effort of the deductive verification process for intelligent hybrid systems.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 64.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 84.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Adelt, J., Herber, P., Niehage, M., Remke, A.: Towards safe and resilient hybrid systems in the presence of learning and uncertainty. In: International Symposium On Leveraging Applications of Formal Methods, Verification and Validation (ISoLA). LNCS, vol. 13701. Springer (2022)

    Google Scholar 

  2. Adelt, J., Liebrenz, T., Herber, P.: Formal verification of intelligent hybrid systems that are modeled with simulink and the reinforcement learning toolbox. In: Huisman, M., Păsăreanu, C., Zhan, N. (eds.) FM 2021. LNCS, vol. 13047, pp. 349–366. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-90870-6_19

    Chapter  Google Scholar 

  3. Alshiekh, M., Bloem, R., Ehlers, R., Könighofer, B., Niekum, S., Topcu, U.: Safe reinforcement learning via shielding. In: AAAI Conference on Artificial Intelligence, vol. 32 (2018)

    Google Scholar 

  4. Beckert, B., Klebanov, V.: Proof reuse for deductive program verification. In: Proceedings of the Second International Conference on Software Engineering and Formal Methods, 2004. SEFM 2004, pp. 77–86. IEEE (2004)

    Google Scholar 

  5. Chen, M., et al.: MARS: a toolchain for modelling, analysis and verification of hybrid systems. In: Hinchey, M.G., Bowen, J.P., Olderog, E.-R. (eds.) Provably Correct Systems. NMSSE, pp. 39–58. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-48628-4_3

    Chapter  Google Scholar 

  6. Cimatti, A., Dorigatti, M., Tonetta, S.: OCRA: a tool for checking the refinement of temporal contracts. In: IEEE/ACM International Conference on Automated Software Engineering (ASE), pp. 702–705. IEEE (2013)

    Google Scholar 

  7. Cloth, L., Haverkort, B.R.: Model checking for survivability! In: International Conference on the Quantitative Evaluation of Systems (QEST), pp. 145–154. IEEE (2005)

    Google Scholar 

  8. Fulton, N., Mitsch, S., Quesel, J.-D., Völp, M., Platzer, A.: KeYmaera X: an axiomatic tactical theorem prover for hybrid systems. In: Felty, A.P., Middeldorp, A. (eds.) CADE 2015. LNCS (LNAI), vol. 9195, pp. 527–538. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-21401-6_36

    Chapter  Google Scholar 

  9. Fulton, N., Platzer, A.: Safe reinforcement learning via formal methods: toward safe control through proof and learning. In: AAAI Conference on Artificial Intelligence, vol. 32 (2018)

    Google Scholar 

  10. Genestier, R., Giorgetti, A., Petiot, G.: Sequential generation of structured arrays and its deductive verification. In: Blanchette, J.C., Kosmatov, N. (eds.) TAP 2015. LNCS, vol. 9154, pp. 109–128. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-21215-9_7

    Chapter  Google Scholar 

  11. Hähnle, R., Huisman, M.: Deductive software verification: from pen-and-paper proofs to industrial tools. In: Steffen, B., Woeginger, G. (eds.) Computing and Software Science. LNCS, vol. 10000, pp. 345–373. Springer, Cham (2019). https://doi.org/10.1007/978-3-319-91908-9_18

    Chapter  MATH  Google Scholar 

  12. Hähnle, R., Schaefer, I., Bubel, R.: Reuse in software verification by abstract method calls. In: Bonacina, M.P. (ed.) CADE 2013. LNCS (LNAI), vol. 7898, pp. 300–314. Springer, Heidelberg (2013). https://doi.org/10.1007/978-3-642-38574-2_21

    Chapter  Google Scholar 

  13. Hoder, K., Kovács, L., Voronkov, A.: Invariant generation in vampire. In: Abdulla, P.A., Leino, K.R.M. (eds.) TACAS 2011. LNCS, vol. 6605, pp. 60–64. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-19835-9_7

    Chapter  Google Scholar 

  14. Könighofer, B., Lorber, F., Jansen, N., Bloem, R.: Shield synthesis for reinforcement learning. In: Margaria, T., Steffen, B. (eds.) ISoLA 2020. LNCS, vol. 12476, pp. 290–306. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-61362-4_16

    Chapter  Google Scholar 

  15. Koutsoukos, X.D., Antsaklis, P.J., Stiver, J.A., Lemmon, M.D.: Supervisory control of hybrid systems. Proc. IEEE 88(7), 1026–1049 (2000)

    Article  Google Scholar 

  16. Laprie, J.C.: From dependability to resilience. In: IEEE/IFIP International Conference on Dependable Systems and Networks (DSN), pp. G8–G9 (2008)

    Google Scholar 

  17. Liebrenz, T., Herber, P., Glesner, S.: Deductive verification of hybrid control systems modeled in Simulink with KeYmaera X. In: Sun, J., Sun, M. (eds.) ICFEM 2018. LNCS, vol. 11232, pp. 89–105. Springer, Cham (2018). https://doi.org/10.1007/978-3-030-02450-5_6

    Chapter  Google Scholar 

  18. Liebrenz, T., Herber, P., Glesner, S.: A service-oriented approach for decomposing and verifying hybrid system models. In: Arbab, F., Jongmans, S.-S. (eds.) FACS 2019. LNCS, vol. 12018, pp. 127–146. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-40914-2_7

    Chapter  Google Scholar 

  19. MathWorks: Control and Simulate Multiple Warehouse Robots

    Google Scholar 

  20. MathWorks: Reinforcement Learning Examples

    Google Scholar 

  21. MathWorks: Reinforcement Learning Toolbox

    Google Scholar 

  22. MathWorks: Simulink

    Google Scholar 

  23. Minopoli, S., Frehse, G.: SL2SX Translator: from Simulink to SpaceEx models. In: International Conference on Hybrid Systems: Computation and Control, pp. 93–98. ACM (2016)

    Google Scholar 

  24. Mitsch, S., Ghorbal, K., Vogelbacher, D., Platzer, A.: Formal verification of obstacle avoidance and navigation of ground robots. Int. J. Robot. Res. 36(12), 1312–1340 (2017)

    Article  Google Scholar 

  25. Phan, D., et al.: A component-based simplex architecture for high-assurance cyber-physical systems. In: 2017 17th International Conference on Application of Concurrency to System Design (ACSD), pp. 49–58. IEEE (2017)

    Google Scholar 

  26. Platzer, A.: Differential dynamic logic for hybrid systems. J. Autom. Reason. 41(2), 143–189 (2008)

    Article  MathSciNet  Google Scholar 

  27. Rodríguez-Carbonell, E., Kapur, D.: Automatic generation of polynomial invariants of bounded degree using abstract interpretation. Sci. Comput. Program. 64(1), 54–75 (2007)

    Article  MathSciNet  Google Scholar 

  28. Safari, M., Oortwijn, W., Joosten, S., Huisman, M.: Formal verification of parallel prefix sum. In: Lee, R., Jha, S., Mavridou, A., Giannakopoulou, D. (eds.) NFM 2020. LNCS, vol. 12229, pp. 170–186. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-55754-6_10

    Chapter  Google Scholar 

  29. Smith, P., Hutchison, D., Sterbenz, J.P., Schöller, M., Fessi, A., Karaliopoulos, M., Lac, C., Plattner, B.: Network resilience: a systematic approach. IEEE Commun. Mag. 49(7), 88–97 (2011)

    Article  Google Scholar 

  30. Sutton, R.S., Barto, A.G.: Reinforcement Learning: An Introduction, 2nd edn. The MIT Press Cambridge, Massachusetts London, England (2018)

    MATH  Google Scholar 

  31. Thüm, T., Schaefer, I., Apel, S., Hentschel, M.: Family-based deductive verification of software product lines. In: International Conference on Generative Programming and Component Engineering, pp. 11–20. ACM (2012)

    Google Scholar 

  32. Zou, L., Zhan, N., Wang, S., Fränzle, M.: Formal verification of Simulink/Stateflow diagrams. In: Finkbeiner, B., Pu, G., Zhang, L. (eds.) ATVA 2015. LNCS, vol. 9364, pp. 464–481. Springer, Cham (2015). https://doi.org/10.1007/978-3-319-24953-7_33

    Chapter  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding authors

Correspondence to Julius Adelt or Paula Herber .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Adelt, J., Brettschneider, D., Herber, P. (2022). Reusable Contracts for Safe Integration of Reinforcement Learning in Hybrid Systems. In: Bouajjani, A., Holík, L., Wu, Z. (eds) Automated Technology for Verification and Analysis. ATVA 2022. Lecture Notes in Computer Science, vol 13505. Springer, Cham. https://doi.org/10.1007/978-3-031-19992-9_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-19992-9_4

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-19991-2

  • Online ISBN: 978-3-031-19992-9

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics