# AI-generated code can be both effective and interpretable

Markdown copy of https://realalpha.app/s/ai-generated-code-can-be-both-effective-and-interpretable/ on Real Alpha, the best minutes from long interviews with the people building AI. Cite and link the page, not this copy.

- Speaker: [Pushmeet Kohli](https://realalpha.app/builders/pushmeet-kohli/) · Pushmeet Kohli is a leads AI for Science at DeepMind. · Leads DeepMind's AI for Science unit behind AlphaFold, the Nobel-winning protein structure model, and AlphaEvolve.
- Host: [Sonya Huang](https://realalpha.app/people/sonya-huang/) · Partner, Sequoia Capital · Works with OpenAI and Anthropic; co-wrote Sequoia's essay on generative AI.
- Host: [Pat Grady](https://realalpha.app/people/pat-grady/) · Co-steward, Sequoia Capital · Joined Sequoia in 2007; backed Snowflake, Zoom, ServiceNow and OpenAI.
- Show: Training Data
- Episode: [DeepMind's Pushmeet Kohli on AI's Scientific Revolution](https://realalpha.app/v/6J7d4_yvqcg/), Jul 15, 2025
- Moment: 14:10 to 20:08 of the episode (6 min), playing on https://realalpha.app/s/ai-generated-code-can-be-both-effective-and-interpretable/; the episode from there: https://realalpha.app/v/6J7d4_yvqcg/?t=850

## Quote

> “if you use a typical reinforcement learning agent on this kind of problem you might get better results, but it might come at the **cost of interpretability**.”
> — [Pushmeet Kohli](https://realalpha.app/builders/pushmeet-kohli/) at [16:36](https://realalpha.app/v/6J7d4_yvqcg/?t=996) · Training Data

## Takeaways

1. Neural-network policies can be hard to debug when something breaks.
2. Program search can produce code experts inspect and learn from.
3. Math offers precise evaluations, such as reducing a multiplication count from 49 to 48.

## About this segment

Pushmeet Kohli explains why DeepMind moved from searching for algorithms to searching programs engineers can inspect. He describes results in matrix multiplication and the cap set problem, and why math offers crisp benchmarks.

From “DeepMind's Pushmeet Kohli on AI's Scientific Revolution”, Jul 15, 2025. [Watch the full episode](https://realalpha.app/v/6J7d4_yvqcg/)

## Transcript

Transcribed by machine (Whisper) from the episode’s audio, so a word may be off here and there.

[14:14](https://realalpha.app/v/6J7d4_yvqcg/?t=854) of the the alpha go move 37 stuff like are the methods different are the results how do they compare to the ways humans would think about them so let's go back to the sort of original sort of motivation for why we started even working on the first iteration of using LLNs for algorithmic discovery, which was fun search. So a few years back, like, as you know, DeepMind has spent a lot of, has done a lot of work in using AI systems for searching over large spaces, right? We have done a lot of work in building agents which have been trained using reinforcement learning which can deal with many complex challenges from the game of go to playing starcraft which are quite complex challenges we set ourselves a challenge that can we take the same kinds of models like the AlphaZero family of models, which were extensions of what we had done in Go

[15:27](https://realalpha.app/v/6J7d4_yvqcg/?t=927) and the development of AlphaGo, can we use the same types of models for discovering new algorithms? And we came up with a new sort of agent called AlphaTensor, which was particularly sort of focused on finding solutions for the matrix multiplication problem. And we found that this agent was able to improve over the past known results which had stood for 50 years. But the key question sort of remained, can you do something better?

[16:05](https://realalpha.app/v/6J7d4_yvqcg/?t=965) And secondly, can you sort of come up with a solution that is more interpretable? At the same time, like when we were looking at practical problems in Google, like how do you schedule jobs in a data center? now there are there has been a lot of work on coming up with new algorithms and these heuristics have been designed by some of the best researchers and engineers at google and because they have a huge amount of impact in terms of computer utilization if you use a typical reinforcement learning agent on this kind of problem you might get better results, but it might come at the cost of interpretability. Because now you have a neural network deciding which workloads go to which computers. And if something breaks, then you don't know how do you debug this thing. So what engineers would really prefer is instead of giving

[17:04](https://realalpha.app/v/6J7d4_yvqcg/?t=1024) them a neural network, you gave them a piece of code that they can interpret and they can run. and this was essentially the motivation can we now use llm so instead of searching in the space of of specific algorithms like we had done metric multiplication algorithms like we had done in alpha tensor or coming up with a neural network policy to directly solve the problem can we come up with an agent which can search in the space of programs and come up with a program that solves this hard problem and the benefit of course will be interpretability that you can see the sort of code you can see what its properties are and so on and and that's what is what happened we found sort of programs that not only were effective but when the experts actually saw those programs they could sort of recover insights so for instance they we one of the maths problems that we had

[18:05](https://realalpha.app/v/6J7d4_yvqcg/?t=1085) looked at for FunSearch was called the cap set problem. This is a problem that Terence Tau, one of the famous mathematicians, he is very interested in. And we collaborated with this mathematician Jordan Ellenberg at NYU. And when we looked at the program that FunSearch had produced, he found that there were certain symmetries that were in the problem that had not been recognized before. And somehow the program, like FunSearch, the agent had discovered those and was utilizing those to get a better solution. Can you say a word about, you mentioned working with Terence Tao and other famous mathematicians. Is math considered the gold standard for, you know, testing and benchmarking if these models are generating novel scientific results?

[18:57](https://realalpha.app/v/6J7d4_yvqcg/?t=1137) Yeah, so math certainly sort of has some properties which are very interesting, right? The fact that it's very precise. Like you can, you know, whether the property that you are looking for, whether you have found it or not, right? You know, the matrix multiplication, for matrix multiplication, how many multiplications you require, like for a four by four matrix. what was known was that you can do it with 49 sort of multiplications.

[19:32](https://realalpha.app/v/6J7d4_yvqcg/?t=1172) That's by Strasser. And we showed that you can do it by 48. So that's a very precise result, right? There is no sort of arguing about that. So it gives you a very crisp way of evaluating how well you are, how well you have done. um and there is no sort of uh uh like rlhf needed in terms of human feedback whether this was a nice result or whether this was a nice output or not. And you don't need to rely on sort of an LMSys code. You just know that you're
