[Paper Review] Unlocking Compositional Generalization in Pre-trained Models Using Intermediate Representations
The paper shows that designing intermediate representations (IRs) and applying them with pre-trained seq2seq models yields large gains in compositional generalization across CFQ and text-to-SQL datasets, achieving new state-of-the-art results.
Sequence-to-sequence (seq2seq) models are prevalent in semantic parsing, but have been found to struggle at out-of-distribution compositional generalization. While specialized model architectures and pre-training of seq2seq models have been proposed to address this issue, the former often comes at the cost of generality and the latter only shows limited success. In this paper, we study the impact of intermediate representations on compositional generalization in pre-trained seq2seq models, without changing the model architecture at all, and identify key aspects for designing effective representations. Instead of training to directly map natural language to an executable form, we map to a reversible or lossy intermediate representation that has stronger structural correspondence with natural language. The combination of our proposed intermediate representations and pre-trained models is surprisingly effective, where the best combinations obtain a new state-of-the-art on CFQ (+14.8 accuracy points) and on the template-splits of three text-to-SQL datasets (+15.0 to +19.4 accuracy points). This work highlights that intermediate representations provide an important and potentially overlooked degree of freedom for improving the compositional generalization abilities of pre-trained seq2seq models.
Motivation & Objective
- Motivate improving compositional generalization for semantic parsing with pre-trained models.
- Investigate whether intermediate representations can bridge structural gaps between natural language and meaning representations.
- Demonstrate model-agnostic two-stage decoding that leverages IRs without changing model architecture.
- Identify design principles for IRs that synergize with pre-training.
- Quantify gains across multiple formalisms (SPARQL, SQL, SCAN) and datasets.
Proposed method
- Define reversible and lossy intermediate representations to increase structural alignment with natural language.
- Train Seq2Seq_1 to map x to an intermediate representation z, then recover y via either an inverse transformation (reversible IR) or a second model conditioned on x and z (lossy IR).
- Design IRs to reduce NL–formalism mismatch, increase program structure similarity, and induce hierarchical scoping with brackets where needed.
- Evaluate on CFQ (MCD splits) and three text-to-SQL datasets with template splits, plus SCAN splits (length, turn left).
- Fine-tune pre-trained T5 models on (x, z) or (x, [SEP], z) pairs; compare with baseline no-IR decoding.
- Conduct ablations to understand contributions of RIR vs LIR and their combinations; analyze interaction with pre-training.
Experimental results
Research questions
- RQ1Can intermediate representations (IRs) improve compositional generalization in pre-trained seq2seq models without architectural changes?
- RQ2Which IR designs (reversible vs lossy) and specific design choices most effectively reduce NL–program mismatch and improve generalization?
- RQ3Do IRs synergize with pre-training to outperform prior state-of-the-art on CFQ and text-to-SQL templates?
- RQ4Do IRs maintain performance on i.i.d. splits while boosting compositional generalization?
- RQ5How does IR design impact model dependence on pre-training and architectural capacity?
Key findings
- IRs combined with pre-training yield large gains on compositional splits: CFQ improves by 14.8 accuracy points; template splits of three text-to-SQL datasets improve by 15.0 to 19.4 accuracy points.
- Reversible IRs (RIR) significantly enhance compositional generalization, with further gains when combined with lossy IRs (LIR ind).
- With T5-base/large/3B, the best IRs surpass previous state-of-the-art on CFQ and text-to-SQL template splits, while preserving i.i.d. performance.
- IRs enable near-oracle performance in ablations where gold IR is used, indicating substantial informational leverage from the IRs.
- IRs primarily unlock benefits when used with pre-training; non-pre-trained (no pre-training) models see only modest or negative gains from IRs.
- CFQ: RIR alone yields strong improvements; LIR alone is less consistent; combined IRs provide best results.
- Text-to-SQL: RIR and LIR d +RIR give substantial gains across ATIS, GeoQuery, and Scholar.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.