SimulatorLanguage models
A gate with a soft edge
A gate rises from 0 to 1 around a threshold. Two hundred made-up inputs are passed through it: set how steep it is, where its threshold lies and how spread out the inputs are.
- the inputs (made up): those the gate passes in colour
- dashed: a hard step at the same threshold
- Inputs passed
- 51%
- Inputs left undecided
- 56%
- Width of the undecided band
- 1.46
- Mean output of the gate
- 0.51
Make the gate steeper and it tends to a hard step: fewer inputs are left undecided. Move the threshold through the inputs.
What the simulator does
- The gate is one half at its threshold; the band in which it is neither clearly open nor clearly shut is 2 ln 9 divided by its steepness wide.
- A steep gate behaves like a hard step and leaves few inputs undecided; a shallow one grades most of them.
- Move the threshold through the inputs to see how the share passed follows it.
In Verace Contrast
Schematic: the adaptive context gate sets how much of the second attention map is subtracted as sequence length grows. The curve follows the design formula and does not plot any recorded run.
- Adaptive context gate
- Scales the subtraction by tanh of sequence length
- Short sequences
- Behave like standard attention
- Long sequences
- Receive full cancellation
- Sequence length
- Current length, passed in and not learned
What this is not
This simulator is an illustration of the principle, with made-up numbers. It does not run the lab's code or show the lab's data, and nothing in it is a measurement.
Read the write-up