LANTERN: Illuminating Hidden Mathematical Knowledge in Language Models
Abstract
Language models can now prove theorems, but people still decide which problems to pursue. We ask whether a model's internal representations can help identify promising mathematical connections. We develop LANTERN, a fast, cost-efficient pipeline that uses a classifier over pretrained-model activations to rank candidate relations, followed by staged filtering, hypothesis generation, executable verification, and analytical checking. Applied to the On-Line Encyclopedia of Integer Sequences (OEIS), LANTERN ranked 50 million pairs among 10,000 frequently referenced sequences and produced 62 verified relations between pairs without an existing OEIS cross-reference. A content screen retained 13 relations worth presenting; nine of these are informative or insightful, including four which are entirely novel to the best of our knowledge: none appears in the OEIS or in our targeted literature search. The entire end-to-end process including classifier training, candidate ranking, filtering and verification took under 8 hours.
Figures & tables
| Stage | Pairs remaining | From previous stage |
|---|---|---|
| Ranked queue | 500 | — |
| Cheap filter | 118 | 23.6% |
| Hypothesis proposal | 44 | 37.3% |
| Technical verification | 44 | 100% |
| S0 routine | S1 informative | S2 insightful | Total | |
|---|---|---|---|---|
| N0 documented | 22 | 0 | 0 | 22 |
| N1 known elsewhere | 2 | 3 | 2 | 7 |
| N2 not found in search | 0 | 4 | 2 | 6 |
| Novelty not assessed | 27 | 0 | 0 | 27 |
| Total | 51 | 7 | 4 | 62 |
| Objects | Connection in plain language | Exact relation |
|---|---|---|
| 1D and 2D cellular automata A071053 A160239 | N2 / S2 bridge. The live-cell counts of a planar automaton are recovered from the block factors of a one-dimensional rule (Sec. 5.2.1 ). | ; , , where are binary run lengths. |
| Continued fraction and theta quotient A007325 A227216 | N2 / S2 bridge. Two analytic expressions combine to count a family of integer partitions, drawn as cell diagrams (Sec. 5.2.2 ). | , where counts 5-core partitions of . |
| Greedy sequence and Conway’s permutation A003278 A006368 | A sequence built by greedily avoiding three-term arithmetic progressions can instead be generated recursively through Conway’s permutation . | , , ; . |
| Pascal matrix and a change of basis A132440 A039755 | A change of basis turns the square of the dense lower-triangular Pascal matrix into a matrix with just two nonzero diagonals. | , where is the B-Stirling array and has only its first subdiagonal nonzero. |
| Partitions and necklaces A066633 A185651 | Deconvolving the counts of parts of size in partitions of reveals divisibility. This recovers the totients used to count necklaces. | , where . |
| Planar maps and a Catalan triangle A039598 A000139 | Ternary trees connect non-separable planar-map counts to a Catalan triangle . This recovers a classical connection missing from the OEIS. | , , . |
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| No. | Pair | N / S | Decision | Reason |
|---|---|---|---|---|
| 1 | A230877 A334302 | N2 / S1 | excluded | The ordering is the definition of A334302; the substantive statistic is a relation to the A125106 encoding. |
| 2 | A053120 A060187 | N2 / S1 | excluded | Chebyshev coefficients only produce the odd powers used in the recorded formula for A060187. |
| 3 | A103438 A001498 | N1 / S1 | retained | Specific route through central factorial numbers and the Bessel coefficients. |
| 4 | A124733 A266213 | N2 / S1 | retained | Specific Riordan-array composition and closed-form identity. |
| 5 | A000127 A076839 | —/ S0 | excluded | Any two period-five sequences can be matched by a five-value table. |
| 6 | A132440 A039755 | N2 / S1 | retained | Specific conjugation identity in the exponential Riordan group. |
| gold | silver | trivia | bare cross-refs | |
|---|---|---|---|---|
| graded by the screener (10 987 pairs) | 369 | 2 436 | 8 182 | — |
| used for training (10 770 pairs) | 358 | 2 422 | 7 990 | 21 493 |
| scorer | percentile of the 74 pairs | 74 pairs in | most-referenced in | |
|---|---|---|---|---|
| random | matched | top-1000 | top-1000 | |
| surface text, untrained cosine (char TF-IDF) | 63.5 | 59.0 | 2 | 1.8% |
| surface text, trained: LSA + logistic (Sec. 6.1 ) | — | 83.0 | — | — |
| surface text, trained: LSA + boosting | — | 90.5 | — | — |
| raw cosine, one layer, untrained | 70.3 | 66.3 | 1 | 1.7% |
| linear classifier (used) | 77.3 | 77.4 | 1 | 6.3% |
| variant 1 | variant 2 | main | |
| entries | 5 000 | 5 000 | 10 000 |
| positives | all links | gold, silver | gold, silver |
| 15 000 | 1 330 | 2 780 | |
| negatives | random | trivia, bare, | trivia, bare, |
| random | random | ||
| one pair per entry | no | yes | yes |
| stage | time |
|---|---|
| labelling of linked pairs (Claude Sonnet 5) | 2 h 40 min |
| Qwen3-32B activations, 10 000 entries | 1 h 20 min |
| classifier training, scoring of 50 million pairs | 8 min |
| ranked queue of 500 pairs | 20 s |
| filter (Claude Sonnet 5, no tools), 584 pairs | 43 min |
| agent (Claude Opus 5 with tools), 118 pairs | 2 h 56 min |
| # | pair | class | novelty |
|---|---|---|---|
| 1 | A230877 A334302 | substantive | T1 |
| 2 | A053120 A060187 | substantive | T1 |
| 3 | A103438 A001498 | substantive | T1 |
| 4 | A124733 A266213 | substantive | T1 |
| 5 | A000127 A076839 | structural | T1 |
| 6 | A132440 A039755 | mechanical | T1 |