Overshooting the Condition on Purpose
Last timeWhat the Prediction Really Is
A condition handed to the network is honoured too weakly, and the standard fix is to measure its effect on the prediction and then deliberately overshoot it.
Everything so far generates pictures with no say in what they contain. Adding a
condition, a class or a line of text, is easy enough: pass it to the network as
an extra input and train as before. What is surprising is that this works
correctly and is not good enough.
The condition is honoured on average
A model trained this way learns the distribution of pictures that match the
condition, and in any real collection that distribution is loose. Images
captioned as a dog include photographs where a dog is one object among many,
poorly lit, or half out of frame. Sampling faithfully reproduces all of it. The
condition is satisfied in the aggregate and frequently not in the sample on the
screen.
- the prediction with the condition supplied
- the prediction with the condition replaced by a blank
- the strength, typically between 5 and 10 for text conditioned models
- what is handed to the sampling step in place of a single prediction
- how plausible the picture is on its own terms, with no reference to the condition
- how well the picture agrees with the condition, as implied by the model
- the strength, now visible as an exponent rather than a multiplier
| Strength | Agreement with the condition | Variety of output | Overdone appearance | Two calls per step |
|---|---|---|---|---|
| 0 | ignored | full | none | no |
| 1 | loose | full | none | no |
| 7.5 | tight | reduced | slight | yes |
| 20 | very tight | poor | strong | yes |
What the strength is doing to the distribution
The honest setting is the second row, and its loose agreement with the condition is
what people complain about. The last row is what happens when the complaint is
answered too enthusiastically. The usual default sits in the third row and is a
judgement about taste, not a value anything derives.
The lesson stops here
2 more paragraphs to go
You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.
The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.
See the planThe contentsThis is the reading half
Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.
The contents