Search for contacts, projects,
courses and publications

SAPIENS: Supporting the API Lifecycle with Neuro-Symbolic AI

People

 

Martin Lopez A.

(Responsible)

Abstract

As software weaves itself into the very fabric of our world, web application programming interfaces (APIs) turn into the stitches, the glue that holds everything together. Web APIs allow heterogeneous systems to communicate over the Internet, and they provide access to all kinds of data and services. We all use web APIs every day, when we post a tweet, order food online, book a flight, or watch a movie. Supporting the development and maintenance of web APIs can have a tremendous impact both on the productivity of developers and on the quality of the software they produce.

Today, artificial intelligence (AI) is a key ingredient of software development, with tools like ChatGPT and GitHub Copilot changing the way software is created. Anyone can develop software. This might seem compelling at first, but it poses challenges like properly integrating AI into the developer workflow and ensuring the quality of AI-generated software. In the realm of web APIs, AI-driven development falls short. The API lifecycle is complex, as it includes over a dozen phases that involve two parties, API producers and consumers. Activities in these lifecycle phases go far beyond just coding, for example, monitoring (e.g., checking for breaking changes that could affect API consumers), end-to-end testing (e.g., generating flows of HTTP requests to validate the service behavior), or software comprehension (e.g., understanding the API documentation or specification to integrate it into a client application), to name but a few.

To address the challenge of easing a wide variety of complex tasks in the API lifecycle, I conjecture that neuro-symbolic AI (NSAI) is the way forward. NSAI combines the power of neural networks such as pre-trained code models and large language models (LLMs) with the robustness and determinism of symbolic techniques such as invariant detection and constraint programming. As such, it is well suited for the web API domain, where the behavior of neural models trained on thousands of API resources can be constrained by the grammar of API specifications or the runtime information of APIs themselves. Along these lines, I propose the SAPIENS project: Supporting the API Lifecycle with Neuro-Symbolic AI. The goal of the project is twofold: (i) to empower developers in the development, maintenance and consumption of web APIs, and (ii) to improve the reliability of real-world services. To reach this goal, SAPIENS will investigate the following research questions (RQs):

RQ1: How can we tailor AI-supported solutions to the web API domain? The unique nature of web APIs poses challenges to AI-driven development. We will mine and collect extensive API resources and use them to train the first-ever API-centric machine learning (ML) model, which will be intelligently combined with symbolic techniques to support API-related tasks.

RQ2: Can domain-specific NSAI techniques surpass general AI-based solutions for web API development? We will support API design and implementation by combining code-generation heuristics with fine-tuned versions of the API-centric model, and assess the approaches against state-of-the-art techniques—purely neural.

RQ3: How can we leverage NSAI to effectively test web APIs and detect faults? Unlike existing approaches which test APIs via fuzzing (random inputs), we will automate the generation of test oracles, which determine the correctness of the API's outputs. Test oracles enable both testing and monitoring of APIs at large scale. We will integrate LLMs with invariant detection and grammar-directed techniques to generate meaningful oracles.

RQ4: Can NSAI techniques ease the consumption of APIs? To support not only API producers (e.g., developers) but also consumers (e.g., regular users), we will enable the usage of APIs solely based on their specification and natural language queries, via a conversational interface. This will foster a world of Open Data, where anyone can access and use APIs.

The impact of SAPIENS may be translated into: (i) revolutionizing the way in which developers produce and consume web APIs, and (ii) finding critical faults in real-world services. I am highly qualified to lead this project, with a strong background in software testing—having found hundreds of bugs in APIs like YouTube and Amadeus—and web engineering—having created tools and approaches for web API management. To contribute to the project's success, I count on international collaborations (Switzerland, Luxembourg, USA) with top scientists in the field. To transfer results to industry, we will materialize our approaches into plugins for tools such as Visual Studio Code and Postman, the latter being a world-leading API platform with over 30 million users.

Additional information

Start date
01.09.2025
End date
31.08.2029
Duration
49 Months
Funding sources
SNSF, Swiss National Science Foundation
Status
Active
Category
Swiss National Science Foundation / Ambizione