Dr. Sarah Chen profile photo

Dr. Sarah Chen

Associate Professor of Computer Science

Stanford University

My research focuses on natural language processing, machine learning, and the intersection of language understanding with knowledge representation.


📍 Stanford, CA
🏛 Stanford University
✉ Email🎓 Google Scholar🆔 ORCID💻 GitHub
← Back to Publications

Neurosymbolic Approaches to Compositional Generalization in Semantic Parsing

Published in NeurIPS, 2024

Jiwon Park, Sarah Chen

Abstract

Compositional generalization—the ability to understand novel combinations of known primitives—remains one of the most persistent challenges in natural language understanding. While humans effortlessly interpret sentences they have never encountered by composing the meanings of familiar words and structures, neural sequence-to-sequence models frequently fail on inputs that require even modest compositional recombination of training examples.

We propose NSP-Comp, a neurosymbolic framework that combines the pattern-matching strengths of neural sequence-to-sequence models with the compositional guarantees of symbolic grammar constraints. Our approach uses a neural encoder to map input utterances to a latent representation, which is then decoded by a constrained symbolic parser that enforces well-formedness and type-consistency at every step. The key innovation is a differentiable interface between the neural and symbolic components that allows end-to-end training while preserving the hard compositional constraints of the grammar.

We evaluate NSP-Comp on three compositional generalization benchmarks: COGS, SCAN, and CFQ. Our method achieves 97.3% accuracy on COGS (vs. 81.2% for the best pure neural baseline), 99.8% on SCAN, and 78.6% on CFQ, setting new state-of-the-art results on all three datasets. Analysis reveals that the symbolic constraints are most beneficial for examples requiring deep compositional nesting and novel argument-structure combinations, precisely the cases where neural models struggle most.

Citation

J. Park, S. Chen. (2024). "Neurosymbolic Approaches to Compositional Generalization in Semantic Parsing." In Advances in NeurIPS 2024.

Download Paper  |  Code  |  Poster  |  BibTeX

Follow:

GitHub

© 2026 Sarah Chen. Powered by Sitelas.