Northeastern University · CS 7150 · Fall 2026

Language modeling

Interactive pieces for Elman 1990, “Finding Structure in Time.” Both reproduce his experiments live in the browser: a simple recurrent network reads a stream one symbol at a time and learns to predict the next, and what it gets wrong, and what its hidden units end up encoding, tell you what it has learned. Each adds the tests your nightly questions asked for.

  1. Elman’s first experiment

    The letter stream: error marks what can’t be known

    Two networks learn ba dii guuu, one with Elman’s one-step training and one with backpropagation through time, side by side. The error spikes at every consonant, which no one can predict, and vanishes on the vowels; lengthen the vowel runs to find where one-step training stops being enough. Step through the stream to watch the hidden and context units, and switch to words or real English with the spaces removed, where the spikes find the word boundaries.

    Open the explainer →
  2. Elman’s sentence experiment

    Word categories from next-word prediction

    Ten thousand sentences like man eat cookie, a network trained to predict each next word, and the tree its hidden states make. Then the controls: an untrained network and raw co-occurrence counts, three versions of the zog test, a noun/verb probe tested on held-out words, and an intervention that pushes the hidden state along the probe’s direction to see whether the network uses it.

    Open the explainer →