[Paper Review] BenchCLAMP: A Benchmark for Evaluating Language Models on Syntactic and Semantic Parsing
BenchCLAMP is a benchmark for evaluating language models on syntactic and semantic parsing using constrained decoding via context-free grammars. It enables reliable performance comparison across eight models, showing that fine-tuned encoder-decoder models with constrained decoding achieve state-of-the-art results, especially in low-resource settings.
Recent work has shown that generation from a prompted or fine-tuned language model can perform well at semantic parsing when the output is constrained to be a valid semantic representation. We introduce BenchCLAMP, a Benchmark to evaluate Constrained LAnguage Model Parsing, that includes context-free grammars for seven semantic parsing datasets and two syntactic parsing datasets with varied output representations, as well as a constrained decoding interface to generate only valid outputs covered by these grammars. We provide low, medium, and high resource splits for each dataset, allowing accurate comparison of various language models under different data regimes. Our benchmark supports evaluation of language models using prompt-based learning as well as fine-tuning. We benchmark eight language models, including two GPT-3 variants available only through an API. Our experiments show that encoder-decoder pretrained language models can achieve similar performance or surpass state-of-the-art methods for syntactic and semantic parsing when the model output is constrained to be valid.
Motivation & Objective
- To address the lack of standardized evaluation for language models on structured prediction tasks like parsing.
- To reduce the barrier for developers to evaluate language models on parsing by providing reusable grammars and a constrained decoding interface.
- To compare performance across prompt-based learning and fine-tuning on diverse parsing datasets with varying data regimes.
- To investigate the impact of constrained decoding, context encoding, and prompt engineering on parsing accuracy.
- To establish best practices for using language models in syntactic and semantic parsing with valid output generation.
Proposed method
- Design a benchmark with nine parsing datasets covering seven semantic parsing and two syntactic parsing tasks, each with context-free grammars for valid output generation.
- Provide low, medium, and high resource splits for each dataset to evaluate performance under different data regimes.
- Implement a constrained decoding interface that ensures only grammatically valid outputs are generated, using the provided context-free grammars.
- Support both prompt-based learning and fine-tuning by integrating the grammars into decoding pipelines for autoregressive and sequence-to-sequence models.
- Use retrieval-based prompt engineering with BM25 and sentence embeddings (e.g., SentenceT5-xxl) to improve few-shot prompting performance.
- Evaluate model performance using task-specific metrics such as LISPRESS match accuracy and exact match on semantic and syntactic parsing tasks.
Experimental results
Research questions
- RQ1How does constrained decoding via context-free grammars improve parsing performance across different language models and data regimes?
- RQ2What is the relative impact of few-shot prompting versus fine-tuning on parsing accuracy, especially in low-resource settings?
- RQ3How do different prompt engineering strategies—such as example ordering and context inclusion—affect few-shot model performance?
- RQ4To what extent do retrieval-based prompt selection methods improve few-shot prompting accuracy compared to random or heuristic selection?
- RQ5How does grammar induction from partial training data affect constrained decoding performance in low-resource scenarios?
Key findings
- Fine-tuned encoder-decoder models like T5 and BART achieve performance comparable to or exceeding state-of-the-art methods on all parsing datasets when constrained decoding is applied.
- Constrained decoding provides the largest performance gains in low-resource settings, with improvements of up to 5–7% over unconstrained generation.
- For few-shot prompted models, constrained decoding is essential—without it, models fail to generate valid parses, especially in complex tasks like constituency and dependency parsing.
- Prompt engineering that places the most relevant examples closest to the generation head improves few-shot performance, particularly in low-data regimes.
- SentenceT5-xxl outperforms BM25 and other sentence embedding models in prompt retrieval, achieving 39.3% accuracy on SMCalFlow in the low-resource setting.
- Using grammars induced from the full training set yields slightly better results than those from low-resource splits, with a 1–2% drop in accuracy when using split-specific grammars in low-resource settings.
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.