TL;DR: Researchers from Intel Labs and UC Berkeley have developed SPORE (Sparse POlynomial REgression), a methodology that automatically predicts how long a computer program will take to run. By extracting internal execution features and applying sparse non-linear modeling, SPORE achieves high accuracy (under 7% error) without requiring human experts to manually analyze source code.
Introduction: The Expert Bottleneck
In modern computing—from massive data centers to smartphones—schedulers need to guess how long a program will run to manage energy and hardware resources efficiently. Traditionally, this required "expert-in-the-loop" analysis: a developer would have to manually identify which parts of the code (like specific loops or input parameters) drive performance.
However, as software grows more complex and "short-lived" (think of the millions of apps on an app store), manual analysis becomes an impossible bottleneck. Existing automated attempts often treat programs as "black boxes" or assume performance is a simple linear function of input size. This paper tackles the expert bottleneck by automatically extracting internal features and modeling the complex, non-linear interactions that actually dictate execution time.
Methodology: The SPORE Pipeline
The authors introduce a four-step system pipeline to automate performance prediction:
- Feature Instrumentation: Automatically modifies the program's source code to track internal metrics like loop counts, branch frequencies, and variable values.
- Profiling: Runs the instrumented program on sample inputs to collect data.
- Slicing: A clever "sanity check" step. It determines the computational cost of each feature. If a feature takes as long to calculate as the program itself takes to run, it’s discarded as "expensive" and useless for prediction.
- Modeling (The SPORE Algorithms): Since program performance is rarely linear (e.g., nested loops create $O(n^2)$ or $O(n^3)$ behavior), the authors use polynomial regression. They propose two specific algorithms:
- SPORE-LASSO: A two-step approach that first uses linear LASSO to prune the feature set, then applies an "Adaptive-LASSO" to a polynomial expansion of the remaining features.
- SPORE-FoBa: A more flexible "Forward-Backward" search that adaptively adds or deletes specific non-linear terms and interactions (like $width \times height$) to find the most compact, accurate model.
Evaluation Datasets
The researchers evaluated their system on three computationally diverse programs:
- Lucene Search Engine: A widely used text search library, tested using queries from Shakespeare’s works and the King James Bible.
- Find Maxima (ImageJ): An image processing algorithm used to find local peaks in brightness.
- Segmentation (ImageJ): An algorithm used to partition images into multiple segments.
The image processing datasets utilized diverse vision corpora (Caltech 101, Event Dataset, etc.) to ensure the models weren't just "memorizing" specific types of images.
Key Insights
- Interactions Matter: The "aha moment" of the paper is that program features don't act in isolation. The execution time of an image filter isn't just "width + height"; it’s often "width $\times$ height." SPORE is specifically designed to capture these interactions through polynomial terms.
- Interpretability is a Feature: Unlike deep learning "black boxes," SPORE produces a compact mathematical formula. For example, in the "Find Maxima" test, the model clearly identified that the width and height of the region of interest were the dominant factors, providing developers with actionable insights into their code's behavior.
- Slicing for Efficiency: The inclusion of "program slicing" ensures the resulting predictor is actually practical. A predictor is only useful if it can give you an answer significantly faster than just running the program itself.
Key Results
SPORE demonstrated significant improvements in both accuracy and efficiency compared to existing methods.
- High Accuracy & Data Efficiency: SPORE methods achieved a relative prediction error of less than 7% across the Lucene and Find Maxima datasets. Remarkably, the models reached this high accuracy even when trained on only 10% of the available data (roughly 300–400 samples).
- SPORE-FoBa vs. SPORE-LASSO: While both performed well, SPORE-FoBa was generally more robust, particularly on the complex Segmentation dataset, because it could adaptively pick higher-order terms without being overwhelmed by the "curse of dimensionality."
- Superiority over State-of-the-Art: As shown above, SPORE outperformed standard LASSO and other non-parametric greedy methods (like AFR), showing a 40% or more reduction in prediction error in several test cases.
Limitations and Future Work
The current system assumes a fixed, overprovisioned environment. It doesn't yet account for "noisy neighbors" (CPU contention from other tasks) or network fluctuations.
The authors noted that future research will focus on incorporating hardware features (CPU configurations, cache policies, memory) into the model to predict performance across different devices, and adapting the system to handle more dynamic, shared cloud environments where resource availability changes constantly.
Summary updated