Abstract
On-the-fly composition of service-based software solutions is still a challenging task. Even more challenges emerge when facing automatic service composition in markets of composed services for end users. In this paper, we focus on the functional discrepancy between “what a user wants” specified in terms of a request and “what a user gets” when executing a composed service. To meet the challenge of functional discrepancy, we propose the combination of existing symbolic composition approaches with machine learning techniques. We developed a learning recommendation system that expands the capabilities of existing composition algorithms to facilitate adaptivity and consequently reduces functional discrepancy. As a representative of symbolic techniques, an Artificial Intelligence planning based approach produces solutions that are correct with respect to formal specifications. Our learning recommendation system supports the symbolic approach in decision-making. Reinforcement Learning techniques enable the recommendation system to adjust its recommendation strategy over time based on user ratings. We implemented the proposed functionality in terms of a prototypical composition framework. Preliminary results from experiments conducted in the image processing domain illustrate the benefit of combining both complementary techniques.
Introduction: The Challenge of On-The-Fly Computing
The vision of "On-The-Fly" (OTF) computing envisions a world where users can request custom software solutions—such as a specific image processing pipeline—and have a provider automatically assemble them from a dynamic market of microservices. However, a significant hurdle remains: functional discrepancy. This is the gap between what a user formally requests and the actual quality or suitability of the resulting software solution.
Functional discrepancy arises from three primary factors:
- Abstraction: Formal specifications often lack the granularity to distinguish between similar algorithms (e.g., Gaussian vs. Median blur).
- Data-Dependency: A service’s performance often depends on the specific input data, which is unpredictable at composition time.
- Inexpert Users: Users may struggle to articulate precise technical requirements.
Methodology: A Hybrid Approach
To address these challenges, the authors propose a framework that integrates two complementary techniques:
- Symbolic Composition (The Guardrail): An AI planning-based forward search algorithm identifies all sequences of services that are syntactically and semantically "correct" according to formal IOPE (Input, Output, Preconditions, and Effects) specifications.
- Reinforcement Learning (The Guide): To select the optimal path among formally valid options, the system employs a recommendation engine based on Q-Learning.
The framework transforms the composition search space into a Markov Decision Process (MDP). A "Composition Rule Manager" (CRM) generates grammar rules for valid steps, while a "Temporal Difference Learner" (TDL) maintains Q-values (quality estimates) based on user feedback. Over time, the system learns which service combinations best satisfy user expectations.
Experimental Evaluation
The approach was evaluated in the image processing domain using services implemented with the OpenCV library. The testbed included 14 thresholding services, 4 blurring services, and 10 morphological filters.
The authors conducted 30 independent simulation runs, each with 1,000 composition iterations, testing the system's ability to compensate for varying levels of request precision.
Key Results and Insights
The study compared three strategies: pure planning with random selection (e1), planning with local RL (e2), and planning with global/local RL (e3).
- Performance Gains: The hybrid approach (e2) significantly outperformed the baseline (e1), increasing the average reward from ~0.55 to ~0.85 after 400 iterations.
- Resilience to Vague Requests: Even when specific constraints were removed from the request, the RL-guided system eventually converged on the desired solution by learning from feedback.
- The Greedy Advantage: Strategy e2 (local greedy selection) generally performed best, suggesting that using RL to rank immediate next-steps is more effective in this context than trying to model the entire global state space.
Conclusion and Future Work
By combining the logical rigor of symbolic AI with the adaptive learning of Reinforcement Learning, this framework successfully reduces functional discrepancy in automated service composition. Future work will address state space explosion through abstraction, handle "concept drift" in user preferences, and extend the model to support complex non-linear workflows including loops and conditionals.
Summary updated