AI Dictionary › Fondamenti AI

Regularization

Regolarizzazione

Regularization is a set of techniques that discourage a machine learning model from becoming too complex, by adding an explicit cost for complexity during training. The goal is no longer just to minimize error on the training data, but to find a balance between fitting known data well and staying simple enough to generalize to new data, directly countering the risk of overfitting.

Definition

What it is

Regularization is a set of techniques that discourage a machine learning model from becoming too complex, by adding an explicit cost for complexity during training. The goal is no longer just to minimize error on the training data, but to find a balance between fitting known data well and staying simple enough to generalize to new data, directly countering the risk of overfitting.

How it works

In linear models the most common techniques are L1 and L2 regularization: both add a term to the error function proportional to the size of the model's coefficients, penalizing overly large weights. L2, also called ridge, shrinks coefficients gradually without ever setting them exactly to zero; L1, called lasso, tends instead to zero out the least useful coefficients entirely, implicitly performing a selection of the most relevant features. In neural networks there are different forms of regularization, such as dropout, which randomly deactivates a portion of neurons during training to prevent the model from relying too heavily on individual pathways.

Applications

It is a practically ubiquitous technique in applied machine learning: from regression models used in finance and insurance to large neural networks for computer vision and language, regularization is almost always present in one form or another. The degree of regularization applied is normally a hyperparameter to be chosen through cross-validation, seeking the point where the model is flexible enough to learn, but not so much that it learns by heart.

History & etymology

The term derives from the Latin regula, rule, and literally describes the idea of imposing an additional rule that keeps the model's freedom in check. Regularization techniques originate in applied mathematics and twentieth-century statistics, particularly in the ill-posed inverse problems studied by the Soviet mathematician Andrey Tikhonov in the 1940s and 50s, whose formulation, known today as Tikhonov regularization, underlies the modern ridge regression used in machine learning.

Definizione (italiano)

La regolarizzazione è un insieme di tecniche che scoraggiano un modello di machine learning dal diventare troppo complesso, aggiungendo un costo esplicito alla complessità durante l'addestramento. L'obiettivo non è più soltanto minimizzare l'errore sui dati di addestramento, ma trovare un equilibrio tra adattarsi bene ai dati conosciuti e restare abbastanza semplice da generalizzare su dati nuovi, contrastando direttamente il rischio di overfitting.

Nei modelli lineari le tecniche più comuni sono la regolarizzazione L1 e L2: entrambe aggiungono alla funzione di errore un termine proporzionale alla grandezza dei coefficienti del modello, penalizzando pesi troppo grandi. La L2, chiamata anche ridge, riduce i coefficienti gradualmente senza mai azzerarli del tutto; la L1, chiamata lasso, tende invece ad azzerare completamente i coefficienti meno utili, effettuando implicitamente una selezione delle caratteristiche più rilevanti. Nelle reti neurali esistono forme diverse di regolarizzazione, come il dropout, che disattiva casualmente una parte dei neuroni durante l'addestramento per impedire al modello di affidarsi troppo a singoli percorsi.

È una tecnica praticamente onnipresente nel machine learning applicato: dai modelli di regressione usati in finanza e assicurazioni alle grandi reti neurali per la visione artificiale e il linguaggio, la regolarizzazione è quasi sempre presente in una forma o nell'altra. Il grado di regolarizzazione applicato è di norma un iperparametro da scegliere con la cross-validation, cercando il punto in cui il modello è abbastanza flessibile da imparare, ma non così tanto da imparare a memoria.

Il termine deriva dal latino regula, regola, e descrive letteralmente l'idea di imporre una regola aggiuntiva che tiene sotto controllo la libertà del modello. Le tecniche di regolarizzazione hanno origine nella matematica applicata e nella statistica del Novecento, in particolare nei problemi inversi mal posti studiati dal matematico sovietico Andrey Tikhonov negli anni '40 e '50, la cui formulazione, oggi nota come regolarizzazione di Tikhonov, è alla base della moderna regressione ridge usata in machine learning.

Related terms

More in Fondamenti AI

Put it into practice

From our network

HSE Genius — AI for Safety Data Sheets

Extract SDS data, H phrases and ECHA compliance checks in seconds, powered by AI.

Visit hsegenius.com →

From the Agora Intelligence blog

More on agora-intelligence.com →

📱 Download the Android app (beta) iOS coming soon

Say what you mean. Get what you need.

Grace Certified — the AI coach that trains and certifies your prompt engineering — by Agora Intelligence.