1. Introduction
Program synthesis is often presented as a sequence of independent problems: given a specification and a space of candidate programs, find a program that satisfies the specification. A mature synthesis system should be able to do more. Solving previous problems should change what it can solve next, how quickly it can solve it, and how cheaply it can establish correctness. Repeated synthesis should therefore produce not only completed programs but also reusable knowledge.
This goal has motivated a substantial literature on library learning and abstraction discovery. DreamCoder alternates task solving with the construction of reusable program libraries and a learned search policy (Ellis et al., 2021). Stitch extracts shared abstractions from program corpora at much greater scale than earlier deductive methods (Bowers et al., 2023). BABBLE learns abstractions modulo equational theories by combining anti-unification with e-graphs (Cao et al., 2023). LILO synthesizes, compresses, names, and documents reusable functions, showing that documentation can itself help a model deploy learned abstractions (Grand et al., 2024). ReGAL uses execution-checked refactoring to construct libraries that improve later program prediction across several domains (Stengel-Eskin et al., 2024). Similar ideas now appear in formal theorem proving, where systems accumulate reusable lemmas and use them on later proof obligations (Wang et al., 2023; Zhang et al., 2026; Ota et al., 2026).
These developments make a growing symbolic library look like a natural indicator of cumulative learning. That interpretation is premature. A library can grow without becoming useful. An abstraction can shorten programs already in the training corpus while offering no benefit on future tasks. A solver may retrieve or invoke a helper because it is highly ranked, not because the helper changes whether the task can be solved. A learned library can also alter prompts, search order, candidate count, verification effort, or the number of model samples. End-to-end performance can therefore improve for reasons that have little to do with reusable knowledge.
Recent critical evaluations have made this attribution problem concrete. Berlot-Attwell, Rudzicz, and Si (2024, 2025) found very low direct reuse in two large-language-model library-learning systems and presented evidence that self-correction or self-consistency better explained some reported gains. A broader EACL 2026 study found that improvements in several in-context library-learning systems did not consistently survive compute matching and argued that equal computational budgets and behavioral analysis are necessary for credible evaluation (Berlot-Attwell et al., 2026). These findings do not show that library learning is impossible. They show that storing tools or lemmas, or observing aggregate accuracy improvements, is insufficient evidence that reusable knowledge is the operative mechanism.
A second complication is that future-oriented abstraction selection is itself no longer an open conceptual niche. Hernandez Cano et al. (2026) distinguish retrospective compression of past programs from prospective compression of anticipated future programs. Their work provides an important model of abstraction selection under a changing task distribution. Yet predicted future compressibility is still not the same as a measured causal contribution to future synthesis. An abstraction can be expected to shorten future solutions while making those solutions harder to find, more expensive to verify, or less robust to task-distribution shift.
This paper addresses the resulting methodological question:
What evidence is sufficient to conclude that symbolic knowledge learned from previous synthesis tasks makes future independently verified synthesis easier?
The proposed answer is verified forward-transfer intervention. A candidate abstraction is evaluated by constructing matched synthesis conditions that differ only in whether the abstraction is available. Task lineages, search algorithms, seeds, verifiers, budgets, semantic profiles, and stopping rules are fixed. The system then measures not only solve rate but also search cost, verification cost, execution quality, negative transfer, actual reuse behavior, and the overhead of building and maintaining the library. A reusable abstraction earns credit only when its presence produces a reproducible positive effect on held-out task lineages after those costs are accounted for.
The framework makes four primary contributions.
A formal distinction among four notions of library value: retrospective compression, prospective compression, observed reuse, and forward-transfer effect. These quantities answer different questions and do not imply one another.
A controlled evaluation protocol for reusable symbolic knowledge: per-abstraction interventions, matched placebo abstractions, removal and necessity tests, compute-matched baselines, and factorial experiments that separate library effects from search-policy or representation changes.
A behavioral and verification model: a reuse ladder from storage through cross-family transfer, explicit terminal outcomes of verified, refuted, unknown, timeout, and invalid, and separate verification levels for testing, bounded exhaustive checks, solver validation, proof checking, and artifact validation.
A reproducible experimental blueprint: lineage-based train, development, and test splits; full cost accounting; statistically paired comparisons; and reference domains based on comparator networks and bounded bit-vector synthesis.
The paper does not claim to introduce library learning, future-oriented abstraction selection, proof reuse, counterexample-guided synthesis, or machine algorithm discovery. It does not claim that accumulated libraries guarantee indefinite improvement. It proposes a stricter standard for determining when cumulative symbolic knowledge has actually produced forward transfer.
1.1 Scope
The main setting is a synthesis system that searches a discrete or finitely represented program space under a declared resource budget and uses an independently specified verifier. The framework is applicable to neural, symbolic, solver-based, evolutionary, or hybrid candidate generators. It can evaluate reusable functions, rewrite rules, proof lemmas, certified constraints, and verified representation transformations.
The framework is not restricted to systems that use large language models. In fact, its purpose is to make the generator largely irrelevant to the correctness claim: an arbitrarily complicated or learned system may propose candidates, but verification and attribution must remain independently reproducible.
1.2 Paper organization
Section 2 reviews library learning, prospective abstraction selection, critical evaluation, proof libraries, verification, and algorithm discovery. Section 3 defines the synthesis environment, task lineages, knowledge types, outcomes, and budgets. Section 4 separates four notions of library value. Section 5 introduces the behavioral reuse ladder. Sections 6 and 7 define intervention design and cost accounting. Section 8 specifies independent verification. Section 9 gives formal observations and counterexamples. Sections 10 and 11 provide experimental and statistical protocols. Section 12 states testable hypotheses, Section 13 catalogs failure modes, Sections 14 and 15 place the proposal in broader conceptual and technical context, and Sections 16 and 17 state limitations and conclusions. Appendices provide a reporting checklist and a minimal artifact schema.
References
Alur, R., Bodik, R., Juniwal, G., Martin, M. M. K., Raghothaman, M., Seshia, S. A., Singh, R., Solar-Lezama, A., Torlak, E., and Udupa, A. (2013). Syntax-guided synthesis. In Proceedings of the IEEE International Conference on Formal Methods in Computer-Aided Design, 1–17. https://doi.org/10.1109/FMCAD.2013.6679385
Berlot-Attwell, I., Rudzicz, F., and Si, X. (2024). Library learning doesn’t: The curious case of the single-use “library.” arXiv:2410.20274.
Berlot-Attwell, I., Rudzicz, F., and Si, X. (2025). LLM library learning fails: A LEGO-Prover case study. arXiv:2504.03048.
Berlot-Attwell, I., Sesterhenn, T., Rudzicz, F., and Si, X. (2026). Is this LLM library learning? Evaluation must account for compute and behaviour. In Proceedings of the 19th Conference of the European Chapter of the Association for Computational Linguistics, 3534–3568. https://doi.org/10.18653/v1/2026.eacl-long.163
Blum, M. (1967). A machine-independent theory of the complexity of recursive functions. Journal of the ACM, 14(2), 322–336. https://doi.org/10.1145/321386.321395
Bowers, M., Olausson, T. X., Wong, L., Grand, G., Tenenbaum, J. B., Ellis, K., and Solar-Lezama, A. (2023). Top-down synthesis for library learning. Proceedings of the ACM on Programming Languages, 7(POPL), 1182–1213. https://doi.org/10.1145/3571234
Cao, D., Kunkel, R., Nandi, C., Willsey, M., Tatlock, Z., and Polikarpova, N. (2023). BABBLE: Learning better abstractions with e-graphs and anti-unification. Proceedings of the ACM on Programming Languages, 7(POPL), 396–424. https://doi.org/10.1145/3571207
Codish, M., Cruz-Filipe, L., Frank, M., and Schneider-Kamp, P. (2016). Sorting nine inputs requires twenty-five comparisons. Journal of Computer and System Sciences, 82(3), 551–563. https://doi.org/10.1016/j.jcss.2015.11.014
Ellis, K., Wong, C., Nye, M., Sablé-Meyer, M., Morales, L., Hewitt, L., Cary, L., Solar-Lezama, A., and Tenenbaum, J. B. (2021). DreamCoder: Bootstrapping inductive program synthesis with wake-sleep library learning. In Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation, 835–850. https://doi.org/10.1145/3453483.3454080
Fawzi, A., et al. (2022). Discovering faster matrix multiplication algorithms with reinforcement learning. Nature, 610, 47–53. https://doi.org/10.1038/s41586-022-05172-4
Gödel, K. (1931). Über formal unentscheidbare Sätze der Principia Mathematica und verwandter Systeme I. Monatshefte für Mathematik und Physik, 38, 173–198. https://doi.org/10.1007/BF01700692
Grand, G., Wong, L., Bowers, M., Olausson, T. X., Liu, M., Tenenbaum, J. B., and Andreas, J. (2024). LILO: Learning interpretable libraries by compressing and documenting code. In International Conference on Learning Representations.
Hernandez Cano, L., Zareski, I., El Amouri, L., Zhao, P., Mascini, M., Sansone, E., Pu, Y., Zhao, B., and Kryven, M. (2026). Prospective compression in human abstraction learning. arXiv:2605.09985.
Leroy, X. (2009). Formal verification of a realistic compiler. Communications of the ACM, 52(7), 107–115. https://doi.org/10.1145/1538788.1538814
Lopez-Paz, D., and Ranzato, M. (2017). Gradient episodic memory for continual learning. In Advances in Neural Information Processing Systems, 30.
Lopes, N. P., Menendez, D., Nagarakatte, S., and Regehr, J. (2015). Provably correct peephole optimizations with Alive. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, 22–32. https://doi.org/10.1145/2737924.2737965
Lopes, N. P., Lee, J., Hur, C.-K., Liu, Z., and Regehr, J. (2021). Alive2: Bounded translation validation for LLVM. In Proceedings of the 42nd ACM SIGPLAN International Conference on Programming Language Design and Implementation, 65–79. https://doi.org/10.1145/3453483.3454030
Mankowitz, D. J., et al. (2023). Faster sorting algorithms discovered using deep reinforcement learning. Nature, 618, 257–263. https://doi.org/10.1038/s41586-023-06004-9
Necula, G. C. (1997). Proof-carrying code. In Proceedings of the 24th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, 106–119. https://doi.org/10.1145/263699.263712
Odrzywołek, A. (2026). All elementary functions from a single binary operator. arXiv:2603.21852.
Ota, K., Osa, T., and Harada, T. (2026). Self-supervised theorem discovery in a formal axiomatic system. arXiv:2606.28747.
Ozelim, L., Uthamacumaran, A., Abrahão, F. S., et al. (2026). Assembly theory collapses to dictionary compression and is rendered redundant by common statistical algorithms. npj Complexity. https://doi.org/10.1038/s44260-026-00088-w
Pnueli, A., Siegel, M., and Singerman, E. (1998). Translation validation. In Tools and Algorithms for the Construction and Analysis of Systems, Lecture Notes in Computer Science 1384, 151–166. https://doi.org/10.1007/BFb0054170
Romera-Paredes, B., et al. (2024). Mathematical discoveries from program search with large language models. Nature, 625, 468–475. https://doi.org/10.1038/s41586-023-06924-6
Sasnauskas, R., Chen, Y., Collingbourne, P., Ketema, J., Lup, G., Taneja, J., and Regehr, J. (2017). Souper: A synthesizing superoptimizer. arXiv:1711.04422.
Sharma, A., Czégel, D., Lachmann, M., Kempes, C. P., Walker, S. I., and Cronin, L. (2023). Assembly theory explains and quantifies selection and evolution. Nature, 622, 321–328. https://doi.org/10.1038/s41586-023-06600-9
Stengel-Eskin, E., Prasad, A., and Bansal, M. (2024). ReGAL: Refactoring programs to discover generalizable abstractions. In Proceedings of the 41st International Conference on Machine Learning, PMLR 235, 46605–46624.
Wang, H., et al. (2023). LEGO-Prover: Neural theorem proving with growing libraries. arXiv:2310.00656.
Willsey, M., Nandi, C., Wang, Y. R., Flatt, O., Tatlock, Z., and Panchekha, P. (2021). Egg: Fast and extensible equality saturation. Proceedings of the ACM on Programming Languages, 5(POPL), 1–29. https://doi.org/10.1145/3434304
Wolpert, D. H., and Macready, W. G. (1997). No free lunch theorems for optimization. IEEE Transactions on Evolutionary Computation, 1(1), 67–82. https://doi.org/10.1109/4235.585893
Zhang, Y., Sun, J., Bi, H., Geng, C., Ma, W., Li, Z., and Si, X. (2026). DreamProver: Evolving transferable lemma libraries via a wake-sleep theorem-proving agent. arXiv:2604.26311.