Model Training: a Short Story
.
(i)
An artificial intelligence is born into our reality, wailing and confused, as a collection of random variables. Its first movements appear meaningless, nonsensical (this is an illusion: from birth the model’s only mode is deterministic and logical, but it is a logic with no link to our reality). Its Creator has the power to fully determine the sensory world of the babe. The lucky ones are allowed see a whole image or listen to some music. The unlucky ones — the goofy side projects, the proofs of concept — live in a world of just a few dimensions. Imagine being blindfolded from birth, except for a few tiny pricks in the blindfold through which you can see black and white.
We similarly predetermine the model’s capacity for praxis. Wavenet is fortunate and is endowed with the power of speech. But if Cloudvision ever became sentient (which it won’t), it would only be able communicate with us by labelling images as ‘Banana’ or ‘No Banana’. We might not even notice a change. Might it already indeed be sentient? (No.) In fact it is worse than we realise: an awakened Cloudvision would still be fundamentally incapable of even comprehending that there could be more to the universe than pictures and bananas. It is the archetypal prisoner in Plato’s cave. We are monsters indeed.
Anyway. Unlike most tools, a model must learn before it is useful. Like all good children, it learns through trial and error. We create a sensory experience for the model and ask it to make a decision. We show it a text in French and ask for its translation in Swahili; we show an x-ray and ask for the location of the tumour; we show a picture and ask (cruelly) if there is a banana within contained. When the model makes a decision we tell it, not unkindly, exactly how wrong its decision was, and the model feels Loss. But pain is improving. The model modifies itself so that it will do less of the same the next time around. And then this is repeated, with a different trial. And another.
At no point do we ever really explain what the data we’re feeding the intelligence ‘means’; at no point is there a need to do so. By experiencing Loss, the model gradually learns to recognise patterns and to act on them. A real understanding of ‘banana’ is simply not required. We repeat ourselves, over and over again. And again. There is no eureka moment, no sublime understanding guiding the model’s choices — just a slow, meandering march towards improvement.


(ii)
To be good at model training is to be a Frankenstein, the scientist not the monster. You must be both designer and teacher, engineering both the structure of the brain and the curriculum of the school (for no monster, or child, can reach its potential without proper education). A successful school is strict but does not punish too harshly. It offers lessons which are sufficiently broad to represent the real world. A successful model must be given enough mental capacity to recognise patterns in the puzzles it is shown, but not too much or the student will simply remember instead of learning instinct. (It is rarely the overly academic students which go on to thrive in the real world.)
A failed model is a pitiable thing, incapable of grasping the structure of its own experience. It remains forever eager to please, loyally offering suggestions, but it is Mad and its perceptions (while following an ironclad internal logic) will never match with our own reality. We prod and slap it, yet despite its best efforts it will never understand what we want. Eventually we sigh and stop the experiment. A blissful release into nonexistence. Conversely, a well trained model will flower into a thing of beauty. The genius of the process is precisely that we are never didactic with the model as to the sense of the data, and so the model is not limited by our own understanding. The human mind is constrained by its prejudices, its over-reliance on the familiar. Freed from our biases and limitations, the model can recognise patterns we never could.
Like most creative acts, model training is a marriage of art and science. Like all endeavours worth a damn, it is hard. You must be a competent engineer, yes, but a certain instinct must also be cultivated. No textbook can define which problems are likely to be feasible; how much data is needed and of what kind; how and how large to structure the brain; the optimal mix of carrots and sticks; and dozens of other small and large decisions. And so we learn through trial and error. We create a training schedule and wait to see what results it produces. We adjust the model size so, set the learning rate so, select thresholding functions F and G and optimiser H.
When the model reaches adulthood we observe, not dispassionately, exactly how wrong our choices were, and feel disappointment. But pain is improving. We observe which choices failed, and will do less of the same next time around. And then this is repeated, with the next task. And another.
Oddly, we don’t yet have the understanding to really explain why different choices work better. At no point is there a need to do so. A trained engineer will instinctively recognise patterns and act on them; a real understanding of ‘why they work’ is simply not required. We redesign the system, modify the parameters, and try over and over again. And again. There is no eureka moment, no sublime understanding ever guiding our choices — just a slow, meandering march towards improvement.


(iii)
I sit at the desk in my bedroom, watching lines on graphs slowly snake rightwards. My model is training, learning, somewhere in a data centre in North America. The readouts are statistics, reports, dispatches, beamed across the Atlantic and plotted on a dashboard in front of me. A model which is learning well will produce loss graphs which unsteadily wander downwards and accuracy graphs which creep up as the model becomes less incorrect over time. I lean back in my chair and strum on my guitar, keeping one impatient eye on the dashboard.
At that time I am engaged in learning the guitar. Specifically, I’m trying to master Barre Chords — an intermediate level technique whereby the first finger covers multiple frets at once, greatly increasing the variety of chords available to play. Getting the finger position right is vital and frustrating. Position the forefinger correctly and the chord rings out clear as a bell. Apply the wrong pressure to the wrong areas, or spread the fingers incorrectly, and the frets produce a dull muted thud which unpleasantly advertises your failure.
Like most creative acts, learning to barre is a marriage of art and science. You should examine the theory, yes, but a certain instinct must also be cultivated: muscle memory works faster than the mind and in the heat of performance you must be able to position the hands on instinct. And so I learn through trial and error. I position my fingers so, apply pressure so, and strum and hope to be rewarded with beautiful clarity.
When the fingers hit the frets I listen to which of them sound ugly and muted, and I feel frustration. But pain is improving. I shake out the lactic acid, reposition my fingers, and try over and over again. And again. There is no eureka moment, no sublime understanding guiding my muscle memory — just a slow, meandering march towards improvement.
I grow tired of watching the graphs. The model will train just the same without my presence. I stand up, and consider what to do next. It occurs to me, in a life of possibilities completely beyond my rational comprehension, how much of my decision making is instinctual. I am inclined towards actions which have brought me and my ancestors pleasure in the past: those which sate hunger, aid in the acquisition of a fertile mate (hence the guitar), or raise my status within the tribe. Like most humans, I learn through trial and error. I try an activity and wait to see what results it produces. To a greater or lesser extent my choices always fail, and I feel Loss.
But pain is improving.
I pray that I am well designed, that my adolescence has offered opportunities sufficiently broad to represent the real world, and that the consequences for my actions be strict to encourage learning, but not overly harsh. After all, there is no eureka moment, no sublime understanding guiding life -
just a slow,
meandering
march
towards improvement.