CruxTok: Letting the First Level Choose What Matters

My research preprint. Next-Concept Modeling writes text coarse-to-fine, but its first level just averages fixed chunks of words. I built CruxTok to let that level attend to the words that matter. It rebuilds sentences much better, but similar meanings still don’t get similar codes.
Research
GenAI
NLP
Machine Learning
Author
Published

November 5, 2026

This continues my Next-Concept Modeling post. The preprint is out on Zenodo, and the code, configs and evaluation outputs are on GitHub.

Top: NCM averages fixed chunks of words into 4 codes, while CruxTok's 4 codes each attend to the words they pick. Middle: a real level-1 reconstruction, where CruxTok keeps 'footballer out with an injury' and NCM's version is unrelated. Bottom: an LLM judge picks CruxTok in 57% and 63% of items, against 9% and 8% for NCM.

The idea

NCM trains an encoder-decoder tokenizer and freezes it. Then it trains a generator to predict the encoder’s codes, level by level, the way some image models grow a picture from 4x4 to 512x512. The first level is only a handful of codes for the whole sentence, so it should hold the crux: who did what, and what happened.

But NCM builds that first level by averaging fixed chunks of the text. Each code covers its own 12 tokens, whatever they say. If the important words sit in one chunk and filler sits in another, both chunks get one code each.

To capture the crux, a code has to prioritise. That is exactly what attention does. In “Attention Is All You Need”, the scores from \(QK^\top\) decide how much each value counts, so to me it could just as well be called “Priority Is All You Need”.

CruxTok swaps NCM’s averaging for that. Each level has a small set of learned queries, and each query attends over all the words, guided by a soft prior that starts near NCM’s chunk. Everything else follows NCM. The architecture post has the full diagrams.

The setup

  • Data. XSum news summaries, cut to 48 tokens.
  • Levels. Nine levels, from 4 codes at level 1 to 48 at level 9. Each code is one of 4,096 entries in its level’s codebook.
  • Baselines. NCM’s own tokenizer, plus an NCM tokenizer given extra encoder and decoder depth so it has the same parameter count as CruxTok.
  • Runs. Two training runs of CruxTok with different seeds, 30,000 steps each.

Level 1 rebuilds much more of the sentence

I decoded 1,000 test summaries from level 1 alone and asked an LLM judge which reconstruction kept more of the who, what, where and outcome. The judge saw each pair in both orders, and a side only won if both orders agreed.

Level 1, against the same-size NCM Run 1 Run 2
Judge picks CruxTok 57% 63%
Judge picks NCM 9% 8%
Tie or order disagreement 34% 29%

An embedding model agrees. The level-1 reconstruction’s similarity to the original rises from 0.34 to 0.45. With three levels, CruxTok gets 60% of tokens exactly right, against at most 47% for the NCM baselines.

The examples are still rough. In the image above, CruxTok turns a West Ham striker with a hamstring injury into a Newcastle midfielder with an ankle injury. Names, places and numbers are often wrong. But the type of event usually survives, while NCM’s level 1 is mostly unrelated text.

The attention does move

If the queries just stayed on their starting prior, CruxTok would be NCM with extra parameters. They don’t. At level 1, the attention after training is narrower than the starting prior, about 15 tokens wide against 21. It also changes from sentence to sentence, which fixed chunks never do.

This shows that the attention moves. It does not show that it moves toward meaning.

Similar meanings still don’t get similar codes

The second thing I hoped for was a meaning-organised code space. Two sentences that mean the same thing should get similar first-level codes. That is what would make level 1 easy for a generator to predict.

It didn’t happen. On STS-B, a sentence-similarity benchmark, I scored how well code similarity tracks human similarity ratings, as a Spearman correlation.

Level 3 codes STS-B Spearman
NCM, same size 0.28
CruxTok, two runs 0.02 and 0.03
Word overlap alone 0.57

The deeper NCM baseline is clearly better here, and simple word overlap beats every tokenizer.

So rebuilding a sentence well and grouping similar meanings together turned out to be two different goals. Learned attention gets the first one, not the second.

A training snag

CruxTok kept blowing up in bf16 training. The attention weights grew about 50-fold and the logits reached about \(10^7\). RMS-normalising the queries and keys in each head, a known fix for this failure, removed it. With learned pooling, every level also needs its own gradient path. When I tried to skip that for the deeper levels, their outputs collapsed to almost zero.

What’s next

This is one dataset of short sentences, with a reduced training budget. The big open question is untested: does a more decodable first level actually make coarse-to-fine generation better? That needs a generator trained on top, which is the next step.

The full details, numbers and limitations are in the preprint.