DEV Community

Cover image for Recurrent Neural Network In a Spreadsheet
Kevin Lubick
Kevin Lubick

Posted on

Recurrent Neural Network In a Spreadsheet

Truly understanding Recurrent Neural Networks was hard for me. Sure, I read Kaparthy's oft-cited RNN article and looked at a diagrams like:
A typical basic RNN diagram, with only 3 arrows and very little explanation

But that didn't resonate in my brain. How do numbers "remember"? What details are lurking in the simplicity of that diagram?

To understand them better, I built one in a spreadsheet. It was not as straightforward as my previous attempts to build neural networks this way, mostly because I had to discover novel ways to visualize what was going on:

A visualization of how the hidden layer of an RNN progresses through time to spell the word "mississippi". There is a plot with colored regions and an arrow moving around them.

Those visualizations really helped RNNs click for me, and I was able then to implement one and figure out the weights to make it work. I walk through that entire process in this YouTube video.

The completed spreadsheet is here.

More of my work:

  • Building a traditional neural network in a spreadsheet to learn AND and XOR (Part 1, Part 2)
  • Building a convolutional neural network in a spreadsheet to recognize letters (Part 1, Part 2)

Top comments (0)