MetaDSE: A Few-shot Meta-learning Framework for Cross-workload CPU Design Space Exploration

Runzhen Xue, Hao Wu, Mingyu Yan, Ziheng Xiao, Xiaochun Ye, Dongrui Fan

Abstract

Modern CPU design space exploration (DSE) is hindered by the astronomical number of possible configurations and the high cost of simulation. While machine learning surrogate models offer a solution, they typically require extensive training data for each new workload. This paper presents MetaDSE, a framework that treats DSE as a few-shot learning problem. By leveraging Model-Agnostic Meta-Learning (MAML) and a novel Workload-adaptive Architectural Mask (WAM), MetaDSE achieves a 44.3% reduction in prediction error compared to state-of-the-art methods, enabling accurate performance prediction with minimal simulation data.

Introduction

Designing high-performance, power-efficient CPUs involves navigating a massive design space of parameters such as cache sizes, pipeline widths, and branch predictors. Exhaustive simulation is computationally prohibitive. Consequently, researchers employ surrogate models to predict performance metrics (PPA). However, traditional models often struggle with "cross-workload" scenarios where training data from one set of programs is used to predict performance on another. These methods frequently suffer from overfitting to source data, data ambiguity across tasks, and poor generalization to dissimilar target workloads.

Methodology

MetaDSE addresses these challenges through a two-stage process: Upstream Pre-training and Downstream Adaptation.

Upstream Pre-training (MAML)

Instead of standard supervised learning, MetaDSE employs Model-Agnostic Meta-Learning (MAML). The objective is to "learn how to learn" by finding a set of initial model parameters that can be quickly adapted to new tasks with minimal gradient updates. This approach captures shared architectural patterns across diverse workloads, preventing the model from becoming overly specialized to any single training program.

Downstream Adaptation (WAM)

When a new target workload is encountered, MetaDSE applies a Workload-adaptive Architectural Mask (WAM). This technique utilizes attention weights from a Transformer-based predictor to identify critical architectural parameters (e.g., ROB size, L1 cache) and filter out noise. By focusing on inherent hardware properties rather than workload similarity, WAM enhances the model's robustness.

MetaDSE Framework: The two-stage process involving MAML-based pre-training and WAM-based adaptation.

Experimental Setup

The framework was evaluated using the SPEC CPU 2017 benchmark suite. Ground-truth performance and power data were generated using GEM5 and McPAT simulators. The dataset was split into 7 training, 5 validation, and 5 testing workloads to ensure rigorous evaluation on unseen programs.

Key Insights and Results

A critical finding of this work is that traditional "workload similarity" metrics, such as Wasserstein distance, are often inconsistent and unreliable for transfer learning. MetaDSE bypasses this limitation by focusing on architectural correlations.

Workload Similarity Heatmaps: Visualization of IPC and Power similarity across different SPEC benchmarks, highlighting the inconsistency of traditional metrics.

Performance Gains

MetaDSE achieved a significant 44.3% reduction in prediction error (RMSE) compared to TrEnDSE, the previous state-of-the-art. Unlike traditional models like Random Forest or Gradient Boosting, which exhibit erratic performance across different benchmarks, MetaDSE maintains high accuracy consistently.

Few-shot Efficiency

The framework demonstrates exceptional efficiency in few-shot scenarios. It maintains high predictive performance even when provided with as few as 5 to 10 simulation points for a new workload, drastically reducing the simulation overhead required for DSE.

Conclusion and Future Work

MetaDSE represents a significant advancement in CPU design space exploration by framing it as a meta-learning problem. While the meta-training phase is computationally intensive, it provides a robust foundation for rapid, accurate adaptation to new workloads. Future research will explore extending this framework to other architectures like GPUs and NPUs, as well as integrating it into automated hardware synthesis flows.

Reference: Xue, R., et al. "MetaDSE: A Few-shot Meta-learning Framework for Cross-workload CPU Design Space Exploration." arXiv:2504.13568v1 [cs.AR].

Summary updated

BibTeX
@inproceedings{xue2025metadse,
  author = {Runzhen Xue and Hao Wu and Mingyu Yan and Ziheng Xiao and Xiaochun Ye and Dongrui Fan},
  title = {{MetaDSE: A Few-shot Meta-learning Framework for Cross-workload CPU Design Space Exploration}},
  booktitle = {DAC},
  year = {2025},
}
Figure