Producing Pretty Papers, a Programmer's Guide

Figure 1 from the paper Attention is All You Need, showing "The Transformer - model architecture". It is a complex diagram with a multitude of blocks connected by arrows I’ve often wondered, when reading research papers, how exactly it is that people make such pretty figures like this. I decided to look into it, and start collecting resources here.

Academic Project Page Template Related, a nice github repo for creating slick research project web pages.

Possible tools


Tikz: make graphs natively in LaTeX.



github repo.

Latex code for drawing neural networks for reports and presentation. Have a look into examples to see how they are made. Additionally, lets consolidate any improvements that you make and fix any bugs to help more people with this code.

Essentially, a collection of functions that output tikz stuff you can copy into your LaTeX.


Asked Researchers on Slack

Asked various devs on Slack, here are misc. graphing tools mentioned by various developers:


Searching variations on “Plot Neural Network Architecture”

this Data Science stack exchange discussion mentions a few options.

Appsilon tutorial

PyTorch Forum discussion

This Neptune AI post points out a few options.

Machine Learning Mastery tutorial explaining how to save out a PyTorch model and visualize using Netron.

Reddit Thread on NNViz

TowardsAI says to use PlotNeuralNet with ChatGPT. The takeaway for me is to use PlotNeuralNet

TowardsDataScience article recommending gravis

github repo “Tools to Design or Visualize Architecture of Neural Network “, last updated 3 years ago, shows lots of examples, seems to have lifted from the stack exchange discussions.


I think the tl;dr is that PlotNeuralNet requires you to manually specify things, but looks the prettiest.

Second-prettiest might be the NN-SVG, which looks really easy to use as well.


  • 2024-03-07: creation.
  • 2024-04-18: added some new library links, and sections.
Written on March 7, 2024