# Perplexity, intelligence and pretraining corpus mix

> Source: <https://micjm.com/blog/perplexity-intelligence-pretraining-corpus-mix/>
> Published: 2026-11-22 23:05:36+00:00

**Recommendation:** When comparing log-perplexity across models, control for pretraining corpus mix, since code share alone explains much of the variance (r² 0.75 in RegMix data).
More in the playbook "Fine-tuning and data": <https://wpnews.pro/playbooks/training-data>

# Perplexity, intelligence and pretraining corpus mix

Earlier today, I published [a blog post](https://micjm.com/blog/lowering-perplexity-without-scaling/) showing that if you increase the proportion of code in pretraining, you will get lower log-perplexity in evaluation. This was in response to [OpenAI’s blog](https://openai.com/index/perplexity-and-intelligence/) today.

After publishing, I found [a project](https://github.com/sail-sg/regmix) that had actually randomized contents of pretraining and published log-perplexities on the various components. Basically, they’d already done an experiment to prove the relationship I was alleging.

Here’s the data from their experiment, you can see how closely log-perplexity for code tracks code content.

The r² of this chart is 0.75 and the p-value of this relationship is about 4×10⁻²⁰.

For fun, I asked an agent to cherrypick the data and generate a similar chart to OpenAI’s, just using the various points here. We even have an impressive internal model (that’s just 50% code in pretraining).

Do we know that OpenAI is increasing the component of code in its pretraining over time? No, but I think it’s a good bet. Can we say that this explains the full drop in log-perplexity? Absolutely not and it’s unlikely. Can we say that there is some confounding here and that OpenAI should have used a more balanced corpus to generate log-perplexity? I think so.
