Skip to main content

PDFA Distillation with Error Bound Guarantees

  • Conference paper
  • First Online:
Implementation and Application of Automata (CIAA 2024)

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

Included in the following conference series:

  • 236 Accesses

Abstract

Active learning algorithms to infer probabilistic finite automata (PFA) have gained interest recently, due to their ability to provide surrogate models for some types of neural networks. However, recent approaches either cannot guarantee determinism, which makes the automaton harder to understand and compute, or they rely on techniques that bound errors on individual transitions. In this work we propose a derivative of the recent \(L^{\#}\) algorithm to learn deterministic PFA (PDFA) from systems returning a distribution over a set of tokens given an input string. Along with determinism, we can give error bounds on probabilities assigned to whole strings with an easy to understand approach. We show formal correctness of our algorithm and test it on neural networks trained to model three datasets from computer- and network-systems respectively. We show that the algorithm can learn the network’s behaviour closely, and provide an example application of how the model can be used to interpret the network. We note that our approach is in theory applicable in general to learn deterministic weighted finite automata. We provide the source code of our algorithm and relevant scripts on our public repository.

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

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Similar content being viewed by others

Notes

  1. 1.

    https://github.com/tudelft-cda-lab/FlexFringe.

  2. 2.

    The presence of such a symbol is a reasonable assumption. E.g. in natural language processing this is commonly referred to as the <EOS> (end-of-sentence) symbol.

  3. 3.

    Because we describe our algorithm at all stages, it was not always clear on how we should refer to the individual states and nodes of the automaton. For simplicity we decided to stick to the word ‘state’ meaning both state and node from here on, as they are mostly interchangeable for us.

References

  1. Angluin, D.: Learning regular sets from queries and counterexamples. Inf. Comput. 75(2), 87–106 (1987)

    Article  MathSciNet  Google Scholar 

  2. Balle, B., Carreras, X., Luque, F.M., Quattoni, A.: Spectral learning of weighted automata: a forward-backward perspective. Mach. Learn. 33–63 (2014)

    Google Scholar 

  3. Du, M., Li, F., Zheng, G., Srikumar, V.: Deeplog: anomaly detection and diagnosis from system logs through deep learning. In: Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, CCS 2017, pp. 1285–1298. Association for Computing Machinery, New York (2017)

    Google Scholar 

  4. Eyraud, R., Ayache, S.: Distillation of weighted automata from recurrent neural networks using a spectral approach. Mach. Learn. (2021)

    Google Scholar 

  5. García, S., Grill, M., Stiborek, J., Zunino, A.: An empirical comparison of botnet detection methods. Comput. Secur. 45, 100–123 (2014)

    Article  Google Scholar 

  6. He, P., Zhu, J., Zheng, Z., Lyu, M.R.: Drain: an online log parsing approach with fixed depth tree. In: 2017 IEEE International Conference on Web Services (ICWS), pp. 33–40 (2017)

    Google Scholar 

  7. de la Higuera, C.: Grammatical Inference: Learning Automata and Grammars. Cambridge University Press, Cambridge (2010)

    Book  Google Scholar 

  8. Hofstede, R., et al.: Flow monitoring explained: from packet capture to data analysis with NetFlow and IPFIX. IEEE Commun. Surv. Tutor. 16(4), 2037–2064 (2014)

    Article  Google Scholar 

  9. Lang, K.J., Pearlmutter, B.A., Price, R.A.: Results of the Abbadingo one DFA learning competition and a new evidence-driven state merging algorithm. In: Honavar, V., Slutzki, G. (eds.) ICGI 1998. LNCS, vol. 1433, pp. 1–12. Springer, Heidelberg (1998). https://doi.org/10.1007/BFb0054059

    Chapter  Google Scholar 

  10. Marzouk, R., de la Higuera, C.: Distance and equivalence between finite state machines and recurrent neural networks: computational results. CoRR (2020). https://arxiv.org/abs/2004.00478

  11. Mayr, F., Yovine, S.: Regular inference on artificial neural networks. In: Holzinger, A., Kieseberg, P., Tjoa, A.M., Weippl, E. (eds.) CD-MAKE 2018. LNCS, vol. 11015, pp. 350–369. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-99740-7_25

    Chapter  Google Scholar 

  12. Mayr, F., Yovine, S., Carrasco, M., Pan, F., Vilensky, F.: A congruence-based approach to active automata learning from neural language models. In: Coste, F., Ouardi, F., Rabusseau, G. (eds.) Proceedings of 16th edition of the International Conference on Grammatical Inference. Proceedings of Machine Learning Research, vol. 217, pp. 250–264. PMLR (2023)

    Google Scholar 

  13. Mayr, F., Yovine, S., Pan, F., Basset, N., Dang, T.: Towards efficient active learning of PDFA (2022)

    Google Scholar 

  14. Muškardin, E., Aichernig, B.K., Pill, I., Tappler, M.: Learning finite state models from recurrent neural networks. In: ter Beek, M.H., Monahan, R. (eds.) Integrated Formal Methods, pp. 229–248. Springer, Cham (2022). https://doi.org/10.1007/978-3-031-07727-2_13

    Chapter  Google Scholar 

  15. Okudono, T., Waga, M., Sekiyama, T., Hasuo, I.: Weighted automata extraction from recurrent neural networks via regression on state spaces (2019)

    Google Scholar 

  16. Oliner, A., Stearley, J.: What supercomputers say: a study of five system logs. In: 37th Annual IEEE/IFIP International Conference on Dependable Systems and Networks (DSN 2007), pp. 575–584 (2007)

    Google Scholar 

  17. Pellegrino, G., Lin, Q., Hammerschmidt, C., Verwer, S.: Learning behavioral fingerprints from netflows using timed automata. In: 2017 IFIP/IEEE Symposium on Integrated Network and Service Management (IM), pp. 308–316 (2017)

    Google Scholar 

  18. Vaandrager, F., Garhewal, B., Rot, J., Wißmann, T.: A new approach for active automata learning based on apartness. In: Fisman, D., Rosu, G. (eds.) TACAS 2022. LNCS, vol. 13243, pp. 223–243. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-99524-9_12

    Chapter  Google Scholar 

  19. Weiss, G., Goldberg, Y., Yahav, E.: Learning deterministic weighted automata with queries and counterexamples. In: Wallach, H., Larochelle, H., Beygelzimer, A., d’ Alché-Buc, F., Fox, E., Garnett, R. (eds.) Advances in Neural Information Processing Systems, vol. 32. Curran Associates, Inc. (2019)

    Google Scholar 

  20. Weiss, G., Goldberg, Y., Yahav, E.: Extracting automata from recurrent neural networks using queries and counterexamples. Mach. Learn. (2022)

    Google Scholar 

  21. Xu, W., Huang, L., Fox, A., Patterson, D., Jordan, M.I.: Detecting large-scale system problems by mining console logs. In: Proceedings of the ACM SIGOPS 22nd Symposium on Operating Systems Principles, SOSP 2009, pp. 117–132. Association for Computing Machinery, New York (2009)

    Google Scholar 

  22. Zhu, J., et al.: Tools and benchmarks for automated log parsing. In: Proceedings of the 41st International Conference on Software Engineering: Software Engineering in Practice, ICSE-SEIP 2019, pp. 121–130. IEEE Press (2019)

    Google Scholar 

Download references

Acknowledgments

This work is supported by NWO TTW VIDI project 17541 - Learning state machines from infrequent software traces (LIMIT).

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Robert Baumgartner .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 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

Baumgartner, R., Verwer, S. (2024). PDFA Distillation with Error Bound Guarantees. In: Fazekas, S.Z. (eds) Implementation and Application of Automata. CIAA 2024. Lecture Notes in Computer Science, vol 15015. Springer, Cham. https://doi.org/10.1007/978-3-031-71112-1_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-71112-1_4

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-71111-4

  • Online ISBN: 978-3-031-71112-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics