Week 08 · lesson
Investigation: Order Changes Recurrent State
system flow
From Token Sequence to a Bounded Output Claim
Token Sequence
Begin with ordered supplied tokens.
Input Value
Represent the current token with a declared teaching value.
Recurrent Update
Combine current input with the carried prior state.
Final State
Preserve the ordered trace rather than treating tokens as a bag.
Candidate Scores
Calculate supplied comparison scores from final state.
Claim Boundary
Do not infer understanding, truth, safety, or real-model performance.
Read this concept flow as plain text
- Token Sequence. Begin with ordered supplied tokens. LAB: 3 SEQUENCES.
- Input Value. Represent the current token with a declared teaching value. BOUNDARY: INVENTED VALUES.
- Recurrent Update. Combine current input with the carried prior state. RULE: 0.5S + X.
- Final State. Preserve the ordered trace rather than treating tokens as a bag. TEST: REVERSE ORDER.
- Candidate Scores. Calculate supplied comparison scores from final state. RISK: NOT PROBABILITY.
- Claim Boundary. Do not infer understanding, truth, safety, or real-model performance. ACTION: REPAIR CLAIM.
A language model estimates which tokens fit a context. A recurrent network processes one token at a time and carries a state forward. The same update rule is reused at every step, but the state arriving at each step depends on all earlier updates.
For this investigation, use an invented one-number recurrence:
new state = 0.5 × previous state + token value
This is small enough to calculate by hand. It demonstrates sequence mechanics, not the behavior of a trained RNN.
Completed trace
Use robots = 0.8, build = 0.4, and start with state 0.
robots: 0.5 × 0.0 + 0.8 = 0.8
build: 0.5 × 0.8 + 0.4 = 0.8
final state = 0.8
Reverse the same tokens:
build: 0.5 × 0.0 + 0.4 = 0.4
robots: 0.5 × 0.4 + 0.8 = 1.0
final state = 1.0
The tokens are unchanged, but their order changes the trace and final state.
Scores are not facts
The Lab turns the final state into two invented candidate scores:
safely = 1 - |state - 0.8|
quickly = 1 - |state - 0.3|
These scores expose how context state can affect an output comparison. They are not probabilities, meanings, recommendations, or evidence about real language.
Investigation
- Trace
robots buildandbuild robotsby hand. - Calculate both candidate scores from each final state.
- Explain exactly where order enters the mechanism.
- Add
quickly = 0.2as a third token and predict the new final state. - Repair: “The state remembers the sentence, so the network understands it.”
Vocabulary lab
Flip the idea, not just the card
Explain the term before you reveal the back. Then compare your explanation with the definition, example, and warning.
Read all terms without animation
- language model
- A model that assigns scores or probabilities to token sequences or token predictions. Example: Estimating a next token from preceding context. Do not confuse it with: A score does not establish truth or human understanding.
- recurrent state
- A carried numeric representation updated as sequence elements are processed. Example: The teaching state changes from 0 to 0.8 to 0.8. Do not confuse it with: It is not a verbatim memory or explanation of meaning.
- shared weights
- The same learned transformation is reused at each sequence step. Example: One recurrent cell rule processes every token. Do not confuse it with: Shared weights do not make each step's state identical.
- next-token score
- A numeric value used to compare candidate continuations for a context. Example: Safely receives 1.0 from final state 0.8 in the teaching rule. Do not confuse it with: A score is not automatically a calibrated probability.
- exposure error
- Error that can compound when generated outputs become later inputs. Example: One poor token changes the context used for the next prediction. Do not confuse it with: It is different from one isolated prediction error.