Harnessing Pre-trained Generalist Agents for Software Engineering Tasks (2312.15536v1)
Abstract: Nowadays, we are witnessing an increasing adoption of AI to develop techniques aimed at improving the reliability, effectiveness, and overall quality of software systems. Deep reinforcement learning (DRL) has recently been successfully used for automation in complex tasks such as game testing and solving the job-shop scheduling problem. However, these specialized DRL agents, trained from scratch on specific tasks, suffer from a lack of generalizability to other tasks and they need substantial time to be developed and re-trained effectively. Recently, DRL researchers have begun to develop generalist agents, able to learn a policy from various environments and capable of achieving performances similar to or better than specialist agents in new tasks. In the Natural Language Processing or Computer Vision domain, these generalist agents are showing promising adaptation capabilities to never-before-seen tasks after a light fine-tuning phase and achieving high performance. This paper investigates the potential of generalist agents for solving SE tasks. Specifically, we conduct an empirical study aimed at assessing the performance of two generalist agents on two important SE tasks: the detection of bugs in games (for two games) and the minimization of makespan in a scheduling task, to solve the job-shop scheduling problem (for two instances). Our results show that the generalist agents outperform the specialist agents with very little effort for fine-tuning, achieving a 20% reduction of the makespan over specialized agent performance on task-based scheduling. In the context of game testing, some generalist agent configurations detect 85% more bugs than the specialist agents. Building on our analysis, we provide recommendations for researchers and practitioners looking to select generalist agents for SE tasks, to ensure that they perform effectively.
- (2016) Cartpole. https://gym.openai.com/envs/CartPole-v0/
- (2018) Mspacman. https://www.gymlibrary.dev/environments/atari/ms_pacman/
- (2023) Replication package. https://github.com/npaulinastevia/Harnessing_generalist_agents_on_SE
- Brown AM (2005) A new software for carrying out one-way anova post hoc tests. Computer methods and programs in biomedicine 79(1):89–95
- Games PA, Howell JF (1976) Pairwise multiple comparison procedures with unequal n’s and/or variances: a monte carlo study. Journal of Educational Statistics 1(2):113–125
- Hochreiter S, Schmidhuber J (1997) Long short-term memory. Neural computation 9(8):1735–1780
- Kan AR (2012) Machine scheduling problems: classification, complexity and computations. Springer Science & Business Media
- Kaur S, Verma A (2012) An efficient approach to genetic algorithm for task scheduling in cloud computing environment. International Journal of Information Technology and Computer Science (IJITCS) 4(10):74–79
- McGraw KO, Wong SP (1992) A common language effect size statistic. Psychological bulletin 111(2):361
- Singh S, Kahlon KS (2011) Effectiveness of encapsulation and object-oriented metrics to refactor code and identify error prone classes using bad smells. ACM SIGSOFT Software Engineering Notes 36(5):1–10
- Taillard E (1993) Benchmarks for basic scheduling problems. european journal of operational research 64(2):278–285
- Welch BL (1947) The generalization of ‘student’s’problem when several different population varlances are involved. Biometrika 34(1-2):28–35