AI Dictionary › Modelli AI

Gradient Clipping

Gradient clipping is a technique that limits the maximum value gradients computed during neural network training can take, cutting them when they exceed a set threshold. It prevents excessively large parameter updates, caused by anomalous gradients, from destabilizing training and making the model diverge instead of improving.

Definition

What it is

Gradient clipping is a technique that limits the maximum value gradients computed during neural network training can take, cutting them when they exceed a set threshold. It prevents excessively large parameter updates, caused by anomalous gradients, from destabilizing training and making the model diverge instead of improving.

How it works

During training, the gradient descent algorithm computes, for each parameter, how much and in which direction to adjust it to reduce error. In some situations, particularly in very deep or recurrent networks, these gradients can grow explosively, a phenomenon known as gradient explosion. Gradient clipping intervenes by rescaling or truncating gradients that exceed a certain maximum norm, before they are used to update the weights.

Applications

It is standard practice in training large language models and recurrent networks, where it helps keep training stable over long computation periods that can last weeks and involve an enormous number of update steps, reducing the risk of having to restart training from an earlier checkpoint due to a sudden divergence.

History & etymology

The name literally describes the operation: gradients are "clipped" when they exceed a threshold, a practical safeguard that has become increasingly relevant as trained neural networks have grown in depth and complexity.

Definizione (italiano)

Il gradient clipping è una tecnica che limita il valore massimo che i gradienti calcolati durante l'addestramento di una rete neurale possono assumere, tagliandoli quando superano una soglia stabilita. Serve a evitare che aggiornamenti dei parametri eccessivamente grandi, causati da gradienti anomali, destabilizzino l'addestramento facendo divergere il modello invece di farlo migliorare.

Durante l'addestramento, l'algoritmo di discesa del gradiente calcola per ogni parametro quanto e in che direzione modificarlo per ridurre l'errore. In alcune situazioni, in particolare nelle reti molto profonde o ricorrenti, questi gradienti possono crescere in modo esplosivo, un fenomeno noto come esplosione del gradiente. Il gradient clipping interviene riscalando o troncando i gradienti che superano una certa norma massima, prima che vengano usati per aggiornare i pesi.

È una pratica standard nell'addestramento di modelli linguistici di grandi dimensioni e di reti ricorrenti, dove contribuisce a mantenere l'addestramento stabile su lunghi periodi di calcolo che possono durare settimane e coinvolgere un numero enorme di passi di aggiornamento, riducendo il rischio di dover riavviare l'addestramento da un punto precedente a causa di una divergenza improvvisa.

Il nome descrive letteralmente l'operazione: i gradienti vengono "tagliati" (clipped) quando eccedono una soglia, un accorgimento pratico diventato via via più rilevante man mano che le reti neurali addestrate sono cresciute in profondità e complessità.

Related terms

More in Modelli AI

Put it into practice

From our network

INDACO TMS — Transport Management for European Logistics

Shipment tracking, multi-carrier EDI and automated invoicing in one cloud platform. Invoices generated in under 10 seconds.

Visit indacotms.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.