Top Qs
Timeline
Chat
Perspective

Optuna

Hyperparameter optimization framework From Wikipedia, the free encyclopedia

Remove ads

Optuna is an open-source Python library for automatic hyperparameter tuning of machine learning models.[1] It was first introduced in 2018 by Preferred Networks, a Japanese startup that works on practical applications of deep learning in various fields.[2][3][4][5] The beta version of Optuna was released at the end of the year, with the subsequent first major stable release announced in January 2020.[1]

Quick Facts Developer(s), Initial release ...
Remove ads

Hyperparameter optimization

Thumb
Hyperparameter Optimization using Grid Search

Hyperparameter optimization involves finding the optimal value of non-trainable parameters, defined by the user. Examples of hyperparameters are learning rate, number of layers or neurons, regularization strength and tree depth. However, they strongly depend on the specific algorithm (e.g., classification, regression, clustering, etc.).[6]

Hyperparameter optimization can be especially relevant when dealing with large-scale problems or limited resources, as it improves model accuracy, reduces overfitting, and decreases training time.[1] However, when the hyperparameter space increases, it may become computationally expensive. Hence, there are methods (e.g., grid search, random search, or bayesian optimization) that considerably simplify this process.[1]

Remove ads

Features

Summarize
Perspective

Optuna is designed to optimize the model hyperparameters, by searching large spaces and discarding combinations that show no significant improvements in the model. Moreover, it can parallelize the hyperparameter search over multiple threads or processes. Optuna works with a high degree of modularity, allowing the definition of different configurations for searching hyperparameters. It is possible to choose which hyperparameters to optimize and how to optimize them. Additionally, it permits parameter customization at runtime, meaning that the values to explore for the hyperparameters (i.e., the search space) can be defined while writing the code, rather than being defined in advance.[1]

Thumb
Hyperparameter Optimization using Tree-Structured Parzen Estimators

Sampling

Optuna exploits well-established algorithms to perform hyperparameter optimization, progressively reducing the search space, in light of objective values. Examples are gaussian-process-based algorithms (i.e., a gaussian process to model the objective function[7]), tree-structured parzen estimator (TPE) (i.e., a model-based optimization method that estimates the objective function and selects the best hyperparameters[8]), and random search (i.e., a basic optimization approach used for benchmarking[9]).

Early stopping

Thumb
Bayesian optimization of a function (black) with a gaussian process (purple). Three acquisition functions (blue).

Optuna includes a pruning feature to stop trials early, when the results show no significant improvement in the model. This allows for the prevention of unnecessary computation, and it is used for models with long training times, in order to save time and computational resources. Specifically, Optuna exploits techniques such as median and threshold pruning.[10][11]

Scalability

Optuna is designed to scale with distributed computing resources, supporting parallel execution. This feature allows users to run optimization trials across multiple processors or machines.[12]

Integration with third-part libraries

Optuna integrates with various ML libraries and frameworks:[1]

Moreover, Optuna offers a real-time dashboard that allows to monitor, through graphs and tables, the optimization history and the hyperparameter importance.[13]

Remove ads

Applications

Summarize
Perspective

Optuna was designed to be framework agnostic, so that it can be used with any machine-learning (ML) or deep-learning (DL) framework.[1]

Thumb
Standard pipeline for the optimization of hyperparameters for the training of a Decision Tree Classfier using Optuna

Machine learning

Optuna can be used to optimize hyperparamenters of ML models. Examples are:

  • K-nearest neighbors (KNN): number of neighbors (k), distance metrics (e.g., Euclidean or Manhattan), and weight function.[17]
  • Linear and logistic regression: alpha in Ridge Regression or C in Logistic Regression.[18]

Deep learning

In the context of deep learning, Optuna can be exploited during the training of neural networks (NN), to optimize learning rate, batch size, and the number of hidden layers. For example, it can be used for:

  • Transformers, for NLP tasks such as text classification, sentiment analysis, and machine translation.[22]

Domains

Summarize
Perspective

Optuna has found applications in various research studies and industry implementations across different applicative domains.[2][3][4][5]

Healthcare

In healthcare, Optuna is currently exploited for medical image analysis to optimize DL models for tumor detection,[23][24] disease identification,[25] multi-organ semantic segmentation,[26] and radiological image analysis. It can be also exploited for disease prediction, in particular for the improvement in the accuracy of predictive models for disease diagnosis and treatment outcomes.[27] Its application can be also found in genomics, to predict genetic diseases and to identify genetic variations.[28]

Finance

In finance, Optuna is used to optimize models for algorithmic trading. It allows for predicting market movements, given the ability in handling wide parameter ranges and complex model structures.[29][30] In particular, it is exploited for financial risk analysis and forecasting. Topics addressed are credit, market, and operational risks.[30]

Autonomous systems

Optuna is used for real-time applications in autonomous systems for robotics,[5] supporting decision making in dynamic environments. It is also exploited in the context of self-driving cars, to optimize the model to navigate safely in complex environments. For example, Optuna can be used in scenarios where there is the need to evaluate the rate and the severity of accidents[31] or to address the issue of network intrusion attacks due to possible vulnerabilities that might occur.[32][33]

Natural language processing (NLP)

Optuna has also been applied in NLP, for example, for text classification to classify a piece of written text into categories (e.g., spam vs. not spam, topic modeling).[34] Another task is sentiment analysis, namely the detection of feelings expressed in text, particularly exploited for the analysis of content from social media and customer reviews.[35]

Reinforcement learning (RL)

For what concerns RL, Optuna is exploited in the gaming field, to improve the model performance in games and virtual environments, in robotics to optimize decision-making processes in robotic systems for tasks like manipulation and navigation, and in the field of autonomous vehicles, to optimize RL models to obtain enhanced safety, and a more efficient navigation strategy.[36]

Remove ads

See also

References

Further reading

Loading related searches...

Wikiwand - on

Seamless Wikipedia browsing. On steroids.

Remove ads