arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2409.02137cs.SEcs.DCcs.LGcs.PL
收藏

用于测试分布式系统的强化学习中的奖励增强

Reward Augmentation in Reinforcement Learning for Testing Distributed Systems

Max Planck Institute for Software Systems (MPI-SWS)(马克斯·普朗克软件系统研究所);CNRS(法国国家科学研究中心);Ecole Polytechnique(巴黎综合理工学院);Chennai Mathematical Institute(金奈数学研究所);IRIF(法国信息学研究所);Universite Paris Cite(巴黎西岱大学)

Andrea Borgarelli, Constantin Enea, Rupak Majumdar, Srinidhi Nagendra

AI总结:

本文提出基于强化学习的分布式协议测试方法,通过衰减探索奖励和语义路径点两种奖励增强技术解决奖励稀疏问题,在RedisRaft、Etcd和RSL上显著提升了覆盖率和缺陷发现能力。

摘要:

流行分布式协议实现中的缺陷已成为许多流行互联网服务宕机的根源。我们描述了一种基于强化学习的分布式协议实现随机测试方法。由于自然奖励结构非常稀疏,强化学习中成功探索的关键在于奖励增强。我们展示了两种相互构建的不同技术。首先,我们基于新状态的发现提供一种衰减探索奖励——当同一状态被多次访问时,奖励会衰减。探索奖励捕捉了覆盖率引导模糊测试中优先考虑新覆盖率点的直觉;与其他方案相比,我们表明取奖励与Q值中的最大值能带来更有效的探索。其次,我们以谓词序列的形式为算法提供路径点,这些谓词捕捉有趣的语义场景。路径点利用设计者对协议的洞察,引导探索走向状态空间中“有趣”的部分。我们的奖励结构确保新回合即使在无执行缓存的情况下也能可靠地到达深层有趣状态。我们已在Go中实现了该算法。我们在三个大型基准(RedisRaft、Etcd和RSL)上的评估表明,我们的算法在覆盖率和缺陷发现方面能显著优于基线方法。

英文摘要:

Bugs in popular distributed protocol implementations have been the source of many downtimes in popular internet services. We describe a randomized testing approach for distributed protocol implementations based on reinforcement learning. Since the natural reward structure is very sparse, the key to successful exploration in reinforcement learning is reward augmentation. We show two different techniques that build on one another. First, we provide a decaying exploration bonus based on the discovery of new states -- the reward decays as the same state is visited multiple times. The exploration bonus captures the intuition from coverage-guided fuzzing of prioritizing new coverage points; in contrast to other schemes, we show that taking the maximum of the bonus and the Q-value leads to more effective exploration. Second, we provide waypoints to the algorithm as a sequence of predicates that capture interesting semantic scenarios. Waypoints exploit designer insight about the protocol and guide the exploration to ``interesting'' parts of the state space. Our reward structure ensures that new episodes can reliably get to deep interesting states even without execution caching. We have implemented our algorithm in Go. Our evaluation on three large benchmarks (RedisRaft, Etcd, and RSL) shows that our algorithm can significantly outperform baseline approaches in terms of coverage and bug finding.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑