Compositional Generalization for Natural Language Interfaces to Web APIs
Not on the map. Why?
Abstract (arXiv)
This paper presents Okapi, a new dataset for Natural Language to executable web Application Programming Interfaces (NL2API). This dataset is in English and contains 22,508 questions and 9,019 unique API calls, covering three domains. We define new compositional generalization tasks for NL2API which explore the models' ability to extrapolate from simple API calls in the training set to new and more complex API calls in the inference phase. Also, the models are required to generate API calls that execute correctly as opposed to the existing approaches which evaluate queries with placeholder values. Our dataset is different than most of the existing compositional semantic parsing datasets because it is a non-synthetic dataset studying the compositional generalization in a low-resource setting. Okapi is a step towards creating realistic datasets and benchmarks for studying compositional generalization alongside the existing datasets and tasks. We report the generalization capabilities of sequence-to-sequence baseline models trained on a variety of the SCAN and Okapi datasets tasks. The best model achieves 15% exact match accuracy when generalizing from simple API calls to more complex API calls. This highlights some challenges for future research. Okapi dataset and tasks are publicly available at https://aka.ms/nl2api/data.
Key facts. Cited by 7 papers in the map (data through 7 Oct 2026). Builds on 22 of its 34 references that are in the map. First posted on arXiv 9 Dec 2021.
Builds on
22 of 34 references.
References · 22
- 2017Attention Is All You Needcited by 59,932
- 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
- 2019Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformercited by 14,491
- 2018Spider: A Large-Scale Human-Labeled Dataset for Complex and Cross-Domain Semantic Parsing and Text-to-SQL Taskcited by 1,120
- 2017Seq2SQL: Generating Structured Queries from Natural Language using Reinforcement Learningcited by 679
- 2019Measuring Compositional Generalization: A Comprehensive Method on Realistic Datacited by 280
- 2020COGS: A Compositional Generalization Challenge Based on Semantic Interpretationcited by 260
- 2016Incorporating Copying Mechanism in Sequence-to-Sequence Learningcited by 217
- 2019Towards Complex Text-to-SQL in Cross-Domain Database with Intermediate Representationcited by 210
- 2020Compositional Generalization and Natural Language Variation: Can a Semantic Parsing Approach Handle Both?cited by 147
- 2018Improving Text-to-SQL Evaluation Methodologycited by 133
- 2020Task-Oriented Dialogue as Dataflow Synthesiscited by 122
10 more
- 2016Data Recombination for Neural Semantic Parsingcited by 111
- 2020Compositional Generalization in Semantic Parsing: Pre-training vs. Specialized Architecturescited by 95
- 2020Compositional Generalization via Neural-Symbolic Stack Machinescited by 80
- 2020Span-based Semantic Parsing for Compositional Generalizationcited by 77
- 2020Learning Compositional Rules via Neural Program Synthesiscited by 74
- 2020Compositional Generalization by Learning Analytical Expressionscited by 53
- 2020The EOS Decision and Length Extrapolationcited by 46
- 2020Improving Compositional Generalization in Semantic Parsingcited by 42
- 2019Location Attention for Extrapolation to Longer Sequencescited by 33
- 2019Don't paraphrase, detect! Rapid and Effective Data Collection for Semantic Parsingcited by 24
Built on by
Citing papers per year: 2022: 1; 2023: 1; 2024: 3; 2025: 1; 2026: 1.
7 papers.
- 2024Agent-E: From Autonomous Web Navigation to Foundational Design Principles in Agentic Systemscited by 79
- 2022Compositional Generalisation with Structured Reordering and Fertility Layerscited by 6
- 2023Compositional Generalization without Trees using Multiset Tagging and Latent Permutationscited by 5
- 2024MathViz-E: A Case-study in Domain-Specialized Tool-Using Agentscited by 4
- 2024SLFNet: Generating Semantic Logic Forms from Natural Language Using Semantic Probability Graphscited by 1
- 2025Benchmarking Web API Integration Code Generationcited by 0
- 2026Mitigating Errors in LLM-Generated Web API Invocations via Retrieval-Augmented Generation and Constrained Decodingcited by 0
- 2026Mitigating Errors in LLM-Generated Web API Invocations via Retrieval-Augmented Generation and Constrained Decoding7 Jul 2026
- 2025Benchmarking Web API Integration Code Generation24 Sep 2025
- 2024MathViz-E: A Case-study in Domain-Specialized Tool-Using Agents24 Jul 2024
- 2024Agent-E: From Autonomous Web Navigation to Foundational Design Principles in Agentic Systems17 Jul 2024
- 2024SLFNet: Generating Semantic Logic Forms from Natural Language Using Semantic Probability Graphs29 Mar 2024
- 2023Compositional Generalization without Trees using Multiset Tagging and Latent Permutations26 May 2023
- 2022Compositional Generalisation with Structured Reordering and Fertility Layers6 Oct 2022