atlas

Research map / Large language models / Agents, code and math

LILO: Learning Interpretable Libraries by Compressing and Documenting Code

ICLR 2024 · Large language models › Agents, code and math · approach: LLM-guided program synthesis · 2 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

LILO combines LLM-guided program synthesis, Stitch-based compression, and LLM auto-documentation to learn interpretable program libraries that outperform DreamCoder and an LLM-only baseline on REGEX, CLEVR, and LOGO.

Problem

Library learning for program synthesis is computationally expensive with enumerative search (DreamCoder needs CPU-months), and learned libraries are hard to interpret; LLMs struggle to use anonymous abstractions.

Approach

Alternate LLM-guided search with enumerative search, compress solutions with Stitch's branch-and-bound lambda-abstraction refactoring each iteration, and use an LLM to generate human-readable names and docstrings (AutoDoc) for abstractions, which improves both interpretability and downstream LLM synthesis.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
add enumerative search (ablation)LILO · LOGOsolve rate (mean %): 21.02 -> 48.95Helped
add enumerative search (ablation)LILO · REGEXsolve rate (mean %): 62.93 -> 77.07Helped
add enumerative search (ablation)LILO · CLEVRsolve rate (mean %): 88.03 -> 96.76Helped
add AutoDoc to Stitch-compressed abstractions (ablation)LILO NoSearch · REGEXsolve rate (mean %): +9.73Helped
add AutoDoc to Stitch-compressed abstractions (ablation)LILO NoSearch · CLEVRsolve rate (mean %): +2.27Helped
add AutoDoc to Stitch-compressed abstractions (ablation)LILO NoSearch · LOGOsolve rate (mean %): +0.00No clear effect
add Stitch compression without AutoDoc (ablation)LLMSolver · REGEXsolve rate (mean %): -30.60Hurt
add Stitch compression without AutoDoc (ablation)LLMSolver · CLEVRsolve rate (mean %): -2.91Hurt
add Stitch compression without AutoDoc (ablation)LLMSolver · LOGOsolve rate (mean %): -11.11Hurt
select examples by cosine similarity instead of random sampling (ablation)LILO · REGEXsolve rate (mean %)No clear effect
select examples by cosine similarity instead of random sampling (ablation)LILO · CLEVRsolve rate (mean %)No clear effect
select examples by cosine similarity instead of random sampling (ablation)LILO · LOGOsolve rate (mean %)No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: REGEX string editing dataset (LAPS) CLEVR-based scene reasoning dataset (LAPS) LOGO turtle graphics dataset (LAPS)

Benchmarks: REGEX CLEVR LOGO

Metrics: percent of test tasks solved (max, mean, std over 3 seeds)

Baselines: DreamCoder LLM Solver (no library learning) LLM Solver + enumerative search LILO without search LILO without AutoDoc

Builds on: DreamCoder Stitch LAPS

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy