Searching for More Efficient Dynamic Programs

Tim Vieira, Ryan Cotterell, Jason Eisner


Abstract
Computational models of human language often involve combinatorial problems. For instance, a probabilistic parser may marginalize over exponentially many trees to make predictions. Algorithms for such problems often employ dynamic programming and are not always unique. Finding one with optimal asymptotic runtime can be unintuitive, time-consuming, and error-prone. Our work aims to automate this laborious process. Given an initial correct declarative program, we search for a sequence of semantics-preserving transformations to improve its running time as much as possible. To this end, we describe a set of program transformations, a simple metric for assessing the efficiency of a transformed program, and a heuristic search procedure to improve this metric. We show that in practice, automated search—like the mental search performed by human programmers—can find substantial improvements to the initial program. Empirically, we show that many speed-ups described in the NLP literature could have been discovered automatically by our system.
Anthology ID:
2021.findings-emnlp.322
Volume:
Findings of the Association for Computational Linguistics: EMNLP 2021
Month:
November
Year:
2021
Address:
Punta Cana, Dominican Republic
Editors:
Marie-Francine Moens, Xuanjing Huang, Lucia Specia, Scott Wen-tau Yih
Venue:
Findings
SIG:
SIGDAT
Publisher:
Association for Computational Linguistics
Note:
Pages:
3812–3830
Language:
URL:
https://aclanthology.org/2021.findings-emnlp.322
DOI:
10.18653/v1/2021.findings-emnlp.322
Bibkey:
Cite (ACL):
Tim Vieira, Ryan Cotterell, and Jason Eisner. 2021. Searching for More Efficient Dynamic Programs. In Findings of the Association for Computational Linguistics: EMNLP 2021, pages 3812–3830, Punta Cana, Dominican Republic. Association for Computational Linguistics.
Cite (Informal):
Searching for More Efficient Dynamic Programs (Vieira et al., Findings 2021)
Copy Citation:
PDF:
https://aclanthology.org/2021.findings-emnlp.322.pdf
Video:
 https://aclanthology.org/2021.findings-emnlp.322.mp4