ai.si
Field notes

AI agents and automated research

How Did FunSearch Check a Mathematical Discovery?

Bottom line

The published 512-vector construction can be checked pair by pair for forbidden triples. Passing those checks establishes that a set of that size exists. Proving that no larger set exists requires different evidence.

An action leaves the agent for an environment. An observation returns and informs the next action.

The returned observation is the point at which the external world can change an agent’s next decision.

How can you verify that FunSearch found a new mathematical construction? The authors give the set explicitly. We checked that there are 512 distinct eight-dimensional vectors. For each of the 130,816 pairs, the third vector that would complete a forbidden triple was absent from the published set. So there certainly exists a set with the desired property, of this size. We have not addressed the question of whether there could be one larger. List of 512 vectors

Bernardino Romera-Paredes and colleagues wanted to find programs which, in combination with other code supplied by the authors, would produce collections of vectors. They would then apply further author-supplied code to assess the quality of the output collection. For the eight-dimensional cap set problem, they reported a construction larger than the previous best known when the study appeared. As I see it, one nice feature of this particular problem is the relative ease with which one can verify a key aspect of the output, namely, the collection of vectors, without needing to run the language model (or have anything like the resources they had available). FunSearch paper, Figure 4

What makes a triple forbidden?

Let the coordinates of the points be any of 0, 1 or 2. All sums of coordinates are taken mod 3. So 2 plus 1 is 0, 2 plus 2 is 1, and so on. In this problem, a cap set is a collection of points with eight coordinates apiece, each coordinate equal to 0, 1 or 2. No three distinct points in the collection may sum to zero modulo three in every coordinate.

As a simple example, in 2 dimensions, (0,0), (1,0), (2,0) are 3 points we would not want all to occur, since their sum in the first coordinate is 3 = 0 mod 3, and in the second is 0. So if we had all 3 of these points in our collection, it would not have the desired property. On the other hand, (0,0), (1,0) and (0,1) sum to 1 in each coordinate, so are acceptable. But of course we would want all triples of points in the collection to be acceptable.

Given 2 points, say (0,0) and (1,0), there is only 1 point that can complete a "disallowed" set of 3 points. For this particular pair the missing point is (2,0). Given any 2 points, we can work out in this way what third point would give the forbidden sum of 0 in each coordinate, namely (-x-y) mod 3. So to check that a proposed collection of points, all with the same number of coordinates, has no forbidden 3 points, we only need to look at each pair.

The role of the language model output

One obvious way to try to generate a collection of points with the required property is to go through all possible points, in some order, adding each to the collection provided that the collection, so augmented, has no forbidden 3 points. It is clear that the order in which one goes through the possible points is likely to affect the final size of the collection one produces. Also clear is that one could end up with a collection such that no other single point could be added without creating a forbidden 3 points, and yet, had one chosen points in a different order, one might have been able to end up with a much larger collection.

So one way to try to improve on such an algorithm is to try to find a good way to set priorities on the possible points. That is what the program output by the language model was intended to do. The other code, to generate a set of points given this priority function, to decide if a set of points had the required property, and to evaluate the set, was all supplied. So there was a clear role for the text output by the language model. In the authors’ notebook, the supplied procedure blocks choices that would complete a forbidden triple. It returns the size of the resulting cap set as the score. Authors’ notebook

The language model was then used iteratively to generate more programs, using previous ones and information about their evaluation as inputs. It is useful to separate, in my view, at least 3 things: (1) the program defining the priorities; (2) the set of points resulting from applying the author-supplied procedure using that program to set priorities; (3) the fact that (2) has no forbidden triples. Someone may well be able to write a much simpler program with a similar effect on (2). Someone else may only be interested in (3). The repository gives both the discovered function and its construction. FunSearch repository

Checking the set of 512 points

We downloaded the authors’ published coordinate file. There is one point per line. We wanted to be sure there were 512 points, each with 8 coordinates, each 0, 1 or 2. We had to check there were 512 distinct lines, not merely 512 lines, since duplicate points would give rise to more lines. A row with seven entries or with a coordinate of 3 would describe the wrong space. We decoded the rows as vectors, counted distinct vectors and checked that each had eight entries, all 0, 1 or 2.

We then considered each of the distinct pairs of points, calculated the 3rd point needed to complete 3 summing to 0 mod 3, and checked if this was 1 of the points in the file. A match would have given 3 points summing to 0 mod 3. There was no need to check whether this 3rd point was 1 of the original 2, since, with coordinates only 0, 1 and 2, 2x+y=0 mod 3 implies x=y. We made 512 × 511 ÷ 2 checks, and none gave a 3rd point that was in the file. This pair check rules out every forbidden triple in the file.

If we permuted the rows of the file, we would still come to the same conclusion. There is nothing about being a set of points with the required property that depends on the order they are written down. However, as mentioned above, the order in which points are considered can make a big difference to the points which end up being included. So these are quite different effects.

I would of course want my testing program to reject an obvious "bad" set of points. In 2 dimensions, the 3 points (0,0), (1,0), (2,0) are a useful example. Failure to reject these may be due to, for example, testing equality rather than equality mod 3 of the relevant coordinates, or failing to test one or more of the possible 3rd points. I would also include, as another test, a set of points with one duplicated, to make sure I was counting points correctly. Having checks that I could easily verify "by eye" gives more confidence in the program.

What a lower bound establishes

Let N be the maximum size of a cap set in eight dimensions with coordinates drawn from 0, 1 and 2. If I can check that there are 512 distinct points, with this property, I know N must be 512 or more. If someone else produced another set of points which passed similar tests, and had 513 points, I would know N was 513 or more. Both sets would still be valid.

To show N was exactly 512, someone would need to show that any 513 points must include 3 summing to 0 mod 3. So they would be making a statement about all sets of 513 such points, whatever method was used to find them.

So I would be hesitant to quote the paper as having found the largest set of points known, without giving some indication of when. It may well no longer be correct. On the other hand, I feel confident in saying there is such a set, in 8 dimensions, of 512 points, as long as the file remains available to inspect. I would not be justified in saying it was the largest possible, without further argument.

Could one more point be added to this particular set?

A simple extension of the above allows us to go a step further. From the list as published, we formed the set of all points which would form an illegal triple with some pair from the list. There are 3⁸ = 6,561 points total, so, excluding the 512 listed, this gives 6,049 points to test. All of them form an illegal triple with at least one other pair from the list. So no single additional point can be added to this list, without removing one or more existing points.

To perform this test: for each of the different pairs of points in the list, find the unique third point completing the triple, omitting duplicates. This should yield 6,049 points, none of which is in the list. Together the published set and these excluded points account for the whole space. A point outside the set and absent from the list of completions could be added immediately.

So this shows the set is maximal, but not necessarily maximum. The mathematical distinction is precise. We have shown that no point can be added, leaving the rest unaltered. However, there may well be another set of 512 points, with a different membership, from which further points could be added. Published coordinates used for this check

Further investigation

If all one wished was to satisfy oneself about this set of 512 points, one only needs the file of points and a program to check for 3 summing to 0. One may wish to know more about how reliable the procedure is at generating such a large set of points, starting from various initial sets. One may wish to know the resources required, or how much better the language model is than some other method of generating the priority function. One valid example settles existence. Comparing search methods would require evidence from their runs.

One may wish to understand better the function the language model has come up with, to see what features it uses to decide priorities, what features one can spot in the resulting set of points, and try to generalize to give a proof. It seems to me that one would be on firmer ground starting this process after being satisfied there really is a valid set of 512 points. And then one can assess how useful any putative generalization is: does it enable one to predict the existence of other sets of points, perhaps of other sizes, provide a shorter proof of known results, point out interesting properties, and so on?

So it seems to me there are several distinct things that have been done: set up a problem and code so as to be able to evaluate candidate solutions; use the language model to generate candidate solutions; find an object that passes the tests. And others can verify this last fact. It would be useful if all were clearly laid out, so the reader can see what has and has not been established.

References

All field notes