AANN 25/03/2026

Table of Contents

Visualising neural networks

cover-image.png

People really like to visualise neural network architectures. Some of these figures are helpful, some are not, there are many tools for generating them. I haven't found one I like. When I saw Figure 12 from Tomaselli et al (2025), it got me wondering if it would be possible convenient to do this in PlantUML1. PlantUML is a language for making these types of diagrams which I think does a good job of balancing ease of use with flexibility2.

Here are a couple of figures I created and PlantUML files to generate them. If you have any suggestions for how to improve these, please send them my way!

Example: LeNet (1998)

In Fig 1 I've shown a diagram of LeNet (1998) based on the description on Wikipedia. The PlantUML file is here.

lenet-5.png

Figure 1: LeNet (1998) based on the description in Wikipedia

Example: Zarebski et al (2026)

In Fig 2 I've shown a diagram of a recursive neural network from my recent preprint, Zarebski et al (2026). I've tried to indicate the recursion with some dashed lines; there must be a better way to do this. The PlantUML file is here.

derp.png

Figure 2: Recursive neural network used for amortized simulation-based inference. The blue nodes and edges highlight the recursion.

Example: Plate notation

I think a plate notation, like that used for visualising graphical models could be nice if you wanted to represent a very deep network if it had a structure that was easy to describe. Fig 3 is an attempt at doing that. I'm not sure the extra complexity is all that useful though. The PlantUML file is here.

plate-demo.png

Figure 3: Plate notation could be useful for simplifying deep networks with regular structure. The green box can be expanded by iterating over the values of \(i\) indicated.

Thanks

Thank you to Domenic Germano for providing some helpful comments on an earlier version of this post. Thank you to you for reading it. Please get in touch if you have any feedback :)

Footnotes:

1

Which may have been generated by Keras (and Graphviz).

2

PlantUML files are plain text, so they are easier for our AI collaborators to read, and you don't need to mess about with laying out the nodes. yEd also deserves an honourable mention as a freemium GUI option if you don't like plain text.

Author: Alexander E. Zarebski

Created: 2026-03-28 Sat 21:14

Validate