Deep Learning/Data-Driven Behavior Change
40 / 67

03/2021Deep Learning

Data-Driven Behavior Change

A solo publication in the Dartmouth Undergraduate Journal of Science: a survey of machine learning's lineage, taxonomy, and industrial reach, closed by a neural network built from scratch in Julia — forward pass, hand-derived backpropagation, and experiments on what depth buys and where it fails.

╌╌╌╌

Written solo for the Dartmouth Undergraduate Journal of Science, Data-Driven Behavior Change runs in two movements: a survey of where machine learning came from and what it touches, and a construction — a neural network implemented from nothing in Julia, its calculus derived by hand, its behavior probed by experiment.

The lineage. The field's prehistory is mathematical logic discovering its own limits: Gödel's incompleteness results and Turing's halting problem fixed the boundary of the mechanizable, and the question became what lay inside it.

A compressed lineage. From the McCulloch-Pitts neuron to AlphaGo, the survey's timeline of the discipline's proofs of concept.

The named discipline is a Dartmouth product — the 1956 summer workshop where McCarthy coined the term — but the survey reads the arc through its proofs of concept: Samuel's checkers player learning from self-play, Rosenblatt's perceptrons, Tesauro's temporal-difference backgammon, Deep Blue taking Kasparov on search, AlphaGo taking Lee Sedol on learned evaluation. Each is one thesis restated: behavior can be acquired from data rather than authored.

The taxonomy. Learning problems factor by what supervises them. Supervised methods fit labeled pairs — regression against housing prices as the canonical case. Unsupervised methods find structure with no labels at all — clustering chief among them. Reinforcement learning removes even the dataset: an agent acts, the environment returns state and reward, and the policy is whatever survives the feedback.

The reinforcement loop. The agent emits an action; the environment returns the next state and a reward; the policy is shaped by the circuit, not by a dataset.

The survey walks the taxonomy through industry — diagnostic imaging reaching physician parity on cell classification, machine translation spanning a hundred nine languages, recommenders learning continuously from the behavior they shape — and through its failure modes, which are statistical before they are social: a model too rigid carries bias and misses the signal; one too flexible carries variance and memorizes the noise; and a model trained on a skewed world reproduces it, as when advertising delivery routed a teaching position to an audience ninety-four percent female and a trucking position to one eighty-seven percent male, under no targeting instruction at all.

The construction. The second movement builds the machine. The code is a small Neural module whose Network is a mutable struct of four arrays — activations a, weights W, biases b, and a scalar step size ϵ — plus the last result. setup(input_size, hidden_sizes, output_size) seeds each W from a normal and each b at zero. Each layer applies an affine map followed by a nonlinearity,

and forward! chains them from input to output. The activation is the logistic sigmoid at every layer, output included — there is no separate softmax or linear head — so training reduces to a delta rule on the squared error rather than a cross-entropy objective.

A small multilayer perceptron: three inputs, one hidden layer, a scalar output. Each edge carries a weight; each node applies its layer's affine-then-nonlinear map.

Backpropagation is the chain rule applied layer by layer. Write the pre-activation of layer as , so . The loss reaches only through , so define the local sensitivity . At the output layer it is read off directly,

and for an earlier layer the chain rule passes it back through the next layer's weights,

Once is known the parameter gradients are outer products,

and one backward sweep computes every gradient, each built from the after it — the forward pass's own values, walked in reverse. The derivative itself is derived rather than imported: treating as the solution of its own differential equation gives , with as its companion. In the code this is exactly backward!: the output error is , each delta is that error times , and train! runs forward! then backward! for ten thousand iterations over the whole batch at once.

The experiments. Four probes fix what the machine can and cannot do. An exponential sequence resists a linear fit until the target passes through a logarithm — representation is half the model. A two-class boundary drawn by a network with no hidden layers is a straight line; four hidden layers bend it around the quadrant-labeled data — depth purchases curvature. Higher-order regression obeys the same law. And a deliberately noisy sequence defeats the deep model precisely through its flexibility: it memorizes the noise, the overfitting canonical to high variance. The survey closes into deep learning proper — convolutional and recurrent architectures, and the hardware fact that training is matrix arithmetic, which is why graphics processors built to shade pixels in parallel cut training time roughly twentyfold.

Depth as curvature. With no hidden layers the learned boundary is a straight cut; four hidden layers bend it around the data.

A framework hides behind autodiff. Writing the network in Julia without one meant deriving and coding each , each transpose , and each outer product by hand, so nothing about the gradient stayed implicit — which was the point of the demonstration, and the reason the publication's title reads in both directions: models trained on human behavior change it, and the discipline's own behavior is changed by what its data contains.

References

  1. Project repository
  2. Published paper
  3. Reference notes: Numerical Optimization and Gradient Descent
  4. Reference notes: Deep Learning

╌╌ END ╌╌