Stop Drawing Neural Nets by Hand
This tool generates publication-ready neural network schematics parametrically, sparing researchers from hand-drawing layers and connections for every paper.
What it does
NN-SVG is a browser-based tool that produces neural network architecture diagrams as scalable vector graphics. Instead of manually laying out nodes and edges in a drawing program, researchers adjust parameters—layer sizes, colors, layout—to generate figures ready for academic papers or teaching materials. It handles three distinct visual conventions: classic fully-connected networks, LeNet-style convolutional diagrams, and AlexNet-style deep network schematics.
The interesting bit
The project treats neural net diagrams as a formal visual language, codifying the exact styles of seminal papers rather than inventing a generic look. FCNN and CNN figures render via D3, while the AlexNet-style 3D blocks use Three.js, giving each diagram type the specific visual grammar researchers expect.
Key highlights
- Exports to SVG for lossless inclusion in LaTeX documents or web pages
- Parametric controls for size, color, and layout remove the need for manual illustration
- Supports three canonical styles: FCNN, LeNet-style CNN, and AlexNet-style deep networks
- Published in the Journal of Open Source Software (JOSS)
- Runs in the browser via
D3andThree.js
Caveats
- Limited to three specific diagram styles; modern architectures like transformers or graph neural networks are not mentioned in the documentation
- Appears to require manual parameter entry for each layer rather than importing model definitions directly from deep-learning frameworks
Verdict
Machine learning researchers who need clean, consistent architecture figures for papers or lectures should bookmark this; deep-learning practitioners looking to auto-visualize arbitrary model checkpoints will need to look elsewhere.
Frequently asked
- What is alexlenail/NN-SVG?
- This tool generates publication-ready neural network schematics parametrically, sparing researchers from hand-drawing layers and connections for every paper.
- Is NN-SVG open source?
- Yes — alexlenail/NN-SVG is open source, released under the MIT license.
- What language is NN-SVG written in?
- alexlenail/NN-SVG is primarily written in JavaScript.
- How popular is NN-SVG?
- alexlenail/NN-SVG has 5.7k stars on GitHub.
- Where can I find NN-SVG?
- alexlenail/NN-SVG is on GitHub at https://github.com/alexlenail/NN-SVG.