---
title: "Learning Synchronous Grammars for Semantic — Wong 2007"
description: "Learned synchronous grammars had only been applied to semantic parsing for meaning languages without logical variables."
authors: ["Yuk Wah Wong", "Raymond Mooney"]
year: 2007
venue: "Proceedings of the 45th Annual Meeting of the Association of Computational Linguistics"
source: "https://aclanthology.org/P07-1121/"
licence: "CC BY-NC-SA 3.0 (ACL Anthology, before 2016)"
licence_url: "https://creativecommons.org/licenses/by-nc-sa/3.0/"
summary_licence: "Elamur Cosmic License"
canonical: "https://research.elamur.ai/free/papers/wong-2007-learning-synchronous-grammars-semantic-parsing/"
---
[Elamur Research](https://md.research.elamur.ai/) · [this page in HTML](https://research.elamur.ai/free/papers/wong-2007-learning-synchronous-grammars-semantic-parsing/)

[home](https://md.research.elamur.ai/) / [papers](https://md.research.elamur.ai/free/papers/) / [2007](https://md.research.elamur.ai/free/papers/2007/) / Learning Synchronous Grammars for Semantic Parsing with Lambda Calculus

# Learning Synchronous Grammars for Semantic Parsing with Lambda Calculus

**Authors:** [Yuk Wah Wong](https://md.research.elamur.ai/free/authors/yuk-wah-wong/), [Raymond Mooney](https://md.research.elamur.ai/free/authors/raymond-mooney/) · **Year:** 2007 · **Venue:** Proceedings of the 45th Annual Meeting of the Association of Computational Linguistics · **Licence:** [CC BY-NC-SA 3.0 (ACL Anthology, before 2016)](https://creativecommons.org/licenses/by-nc-sa/3.0/)

**Links:** [Publisher's page](https://aclanthology.org/P07-1121/) · [PDF](https://aclanthology.org/P07-1121.pdf) · [OpenAlex](https://openalex.org/W2121465811)

**Citations:** 335 citations (openalex-snapshot · 2026-10-14) · [129](#cited-by) in our library, of the 140673 papers whose bibliographies we read

## Summary
Learned synchronous grammars had only been applied to semantic parsing for meaning languages without logical variables. Predicate-logic representations, which most computational semantics relies on, were therefore out of reach unless one hand-built a variable-free functional language. Wong and Mooney extend their SMT-inspired parser WASP into λ-WASP. It uses a synchronous context-free grammar whose meaning-side rules are λ-functions, so variables can be bound and passed between subformulas compositionally.

The grammar is learned from sentences paired with Prolog logical forms:
- Rules are extracted from GIZA++ word alignments between words and MRL productions.
- A maximum-entropy model chooses among competing derivations.
- Further improvements include conjunct regrouping, two-level rule features and type checking.

On the GEOQUERY U.S. geography database corpus, λ-WASP reaches the best F-measure and by far the best recall among the compared systems (WASP, SCISSOR, Zettlemoyer & Collins). It needs no NL syntax annotation or language-specific templates, and it performs similarly on Spanish, Japanese and Turkish versions of the data. This shows that standard SMT machinery can learn parsers for full logical forms.

## Key points
- **Formalism:** λ-SCFG pairs an NL phrase with a λ-function over MR strings. Arguments attached to nonterminals let logical variables be renamed and shared correctly when the yield is computed.
- **Lexical acquisition:** Rules come from the K = 5 most probable GIZA++ alignments, with variable names ignored to reduce sparsity. A variable is λ-bound only if it also occurs outside the current subtree.
- **Main results:** On the larger GEOQUERY corpus, evaluated with 10-fold cross-validation and 792 training examples, λ-WASP achieved:

  | System | Precision | Recall | F-measure |
  |---|---|---|---|
  | λ-WASP | 91.95 | 86.59 | 89.19 |
  | WASP | 87.19 | 74.77 | 80.50 |
  | SCISSOR | 92.08 | 72.27 | 80.98 |
  | Z&C | 96.25 | 79.29 | 86.95 |

  Z&C's precision is the highest, but it was measured on 280 test examples only.
- **Ablations:**
  - Removing conjunct regrouping lowers precision/recall to 90.73/83.07.
  - Removing two-level rules gives 88.46/84.32.
  - Additionally removing type checking collapses precision/recall to 65.45/63.18.
- **Multilingual test:** A 250-example multilingual GEOQUERY subset (English, Spanish, Japanese, Turkish) yields comparable learning curves across all four languages.

## Interesting ideas
- **Bind only what escapes a subtree.** During rule extraction, λ-abstract exactly those variables that are also used elsewhere in the logical form. This simple test for which variables to expose could help any grammar-induction or program-synthesis setup that must assemble structures containing shared variables.
- **Linearize the target as grammar productions.** If the target structure has an unambiguous grammar, its unique sequence of productions can be aligned to words with off-the-shelf MT aligners. This turns structured output into something SMT tools already handle.
- **Use type constraints to prune derivations.** Partial parses are discarded when a variable could not refer to any entity type, since users rarely ask nonsensical questions. Cheap domain-type filtering of this kind sharply raised both precision and recall, so it may pay off in other structured-prediction decoders.
- **Evaluate by executed answers.** A parse counts as correct when it retrieves the same database answer as the gold logical form. This credits semantically equivalent outputs, which suits any task where the meaning representation is executable.
- **Test language independence with parallel data.** Translating the questions into several languages while keeping the logical forms fixed checks whether a parser truly needs no language-specific resources. The same design would suit evaluations involving lower-resource languages such as Ukrainian.

*Our summary of the paper, in our own words — not its text. The work belongs to its authors; read it at the links above.*

Fields: [Machine translation](https://md.research.elamur.ai/free/shelves/machine-translation/) · [Natural language processing](https://md.research.elamur.ai/free/shelves/nlp/)

Topics: [Machine translation](https://md.research.elamur.ai/free/topics/machine-translation/)

## Cited by

Cited by

129 papers of our library cite it (of the 140673 whose bibliographies we read); 4 of them have a page here, 125 not yet.

- [Learning to Compose Neural Networks for Question Answering](https://md.research.elamur.ai/free/papers/andreas-2016-learning-compose-neural-networks-question/)
- [Weakly Supervised Learning of Semantic Parsers for Mapping Instructions to Actions](https://md.research.elamur.ai/free/papers/artzi-2013-weakly-supervised-learning-semantic-parsers/)
- [Parsing English into Abstract Meaning Representation Using Syntax-Based Machine Translation](https://md.research.elamur.ai/free/papers/pust-2015-parsing-english-into-abstract-meaning/)
- [Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Task](https://md.research.elamur.ai/free/papers/yu-2018-spider-large-scale-human-labeled/)

## Cite

The paper itself, not this page. BibTeX from the library's record of the work.

```bibtex
@inproceedings{wong2007learning,
  title = {{Learning Synchronous Grammars for Semantic Parsing with Lambda Calculus}},
  author = {Wong, Yuk Wah and Mooney, Raymond},
  booktitle = {Proceedings of the 45th Annual Meeting of the Association of Computational Linguistics},
  year = {2007},
  url = {https://aclanthology.org/P07-1121/}
}
```

- [← previous Large Language Models in Machine Translation](https://md.research.elamur.ai/free/papers/brants-2007-large-language-models-machine-translation/)
- [next → Lexical Influences on the Perception of Sarcasm](https://md.research.elamur.ai/free/papers/kreuz-2007-lexical-influences-perception-sarcasm/)
- [↑ back to papers of 2007](https://md.research.elamur.ai/free/papers/2007/)

## References

19 references, 6 of them with a card of ours. ↗ leads to the work, «find» searches for one we have no id for yet.

1. A. V. Aho and J. D. Ullman. 1972. The Theory of Parsing, Translation, and Compiling. Prentice Hall, Englewood Cliffs, NJ. [find](https://scholar.google.com/scholar?q=A%2E+V%2E+Aho+and+J%2E+D%2E+Ullman%2E+1972%2E+The+Theory+of+Parsing%2C+Translation%2C+and+Compiling%2E+Prentice+Hall%2C+Englewood+Cliffs%2C+NJ%2E)
2. S. Bayer, J. Burger, W. Greiff, and B. Wellner. 2004. The MITRE logical form generation system. In Proc. of Senseval-3, Barcelona, Spain, July. [find](https://scholar.google.com/scholar?q=S%2E+Bayer%2C+J%2E+Burger%2C+W%2E+Greiff%2C+and+B%2E+Wellner%2E+2004%2E+The+MITRE+logical+form+generation+system%2E+In+Proc%2E+of+Senseval%2D3%2C+Barcelona%2C+Spain%2C+July%2E)
3. P. Blackburn and J. Bos. 2005. Representation and Inference for Natural Language: A First Course in Computational Semantics. CSLI Publications, Stanford, CA. [find](https://scholar.google.com/scholar?q=P%2E+Blackburn+and+J%2E+Bos%2E+2005%2E+Representation+and+Inference+for+Natural+Language%3A+A+First+Course+in+Computational+Semantics%2E+CSLI+Publications%2C+Stanford%2C+CA%2E)
4. J. Bos. 2005. Towards wide-coverage semantic interpretation. In Proc. of IWCS-05, Tilburg, The Netherlands, January. [find](https://scholar.google.com/scholar?q=J%2E+Bos%2E+2005%2E+Towards+wide%2Dcoverage+semantic+interpretation%2E+In+Proc%2E+of+IWCS%2D05%2C+Tilburg%2C+The+Netherlands%2C+January%2E)
5. D. Chiang. 2005. A hierarchical phrase-based model for statistical machine translation. In Proc. of ACL-05, pages 263– 270, Ann Arbor, MI, June. [find](https://scholar.google.com/scholar?q=D%2E+Chiang%2E+2005%2E+A+hierarchical+phrase%2Dbased+model+for+statistical+machine+translation%2E+In+Proc%2E+of+ACL%2D05%2C+pages+263%E2%80%93+270%2C+Ann+Arbor%2C+MI%2C+June%2E) [our card](https://md.research.elamur.ai/free/papers/chiang-2005-hierarchical-phrase-based-model-statistical/)
6. M. Collins and T. Koo. 2005. Discriminative reranking for natural language parsing. Computational Linguistics, 31(1):25–69. [↗](https://doi.org/10.1162/0891201053630273) [our card](https://md.research.elamur.ai/free/papers/collins-2000-discriminative-reranking-natural-language-parsing/)
7. M. Galley, J. Graehl, K. Knight, D. Marcu, S. DeNeefe, W. Wang, and I. Thayer. 2006. Scalable inference and training of context-rich syntactic translation models. In Proc. of COLING/ACL-06, pages 961–968, Sydney, Australia, July. Recall (%) English Spanish Japanese Turkish 100 150 Number of training examples R. Ge and R. J. Mooney. 2005. A statistical semantic parser that integrates syntax and semantics. In Proc. of CoNLL-05, pages 9–16, Ann Arbor, MI, July. [find](https://scholar.google.com/scholar?q=M%2E+Galley%2C+J%2E+Graehl%2C+K%2E+Knight%2C+D%2E+Marcu%2C+S%2E+DeNeefe%2C+W%2E+Wang%2C+and+I%2E+Thayer%2E+2006%2E+Scalable+inference+and+training+of+context%2Drich+syntactic+translation+models%2E+In+Proc%2E+of+COLING%2FACL%2D06%2C+pages+961%E2%80%93) [our card](https://md.research.elamur.ai/free/papers/galley-2006-scalable-inference-training-context-rich/)
8. H. P. Grice. 1975. Logic and conversation. In P. Cole and J. Morgan, eds., Syntax and Semantics 3: Speech Acts, pages 41–58. Academic Press, New York. [↗](https://doi.org/10.1163/9789004368811_003)
9. A. K. Joshi and K. Vijay-Shanker. 2001. Compositional semantics with lexicalized tree-adjoining grammar (LTAG): How much underspecification is necessary? In H. Bunt et al., eds., Computing Meaning, volume 2, pages 147–163. Kluwer Academic Publishers, Dordrecht, The Netherlands. [↗](https://doi.org/10.1007/978-94-010-0572-2_9)
10. R. Montague. 1970. Universal grammar. Theoria, 36:373–398. [find](https://scholar.google.com/scholar?q=R%2E+Montague%2E+1970%2E+Universal+grammar%2E+Theoria%2C+36%3A373%E2%80%93398%2E)
11. F. J. Och and H. Ney. 2003. A systematic comparison of various statistical alignment models. Computational Linguistics, 29(1):19–51. [↗](https://doi.org/10.1162/089120103321337421)
12. K. A. Papineni, S. Roukos, and R. T. Ward. 1997. Feature-based language understanding. In Proc. of EuroSpeech-97, pages 1435–1438, Rhodes, Greece. [find](https://scholar.google.com/scholar?q=K%2E+A%2E+Papineni%2C+S%2E+Roukos%2C+and+R%2E+T%2E+Ward%2E+1997%2E+Feature%2Dbased+language+understanding%2E+In+Proc%2E+of+EuroSpeech%2D97%2C+pages+1435%E2%80%931438%2C+Rhodes%2C+Greece%2E)
13. W. Schuler. 2003. Using model-theoretic semantic interpretation to guide statistical parsing and word recognition in a spoken language interface. In Proc. of ACL-03, pages 529– 536. [find](https://scholar.google.com/scholar?q=W%2E+Schuler%2E+2003%2E+Using+model%2Dtheoretic+semantic+interpretation+to+guide+statistical+parsing+and+word+recognition+in+a+spoken+language+interface%2E+In+Proc%2E+of+ACL%2D03%2C+pages+529%E2%80%93+536%2E)
14. Y. W. Wong and R. J. Mooney. 2006. Learning for semantic parsing with statistical machine translation. In Proc. of HLT/NAACL-06, pages 439–446, New York City, NY. [find](https://scholar.google.com/scholar?q=Y%2E+W%2E+Wong+and+R%2E+J%2E+Mooney%2E+2006%2E+Learning+for+semantic+parsing+with+statistical+machine+translation%2E+In+Proc%2E+of+HLT%2FNAACL%2D06%2C+pages+439%E2%80%93446%2C+New+York+City%2C+NY%2E)
15. Y. W. Wong and R. J. Mooney. 2007. Generation by inverting a semantic parser that uses statistical machine translation. In Proc. of NAACL/HLT-07, Rochester, NY, to appear. [find](https://scholar.google.com/scholar?q=Y%2E+W%2E+Wong+and+R%2E+J%2E+Mooney%2E+2007%2E+Generation+by+inverting+a+semantic+parser+that+uses+statistical+machine+translation%2E+In+Proc%2E+of+NAACL%2FHLT%2D07%2C+Rochester%2C+NY%2C+to+appear%2E) [our card](https://md.research.elamur.ai/free/papers/wong-2007-generation-inverting-semantic-parser-that/)
16. D. Wu. 1997. Stochastic inversion transduction grammars and bilingual parsing of parallel corpora. Computational Linguistics, 23(3):377–403. [find](https://scholar.google.com/scholar?q=D%2E+Wu%2E+1997%2E+Stochastic+inversion+transduction+grammars+and+bilingual+parsing+of+parallel+corpora%2E+Computational+Linguistics%2C+23%283%29%3A377%E2%80%93403%2E) [our card](https://md.research.elamur.ai/free/papers/wu-1997-stochastic-inversion-transduction-grammars-bilingual/)
17. K. Yamada and K. Knight. 2001. A syntax-based statistical translation model. In Proc. of ACL-01, pages 523–530, Toulouse, France. [find](https://scholar.google.com/scholar?q=K%2E+Yamada+and+K%2E+Knight%2E+2001%2E+A+syntax%2Dbased+statistical+translation+model%2E+In+Proc%2E+of+ACL%2D01%2C+pages+523%E2%80%93530%2C+Toulouse%2C+France%2E) [our card](https://md.research.elamur.ai/free/papers/yamada-2001-syntax-based-statistical-translation-model/)
18. J. M. Zelle and R. J. Mooney. 1996. Learning to parse database queries using inductive logic programming. In Proc. of AAAI-96, pages 1050–1055, Portland, OR, August. [find](https://scholar.google.com/scholar?q=J%2E+M%2E+Zelle+and+R%2E+J%2E+Mooney%2E+1996%2E+Learning+to+parse+database+queries+using+inductive+logic+programming%2E+In+Proc%2E+of+AAAI%2D96%2C+pages+1050%E2%80%931055%2C+Portland%2C+OR%2C+August%2E)
19. L. S. Zettlemoyer and M. Collins. 2005. Learning to map sentences to logical form: Structured classification with probabilistic categorial grammars. In Proc. of UAI-05, Edinburgh, Scotland, July. [find](https://scholar.google.com/scholar?q=L%2E+S%2E+Zettlemoyer+and+M%2E+Collins%2E+2005%2E+Learning+to+map+sentences+to+logical+form%3A+Structured+classification+with+probabilistic+categorial+grammars%2E+In+Proc%2E+of+UAI%2D05%2C+Edinburgh%2C+Scotland%2C+July%2E)
