{
  "$type": "site.standard.document",
  "content": "---\ntitle: Interactive neon perceptron visualisation\ndescription: \"An interactive 3D digital twin of the Neon Perceptron---a physical neural network built from flexible LEDs. Draw on the input grid and watch activations flow.\"\ntags:\n  - ai\n  - web\n---\n\nimport NeonPerceptron from \"@/components/svelte/NeonPerceptron.svelte\";\n\nI'm about to design and build a modern interpretation of\n[Rosenblatt's Perceptron](https://en.wikipedia.org/wiki/Perceptron). It's called\nthe [Neon Perceptron](https://github.com/ANUcybernetics/neon-perceptron)\nbecause every wire will be a flexible LED that lights up with its \"activation\".\nI'm doing the software, my colleague Brendan Traw is designing some custom PCBs\nand other hardware, and we're working on the overall design together.\n\nThis post contains a digital twin of the current design, just to help us get a\nfeel for how it'll look and work. While the physical version is still a work in\nprogress, you can play with this interactive 3D version right now.\n\nDraw on the 5×5 blue input grid (on the left) and watch the activations flow\nthrough the network to the output layer. The coloured lines show you what's\nhappening inside: orange for positive activations, blue for negative, with\nbrightness and thickness showing the magnitude.\n\n<NeonPerceptron client:only=\"svelte\" />\n\n## How it works\n\nThe neon perceptron has three layers:\n\n1. **Input layer** (left): a 5×5 grid of pixels. Click and drag to \"draw\" on it.\n2. **Hidden layer** (middle): 9 neurons with tanh activation.\n3. **Output layer** (right): 10 neurons with softmax activation, displayed as\n   seven-segment displays showing digits 0--9.\n\nThe coloured lines show the weighted connections between neurons---orange for\npositive activations (the input is reinforcing this connection), blue for\nnegative (the input is inhibiting it). Line thickness and brightness indicate\nthe magnitude of the activation.\n\nThe weights are randomly initialised, so hit \"Randomise\" to generate a new set.\nSince the network hasn't been trained on anything, it won't actually recognise\ndigits[^untrained]. But you can see how different input patterns produce\ndifferent output distributions.\n\n[^untrained]:\n    In the physical neon perceptron, we're planning to train it by manually\n    adjusting potentiometers---proper old-school analogue computing.\n\n## Controls\n\n- **Reset**: clear the input grid\n- **Randomise**: generate new random weights\n- **Fullscreen**: expand to fill your screen (press Escape to exit)\n- **Wire gamma**: adjust how bright the connection lines appear (higher values\n  make weak activations more visible)\n\nYou can also click and drag on the background to orbit the camera, and scroll to\nzoom.\n\n## The maths\n\nThe forward pass is straightforward:\n\n```\nhidden = tanh(input @ W1)\noutput = softmax(hidden @ W2)\n```\n\nWhere `W1` is a 25×9 weight matrix and `W2` is a 9×10 weight matrix. The weights\nare initialised using Xavier/Glorot initialisation.\n\nThe seven-segment displays show the softmax probability for each digit\nclass---brighter segments indicate higher probability. Since the weights are\nrandom, you'll see fairly uniform (and nonsensical) output distributions.\n",
  "createdAt": "2026-05-13T23:14:42.217Z",
  "description": "An interactive 3D digital twin of the Neon Perceptron---a physical neural network built from flexible LEDs. Draw on the input grid and watch activations flow.",
  "path": "/blog/2025/12/11/neon-perceptron-digital-twin",
  "publishedAt": "2025-12-11T00:00:00.000Z",
  "site": "at://did:plc:tevykrhi4kibtsipzci76d76/site.standard.publication/self",
  "tags": [
    "ai",
    "web"
  ],
  "textContent": "An interactive 3D digital twin of the Neon Perceptron---a physical neural network built from flexible LEDs. Draw on the input grid and watch activations flow.",
  "title": "Interactive neon perceptron visualisation"
}