Programming by Example meets Historical Linguistics: A Large Language Model Based Approach to Sound Law Induction
Atharva Naik, Darsh Agrawal, Hong Sng, Clayton Marr, Kexun Zhang, Nathaniel Romney Robinson, Kalvin Chang, Rebecca Byrnes, Aravind Mysore, Carolyn P. Rosé, David R. Mortensen
Abstract
Historical linguists have long written "programs" that convert reconstructed words in an ancestor language into their attested descendants via ordered string rewrite functions (called SOUND LAWS) However, writing these programs is error-prone, motivating the development of automated SOUND LAW INDUCTION (SLI) which we formulate as Programming by Examples (PBE) with Large Language Models (LLMs). While LLMs have been effective for code generation, recent work has shown that PBE with LLMs is challenging but improvable by fine-tuning, especially with training data drawn from the same distribution as evaluation data. In this paper, we create a conceptual framework regarding what constitutes a "similar distribution" for SLI and propose four kinds of synthetic data generation methods with varying amounts of inductive bias to investigate what leads to the best performance. Based on the results, we create a SOTA open source model for SLI as PBE (+6% pass rate with a third of the parameters of the next best open source LLM).
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
1 top-tier paper has cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
Cited by top-tier papers1
Builds on6
- Magicoder: Empowering Code Generation with OSS-InstructYuxiang Wei, Zhe Wang, Jiawei Liu, Yifeng Ding et al.ICML 2024 · 246 citations
- Jigsaw: Large Language Models meet Program SynthesisNaman Jain, Skanda Vaidyanath, Arun Iyer, Nagarajan Natarajan et al.ICSE 2022 · 134 citations
- Is Programming by Example Solved by LLMs?Wen-Ding Li, Kevin EllisNeurIPS 2024 · 45 citations
- ExeDec: Execution Decomposition for Compositional Generalization in Neural Program SynthesisKensen Shi, Joey Hong, Yinlin Deng, Pengcheng Yin et al.ICLR 2024 · 21 citations
- Counting the Bugs in ChatGPT's Wugs: A Multilingual Investigation into the Morphological Capabilities of a Large Language ModelLeonie Weissweiler, Valentin Hofmann, Anjali Kantharuban, Anna Cai et al.EMNLP 2023 · 10 citations
Related papers
- PBEBench: A Multi-Step Programming by Examples Reasoning Benchmark inspired by Historical LinguisticsAtharva Naik, Prakam, Yash Mathur, Darsh Agrawal et al.ACL Findings 2026
- PRM-PBE: Process Reward Model for Reinforcement Learning in Programming-by-ExampleYue Fang, Zhi Jin, Jie An, Hongshen Chen et al.ICML 2026
- Programming by Backprop: An Instruction is Worth 100 Examples When Finetuning LLMsJonathan Cook, Silvia Sapora, Arash Ahmadian, Akbir Khan et al.ICLR 2026 · 2 citations
- RLEF: Grounding Code LLMs in Execution Feedback with Reinforcement LearningJonas Gehring, Kunhao Zheng, Jade Copet, Vegard Mella et al.ICML 2025
- Execution-guided within-prompt search for programming-by-exampleGust Verbruggen, Ashish Tiwari, Mukul Singh, Vu Le et al.ICLR 2025
