Idea · Aug 14, 2026

From-Scratch Neural Net with Live Visualization

Students implement a two-layer feedforward neural network in vanilla Python or TypeScript, then build a browser-based D3 visualization that animates forward-pass activations and gradient flow during backpropagation, culminating in a live-trainable demo on XOR or a 2D toy dataset.

What it would do

This assignment is a direct classroom application of the SIGCSE TS 2026 finding that students who build machine learning models from scratch score roughly 10% better on conceptual understanding than library-first students. The deliverable has two layers. Layer 1 (weeks 1-2): students implement, from scratch, a two-layer feedforward network including forward pass, sigmoid or ReLU activation, cross-entropy loss, and backpropagation via chain rule in pure Python (no NumPy, no PyTorch) or TypeScript. They write unit tests for each component. Layer 2 (weeks 3-4): students build a React + D3 frontend that consumes their network's internal state and visualizes it in real time: nodes sized by activation value, edges colored by weight sign and magnitude, a loss curve updating each epoch, and a decision-boundary overlay animating over a 2D scatter plot. The final demo lets visitors pause training mid-epoch, scrub backward through gradient history, and inspect any neuron's activation. The assignment teaches backpropagation conceptually (you cannot copy-paste what you have not internalized), professional toolchain discipline (code is tested before visualized), and data visualization design in one coherent arc.

Key features

  • Vanilla implementation of forward pass, sigmoid/ReLU, cross-entropy loss, and backprop via chain rule (no ML libraries)
  • Unit-tested network components with gradient-check tests
  • Real-time D3 visualization: node activations, edge weights, loss curve, and decision boundary
  • Pause, scrub, and inspect controls for mid-epoch exploration
  • Configurable architecture (hidden layer size, learning rate, activation function) via a sidebar panel
  • Demo mode: students train live in front of the class on XOR or a 2D dataset of their choosing

More in AI Literacy & Ethics

Competitive Prompt Engineering Lab

A multi-week assignment where students iteratively engineer prompts against a fixed benchmark test suite, studying which strategies improve AI code generation quality and why.

AI Literacy & EthicsClass assignmentLargeAug 18, 2026

Dataset Ethics Audit Pipeline

Students build a CLI tool and React dashboard that ingests any tabular dataset and produces a structured ethics audit report covering demographic balance, historical bias, missing consent signals, and intersectionality gaps — with a remediation roadmap.

AI Literacy & EthicsClass assignmentLargeAug 11, 2026

Self-Narrating Game Agent

Students build a simple game and an AI agent that plays it while narrating every decision in natural language -- then evaluate whether the narrations are faithful explanations or post-hoc rationalizations.

AI Literacy & EthicsClass assignmentLargeAug 2, 2026

Federated Learning Privacy Lab

Students build and experiment with a browser-based federated learning simulation — local models, gradient aggregation, and adjustable differential privacy noise — so they can directly observe the privacy-utility tradeoff without any GPU or server setup.

AI Literacy & EthicsClass assignmentLargeAug 1, 2026

All 110 ideas in AI Literacy & Ethics →