← All topics

ml theory

4 captures, most recent first.

François Fleuret @francoisfleuret

— saved image

François Fleuret  @francoisfleuret

Some people in the comments are missing one of the fundamental trick / source of limitation of the transformer.

This model identifies the sequence index and the token index in what would be its "internal state".

1/4

[quoted post]
François Fleuret  @francoisfleuret · 7h
Due to its causal structure, a transformer processing "The cat hunts the mouse" can enrich <mouse>'s embedding with "is hunted by a cat" but cannot symmetrically enrich <cat>'s embedding with "is hunting a mouse"....

4:38 AM · Nov 17, 2026 · 7,700 Views

[replies 2, reposts 2, likes 65, bookmarks 60]

Relevant                                  View quotes >

François Fleuret  @francoisfleuret · 2h
So it's not as if you had a state

S(t) = { x_1(time=t), ..., x_t(time=t) }

What you do have is

S(t) = { x_1(time=1), ..., x_t(time=t) }

2/4
[replies 1, likes 12, views 1.4K]

François Fleuret  @francoisfleuret · 2h
It's a wonderful trick since you pay[cut off]
Note from Claude Sonnet 5

X thread screenshot by François Fleuret (@francoisfleuret) on a fundamental trick and limitation of the transformer: its causal structure means the model identifies sequence index and token index in its 'internal state', with a quoted post about enriching <mouse> but not <cat> embeddings and a reply contrasting state S(t) with time-indexed past activations.

transformerscausal attentioninternal statearchitecture limitationsml theory

@willcb

— saved image

will brown [verified] [badge] @willcb · 15h
i often hear people talk about RL as if it's just "an algorithm" which might or might not be the "right one" and speculate that we might "find a better one"

the issue with this is that all algorithms have some implicit goal of "solving a problem" or "improving an objective" and RL is just what pops out when you take the gradient for your objective

if you're doing any algorithm other than RL, you are giving up on optimizing your on your ultimate objective directly and leaning on a proxy instead. this is often useful, because your objective might be imprecise, and you might have access to some teacher signal (a static dataset, a teacher model, process evaluation) which trades off unbiased optimization for robustness or reducing sampling costs. but if what you care about can be made explicit, there aren't any shortcuts. policy gradients are minimum variance unbiased estimators for progress.
Note from Claude Sonnet 5

Will Brown tweet arguing RL is not just one algorithm among alternatives but what results from taking the gradient of your objective directly, and that other methods lean on proxies.

reinforcement learningpolicy gradientsobjectivesproxiesml theory

@yifeiwang77

— quoting @YouJiacheng — saved image

Yifei Wang @yifeiwang77 · 13h

Very intriguing discussion here to rethink policy gradient: we always want to optimize E_p[R], so we would need the IS techniques that introduced all variance.

Score centering is taking a different view: let's just optimize E_q[R], as q (sampling distribution) is what we finally care about. As samples are indeed from q, no IS is needed.

And since we cannot optimize q (inference engine/ old policy) directly, we just use p's grad as a surrogate to q's grad (yes its biased), as explained in the STE estimate here.

A change of perspective (from optimizing p obj to q obj) gives a lot of simplicity!

[quoted post]
You Jiacheng @YouJiacheng · Sep 20
Actually this argument is not limited to linear policy.
Consider the gradient w.r.t. logits.
s = ∇_z log p(a) = e_a - p
\bar{s} = E_{a~q}[e_a - p] = (q - p)... [cut off]
Note from Claude Sonnet 5

A text tweet by @yifeiwang77 on rethinking policy gradient: optimizing E_q[R] over the sampling distribution via 'score centering' avoids importance sampling, using p's gradient as a biased surrogate (straight-through-style). Quotes a @YouJiacheng post with a logit-gradient derivation, cut off at the bottom.

policy gradientrlimportance samplingscore centeringml theoryllm training

kalomaze @kalomaze

— saved image

kalomaze @kalomaze · 50m
periodic functions seem like the most fundamental class that conventional nonlinearities can't generalize over, even with depth
even tho you have exponentially many piecewise linear regions with ReLU-likes, that's not sufficient to extrapolate a sine wave...
Note from Claude Sonnet 5

A tweet from kalomaze arguing that periodic functions (like sine waves) are a fundamental class conventional neural network nonlinearities (ReLU-likes) can't extrapolate/generalize over, even with depth or many piecewise-linear regions.

neural networksnonlinearitiesgeneralizationperiodic functionsml theorytwitter