Skip to main content

Neural String Diagrams: A Universal Modelling Language for Categorical Deep Learning

  • Conference paper
  • First Online:
Artificial General Intelligence (AGI 2021)

Part of the book series: Lecture Notes in Computer Science ((LNAI,volume 13154))

Included in the following conference series:

Abstract

Category theory has been successfully applied to compositional modelling of diverse systems, including computational systems, logical systems, and physical systems, paving the way for a new kind of general system science (or rather general process science). It has been particularly successful in quantum computing and natural language processing recently; traditionally, it has played major rôles in compositional semantics of programming languages and symbolic reasoning systems. Building upon them, we propose the mathematical system of neural string diagrams as a universal modelling language for categorical deep learning, which allows us to turn informal neural network architecture pictures into formally explainable, mathematically verifiable, and systematically composable entities in their own right. We give, in particular, a neural string diagram account of CNN and Transformer (which has never been achieved before). Neural string diagrams can be computed with DisCoPy, Quantomatic, and their extensions. Categorically formalised neural networks can be instantiated for both ordinary vector spaces and other monoidal categorical structures, allowing for generalisations of deep learning (e.g., deep learning on relational structures, deep learning on graph and other network structures, etc.). We envisage that the category theory approach to artificial intelligence ultimately contributes to the development of artificial general intelligence, giving a universal modelling language for intelligent systems and agents.

This work was supported by JST (JPMJMS2033; JPMJPR17G9).

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 69.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 89.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. Abramsky, S., Coecke, B.: Categorical quantum mechanics. In: Handbook of Quantum Logic and Quantum Structures, pp. 261–325 (2009)

    Google Scholar 

  2. Besold, T., et al.: Neural-Symbolic Learning and Reasoning (2017)

    Google Scholar 

  3. Clark, S., et al.: Mathematical foundations for a compositional distributional model of meaning. Linguist. Anal. 36, 345–384 (2010)

    Google Scholar 

  4. Coecke, B., Kissinger, A.: Picturing Quantum Processes. CUP (2017)

    Google Scholar 

  5. Cruttwell, G., et al.: Categorical foundations of gradient-based learning. arXiv arXiv:2103.01931 (2021)

  6. De Felice, G., et al.: DisCoPy: monoidal categories in Python. In: 2020 Proceedings of the ACT, pp. 183–197 (2021)

    Google Scholar 

  7. Fong, B., Spivak, D.: An Invitation to Applied Category Theory. CUP (2019)

    Google Scholar 

  8. Goertzel, B., et al.: Guiding symbolic natural language grammar induction via transformer-based sequence probabilities. In: Proceedings of the AGI 2020, pp. 153–163 (2020)

    Google Scholar 

  9. Goertzel, B.: Human-level artificial general intelligence and the possibility of a technological singularity. Artif. Intell. 171, 1161–1173 (2007)

    Article  Google Scholar 

  10. Grefenstette, E., Sadrzadeh, M.: Experimental support for a categorical compositional distributional model of meaning. In: Proceedings of the EMNLP, pp. 1394–1404 (2011)

    Google Scholar 

  11. Heunen, C., Vicary, J.: Categories for Quantum Theory. OUP (2019)

    Google Scholar 

  12. Lorenz, R., et al.: QNLP in practice. arXiv arXiv:2102.12846 (2021)

  13. Maruyama, Y.: Categorical artificial intelligence: the integration of symbolic and statistical AI for verifiable, ethical, and trustworthy AI. In: Proceedings of the AGI (2021)

    Google Scholar 

  14. Sejnowski, T.: The unreasonable effectiveness of deep learning in artificial intelligence. PNAS 117, 30033–30038 (2020)

    Article  Google Scholar 

  15. Zhang, Z., et al.: Deep learning on graphs. IEEE Trans. Knowl. Data Eng. 34, 249–270 (2021)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Yoshihiro Maruyama .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2022 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Xu, T., Maruyama, Y. (2022). Neural String Diagrams: A Universal Modelling Language for Categorical Deep Learning. In: Goertzel, B., Iklé, M., Potapov, A. (eds) Artificial General Intelligence. AGI 2021. Lecture Notes in Computer Science(), vol 13154. Springer, Cham. https://doi.org/10.1007/978-3-030-93758-4_32

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-93758-4_32

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-93757-7

  • Online ISBN: 978-3-030-93758-4

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics