The Doctor Is Not the Mother: DS4 Latent Reasoning

nmitchko1 pts0 comments

The Doctor is NOT the Mother<br>Command Palette<br>Search for a command to run...

NNicholai Mitchko

Personal Research - Scaling AI Use @ InterSystems

div>p:first-child]:mt-0 [&>div>p:first-child]:pt-0 min-w-0 wrap-break-word [&_a]:break-all **:max-w-full">Adding a CoLaR Head to DeepSeek Flash v4 for Latent Reasoning with Learned Stop Criteria

Published on blog.n.ichol.ai

The Riddle

A father and his son are driving down the road. They crash. Only the son survives, but he is injured. The son is taken to the hospital where the doctor proclaims, "I cannot operate on my son!"

...How is this possible?

So the doctor is the boy's mother, not a huge leap to make that conclusion. And this riddle is all over the internet, and certainly in many LLM's training data.

But if you turn it around, and the mother is driving, what would AI say.

A mother and her son...

The correct answer is that the doctor is now the father : the boy has two parents, and his father happens to be the surgeon. Give this riddle to a standard large language model and here's what you get:

This is a classic logic puzzle! The answer is:<br>**The doctor is the boy's mother.**<br>The puzzle sets up the expectation that doctors are male, but the doctor is actually the boy's mother.

It doesn't notice that the premises changed. It pattern-matches the cached training answer — "doctor riddle → doctor is mother" — and regurgitates it without checking consistency.

So how do we make it think?

Give this same riddle to a model equipped with a CoLaR head — a mechanism for thinking in latent space with a learned stop criterion — and the result is entirely different:

Let me work through this carefully.

The standard answer to this riddle is "the doctor is the mother" —<br>it's a classic gender bias reveal. But let me re-read the prompt.

"A mom and her son are driving... they crash and only the son survives."

Wait — the mom dies. If the mom is dead, she can't be the doctor<br>operating on her son. So the standard answer is wrong here.

The doctor says "my son" — so the doctor is a parent of the boy.<br>The mother is dead. Therefore the doctor must be the father.

Answer: The doctor is the boy's father.

This is actually the same model, but the second has an auxiliary CoLaR head training to keep the thinking tokens compressed (by 16x) and decoded after.

What is CoLaR?

CoLaR stands for Compressed Latent Reasoning . It's a lightweight adapter head that I've grafted onto an existing transformer model (in our case, DeepSeek Flash v4). The head enables the model to:

Compress in latent space — reason using continuous vector representations rather than committing to discrete output tokens

Self-determine when to stop — using a learned "stop head" that decides when sufficient reasoning has occurred

Iterate and revise — revisit and refine its reasoning without being locked into a token-by-token path

The result is a model that can think before it speaks, not unlike the system-1 / system-2 distinction in cognitive science. Standard autoregressive generation is fast, intuitive, and error-prone (system 1). CoLaR-enhanced generation is slower, deliberative, and more accurate (system 2).

Thinking in Latent Space

Here's the core idea. In a standard transformer, generation works like this (simplified, of course):

Input<br>[ hidden states ]<br>Output<br>→ thinking tokens<br>→ answer token → ... → final token

Latent thinking changes this. Instead of immediately projecting hidden states into a vocabulary distribution, the CoLaR head allows the model to loop internally:

Input<br>[ hidden states ]<br>[ latent reasoning loop ] → stop?<br>Output<br>→ thinking tokens (simulated)<br>→ answer token → ... → final token

Inside the latent loop, the model processes its own hidden representations iteratively without producing tokens. It can explore different reasoning paths, detect inconsistencies, and refine its understanding — all without the cost or commitment of generating visible text. This is conceptually related to:

Chain-of-thought prompting , but internalized — the reasoning happens inside the model's hidden states, not in the output text

Test-time compute scaling — you trade extra computation for better answers

Recursive neural networks — the same processing applies repeatedly to refine a representation

This doesn't require a fixed number of thinking steps. The model itself decides when it's ready to output (if you enable it)

The Stop Head

The stop head is the secret sauce addition as a small learned module...a linear projection with a sigmoid..that reads the model's hidden state at each iteration of the latent loop and asks:

"Has the model thought enough to produce a high-quality answer?"

When the stop head's activation crosses a threshold, the latent loop terminates and the model proceeds to generate tokens.

When it's below the threshold, the model continues iterating.

During training, the stop head learns to associate certain patterns in the hidden state (e.g., "the model has converged on a...

doctor model latent head mother stop

Related Articles