{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/arxiv-2606-09930","title":"Compile Once, Differentiate Everywhere: A Differentiable Meta-Circular Interpreter","arxiv_id":"2606.09930","date":"2026-06-07","proceeding":null,"authors":["Lucas Sheneman"],"abstract":"The boundary between program execution and gradient-based optimization has long limited the use of code itself as a learnable scientific model. We present a compiler that translates a self-hosting subset of Scheme into differentiable computation graphs for autograd backends. Because the subset can compile its own evaluator, this yields differentiable meta-circular interpretation (DMCI): a compiled Scheme interpreter executes programs supplied as data, while reverse-mode autodiff propagates gradients to continuous constants embedded in those programs. The interpreter is compiled once, so new programs inherit differentiability without recompilation or custom gradient machinery, while retaining closures, recursion, and data structures. We prove that gradients through the compiled interpreter are correct almost everywhere and show that they match direct compilation to numerical precision across 171 recursive and higher-order program-seed pairs. We then use DMCI for program-and-parameter co-search, where a large language model proposes Scheme programs and exact gradients calibrate their continuous parameters through a single frozen interpreter. This enables OpenEvolve-style program search in which an outer loop proposes discrete program structures and DMCI supplies exact gradient-based calibration of each candidate's continuous parameters. On battery capacity-fade data, the search recovers a knee-like degradation structure and improves held-out extrapolation over hand-crafted baselines on the harder early-extrapolation split, matching them on the later split. On a high-dimensional El Nino inverse problem, DMCI optimizes an interpreted Kalman-filter likelihood where gradient-free search fails. These results extend symbolic regression and neurosymbolic search from closed-form expressions to executable, stateful programs, making model-generated code directly optimizable against data.","url_abs":"https://arxiv.org/abs/2606.09930","url_pdf":"https://arxiv.org/pdf/2606.09930","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":null,"mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2606.09930"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/sheneman/dmci","reach":null}],"summary":{"ran":9,"unverified":4},"by_repo_kind":{"found_in_text":{"samples":13,"ran":9,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"2f9b95133bdfab29","entry":"compose_product","repo":"sheneman/dmci","repo_kind":"found_in_text","path":"experiments/exp_g/modules.py","file_url":"https://github.com/sheneman/dmci/blob/HEAD/experiments/exp_g/modules.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2f9b95133bdfab29"}},{"code_sha256_prefix":"7910057042a93b28","entry":"compose_sum","repo":"sheneman/dmci","repo_kind":"found_in_text","path":"experiments/exp_g/modules.py","file_url":"https://github.com/sheneman/dmci/blob/HEAD/experiments/exp_g/modules.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7910057042a93b28"}},{"code_sha256_prefix":"8875030ea2485c34","entry":"load_data","repo":"sheneman/dmci","repo_kind":"found_in_text","path":"benchmarks/plot_benchmarks.py","file_url":"https://github.com/sheneman/dmci/blob/HEAD/benchmarks/plot_benchmarks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8875030ea2485c34"}},{"code_sha256_prefix":"b233d4e94dc70dbc","entry":"make_chain","repo":"sheneman/dmci","repo_kind":"found_in_text","path":"benchmarks/run_benchmarks.py","file_url":"https://github.com/sheneman/dmci/blob/HEAD/benchmarks/run_benchmarks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b233d4e94dc70dbc"}},{"code_sha256_prefix":"2420c254d5ba9c8a","entry":"make_tree","repo":"sheneman/dmci","repo_kind":"found_in_text","path":"benchmarks/run_benchmarks.py","file_url":"https://github.com/sheneman/dmci/blob/HEAD/benchmarks/run_benchmarks.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2420c254d5ba9c8a"}},{"code_sha256_prefix":"5885ea8c05d86d9f","entry":"manifest_text","repo":"sheneman/dmci","repo_kind":"found_in_text","path":"experiments/check_manifests.py","file_url":"https://github.com/sheneman/dmci/blob/HEAD/experiments/check_manifests.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5885ea8c05d86d9f"}},{"code_sha256_prefix":"ad5da3ef9764d7ec","entry":"read_manifest","repo":"sheneman/dmci","repo_kind":"found_in_text","path":"experiments/check_manifests.py","file_url":"https://github.com/sheneman/dmci/blob/HEAD/experiments/check_manifests.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ad5da3ef9764d7ec"}},{"code_sha256_prefix":"203ca9d3ae2046d6","entry":"split_top_level_forms","repo":"sheneman/dmci","repo_kind":"found_in_text","path":"neural_compiler/dmci.py","file_url":"https://github.com/sheneman/dmci/blob/HEAD/neural_compiler/dmci.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"203ca9d3ae2046d6"}},{"code_sha256_prefix":"d67550ff7c4be8e2","entry":"unsupported_interpreter_ops","repo":"sheneman/dmci","repo_kind":"found_in_text","path":"neural_compiler/dmci.py","file_url":"https://github.com/sheneman/dmci/blob/HEAD/neural_compiler/dmci.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d67550ff7c4be8e2"}},{"code_sha256_prefix":"2d07c976b1334d89","entry":"bench","repo":"sheneman/dmci","repo_kind":"found_in_text","path":"benchmarks/run_benchmarks.py","file_url":"https://github.com/sheneman/dmci/blob/HEAD/benchmarks/run_benchmarks.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"2d07c976b1334d89"}},{"code_sha256_prefix":"373ef1fde5910993","entry":"dmci_wrap","repo":"sheneman/dmci","repo_kind":"found_in_text","path":"neural_compiler/dmci.py","file_url":"https://github.com/sheneman/dmci/blob/HEAD/neural_compiler/dmci.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"373ef1fde5910993"}},{"code_sha256_prefix":"7d97cce990a1e71a","entry":"plot_large_programs","repo":"sheneman/dmci","repo_kind":"found_in_text","path":"benchmarks/plot_benchmarks.py","file_url":"https://github.com/sheneman/dmci/blob/HEAD/benchmarks/plot_benchmarks.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7d97cce990a1e71a"}},{"code_sha256_prefix":"8f5dbe719f430fe1","entry":"tracked_basenames","repo":"sheneman/dmci","repo_kind":"found_in_text","path":"experiments/check_manifests.py","file_url":"https://github.com/sheneman/dmci/blob/HEAD/experiments/check_manifests.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"8f5dbe719f430fe1"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":null}