ART / GENERATIVE EXPERIMENT
Neural Turing Patterns
An interactive experiment at the intersection of neuroscience and generative art. Spatial structures emerge from the evolving spikes of a recurrent neural network.
2D map of the excitatory spike trace. Change viewing mode to explore graphical 3D projections.
Boundary conditions: periodic in both directions (left ↔ right, top ↔ bottom). Local E/I interactions connect one continuous periodic lattice, not every neuron to every other neuron. Torus represents this topology; Sphere is a visual projection, not an equivalent network geometry.
Live dynamics and spectral analysis
Collecting spike activity…
5 s rolling mean PSD · log-log · 1–500 nominal Hz
Collecting the first 5-second analysis window…
Hann-windowed, mean-detrended 1024/2048-point FFT periodograms, 50% overlap, averaged over the last 5 nominal seconds once available (clearly labeled partial preview during warm-up). Both axes use logarithmic scales; zero frequency is omitted. Nominal 1 ms/step gives a 500 Hz Nyquist limit.
Morlet scalogram · time–frequency power
E–I phase plane · mean membrane potential trajectory
E/I voltage balance · live
Collecting membrane-potential samples…
Phase plane: horizontal E voltage, vertical I voltage. Voltage balance: mean E and I on the upper axis, E − I on a separate lower axis. Voltages are dimensionless for LIF / adaptive LIF, and model mV for Izhikevich / Hodgkin–Huxley.
Nominal Δt changes the spectral analysis clock and the 5-second Welch window, not the neural simulation equations. HH membrane integration advances 0.10 model ms per network step; the nominal plotting Δt is independent and the nominal frequency axis is not the HH model frequency axis. Even at 500 Hz Nyquist, nominal Hz is not calibrated physiological Hz. Signal: fraction of excitatory neurons spiking at each simulation step, measured in the central patch (radius 22 cells) or across the full lattice. The 5 s mean PSD uses a moving-window Welch estimate with frequencies in nominal Hz. The Morlet CWT is displayed only as a scalogram, updated approximately every 84 simulation steps, with its own axis in cycles/step. Both estimates come from the same actual spike-rate signal. Wavelet edge estimates are approximate; orange lines mark stimulus onsets.
What is simulated?
The 160×160 E and 160×160 I periodic lattice supports four interaction modes: local spatial fields; a 256-region Watts–Strogatz-type rewired small-world graph; a 256-region Erdős–Rényi G(n,p) random graph; and a soft top-K winner-take-all competition across regions. Graph edges link region-average spiking traces rather than individual neurons, preserving local field interactions and periodic boundaries. WTA is a competitive mechanism, not a graph class. These topology options do not reproduce an explicit-neuron Brunel (2000) graph. A single spatially periodic (toroidal) two-population E/I lattice is simulated; the left/right edges and top/bottom edges are identified through wraparound, while synaptic interactions remain spatially local, not all-to-all. The Torus view depicts the periodic topology. The Sphere view is an artistic texture mapping with different geometry. A recurrent two-population E/I lattice is simulated with your choice of LIF, adaptive LIF (with spike-triggered recovery), or Izhikevich neurons (regular-spiking E and fast-spiking I). All three produce discrete spikes and drive spatial E→E, E→I, I→E and I→I interactions. Recurrent synaptic fields can be delayed using a characteristic-distance conduction approximation. The central perturbation is an added Gaussian external input to excitatory neurons, with adjustable intensity, spread and pulse duration. The Hodgkin–Huxley option has classical one-compartment Na⁺, K⁺ and leak conductances and m/h/n gating in both E and I populations. The HH simulation integrates 0.10 model ms per network step; normalized recurrent fields are heuristically mapped to injected current density instead of conductance synapses. The Brunel-balanced preset is a Brunel-inspired inhibition-dominated heuristic with stochastic external drive inside this equal-sized spatial E/I lattice, not a faithful Brunel sparse random network or proof of a balanced asynchronous irregular state.
How is the artwork made?
The torus view illustrates the periodic local lattice but does not draw optional nonlocal region-to-region graph edges. Colors encode exponentially smoothed excitatory spike traces. Palette, hue, contrast and 3D projection alter the rendering only. The 3D surface, rolled sheet, sphere and torus visualize the same 2D numerical field; none is a neuronal anatomical reconstruction. Only the torus depicts both periodic identifications topologically. The pulse marker is an overlay, while stimulation directly enters neuronal dynamics. Results depend on the model, coupling, stimulus history and random seed. This is an exploratory periodic-lattice SNN, not a validated biological model or proof of a mathematical Turing instability.