English

Synthesizing DSLs for Few-Shot Learning

Programming Languages 2025-08-27 v2 Formal Languages and Automata Theory

Abstract

We study the problem of synthesizing domain-specific languages (DSLs) for few-shot learning in symbolic domains. Given a base language and instances of few-shot learning problems, where each instance is split into training and testing samples, the DSL synthesis problem asks for a grammar over the base language that guarantees that small expressions solving training samples also solve corresponding testing samples. We prove that the problem is decidable for a class of languages whose semantics over fixed structures can be evaluated by tree automata and when expression size corresponds to parse tree depth in the grammar, and, furthermore, the grammars solving the problem correspond to a regular set of trees. We also prove decidability results for variants of the problem where DSLs are only required to express solutions for input learning problems and where DSLs are defined using macro grammars.

Keywords

Cite

@article{arxiv.2508.16063,
  title  = {Synthesizing DSLs for Few-Shot Learning},
  author = {Paul Krogmeier and P. Madhusudan},
  journal= {arXiv preprint arXiv:2508.16063},
  year   = {2025}
}
R2 v1 2026-07-01T05:01:06.895Z