# Minerva

Google Research's new AI tackles natural language math problems and handily outperforms the SOTA[^z9ujz7hobka]. It is a pre-trained PaLM [^jhan4auwcm]finetuned on some maths datasets (which use LaTeX) composed of maths webpages and Arxiv papers (38.5B tokens). The three models trained were as follows.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/fc85eb31b589d4cdea5e6ad82e193d67011a099ea1a92319.png)

When generating answers, Minerva is given the same prompt of four questions with correct a chain of reasoning and a consistent format for the final, correct answer. Then the actual question is given. Minerva then outputs a chain of reasoning and a corresponding answer a number of times, with the most common answer chosen. Minerva is graded only on the final answer. 

This voting algorithm is called maj@1k and saturates faster than pass@k (generates k answers, if one is right then the answer is graded correctly) but doesn't perform as well for large k. This is quite reasonable, as majority voting will continue to choose the most common answer, with the estimate's error decreasing with larger k. Whereas pass@k allows the model more tries for large k.

### Datasets

The datasets used are:

*   [MATH](https://arxiv.org/abs/2103.03874): High school math competition level problems

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/ababe35bdbeae9d9ad2c43243657139e8a8526c31c1d67bb.png)

MATH dataset. Note that a PhD CS student who wasn't fond of maths achieved 40% accuracy on this dataset, and a three time IMO gold medalist achieved 90%.

*   [MMLU-STEM](https://arxiv.org/abs/2009.03300v3): A subset of the Massive Multitask Language Understanding benchmark focused on STEM, covering topics such as engineering, chemistry, math, and physics at high school and college level. 

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/d2aa633a60ba78b98585ece0afa91a41fd1dca666681843d.png)

MMLU example questions

*   [GSM8k](https://arxiv.org/abs/2110.14168v2): Grade school level math problems involving basic arithmetic operations that should all be solvable by a talented middle school student.

The datasets have questions which vary in difficulty. Predictably, the model performed worse on harder questions, with false positives linearly with question difficulty on 

### Results

Now time for a suprise quiz! For the purposes of this quiz, assume we're talking about the most accurate minerva model (540B parameters using maj1@k sampling. k=64 for MATH and k=16 for MMLU). And we'll be averaging over results on subtopics[^hnvtvvr5jdb]. Note the SOTA is OpenAI's davinci-002, which obtained absolute (averaged) scores of about 20% and 49%.

Elicit Prediction ([forecast.elicit.org/binary/questions/eMIWVdS3B](forecast.elicit.org/binary/questions/eMIWVdS3B))

Elicit Prediction ([forecast.elicit.org/binary/questions/kWY5jIKFh](forecast.elicit.org/binary/questions/kWY5jIKFh))

Elicit Prediction ([forecast.elicit.org/binary/questions/rsgoppa4v](forecast.elicit.org/binary/questions/rsgoppa4v))

Elicit Prediction ([forecast.elicit.org/binary/questions/R6Cdm6_HY](forecast.elicit.org/binary/questions/R6Cdm6_HY))

And the answers are... no, yes, yes and no. Here's the raw data.

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/a582c87764910e628707c9ae91f5e8999d662d609fdd9f7f.png)

MATH results are on the left and MMLU results are on the right.

### Random Remarks

*   I'm not so surprised by these results, given how well AlphaCode improved over the SOTA then, and given that PaLM is just better at common sense reasoning than GPT-3. 
*   Finetuning on the MATH dataset didn't improve Minerva, but did improve PaLM significantly.
*   Slightly changing the framing of the questions didn't really alter performance. Swapping the numbers out significantly altered the variance between altered and unaltered answers, possibly slightly degrading it on net. Significantly changing question framing, with or without alterning the numbers, increased variance and somewhat degraded performance.
*   Interstingly, the model didn't generalise as well to engineering questions as I'd naively expect. I'd have thought if it understood physics, it could nail engineering, but I guess not. Maybe there were some subtopics in the datest not covered in Engineering?
*   What about GSM8K? Were the results not included because Minerva can't do grade school maths? Nope. Its performance was just barely SOTA. That said, the model struggles with large number arithmetic, especially multiplication. But cut it some slack, that's better than most mathematicians can do. 

![](https://39669.cdn.cke-cs.com/rQvD3VnunXZu34m86e5f/images/c737bab2023529ffb6b73be329fc03be4186b8ab0e3f8a6e.png)

[^z9ujz7hobka]: State of the art 

[^jhan4auwcm]: Pathways Language Model, another AI developed by Google Research.  

[^hnvtvvr5jdb]: I'm assigning equal weights to the subtopics on MMLU because I'm too lazy to find out how many questions were on physics and maths in the dataset.