Lune

FSE2021顶会

FLEX: fixing flaky tests in machine learning projects by updating assertion bounds

Saikat Dutta, August Shi, Sasa Misailovic

摘要

Many machine learning (ML) algorithms are inherently randommultiple executions using the same inputs may produce slightly different results each time. Randomness impacts how developers write tests that check for end-to-end quality of their implementations of these ML algorithms. In particular, selecting the proper thresholds for comparing obtained quality metrics with the reference results is a non-intuitive task, which may lead to flaky test executions.

We present FLEX, the first tool for automatically fixing flaky tests due to algorithmic randomness in ML algorithms. FLEX fixes tests that use approximate assertions to compare actual and expected values that represent the quality of the outputs of ML algorithms. We present a technique for systematically identifying the acceptable bound between the actual and expected output quality that also minimizes flakiness. Our technique is based on the Peak Over Threshold method from statistical Extreme Value Theory, which estimates the tail distribution of the output values observed from several runs. Based on the tail distribution, FLEX updates the bound used in the test, or selects the number of test re-runs, based on a desired confidence level.

We evaluate FLEX on a corpus of 35 tests collected from the latest versions of 21 ML projects. Overall, FLEX identifies and proposes a fix for 28 tests. We sent 19 pull requests, each fixing one test, to the developers. So far, 9 have been accepted by the developers.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 6 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Domain-Specific Fixes for Flaky Tests with Wrong Assumptions on Underdetermined Specifications 引用了 A study on the lifecycle of flaky tests
  • Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source 引用了 Domain-Specific Fixes for Flaky Tests with Wrong Assumptions on Underdetermined Specifications
  • Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source 引用了 Detecting numerical bugs in neural network architectures
  • Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open Source 引用了 Detecting flaky tests in probabilistic and machine learning applications
  • Understanding and Improving Flaky Test Classification 引用了 Detecting flaky tests in probabilistic and machine learning applications
  • Understanding and Improving Flaky Test Classification 引用了 TERA: optimizing stochastic regression tests in machine learning projects
  • Preempting Flaky Tests via Non-Idempotent-Outcome Tests 引用了 Domain-Specific Fixes for Flaky Tests with Wrong Assumptions on Underdetermined Specifications
  • Preempting Flaky Tests via Non-Idempotent-Outcome Tests 引用了 Repairing Order-Dependent Flaky Tests via Test Generation
  • Repairing Order-Dependent Flaky Tests via Test Generation 引用了 Preempting Flaky Tests via Non-Idempotent-Outcome Tests
  • Preempting Flaky Tests via Non-Idempotent-Outcome Tests 引用了 Detecting flaky tests in probabilistic and machine learning applications
  • Preempting Flaky Tests via Non-Idempotent-Outcome Tests 引用了 A study on the lifecycle of flaky tests
  • Repairing Order-Dependent Flaky Tests via Test Generation 引用了 Domain-Specific Fixes for Flaky Tests with Wrong Assumptions on Underdetermined Specifications
  • Repairing Order-Dependent Flaky Tests via Test Generation 引用了 Detecting flaky tests in probabilistic and machine learning applications
  • Detecting flaky tests in probabilistic and machine learning applications 引用了 A study on the lifecycle of flaky tests
  • TERA: optimizing stochastic regression tests in machine learning projects 引用了 Domain-Specific Fixes for Flaky Tests with Wrong Assumptions on Underdetermined Specifications
  • TERA: optimizing stochastic regression tests in machine learning projects 引用了 Detecting numerical bugs in neural network architectures
  • TERA: optimizing stochastic regression tests in machine learning projects 引用了 Audee: Automated Testing for Deep Learning Frameworks
  • TERA: optimizing stochastic regression tests in machine learning projects 引用了 Detecting flaky tests in probabilistic and machine learning applications
  • TERA: optimizing stochastic regression tests in machine learning projects 引用了 A study on the lifecycle of flaky tests
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper6

  1. Free Lunch for Testing: Fuzzing Deep-Learning Libraries from Open SourceAnjiang Wei, Yinlin Deng, Chenyuan Yang, Lingming ZhangICSE 2022 · 91 次引用
  2. Repairing Order-Dependent Flaky Tests via Test GenerationChengpeng Li, Chenguang Zhu, Wenxi Wang, August ShiICSE 2022 · 22 次引用
  3. Preempting Flaky Tests via Non-Idempotent-Outcome TestsAnjiang Wei, Pu Yi, Zhengxi Li, Tao Xie 等ICSE 2022 · 20 次引用
  4. TERA: optimizing stochastic regression tests in machine learning projectsSaikat Dutta, Jeeva Selvam, Aryaman Jain, Sasa MisailovicISSTA 2021 · 12 次引用
  5. Understanding and Improving Flaky Test ClassificationShanto Rahman, Saikat Dutta, August ShiOOPSLA 2025 · 5 次引用

它引用的 Paper8

  1. A study on the lifecycle of flaky testsWing Lam, Kivanç Muslu, Hitesh Sajnani, Suresh ThummalapentaICSE 2020 · 107 次引用
  2. Audee: Automated Testing for Deep Learning FrameworksQianyu Guo, Xiaofei Xie, Yi Li, Xiaoyu Zhang 等ASE 2020 · 83 次引用
  3. Detecting flaky tests in probabilistic and machine learning applicationsSaikat Dutta, August Shi, Rutvik Choudhary, Zhekun Zhang 等ISSTA 2020 · 71 次引用
  4. Detecting numerical bugs in neural network architecturesYuhao Zhang, Luyao Ren, Liqian Chen, Yingfei Xiong 等FSE 2020 · 66 次引用
  5. Domain-Specific Fixes for Flaky Tests with Wrong Assumptions on Underdetermined SpecificationsPeilun Zhang, Yanjie Jiang, Anjiang Wei, Victoria Stodden 等ICSE 2021 · 26 次引用

相关 Paper

  1. Balancing Effectiveness and Flakiness of Non-Deterministic Machine Learning TestsChunqiu Steven Xia, Saikat Dutta, Sasa Misailovic, Darko Marinov 等ICSE 2023 · 5 次引用
  2. Higher income, larger loan? monotonicity testing of machine learning modelsArnab Sharma, Heike WehrheimISSTA 2020 · 12 次引用
  3. FlakeFlagger: Predicting Flakiness Without Rerunning TestsAbdulrahman Alshammari, Christopher Morris, Michael Hilton, Jonathan BellICSE 2021 · 63 次引用
  4. Neurosymbolic Repair of Test FlakinessYang Chen, Reyhaneh JabbarvandISSTA 2024 · 8 次引用
  5. Do Automatic Test Generation Tools Generate Flaky Tests?Martin Gruber, Muhammad Firhard Roslan, Owain Parry, Fabian Scharnböck 等ICSE 2024 · 12 次引用
黄昏的海面,两侧是细线勾勒的悬崖