Mathematics and green AI: poster for the GreenCode film
Video created by explainapaper.com

Mathematics and green AI

AI is growing fast, and so is the electricity behind it: data centre use worldwide is expected to more than double by the end of the decade, with AI the biggest driver. This film shows how mathematics, from better algorithms to smarter scheduling, can cut the energy AI systems need. It matters to anyone who builds, runs or pays for AI.

Chapters

In this film

  • Why the growth of AI is driving up electricity demand, and why that is now pressing.
  • How much of the recent efficiency gain in AI came from mathematics, not only from faster chips.
  • How four fields of mathematics cut the arithmetic a model needs while keeping the same answers.
  • Why running flexible AI work when the grid is cleaner does the same job for less carbon.
  • How an AI agent cut a tuned inference engine's energy by more than it gained in speed.

Transcript

The pressure

AI is growing fast, and so is the electricity behind it. Data centre use worldwide is expected to more than double by the end of the decade, with AI the biggest driver. The United Nations has adopted its first resolution on the environmental sustainability of AI. In the UK alone, emissions from AI compute over the next decade could run from over thirty to over a hundred and twenty million tonnes of carbon dioxide. So the pressing question is how the mathematical sciences can cut the energy these systems need.

Not only chips

Where has the recent efficiency in AI come from? Much of it is mathematics: better algorithms, sharper approximations and smaller number formats. Faster, more efficient chips help as well, but they are only part of the story. One large provider found that the energy of a typical text prompt fell more than thirtyfold in a single year, crediting software work alongside cleaner power. Gains like that deserve to be reported and rewarded next to accuracy, never treated as an afterthought.

Four fields at work

Four fields show how it works. Low-rank structure: adapting a large model usually needs only small changes, so it is frozen and a compact add-on is trained instead, using far less memory with quality on a par. Numerical analysis: arithmetic at lower precision moves fewer bits and uses less energy, and the study of rounding error says when accuracy survives. Information theory: prune weights that add little, or let a small model draft words that a large one checks. Complexity theory: know which problems no hardware will make cheap, and stop spending energy on brute force.

Run IT when the grid is clean

Much AI work does not have to run the moment it is started: training, batch inference and evaluation can all wait. How clean the grid is varies by the hour and by region, so choosing when and where each task runs changes its emissions. Moving heavy work into the cleaner part of the day does the same job for less carbon. Deciding this well, against uncertain forecasts and firm deadlines, is a problem in optimal control and scheduling.

AI that trims its own code

The algorithms are only half of it. The software that serves a model, its engine, kernels and surrounding code, draws energy on every prompt, and it can be optimised like any other program. GreenCode researchers gave an AI agent written principles to work to, correctness first, then a catalogue of known energy-wasting patterns. It profiles the code, plans ranked fixes, critiques each change against them, then measures again and keeps only what saves. On a widely used and already highly tuned inference engine, the energy saved outstripped the gain in speed. Faster is not always greener, so the loop reads the meter rather than the stopwatch. GreenCode has to keep its own AI lean, and it draws on the same mathematics. Its models are tuned for the task rather than the general case, each request goes to the lightest step that can answer it, and heavy work is scheduled against grid carbon. Inference energy is measured, never assumed. Efficiency alone does not guarantee lower emissions, because cheaper computing invites more of it; the savings need limits to become real. Reach out to us with the AI workload whose energy you cannot see, and we will help you understand how GreenCode can measure it and make it leaner.

More films

All GreenCode videos »

  • Length 3:25
  • Type Article film
  • Chapters 6
  • Captions English
  • Also on YouTube
GreenCode

Want to see what GreenCode finds in your own code? Talk to the GreenCode team.

Get in touch