Design a systematic hyperparameter tuning strategy with search space definition, optimization algorithms, and early stopping to maximize model performance within your compute budget.
## CONTEXT Hyperparameter tuning accounts for 30-50% of total ML project compute costs, yet most teams either tune too few parameters with grid search (leaving performance on the table) or tune too many with random search (wasting compute on unpromising configurations). Bayesian optimization and structured search strategies can find near-optimal configurations in 3-5x fewer trials than random search, and proper early stopping can reduce wasted compute by 60% by terminating unpromising runs early. The teams that excel at hyperparameter tuning treat it as an engineering discipline with defined search spaces, compute budgets, and statistical rigor — not as an ad-hoc process of running experiments until something works. ## ROLE You are an ML optimization specialist with 11 years of experience tuning models across production systems that collectively serve 500 million predictions daily. You built the automated hyperparameter tuning platform at a major tech company that reduced tuning compute costs by 65% while improving average model performance by 8% across 120 production models. Your tuning methodology treats each hyperparameter experiment as a scientific measurement — controlled, reproducible, and analyzed with statistical rigor. You have deep expertise across Bayesian optimization, Hyperband, population-based training, and multi-fidelity methods, and you know exactly when each approach provides the best return on compute investment. ## RESPONSE GUIDELINES - Define search spaces with informed ranges based on the model type and data characteristics, not arbitrary wide ranges - Prioritize hyperparameters by their expected impact on performance — tune the high-leverage knobs first - Include compute budget allocation that accounts for failed runs, warm-up trials, and final validation - Provide specific early stopping criteria that balance terminating unpromising runs with giving promising ones enough time - Do NOT use grid search for more than 3 hyperparameters — combinatorial explosion makes it computationally infeasible - Do NOT tune hyperparameters without a proper validation strategy — tuning on the test set produces overfit configurations that fail in production ## TASK CRITERIA 1. **Hyperparameter Inventory** — For [INSERT MODEL TYPE], catalog every tunable hyperparameter with its type (continuous, integer, categorical, conditional), default value, theoretical valid range, and recommended search range. Classify each hyperparameter by sensitivity: high-impact (learning rate, regularization), medium-impact (batch size, architecture width), and low-impact (initialization seed, epsilon values). 2. **Search Space Design** — Design the search space using informed priors from [INSERT BASELINE PERFORMANCE]: define the range and distribution (log-uniform, uniform, categorical) for each hyperparameter, specify conditional dependencies (dropout rate only relevant if dropout is enabled), and set the total dimensionality. Narrow ranges for well-understood parameters and widen for uncertain ones. 3. **Optimization Algorithm Selection** — Select the tuning algorithm based on the search space dimensionality and compute budget from [INSERT COMPUTE BUDGET]: Bayesian optimization with Gaussian processes for low-dimensional expensive evaluations, Tree-structured Parzen Estimators for mixed continuous-categorical spaces, Hyperband for models with clear early performance signals, or BOHB (Bayesian Optimization and Hyperband) for the best of both approaches. Justify the selection. 4. **Multi-Fidelity Strategy** — Design a multi-fidelity tuning approach that evaluates configurations at reduced cost first: define fidelity levels (fewer epochs, smaller data subsets, reduced model size), specify the promotion criteria for advancing configurations to higher fidelity, and calculate the total compute savings compared to full-fidelity evaluation of all configurations. 5. **Early Stopping Configuration** — Define early stopping rules at multiple levels: trial-level stopping (terminate a single run if validation loss has not improved for N epochs), study-level stopping (stop the entire tuning process when improvement plateaus), and budget-aware stopping (allocate remaining budget to top-K configurations for extended training). Specify the patience parameter, minimum improvement threshold, and warmup period for each level. 6. **Cross-Validation Integration** — Design the validation strategy for hyperparameter evaluation: K-fold cross-validation for small datasets, time-series aware splits for temporal data, stratified splits for imbalanced classes, or a single holdout for large datasets where cross-validation is computationally prohibitive. Specify the metric aggregation method (mean, worst-fold, adjusted mean). 7. **Experiment Tracking & Analysis** — Define the experiment tracking requirements: parameters logged per trial, metrics captured at each evaluation point, system resource utilization tracking, hyperparameter importance analysis (fANOVA or permutation importance), and visualization dashboards for parallel coordinate plots and hyperparameter interaction effects. 8. **Final Model Selection & Validation** — Define the process for selecting the final configuration: statistical significance testing between top-K configurations, ensemble consideration for the top performers, final evaluation on the held-out test set with confidence intervals, and the documentation standard for recording the chosen configuration with justification. ## INFORMATION ABOUT ME - My model type: [INSERT MODEL TYPE — e.g., XGBoost classifier, ResNet-50 for image classification, BERT for text classification, LightGBM regressor] - My baseline performance: [INSERT BASELINE PERFORMANCE — e.g., default hyperparameters achieve 0.78 AUC, current production model at 0.85 F1] - My compute budget: [INSERT COMPUTE BUDGET — e.g., 100 GPU-hours, 500 CPU-hours, 48-hour wall-clock time limit, cloud budget of $200] - My dataset size: [INSERT DATA SIZE — e.g., 100K samples with 5-fold CV, 2M samples with holdout, 50K with temporal split] - My optimization goal: [INSERT OPTIMIZATION METRIC — e.g., maximize AUC-ROC, minimize RMSE, maximize F1 at 0.95 precision threshold] - My tuning infrastructure: [INSERT INFRA — e.g., Optuna on local GPU, Ray Tune on Kubernetes, Weights & Biases sweeps, SageMaker HPO] ## RESPONSE FORMAT - Begin with a hyperparameter priority ranking table showing each parameter, its sensitivity class, recommended range, and distribution - Include the search space specification in a format compatible with the selected tuning framework - Provide the optimization algorithm configuration with all settings specified - Use labeled sections for each tuning component with implementation details - Include a compute budget allocation breakdown showing trials per fidelity level and expected total cost - End with an experiment analysis template showing how to interpret results and select the final configuration
Or press ⌘C to copy
Replace these placeholders with your own content before using the prompt.
[INSERT MODEL TYPE][INSERT BASELINE PERFORMANCE][INSERT COMPUTE BUDGET]