Semantic Property Dependency Graph (SPDG)
- Semantic Property Dependency Graph (SPDG) is a dependency-embedded semantic graph that models REST API operations using semantic similarity scores.
- It integrates into multi-agent testing frameworks to guide coordinated test sequences, simplifying the exploration of complex API dependencies.
- Empirical evaluations demonstrate that SPDG enhances operational coverage and fault detection, outperforming traditional black-box API testing methods.
A Semantic Property Dependency Graph (SPDG) is a dependency-embedded semantic graph structure utilized in the context of black-box REST API testing. It is designed to represent dependencies between REST API operations by capturing semantic similarity scores, thereby enabling a more structured and efficient exploration of complex API spaces. The SPDG integrates into multi-agent testing frameworks, allowing agent cooperation to optimize dependency-aware coverage, simplify the search space, and enhance fault detection capabilities when combined with reinforcement learning and LLMs (Kim et al., 2024).
1. Conceptual Framework
An SPDG encodes relationships between REST API operations by constructing a graph whose nodes represent individual API operations, and whose edges encapsulate semantic dependencies. The SPDG does not merely capture syntactic links, but also incorporates semantic similarity scores to express the degree of dependency or closeness between API operations. These scores guide test generation strategies to target related or interdependent API endpoints, enhancing the thoroughness of coverage and the likelihood of discovering faults that manifest only in particular operational sequences or under dependency constraints.
The approach utilizing the SPDG treats REST API testing as a separable multi-agent problem, collaborating through shared understanding of dependencies as modeled in the SPDG. This stands in contrast to conventional black-box testing tools, which tend to treat API elements (endpoints, parameters, or values) in isolation, leading to suboptimal code and operation coverage (Kim et al., 2024).
2. Structure and Construction
The SPDG is formally constructed by defining a set of nodes corresponding to the available API operations in a given specification (e.g., as enumerated in OpenAPI). Edges in the graph represent potential dependencies, informed not purely by parameter coincidence or documentation heuristics, but by calculated semantic similarity scores. These scores—used to weight graph edges—reflect how closely the operations are related, thus determining the potential for parameter, value, or response dependencies between APIs.
Within the framework, the semantic similarity score is the mechanism by which the search space for dependencies is simplified and made tractable for automated reasoning agents. The resulting SPDG enables efficient identification and prioritization of dependency-relevant paths for test execution.
3. Integration with Multi-Agent Testing
AutoRestTest, the testing system adopting the SPDG, incorporates four cooperating agents: API, dependency, parameter, and value agents. The SPDG serves as a shared substrate for these agents—particularly the dependency agent—which consults the graph structure to suggest promising sequences or combinations of API invocations that maximize dependent coverage.
Multi-agent reinforcement learning (MARL) dynamically optimizes the exploration policy of agents based on feedback about coverage and detected faults. The SPDG integrates into this loop by informing agent actions, allowing coordinated strategies that make use of both the semantic relationships (as encoded in the graph) and empirical outcomes during the testing process (Kim et al., 2024).
4. Practical Deployment and Evaluation
In empirical evaluations conducted using AutoRestTest on 12 real-world REST services, the utilization of the SPDG contributed to superior performance in three primary metrics: code coverage, operation coverage, and fault detection capability. The SPDG component was explicitly shown in ablation studies to constitute an individually crucial contributor to system effectiveness. Notably, AutoRestTest was uniquely successful in triggering internal server errors on target services—specifically, an internal server error in the Spotify service—demonstrating the practical efficacy of dependency-aware semantic exploration fostered by the SPDG (Kim et al., 2024).
The following table summarizes key contributions of the SPDG component in AutoRestTest, as evidenced by ablation studies:
| Component | Contribution | Metric Improved |
|---|---|---|
| SPDG | Dependency reasoning | Fault detection, coverage |
| LLM | Domain-specific input generation | Input realism |
| MARL | Adaptive exploration | Overall agent performance |
5. Relationship to Value Generation and LLMs
The SPDG operates in concert with LLMs within the AutoRestTest framework. While LLMs handle domain-specific value generation—providing realistic input payloads for sampled API parameters—the SPDG ensures that the values generated are applied within dependency-respecting operational sequences. This combination further refines the search space: LLMs contribute contextually appropriate values, and the SPDG channels these values into operational paths where semantic dependencies are most informative for fault detection.
6. Role in Advancing Black-Box API Testing
The introduction of the SPDG represents a substantive advance in black-box REST API testing, addressing deficiencies of prior tools that examined API elements in isolation. The dependency-embedded semantic structure provides superior guidance for exploratory testing agents, yielding measurable gains in coverage and error detection compared to prior-generation tools, including those augmented by prompt-based LLM input generators (e.g., RESTGPT). Results indicate that a comprehensive test strategy leveraging SPDGs can expose behaviors and errors unreachable via isolated or random input strategies (Kim et al., 2024).
A plausible implication is that SPDGs may generalize to other domains where structured semantic dependencies govern software behavior, suggesting potential extensions beyond the REST API context.
7. Empirical Impact and Research Significance
Ablation studies on AutoRestTest explicitly demonstrate that each modeled component—the SPDG, LLM, and agent-based learning—provides additive effectiveness for REST API testing. The SPDG's main empirical benefit arises from its ability to simplify the search over dependencies using semantic similarity, enabling agents to craft tests that both maximize coverage and uncover faults that are dependency-sensitive. These contributions result in demonstrable improvements over both legacy and LLM-assisted black-box testing tools in multiple real-world scenarios, emphasizing the centrality of the SPDG in state-of-the-art multi-agent API test frameworks (Kim et al., 2024).