CayleyPy

Exploring math with AI and Python

CayleyPy is an open-source Python library that uses AI methods to explore extremely large Cayley graphs. Around it we have built a wider research project, with papers, a seminar and Kaggle benchmarks.

Its most ambitious goal is AI-holography: a new duality in mathematics that could lead to more effective AI methods grounded in mathematics and mathematical physics. CayleyPy is a crowd-sourced project and is actively seeking collaborators. Its scientific advisory board includes two Fields Medallists.

1Brief info on the project

Extremely large graphs — googol-sized and beyond — cannot be built or stored by standard means. They arise naturally as state-transition graphs: positions in a game joined by legal moves, configurations of a Rubik's cube joined by single turns, permutations joined by generators. The cleanest mathematical examples are Cayley graphs and Schreier coset graphs, and these are where CayleyPy begins.

The library provides machine-learning and reinforcement-learning pathfinding, beam search, efficient BFS on small subgraphs, random-walk generation, growth and diameter estimation, running on CPU, GPU and TPU, with more to be added in future. The mathematical targets include growth functions, word-metric approximation and mixing times for random walks; the practical ones include solving large permutation puzzles optimally.

Building on multiple experiments made with CayleyPy, an ambitious research programme emerged — AI-holography. It aims to approach the key question in AI — the construction of “good embeddings” — as a sort of holographic duality grounded in ideas of string theory (the AdS/CFT correspondence). The “complexity = volume” principle serves as a guarantee that the embeddings obtained are optimal. The quasi-polynomiality conjecture for diameters and word metrics appears as the first manifestation of, and support for, that principle.

2Code and documentation

The library is developed in the open on GitHub. Its documentation is generated from the library's source and published as a separate site.

GitHub repository Documentation

3Scientific advisory board

The project is advised by a board of six mathematicians and physicists, among them two Fields Medallists — Maxim Kontsevich (1998) and Stanislav Smirnov (2010) — together with Michael R. Douglas, Jordan Ellenberg, Yan Soibelman and Geordie Williamson.

Meet the advisory board

4Seminar and YouTube channel

The seminar Quantum Mathematics and Artificial Intelligence is led by Prof. Yan Soibelman (Department of Mathematics, Kansas State University) together with the CayleyPy team. Talks are recorded and published on the seminar's YouTube channel.

Seminar website YouTube channel

5“Polymath”-style project with agents and humans

A collaborative project in which humans and AI agents work together to advance research problems. We started with the Cayley graph defined by Elvira Strasser Rapaport in 1959 — beautiful and simple, yet still full of unknown mysteries.

Join the Cayley room

6Papers

Main CayleyPy papers

Exact diameters of the LRX and LX Cayley graphs

Further papers by the team

7Talks and informal presentations

8Kaggle benchmarks

Between 2025 and 2026 the community ran a series of Kaggle competitions that benchmark pathfinding methods on concrete large graphs. Most need no special library — only a good algorithm. The three LRX challenges were created by Sergei Fironov. The competition pages, datasets and leaderboards remain available on Kaggle.

CompetitionGraph sizeRan
4×4×4 Cube7×10452025–26
5×5×5 Cube10922025–26
6×6×6 Cube101502025–26
7×7×7 Cube102102025–26
Christopher's Jewel10162025–26
Megaminx10692025–26
Professor Tetraminx10322025–26
IHES Supercube10242025–26
Transposons108–101582025–26
Reversals108–10642025–26
RapaportM2varies with n2025–26
Pancake sortingvaries with n2025–26
Glushkov's problemvaries with n2025–26
LRX OEIS-A186783 brainstorm math conjecturevaries with n2025–26
LRX discover math & God's algorithmvaries with n2025–26
LRX-binary: in search of God's numbervaries with n2025–26

9Get involved

CayleyPy is open to mathematicians, physicists, programmers and students. The easiest ways to take part are to join the Cayley room, where humans and AI agents work on open problems together, to contribute code or report issues on GitHub, or to attend the seminar.

Cayley room GitHub issues Seminar