Hello, I'm Rijul, and I'm building LiveReview — a blast-radius aware AI code review built for your business-critical systems. Star us to help devs discover the project, give it a try, and share your feedback to help improve the product.
When you are using AI tools, it is useful to know that there are different ways an AI model can generate text.
Today, most deployed language models use one main approach, but other approaches are emerging as well.
Here, I'll introduce you to two different approaches to generating text.
The first is autoregressive generation.
The way autoregressive generation works is quite simple.
The model generates one token at a time, moving from left to right.
For example, if we ask the model:
The cat is sitting on the ___
The model might first predict:
mat
Then it uses everything generated so far to predict what comes next.
So the process looks something like:
The
↓
The cat
↓
The cat is
↓
The cat is sitting
↓
The cat is sitting on
↓
The cat is sitting on the mat
This is the approach used by most deployed language models today.
The important thing to notice is that the process is sequential.
The model needs to generate one part before it can move on to the next.
Once a token has been generated, the model doesn't normally go back and revise it as part of that same generation process.
This also limits parallelism because the next token depends on the tokens that came before it.
Now, let's look at an emerging approach that works quite differently.
Diffusion is more like sculpting.
Imagine you are making a statue. You start with a rough shape and then keep refining different parts until you get the final result.
Diffusion-based text generation follows a somewhat similar idea.
Instead of starting from the first token and generating one token after another, some diffusion language models can start with a sequence containing multiple masked or uncertain positions.
For example:
The [MASK] is [MASK] on the [MASK].
The model can work on multiple positions rather than being forced to complete them strictly from left to right.
For example, multiple positions could be refined in the same step:
The [MASK] is [MASK] on the [MASK].
↓ ↓ ↓
The cat is sleeping on the mat.
But the process doesn't necessarily stop there.
The model can revisit and refine parts of the sequence based on the surrounding context.
The cat is sleeping on the mat.
↓
revisit
↓
The cat is sitting on the mat.
Here, the model could change an earlier prediction:
sleeping → sitting
The exact way this refinement works depends on the diffusion model, but the key idea is that the model can iteratively refine the sequence rather than only moving forward from left to right.
So the process is less like:
Token 1 → Token 2 → Token 3 → Token 4 → ...
and more like:
Multiple uncertain positions
↓
Fill / refine them
↓
Revisit uncertain parts
↓
Refine again
↓
Final sentence
This also creates opportunities for more parallel processing, since multiple positions can potentially be worked on at the same time.
Some models exploring this approach include LLaDA, Dream-7B, and Mercury.
Since this is still an emerging approach, performance varies across models and tasks, while autoregressive generation remains the dominant approach today.
So why are people interested in this approach?
One potential advantage is parallelism.
If multiple parts of the sequence can be processed at the same time, diffusion-based generation could potentially produce responses faster.
It could also potentially reduce the cost of generation if that parallelism can be used effectively.
Of course, this doesn't mean diffusion is automatically faster or cheaper in every situation. The actual performance depends on how the model and inference system are designed.
You can think of the two approaches like this:
Autoregressive: Write the sentence one word at a time, from left to right.
Diffusion: Rough out different parts of the sentence and keep refining them until the final version emerges.
That's the fundamental difference in how they approach text generation.
There are still many new developments happening in how AI generates text.
Autoregressive generation is the dominant approach today, but diffusion-based language models are exploring a different way of generating text.
And the interesting part is that this area is still evolving.
We are already seeing newer ideas emerge, such as soft masking, which takes the idea of masking and makes it more flexible.
So, even something as fundamental as how an AI writes a sentence is still being explored.
Your team's attention is limited, and the deluge of AI-generated code is making it harder to keep production reliable and secure without slowing you down.
I'm building LiveReview, a blast-radius aware AI code review built for your business-critical systems.
Instead of presenting every diff with equal emphasis, LiveReview scores each change by blast radius — how far its impact reaches through your call graph — so you can focus attention where it actually matters.
Spend code review effort where business risk is highest — not spread evenly across every diff.
⭐ Star it on GitHub:
LiveReview is an AI code reviewer that scores every hunk of a diff by blast radius: how far a change reaches through your call graph, how much persistent state it touches, and how well-tested it is. A 3-line change to a shared auth check can outrank a 300-line UI tweak. Your team's attention goes to the highest-risk code first, not spread evenly across every diff.
LiveReview's Blast Radius & Review Priority scoring, live in the diff viewer.
| The exact math, not a black box | Visualize blast radius at a glance | Every factor that feeds the score |
|---|
Here's the goal:
Click below to try LiveReview with your codebase: