Overview
Can a model reason longer without writing every step?
Visible chain-of-thought gives a language model extra tokens for intermediate work, but those tokens increase output length and expose the full reasoning trace. TokenMix investigates an alternative: recurrent computation in latent space before the answer is decoded.
The project is both a model experiment and an evaluation system. The useful result is not one headline accuracy number, but a reproducible comparison across training objectives, arithmetic difficulty and compute strategies.
01 / Research question
Compare reasoning strategies under controlled conditions.
I implemented three families of GPT-2-based models: direct answer prediction, visible chain-of-thought generation and recurrent latent computation. Holding the task family and evaluation pipeline constant made architectural differences easier to interpret.
Carry-balanced addition was used because carries create identifiable difficulty. It supports overall accuracy measurement while also allowing errors to be grouped by carry pattern.
02 / Experimental system
Build reproducibility into the architecture.
I created deterministic data generation and shared training and evaluation workflows so model variants could be compared against the same distributions. The system records accuracy and latency, with further analysis by digit length and carry vector.
- Controlled generation of arithmetic examples.
- Common experiment configuration across model variants.
- Evaluation by exact answer accuracy and inference cost.
- Failure analysis that goes beyond aggregate scores.
03 / Latent computation
Separate internal compute from visible output.
The recurrent variant reuses a computation block in latent space before producing an answer. This creates a tunable internal-compute budget without requiring the model to emit an equivalent number of reasoning tokens.
I also examined adaptive routing: allocating additional recurrence when an example appears to need it, rather than applying the maximum compute depth to every input.
04 / Curriculum and analysis
Test whether easier structure transfers upward.
Curriculum experiments progressively increased arithmetic difficulty instead of training only on the final digit length. The five-digit curriculum run reached 99.25% exact-answer accuracy.
I treated that result as evidence for the specific experiment, not a universal model claim. Carry-vector breakdowns, latency and transfer behaviour remained necessary to understand where performance came from and where it failed.
Observed on the five-digit curriculum experiment within the project's controlled evaluation workflow.
05 / Engineering decisions
Design the codebase around comparable experiments.
Model configuration, data generation, training and analysis were kept as distinct concerns. This reduced the chance that a change intended for one variant silently altered the evaluation of another.
The work strengthened my understanding of experiment architecture: deterministic inputs, explicit configuration and failure-level analysis are as important as the model implementation itself.
06 / Limitations and next steps
Arithmetic is a useful probe, not a complete theory of reasoning.
The experiments operate on a narrow synthetic task and small GPT-2 variants. Strong arithmetic accuracy does not establish equivalent gains on open-ended language tasks.
The next useful step is to test whether routing decisions remain stable on broader algorithmic tasks, then compare accuracy and latency at matched compute budgets.
