[Paper Review] A Zero-Positive Learning Approach for Diagnosing Software Performance Regressions
This paper proposes AutoPerf, a zero-positive learning framework that uses hardware performance counters (HWPCs), autoencoders, and k-means clustering to detect software performance regressions with minimal profiling overhead. It achieves 4% average profiling overhead and diagnoses performance bugs with higher accuracy than prior methods, producing no false negatives across 10 real-world performance regressions.
The field of machine programming (MP), the automation of the development of software, is making notable research advances. This is, in part, due to the emergence of a wide range of novel techniques in machine learning. In this paper, we apply MP to the automation of software performance regression testing. A performance regression is a software performance degradation caused by a code change. We present AutoPerf - a novel approach to automate regression testing that utilizes three core techniques: (i) zero-positive learning, (ii) autoencoders, and (iii) hardware telemetry. We demonstrate AutoPerf's generality and efficacy against 3 types of performance regressions across 10 real performance bugs in 7 benchmark and open-source programs. On average, AutoPerf exhibits 4% profiling overhead and accurately diagnoses more performance bugs than prior state-of-the-art approaches. Thus far, AutoPerf has produced no false negatives.
Motivation & Objective
- Address the challenge of diagnosing performance regressions in evolving software systems, especially in parallel programs.
- Overcome limitations of rule-based and supervised learning approaches that require labeled training data or prior defect instances.
- Develop a scalable, general-purpose solution for detecting diverse performance regression patterns without relying on labeled anomalies.
- Minimize profiling overhead while maintaining high diagnostic accuracy in real-world systems.
- Enable automatic detection of performance defects such as false sharing, true sharing, and NUMA latency in production-grade software.
Proposed method
- Collect hardware performance counter (HWPC) profiles from both baseline (Pi) and modified (Pi+1) program versions using lightweight instrumentation.
- Train autoencoder models on HWPC profiles from the baseline version (Pi) to learn normal program behavior.
- Apply zero-positive learning (ZPL) to detect anomalies in Pi+1 by measuring reconstruction error (RE) of autoencoders; high RE indicates potential regression.
- Use k-means clustering to group similar functions and reduce training overhead, enabling scalable model training across many changed functions.
- Apply a statistical thresholding heuristic γ(t) based on reconstruction error to distinguish true regressions from normal variation, improving detection accuracy.
- Classify and localize detected regressions by analyzing function-level reconstruction errors and clustering results.
Experimental results
Research questions
- RQ1Can a zero-positive learning approach effectively detect performance regressions without requiring labeled defect examples?
- RQ2How does the integration of autoencoders and hardware performance counters improve detection accuracy compared to existing methods?
- RQ3To what extent does k-means clustering reduce training overhead while preserving diagnostic accuracy?
- RQ4How effective is the proposed thresholding strategy γ(t) in minimizing false positives while maintaining high true positive detection rates?
- RQ5What is the profiling overhead of the proposed system in real-world applications, and how does it scale with code changes?
Key findings
- AutoPerf achieves an average of only 4% profiling overhead across all evaluated programs, with the highest overhead at 7% in MySQL.
- The framework detects all 10 real-world performance bugs across 7 benchmark and open-source programs with zero false negatives.
- Using the thresholding strategy γ(t), AutoPerf achieves a true positive rate of 1.0 and a false positive rate of 0.05 at t=2, outperforming both UBL and arbitrary threshold baselines.
- K-means clustering reduces training time by 2.5x to 5x while maintaining high accuracy—achieving equivalent F1 scores to per-function autoencoders in Memcached.
- The F1 score improves with increasing cluster count (k=2 to k=4), peaking at k=4, demonstrating the scalability and effectiveness of clustering.
- AutoPerf outperforms two state-of-the-art approaches in both accuracy and generalization, detecting complex regressions like false sharing and NUMA latency effectively.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.