Mi informacion de contacto
Correo[email protected]
2024-07-12
한어Русский языкEnglishFrançaisIndonesianSanskrit日本語DeutschPortuguêsΕλληνικάespañolItalianoSuomalainenLatina
La optimización estocástica es un componente vital del aprendizaje automático y su núcleo es el algoritmo de descenso de gradiente estocástico (SGD), un método que se ha utilizado ampliamente desde que se propuso por primera vez hace más de 60 años. Durante los últimos ocho años, hemos sido testigos de un nuevo e interesante desarrollo: técnicas de reducción de varianza para métodos de optimización estocástica. Estos métodos de reducción de la varianza (métodos VR) funcionan bien en escenarios que permiten múltiples iteraciones de los datos de entrenamiento, mostrando una convergencia más rápida que SGD, tanto en teoría como en la práctica. Este aumento de la velocidad pone de relieve el creciente interés en los métodos de realidad virtual y la rápida acumulación de resultados de investigación en esta área. Este artículo revisa los principios clave y los principales avances en los métodos de realidad virtual para la optimización de conjuntos de datos limitados, con el objetivo de informar a los lectores no expertos. Nos centramos principalmente en entornos de optimización convexa y proporcionamos una referencia para los lectores interesados en extensiones para la minimización de funciones no convexas.
Palabras clave | Aprendizaje automático; optimización;
En el campo de la investigación del aprendizaje automático, una cuestión básica e importante es cómo adaptar modelos a enormes conjuntos de datos. Por ejemplo, podemos considerar el caso típico de un modelo lineal de mínimos cuadrados:
x ∗ ∈ arg min x ∈ R d 1 n ∑ i = 1 n ( ai T x − bi ) 2 x^* en argmin_{x en mathbb{R}^d} frac{1}{n} suma_{i=1}^{n} (a_i^T x - b_i)^2X∗∈ArkansasgramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoX∈Rdmín.norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1i=1∑norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte(aiyoX−bi)2
En este modelo tenemos Oídod parámetros, que están representados por vectores x ∈ R dx en matemáticasbb{R}^dX∈Rd dado.Mientras tanto, tenemos a la mano nnnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte puntos de datos, incluidos vectores de características ai ∈ R d a_i en matemáticasbb{R}^dai∈Rd y valor objetivo bi ∈ R b_i en matemáticasbb{R}bi∈R .El proceso de adaptación del modelo consiste en ajustar estos parámetros para que la salida prevista del modelo aiTx a_i^TxaiyoX en promedio lo más cerca posible del valor objetivo yo b_ibi。
En términos más generales, podríamos utilizar una función de pérdida. fi(x) f_i(x)Fi(X) Para medir las predicciones del modelo y la iii Qué tan cerca están los puntos de datos:
x ∗ ∈ arg min x ∈ R df ( x ) : = 1 n ∑ i = 1 nfi ( x ) x^* en argmin_{x en mathbb{R}^d} f(x) := frac{1}{n} sum_{i=1}^{n} f_i(x)X∗∈ArkansasgramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoX∈Rdmín.F(X):=norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1i=1∑norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteFi(X)
función de pérdida fi(x) f_i(x)Fi(X) Si es mayor, indica que las predicciones del modelo se desvían mucho de los datos; fi(x) f_i(x)Fi(X) Igual a cero, el modelo se ajusta perfectamente a los puntos de datos.función f(x)f(x)F(X) Refleja la pérdida promedio del modelo en todo el conjunto de datos.
Problemas como el formulario (2) anterior se aplican no solo a problemas de mínimos cuadrados lineales, sino también a muchos otros modelos estudiados en aprendizaje automático. Por ejemplo, en un modelo de regresión logística resolvemos:
x ∗ ∈ arg min x ∈ R d 1 n ∑ i = 1 n log ( 1 + e − biai T x ) + λ 2 ∥ x ∥ 2 2 x^* en argmin_{x en mathbb{R}^d} frac{1}{n} sum_{i=1}^{n} log(1 + e^{-b_i a_i^T x}) + frac{lambda}{2} |x|_2^2X∗∈ArkansasgramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoX∈Rdmín.norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1i=1∑norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteLogramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramo(1+mi−biaiyoX)+2λ∥X∥22
Aquí estamos tratando con bi ∈ { − 1 , + 1 } b_i en {-1, +1}bi∈{−1,+1} Para un problema de clasificación binaria, la predicción se basa en aiTx a_i^TxaiyoX símbolos.También se introduce un término de regularización en la fórmula. λ 2 ∥ x ∥ 2 2 frac{lambda}{2} |x|_2^22λ∥X∥22 para evitar el sobreajuste de los datos, donde ∥ x ∥ 2 2 |x|_2^2∥X∥22 expresar xxX El cuadrado de la norma euclidiana de .
En la mayoría de los modelos de aprendizaje supervisado, el proceso de entrenamiento se puede expresar como la forma (2), incluidos mínimos cuadrados regularizados L1, máquina de vectores de soporte (SVM), análisis de componentes principales, campos aleatorios condicionales y redes neuronales profundas, etc.
Un desafío clave en los casos de problemas modernos es la cantidad de puntos de datos nnnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte Probablemente extremadamente grande. A menudo tratamos con conjuntos de datos que van mucho más allá del rango de los terabytes y pueden provenir de fuentes tan diversas como Internet, satélites, sensores remotos, mercados financieros y experimentos científicos. Para manejar conjuntos de datos tan grandes, un enfoque común es utilizar el algoritmo de descenso de gradiente estocástico (SGD), que utiliza solo una pequeña cantidad de puntos de datos seleccionados aleatoriamente en cada iteración. Además, recientemente ha habido un fuerte aumento en el interés por los métodos de gradiente estocástico de reducción de la varianza (VR), que tienen tasas de convergencia más rápidas que los métodos de gradiente estocástico tradicionales.
Figura 1. En el problema de regresión logística basado en el conjunto de datos de hongos [7], se utilizaron el método de descenso de gradiente (GD), descenso de gradiente acelerado (AGD, GD acelerado en [50]), descenso de gradiente estocástico (SGD) y ADAM [30]. en comparación con los métodos de reducción de la varianza (VR) SAG y SVRG, donde n = 8124, d = 112.
El descenso de gradiente (GD) es un algoritmo clásico utilizado para resolver el problema anterior (2), y su fórmula de actualización iterativa es la siguiente:
xk + 1 = xk − γ 1 n ∑ i = 1 n ∇ fi ( xk ) x_{k+1} = x_k - gamma frac{1}{n} suma_{i=1}^{n} en f_i(x_k)Xa+1=Xa−γnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1i=1∑norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte∇Fi(Xa)
aquí, γ gamaγ es un valor de paso fijo mayor que cero.Durante cada iteración del algoritmo GD, cada punto de datos debe ser iii Calcular gradiente ∇ fi ( xk ) en f_i(x_k)∇Fi(Xa), lo que significa que GD requiere todos nnnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte realizar un recorrido completo de los puntos de datos.Cuando el tamaño del conjunto de datos nnnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte Cuando se vuelve muy grande, el costo de cada iteración del algoritmo GD se vuelve muy alto, limitando así su aplicación.
Como alternativa, podemos considerar el método de descenso de gradiente estocástico (SGD), propuesto por primera vez por Robbins y Monro, y su fórmula de actualización iterativa es la siguiente:
xk + 1 = xk − γ ∇ fik ( xk ) x_{k+1} = x_k - gamma sobre f_{i_k}(x_k)Xa+1=Xa−γ∇Fia(Xa)
El algoritmo SGD funciona utilizando únicamente el gradiente de un punto de datos seleccionado aleatoriamente en cada iteración. ∇ fik ( xk ) en f_{i_k}(x_k)∇Fia(Xa) para reducir el costo de cada iteración. En la Figura 1, podemos ver que SGD logra un progreso más significativo que GD (incluidos los métodos GD acelerados) en las primeras etapas del proceso de optimización.El gráfico muestra el progreso de la optimización en términos de épocas, que se definen como el cálculo de todos nnnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte El número de gradientes para muestras de entrenamiento. El algoritmo GD realiza una iteración en cada ronda, mientras que el algoritmo SGD realiza una iteración en cada ronda nnnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte iteraciones.Usamos rondas como base para comparar SGD y GD, porque bajo el supuesto nnnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte En casos muy grandes, el costo principal de ambos métodos se concentra en el gradiente. ∇ fi ( xk ) en f_i(x_k)∇Fi(Xa) cálculo.
Consideremos la indexación aleatoria yo séia de la colección { 1 , … , n } {1, lpuntos, n}{1,…,norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte} En el caso de una selección aleatoria uniforme, esto significa que para todos iii,elegir yo_yo = yoia=i La probabilidad P[ik = i] P[i_k = i]PAGAGAG[ia=i] igual 1 n frac{1}{n}norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1 . en este caso, ∇ fik ( xk ) en f_{i_k}(x_k)∇Fia(Xa) como ∇ f ( xk ) es f(x_k)∇F(Xa) El estimador de es insesgado porque, según la definición de expectativa, tenemos:
E [ ∇ fik ( xk ) ∣ xk ] = 1 n ∑ i = 1 n ∇ fi ( xk ) = ∇ f ( xk ) ( 6 ) E[nabla f_{i_k}(x_k) | x_k] = frac{1}{n} suma_{i=1}^{n} resultante f_i(x_k) = resultante f(x_k) quad (6)mi[∇Fia(Xa)∣Xa]=norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1i=1∑norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte∇Fi(Xa)=∇F(Xa)(6)
Aunque el método SGD (Stochastic Gradient Descent) no garantiza la función en cada iteración adjF El valor de disminuirá, pero en promedio se mueve hacia el gradiente completo negativo, que representa la dirección descendente.
Sin embargo, tener un estimador de gradiente insesgado no es suficiente para garantizar la convergencia de las iteraciones SGD. Para ilustrar este punto, la Figura 2 (izquierda) muestra la trayectoria iterativa de SGD cuando se aplica una función de regresión logística utilizando un tamaño de paso constante en el conjunto de datos de cuatro categorías proporcionado por LIBSVM [7].Las elipses concéntricas en la figura representan los contornos de la función, es decir, el valor de la función. f(x) = cf(x) = cF(X)=C punto correspondiente xxX recolectar, C.C.C es una constante específica en el conjunto de los números reales.diferentes valores constantes C.C.C Corresponde a diferentes elipses.
La trayectoria iterativa de SGD no converge a la solución óptima (indicada por un asterisco verde en la figura), sino que forma una nube de puntos alrededor de la solución óptima. Por el contrario, en la Figura 2 mostramos la trayectoria iterativa de un método de reducción de la varianza (VR), gradiente promedio estocástico (SAG), utilizando el mismo tamaño de paso constante, que presentaremos más adelante. La razón por la que SGD no converge en este ejemplo es que el gradiente estocástico en sí no converge a cero y, por lo tanto, el método SGD de paso constante (5) nunca se detiene.Esto contrasta fuertemente con los métodos de descenso de gradiente (GD), que naturalmente se detienen cuando xk x_kXa Enfoques x ∗ x^*X∗,degradado ∇ f ( xk ) es f(x_k)∇F(Xa) tenderá a cero.
Figura 2. Gráficos de conjuntos de niveles para regresión logística bidimensional utilizando métodos iterativos SGD (izquierda) y SAG (derecha) de paso fijo. El asterisco verde indica xdesatar.
procesamiento debido a ∇ fi ( xk ) en f_i(x_k)∇Fi(Xa) Existen varias técnicas clásicas para problemas de no convergencia causados por la varianza de valores.Por ejemplo, Robbins y Monro [64] utilizan una serie de pasos decrecientes γ k gama_kγa para resolver el problema de la varianza, asegurando que el producto γ k ∇ fik ( xk ) gamma_k de f_{i_k}(x_k)γa∇Fia(Xa) puede converger a cero. Sin embargo, ajustar esta secuencia de pasos decrecientes para evitar detener el algoritmo demasiado pronto o demasiado tarde es un problema difícil.
Otra técnica clásica para reducir la varianza es utilizar múltiples ∇ fi ( xk ) en f_i(x_k)∇Fi(Xa) promedio para obtener el gradiente completo ∇ f ( x ) es f(x)∇F(X) una estimación más precisa. Este enfoque se llama minibatch y es particularmente útil cuando se pueden evaluar múltiples gradientes en paralelo. Esto da como resultado una iteración de la forma:
xk + 1 = xk − γ 1 ∣ B k ∣ ∑ i ∈ B k ∇ fi ( xk ) ( 7 ) x_{k+1} = x_k - gamma frac{1}{|B_k|} suma_{i en B_k} en f_i(x_k) quad (7)Xa+1=Xa−γ∣Ba∣1i∈Ba∑∇Fi(Xa)(7)
en Bk B_kBa es un conjunto de índices aleatorios, ∣ B_k ∣ |B_k|∣Ba∣ expresar Bk B_kBa la talla de.si Bk B_kBa Muestreo uniforme con reemplazo, luego la varianza de esta estimación de gradiente está relacionada con el "tamaño del lote" ∣ B_k ∣ |B_k|∣Ba∣ es inversamente proporcional, por lo que la variación se puede reducir aumentando el tamaño del lote.
Sin embargo, el costo de tales iteraciones es proporcional al tamaño del lote, por lo que esta forma de reducción de la varianza tiene el costo de un mayor costo computacional.
Otra estrategia común para reducir la varianza y mejorar el desempeño empírico de SGD es agregar "impulso", un término adicional basado en la dirección utilizada en pasos anteriores. En particular, la forma de SGD con impulso es la siguiente:
xk + 1 = xk − γ mk ( 9 ) x_{k+1} = x_k - gamma m_k cuádruple (9)Xa+1=Xa−γmetroetroetroetroetroetroetroetroetroetroa(9)
donde el parámetro de impulso β-betaβ Ubicado en el rango (0, 1).Si el impulso inicial m0 = 0 m_0 = 0metroetroetroetroetroetroetroetroetroetro0=0, y expandir en (8) mk m_kmetroetroetroetroetroetroetroetroetroetroa Para actualizaciones, obtenemos mk m_kmetroetroetroetroetroetroetroetroetroetroa es el promedio ponderado de gradientes anteriores:
mk = ∑ t = 0 k β k − t ∇ ajuste ( xt ) ( 10 ) m_k = suma_{t=0}^{k} beta^{kt} en f_{i_t}(x_t) cuádruple (10)metroetroetroetroetroetroetroetroetroetroa=a=0∑aβa−a∇Fia(Xa)(10)
por lo tanto, mk m_kmetroetroetroetroetroetroetroetroetroetroa es la suma ponderada de gradientes estocásticos.porque ∑ t = 0 k β k − t = 1 − β k + 1 1 − β suma_{t=0}^{k} beta^{kt} = frac{1 - beta^{k+1}}{1 - beta}∑a=0aβa−a=1−β1−βa+1, podemos convertir 1 − β 1 − β kmk frac{1 - beta}{1 - beta^k} m_k1−βa1−βmetroetroetroetroetroetroetroetroetroetroa Considerado como un promedio ponderado de gradientes estocásticos.Si comparamos esto con la expresión del gradiente completo ∇ f ( xk ) = 1 n ∑ i = 1 n ∇ fi ( xk ) de manera que f(x_k) = frac{1}{n} suma_{i=1}^{n} de manera que f_i(x_k)∇F(Xa)=norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1∑i=1norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte∇Fi(Xa) Para comparar podemos 1 − β 1 − β kmk frac{1 - beta}{1 - beta^k} m_k1−βa1−βmetroetroetroetroetroetroetroetroetroetroa(así como mk m_kmetroetroetroetroetroetroetroetroetroetroa ) se interpreta como una estimación del gradiente completo. Si bien esta suma ponderada reduce la variación, también plantea cuestiones clave.Dado que la suma ponderada (10) da más peso a los gradientes muestreados recientemente, no convergerá al gradiente completo. ∇ f ( xk ) es f(x_k)∇F(Xa) , este último es un promedio simple. El primer método de reducción de la varianza que veremos en la Sección II-A resuelve este problema utilizando un promedio simple en lugar de cualquier promedio ponderado.
A diferencia de los métodos clásicos, utilizan directamente uno o más ∇ fi ( xk ) en f_i(x_k)∇Fi(Xa) como ∇ f ( xk ) es f(x_k)∇F(Xa) Como aproximación, los métodos modernos de reducción de la varianza (VR) emplean una estrategia diferente.Estos métodos utilizan ∇ fi ( xk ) en f_i(x_k)∇Fi(Xa) para actualizar la estimación del gradiente bueno buenogramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa, cuyo objetivo es hacer bueno buenogramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa acercarse ∇ f ( xk ) es f(x_k)∇F(Xa) .En concreto, esperamos bueno buenogramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa capaz de satisfacer gk ≈ ∇ f ( xk ) g_k aproximadamente igual a f(x_k)gramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa≈∇F(Xa) . Con base en dichas estimaciones de gradiente, luego realizamos un paso de gradiente aproximado de la forma:
xk + 1 = xk − γ gk ( 11 ) x_{k+1} = x_k - gamma g_k cuádruple (11)Xa+1=Xa−γgramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa(11)
aquí γ > 0 gama > 0γ>0 es el parámetro de tamaño de paso.
Para garantizar que se utilice un tamaño de paso constante γ gamaγ Cuando la iteración (11) puede converger, debemos asegurarnos de que la estimación del gradiente bueno buenogramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa La varianza tiende a cero. Matemáticamente, esto se puede expresar como:
E [ ∥ gk − ∇ f ( xk ) ∥ 2 ] → 0 como k → ∞ ( 12 ) Eleft[ | g_k - nabla f(x_k) |^2 right] flecha derecha 0 quad text{as } k flecha derecha infty quad (12)mi[∥gramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa−∇F(Xa)∥2]→0comoa→∞(12)
expectativas aquí EEmi se basa en el algoritmo hasta el yoa Todas las variables aleatorias se calculan para iteraciones. La propiedad (12) garantiza que el método VR pueda detenerse cuando se alcance la solución óptima. Consideramos esta propiedad como una característica distintiva del enfoque de realidad virtual y, por lo tanto, la llamamos propiedad de realidad virtual. Vale la pena señalar que la expresión varianza "reducida" puede inducir a error, porque en realidad la varianza tiende a cero. La propiedad (12) es un factor clave que permite que los métodos de realidad virtual logren una convergencia más rápida en la teoría (bajo supuestos apropiados) y en la práctica (como se muestra en la Figura 1).
Un método de mejora simple puede hacer que la fórmula recursiva SGD (5) alcance la convergencia sin reducir el tamaño del paso, es decir, traducir cada gradiente. El método específico es restar. ∇ fi ( x ∗ ) en f_i(x^*)∇Fi(X∗), este método se define de la siguiente manera:
xk + 1 = xk − γ ( ∇ fik ( xk ) − ∇ fik ( x ∗ ) ) ( 13 ) x_{k+1} = x_k - gamma (en el caso de f_{i_k}(x_k) - en el caso de f_{i_k}(x^*)) quad (13)Xa+1=Xa−γ(∇Fia(Xa)−∇Fia(X∗))(13)
Este método se llama SGD² [22].Aunque normalmente no podemos saber con seguridad cada ∇ fi ( x ∗ ) en f_i(x^*)∇Fi(X∗) , pero SGD², como ejemplo, puede ilustrar bien las características básicas del método de reducción de la varianza.Además, muchos métodos de reducción de la varianza pueden verse como una forma aproximada del método SGD²; estos métodos no se basan en los conocidos; ∇ fi ( x ∗ ) en f_i(x^*)∇Fi(X∗), sino que utilice un método que pueda aproximarse ∇ fi ( x ∗ ) en f_i(x^*)∇Fi(X∗) valor estimado.
Vale la pena señalar que SGD² utiliza una estimación insesgada del gradiente completo.porque ∇ f ( x ∗ ) = 0 por lo tanto f(x^*) = 0∇F(X∗)=0,F:
E [ ∇ fik ( xk ) − ∇ fik ( x ∗ ) ] = ∇ f ( xk ) − ∇ f ( x ∗ ) = ∇ f ( xk ) E[nabla f_{i_k}(x_k) - nabla f_{i_k}(x^*)] = nabla f(x_k) - nabla f(x^*) = nabla f(x_k)mi[∇Fia(Xa)−∇Fia(X∗)]=∇F(Xa)−∇F(X∗)=∇F(Xa)
Además, cuando SGD² alcance la solución óptima, naturalmente se detendrá porque para cualquier iii,tener:
( ∇ fi ( x ) − ∇ fi ( x ∗ ) ) ∣ x = x ∗ = 0 (por defecto f_i(x) - por defecto f_i(x^*)) bigg|_{x=x^*} = 0(∇Fi(X)−∇Fi(X∗))
X=X∗=0
Tras una observación adicional, con xk x_kXa cerca x ∗ x^*X∗(para consecutiva ∇ fi nabla f_i∇Fi), SGD² satisface la propiedad de reducción de la varianza (12) porque:
E [ ∥ gk − ∇ f ( xk ) ∥ 2 ] = E [ ∥ ∇ fik ( xk ) − ∇ fik ( x ∗ ) − ∇ f ( xk ) ∥ 2 ] ≤ E [ ∥ ∇ fik ( xk ) − ∇ fik ( x ∗ ) ∥ 2 ] Eizquierda[ | g_k - nabla f(x_k) |^2 derecha] = \Eizquierda[ | nabla f_{i_k}(x_k) - nabla f_{i_k}(x^*) - nabla f(x_k) |^2 derecha] leq Eizquierda[ | nabla f_{i_k}(x_k) - nabla f_{i_k}(x^*) |^2 derecha]mi[∥gramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa−∇F(Xa)∥2]=mi[∥∇Fia(Xa)−∇Fia(X∗)−∇F(Xa)∥2]≤mi[∥∇Fia(Xa)−∇Fia(X∗)∥2]
Aquí usamos el Lema 2, dejemos X = ∇ fik ( xk ) − ∇ fik ( x ∗ ) X = f_{i_k}(x_k) - f_{i_k}(x^*)X=∇Fia(Xa)−∇Fia(X∗)y aprovechó E [ ∇ fik ( xk ) − ∇ fik ( x ∗ ) ] = ∇ f ( xk ) E[nabla f_{i_k}(x_k) - nabla f_{i_k}(x^*)] = nabla f(x_k)mi[∇Fia(Xa)−∇Fia(X∗)]=∇F(Xa) naturaleza. Esta propiedad indica que SGD² tiene una velocidad de convergencia más rápida que los métodos SGD tradicionales, que detallamos en el Apéndice B.
En esta sección introduciremos dos supuestos estándar utilizados para analizar el método de reducción de la varianza (VR) y discutiremos el efecto de aceleración que se puede lograr bajo estos supuestos en comparación con el método SGD tradicional. Primero, asumimos que el gradiente tiene continuidad de Lipschitz, lo que significa que la tasa de cambio del gradiente es finita.
Suponemos que la función adjFes diferenciable y es LLyo- suave, para todos xxX y yyy y alguien 0 < L < ∞ 0 < L < infty0<yo<∞,Las siguientes condiciones:
∥ ∇ f ( x ) − ∇ f ( y ) ∥ ≤ L ∥ x − y ∥ ( 14 ) |nabla f(x) - nabla f(y)| leq L|x - y| quad (14)∥∇F(X)−∇F(y)∥≤yo∥X−y∥(14)
Esto significa que cada fi : R d → R fi: mathbb{R}^d flecha derecha mathbb{R}Fi:Rd→R es diferenciable, Yo y yoyoi- suave, definimos L máx. L_{texto{máx}}yomáximo para máx { L 1 , . . . , L n } máx{L_1, . . . , L_n}máximo{yo1,...,yonorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte}。
Aunque esto generalmente se considera una suposición débil, en capítulos posteriores discutiremos métodos de realidad virtual que son adecuados para problemas no fluidos. Para una función univariada dos veces diferenciable, LLyo-La suavidad se puede entender intuitivamente como: equivale a suponer que la segunda derivada es LLyo límite superior, es decir ∣ f ′ ′ ( x ) ∣ ≤ L |f''(x)| leq L∣F′′(X)∣≤yo para todos x ∈ R dx en matemáticasbb{R}^dX∈Rd .Para funciones dos veces diferenciables de múltiples variables, es equivalente a asumir una matriz de Hesse ∇ 2 f ( x ) es igual a^2 f(x)∇2F(X) El valor singular de LLyo limite superior.
La segunda hipótesis que consideramos es que la función (f) es μmμ-Fuertemente convexo, lo que significa que para un cierto μ > 0 mu > 0μ>0,función x ↦ f ( x ) − μ 2 ∥ x ∥ 2 x se asigna a f(x) - frac{mu}{2}|x|^2X↦F(X)−2μ∥X∥2 Es convexo.Además, para cada yo = 1 , . . . , ni = 1, . . . , sust.i=1,...,norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte, fi : R d → R fi: mathbb{R}^d flecha derecha mathbb{R}Fi:Rd→R Es convexo.
Esta es una suposición fuerte.En el problema de mínimos cuadrados, cada (fi$ es convexa, pero la función general (f) está solo en la matriz de diseño A : = [ a 1 , . . . , an ] A := [a_1, . . . , a_n]A:=[a1,...,anorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte] Es fuertemente convexo sólo si tiene un rango de fila perfecto. El problema de regresión logística regularizada L2 satisface este supuesto debido a la existencia del término de regularización, donde μ ≥ λ mu geq lambdaμ≥λ。
Una clase importante de problemas que satisfacen estos supuestos son los problemas de optimización de la forma:
x ∗ ∈ arg min x ∈ R df ( x ) = 1 n ∑ i = 1 n ℓ i ( ai T x ) + λ 2 ∥ x ∥ 2 ( 15 ) x^* en argmin_{x en mathbb{R}^d} f(x) = frac{1}{n} suma_{i=1}^{n} ell_i(a_i^Tx) + frac{lambda}{2}|x|^2 quad (15)X∗∈ArkansasgramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoX∈Rdmín.F(X)=norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1i=1∑norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteℓi(aiyoX)+2λ∥X∥2(15)
donde cada función de "pérdida" ℓ i : R → R ell_i: mathbb{R} flecha derecha mathbb{R}ℓi:R→R es dos veces diferenciable y su segunda derivada yo ′ ′ ell_i''ℓi′′ está restringido a 0 y algún límite superior M.M.METROETRO entre. Esto incluye una variedad de funciones de pérdida con regularización L2 en aprendizaje automático, como mínimos cuadrados, regresión logística, regresión probit, regresión robusta de Huber, etc.En este caso, para todos iii,Tenemos L i ≤ M ∥ ai ∥ 2 + λ L_i leq M|a_i|^2 + lambdayoi≤METROETRO∥ai∥2+λ y μ ≥ λ mu geq lambdaμ≥λ。
Bajo estos supuestos, la tasa de convergencia del método de descenso de gradiente (GD) está determinada por el número de condición κ : = L / μ kappa := L/muκ:=yo/μ Decidir. El número de condición siempre es mayor o igual a 1, y cuando es significativamente mayor que 1, los contornos de la función se vuelven muy elípticos, haciendo que las iteraciones del método GD oscilen.Por el contrario, cuando kappaκ Cuando está cerca de 1, el método GD converge más rápido.
Según los Supuestos 1 y 2, el método VR converge a una tasa lineal.Decimos que el valor de la función de un método aleatorio ({f(x_k)}) viene dado por 0 < ρ ≤ 1 0 < rho leq 10<ρ≤1 La tasa de convergencia lineal (bajo lo esperado), si existe una constante C > 0 C > 0C>0 Marcas:
E [ f ( xk ) ] − f ( x ∗ ) ≤ ( 1 − ρ ) k C = O ( exp ( − k ρ ) ) ∀ k ( 16 ) E[f(x_k)] - f(x^*) leq (1 - rho)^k C = O(exp(-krho)) cuádruple para todo k cuádruple (16)mi[F(Xa)]−F(X∗)≤(1−ρ)aC=Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(Exp(−aρ))∀a(16)
Esto contrasta con los métodos SGD clásicos que se basan únicamente en estimaciones insesgadas del gradiente en cada iteración, que solo obtienen tasas sublineales bajo estos supuestos:
E [ f ( xk ) ] − f ( x ∗ ) ≤ O ( 1 / k ) E[f(x_k)] - f(x^*) leq O(1/k)mi[F(Xa)]−F(X∗)≤Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(1/a)
El mínimo que satisface esta desigualdad yoa Se llama complejidad iterativa del algoritmo. Los siguientes son la complejidad iterativa y el costo de una iteración para variantes básicas de los métodos GD, SGD y VR:
algoritmo | Número de iteraciones | costo de una iteración |
---|---|---|
Dios bendiga | O ( κ log ( 1 / ϵ ) ) O(kappa log(1/épsilon))Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(κLogramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramo(1/ϵ)) | O ( n ) O(n)Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte) |
Dólares singapurenses | O ( κ máx máx ( 1 / ϵ ) ) O(kappa_{text{máx}} máx(1/épsilon))Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(κmáximomáximo(1/ϵ)) | O ( 1 ) O(1)Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(1) |
realidad virtual | O ( ( κ máx + n ) log ( 1 / ϵ ) ) O((kappa_{text{máx}} + n) log(1/épsilon))Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh((κmáximo+norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte)Logramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramo(1/ϵ)) | O ( 1 ) O(1)Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(1) |
El tiempo total de ejecución de un algoritmo está determinado por el producto de la complejidad de la iteración y el tiempo de ejecución de la iteración.usado aquí κ máx : = máx i L i / μ kappa_{text{máx}} := máx_i L_i/muκmáximo:=máximoiyoi/μ .Aviso κ máx ≥ κ kappa_{text{máx}} geq kappaκmáximo≥κPor lo tanto, la complejidad de iteración de GD es menor que la del método VR.
Sin embargo, dado que el costo por iteración de GD es el del método VR nnnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte veces, el método VR es superior en términos de tiempo total de ejecución.
La ventaja de los métodos SGD clásicos es que su tiempo de ejecución y tasa de convergencia no dependen de nnnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte, pero tiene una tolerancia épsilonϵ La dependencia de es mucho peor, lo que explica el pobre desempeño del SGD cuando la tolerancia es pequeña.
En el Apéndice B, proporcionamos una prueba simple que muestra que el método SGD² tiene la misma complejidad iterativa que el método VR.
El desarrollo de métodos de reducción de la varianza (VR) ha pasado por varias etapas, y el lote inicial de métodos dio como resultado tasas de convergencia significativamente mejoradas. El comienzo de esta serie de métodos es el algoritmo SAG. Posteriormente, el algoritmo de ascenso estocástico de doble coordenada (SDCA), el algoritmo MISO, el algoritmo de gradiente estocástico de reducción de varianza (SVRG/S2GD) y el algoritmo SAGA (que significa SAG "mejorado") surgieron uno tras otro.
En este capítulo, detallaremos estos métodos pioneros de realidad virtual. En el Capítulo 4, exploraremos algunos métodos más nuevos que muestran características superiores en comparación con estos métodos básicos en escenarios de aplicación específicos.
Nuestra exploración del primer método de reducción de la varianza (VR) comienza con la imitación de la estructura de gradiente completa.Desde el gradiente completo ∇ f ( x ) es f(x)∇F(X) es todo ∇ fi ( x ) en f_i(x)∇Fi(X) Un promedio simple de los gradientes, luego nuestra estimación del gradiente completo bueno buenogramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa También debería ser el promedio de estas estimaciones de gradiente. Esta idea dio origen a nuestro primer método de realidad virtual: el método del gradiente promedio estocástico (SAG).
El método SAG [37], [65] es una versión aleatoria del método temprano de gradiente agregado incremental (IAG) [4]. La idea central de SAG es que para cada punto de datos iii mantener una estimación vik ≈ ∇ fi ( xk ) v_{ik} aproximadamente de f_i(x_k)enyo soy≈∇Fi(Xa) .Entonces, usa estos vik_v_{ik}enyo soy El promedio de los valores se utiliza como estimación del gradiente completo, es decir:
g ˉ k = 1 n ∑ j = 1 nvjk ≈ 1 n ∑ j = 1 n ∇ fj ( xk ) = ∇ f ( xk ) ( 18 ) bar{g}_k = frac{1}{n} suma_{j=1}^{n} v_{jk} aprox frac{1}{n} suma_{j=1}^{n} nabla f_j(x_k) = nabla f(x_k) quad (18)gramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoˉa=norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1yo=1∑norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteenes broma≈norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1yo=1∑norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte∇Fyo(Xa)=∇F(Xa)(18)
En cada iteración de SAG, del conjunto { 1 , … , n } {1, lpuntos, n}{1,…,norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte} Extraer un índice de yo séiay luego actualizado de acuerdo con las siguientes reglas vjk v_{jk}enes broma:
vjkk + 1 = { ∇ fik ( xk ) , si j = ikvjkk , si j ≠ ik ( 19 ) v_{jk}^{k+1} ={∇Fia(Xa),siyo=iaenayoa,siyo≠ia cuadrilátero (19)enes bromaa+1={∇Fia(Xa),enes bromaa,siyo=iasiyo=ia(19)
Entre ellos, cada v 0 i v_{0i}en0i Se puede inicializar a cero o ∇ fi ( x 0 ) de f_i(x_0)∇Fi(X0) valor aproximado.con la solución x ∗ x^*X∗ aproximación, cada vik_v_{ik}enyo soy convergerá gradualmente a ∇ fi ( x ∗ ) en f_i(x^*)∇Fi(X∗), satisfaciendo así la propiedad VR (12).
Para implementar SAG de manera eficiente, debemos prestar atención al cálculo g ˉ k barra{g}_kgramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoˉa para evitar comenzar la suma desde cero cada vez nnnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte vector, porque esto es nnnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte El costo es alto cuando es grande.Afortunadamente, dado que cada iteración sólo tiene una vik_v_{ik}enyo soy Los términos cambiarán y no tendremos que volver a calcular la suma completa cada vez.Específicamente, supongamos que mientras se itera yoa Índice extraído de yo séia, entonces hay:
g ˉ k = 1 n ∑ j = 1 j ≠ iknvjk + 1 nvikk = g ˉ k − 1 − 1 nvikk − 1 + 1 nvikk ( 20 ) barra{g}_k = frac{1}{n} suma_{subpila{j=1 \ j neq i_k}}^{n} v_{jk} + frac{1}{n} v_{i_k}^k = barra{g}_{k-1} - frac{1}{n} v_{i_k}^{k-1} + frac{1}{n} v_{i_k}^k cuádruple (20)gramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoˉa=norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1yo=1yo=ia∑norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteenes broma+norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1eniaa=gramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoˉa−1−norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1eniaa−1+norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1eniaa(20)
Ya que además de función v_{i_k}enia todo excepto vjk v_{jk}enes broma Todos los valores siguen siendo los mismos, solo almacenamos cada uno jjyo Un vector correspondiente a ¡Vaya! ¡Vaya!enyo . El algoritmo 1 muestra la implementación específica del método SAG.
SAG es el primer método estocástico que logra una convergencia lineal y su complejidad de iteración es O ( ( κ máx + n ) log ( 1 / ϵ ) ) O((kappa_{text{máx}} + n) log(1/épsilon))Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh((κmáximo+norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte)Logramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramo(1/ϵ)), usando el tamaño del paso γ = O ( 1 / L máx ) gamma = O(1/L_{text{máx}})γ=Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(1/yomáximo) . Esta convergencia lineal se puede observar en la Figura 1.Vale la pena señalar que debido a L máx. L_{texto{máx}}yomáximo-Función suave para cualquier L ′ ≥ L máx L' geq L_{text{máx}}yo′≥yomáximo También Yo ′ Yo ′yo′- Los métodos SAG suaves logran tasas de convergencia lineal para tamaños de paso suficientemente pequeños, en contraste con los métodos SGD clásicos, que solo logran tasas sublineales con secuencias de tamaños de paso decrecientes que son difíciles de ajustar en la práctica.
En ese momento, la convergencia lineal de SAG fue un avance significativo porque calculaba solo un gradiente estocástico (procesando un único punto de datos) en cada iteración. Sin embargo, la prueba de convergencia proporcionada por Schmidt et al. [65] es muy compleja y se basa en pasos verificados por computadora. Una razón clave por la que el SAG es difícil de analizar es que bueno buenogramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa es una estimación sesgada del gradiente.
A continuación, presentamos el método SAGA, una variante de SAG que explota el concepto de covariables para crear una variante imparcial del método SAG que tiene un rendimiento similar pero es más fácil de analizar.
Algoritmo 1: método SAG
Una estimación de gradiente básica e insesgada reducida ∇ fik ( xk ) en f_{i_k}(x_k)∇Fia(Xa) El enfoque de la varianza se realiza mediante el uso de las llamadas covariables o variables de control.para i = 1, …, ni = 1, lpuntos, ni=1,…,norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte,configuración vi ∈ R d v_i en mathbb{R}^deni∈Rd es un vector.Usando estos vectores, podemos convertir el gradiente completo. ∇ f ( x ) es f(x)∇F(X) Reescrito como:
∇ f ( x ) = 1 n ∑ i = 1 n ( ∇ fi ( x ) − vi + vi ) = 1 n ∑ i = 1 n ∇ fi ( x ) − vi + 1 n ∑ j = 1 nvj nabla f(x) = frac{1}{n} suma_{i=1}^{n}(nabla f_i(x) - v_i + v_i) = frac{1}{n} suma_{i=1}^{n} nabla f_i(x) - v_i + frac{1}{n} suma_{j=1}^{n} v_j∇F(X)=norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1i=1∑norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte(∇Fi(X)−eni+eni)=norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1i=1∑norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte∇Fi(X)−eni+norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1yo=1∑norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteenyo
: = 1 n ∑ i = 1 n ∇ fi ( x , v ) ( 21 ) := frac{1}{n} suma_{i=1}^{n} de f_i(x, v) quad (21):=norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1i=1∑norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte∇Fi(X,en)(21)
que define ∇ fi ( x , v ) : = ∇ fi ( x ) − vi + 1 n ∑ j = 1 nvj de f_i(x, v) := de f_i(x) - v_i + frac{1}{n} suma_{j=1}^{n} v_j∇Fi(X,en):=∇Fi(X)−eni+norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1∑yo=1norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteenyo .Ahora podemos muestrear aleatoriamente una ∇ fi ( x , v ) en f_i(x, v)∇Fi(X,en) para construir el gradiente completo ∇ f ( x ) es f(x)∇F(X) Una estimación insesgada de i ∈ { 1 , … , n } i en {1, lpuntos, n}i∈{1,…,norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte}, puede aplicar el método SGD y utilizar la estimación de gradiente:
gk = ∇ fik ( xk , v ) = ∇ fik ( xk ) − vik + 1 n ∑ j = 1 nvj ( 22 ) g_k = nabla f_{i_k}(x_k, v) = nabla f_{i_k}(x_k) - v_{i_k} + frac{1}{n} suma_{j=1}^{n} v_j quad (22)gramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa=∇Fia(Xa,en)=∇Fia(Xa)−enia+norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1yo=1∑norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteenyo(22)
para observación yo v_ieni La diferencia del par de selección. bueno buenogramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa influencia, podemos gk = ∇ fik ( xk , v ) g_k = f_{i_k}(x_k, v)gramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa=∇Fia(Xa,en) Sustituir y usar E i ∼ 1 n [ vi ] = 1 n ∑ j = 1 nvj E_i sim frac{1}{n}[v_i] = frac{1}{n} suma_{j=1}^{n} v_jmii∼norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1[eni]=norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1∑yo=1norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteenyo Para calcular la expectativa, obtenemos:
E [ ∥ ∇ fi ( xk ) − vi + E i ∼ 1 n [ vi − ∇ fi ( xk ) ] ∥ 2 ] ≤ E [ ∥ ∇ fi ( xk ) − vi ∥ 2 ] ( 23 ) E izquierda[ |nabla f_i(x_k) - v_i + E_i sim frac{1}{n}[v_i - nabla f_i(x_k)]|^2 derecha] leq E izquierda[ |nabla f_i(x_k) - v_i|^2 derecha] quad (23)mi[∥∇Fi(Xa)−eni+mii∼norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1[eni−∇Fi(Xa)]∥2]≤mi[∥∇Fi(Xa)−eni∥2](23)
Aquí se utiliza el lema 2, donde X = ∇ fi ( xk ) − vi X = f_i(x_k) - v_iX=∇Fi(Xa)−eni .Esta cota (23) muestra que si yo v_ieni junto con yoa El aumento es cercano a ∇ fi ( xk ) en f_i(x_k)∇Fi(Xa) , podemos obtener atributos de realidad virtual (12).Por eso llamamos yo v_ieni son covariables y podemos seleccionarlas para reducir la varianza.
Por ejemplo, este enfoque también se implementa mediante el método SGD² (13), donde vi = ∇ fi ( x ∗ ) v_i = nabla f_i(x^*)eni=∇Fi(X∗) .Sin embargo, esto no se usa comúnmente en la práctica porque normalmente no sabemos ∇ fi ( x ∗ ) en f_i(x^*)∇Fi(X∗) .Una opción más práctica es yo v_ieni como la conocemos x ˉ i ∈ R d bar{x}_i en mathbb{R}^dXˉi∈Rd gradiente cercano ∇ fi ( x ˉ i ) en f_i(bar{x}_i)∇Fi(Xˉi) . SAGA para cada función es f_iFi utilizar un punto de referencia x ˉ i ∈ R d bar{x}_i en mathbb{R}^dXˉi∈Rdy utilizar covariables vi = ∇ fi ( x ˉ i ) v_i = nabla f_i(bar{x}_i)eni=∇Fi(Xˉi), cada uno de los cuales x ˉ i barra{x}_iXˉi será nuestra última evaluación es f_iFi punto. Usando estas covariables, podemos construir una estimación de gradiente, siguiendo (22), dando:
gk = ∇ fik ( xk ) − ∇ fik ( x ˉ ik ) + 1 n ∑ j = 1 n ∇ fj ( x ˉ j ) ( 24 ) g_k = nabla f_{i_k}(x_k) - nabla f_{i_k}(bar{x}_{i_k}) + frac{1}{n} suma_{j=1}^{n} nabla f_j(bar{x}_j) quad (24)gramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa=∇Fia(Xa)−∇Fia(Xˉia)+norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1yo=1∑norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte∇Fyo(Xˉyo)(24)
Para implementar SAGA podemos almacenar gradientes. ∇ fi ( x ˉ i ) en f_i(bar{x}_i)∇Fi(Xˉi) en lugar de nnnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte punto de referencia x ˉ i barra{x}_iXˉi .Es decir, supongamos vj = ∇ fj ( x ˉ j ) v_j = barra f_j(x_j)enyo=∇Fyo(Xˉyo) para j ∈ { 1 , … , n } j en {1, lpuntos, n}yo∈{1,…,norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte}, en cada iteración, actualizamos un gradiente estocástico como SAG ¡Vaya! ¡Vaya!enyo。
Algoritmo 2 SAGA
El método SAGA tiene la misma complejidad de iteración que SAG. O ( ( κ máx + n ) log ( 1 / ϵ ) ) O((kappa_{text{máx}} + n) log(1/épsilon))Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh((κmáximo+norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte)Logramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramo(1/ϵ)), usando el tamaño del paso γ = O ( 1 / L máx ) gamma = O(1/L_{text{máx}})γ=Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(1/yomáximo) , pero la prueba es mucho más sencilla.Sin embargo, al igual que SAG, el método SAGA requiere almacenamiento nnnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte vectores auxiliares vi ∈ R d v_i en mathbb{R}^deni∈Rd para i = 1, …, ni = 1, lpuntos, ni=1,…,norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte, lo que significa la necesidad O ( nd ) O(nd)Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorted) de espacio de almacenamiento.cuando Oídod y nnnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte Cuando ambos son grandes, esto puede no ser factible. En la siguiente sección, detallamos cómo reducir este requisito de memoria para modelos comunes, como los modelos lineales regularizados.
cuando sea capaz de nnnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte Cuando se almacenan dos vectores auxiliares en la memoria, SAG y SAGA tienden a comportarse de manera similar. Si este requisito de memoria es demasiado alto, el método SVGG, que revisaremos en la siguiente sección, es una buena alternativa. El método SVGG logra la misma tasa de convergencia y a menudo es casi tan rápido en la práctica, pero sólo requiere O ( d ) O(d)Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(d) de la memoria, para cuestiones generales.
Antes de la aparición del método SAGA, algunos de los primeros trabajos introdujeron covariables por primera vez para resolver el problema de alta memoria requerido por el método SAG.Estos estudios se basan en un punto de referencia fijo. x ˉ ∈ R d bar{x} en mathbb{R}^dXˉ∈Rd covariables, hemos calculado el gradiente completo en ese punto ∇ f ( x ˉ ) en f(bar{x})∇F(Xˉ) .almacenando puntos de referencia x ˉ barra{x}Xˉ y el gradiente completo correspondiente ∇ f ( x ˉ ) en f(bar{x})∇F(Xˉ), podemos hacer esto sin almacenar cada uno ∇ fj ( x ˉ ) en f_j(barra{x})∇Fyo(Xˉ) En caso de utilizar x ˉ j = x ˉ barra{x}_j = barra{x}Xˉyo=Xˉ a todos jjyo para implementar la actualización (24).Específicamente, en lugar de almacenar estos vectores, utilizamos los puntos de referencia almacenados en cada iteración. x ˉ barra{x}Xˉ calcular ∇ fik ( x ˉ ) en f_{i_k}(bar{x})∇Fia(Xˉ) . Este método fue propuesto originalmente por diferentes autores con diferentes nombres, pero luego fue unificado como método SVGG, siguiendo la nomenclatura de [28] y [84].
Formalizamos el método SVGG en el Algoritmo 3.
Usando (23), podemos derivar la estimación del gradiente. bueno buenogramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa La varianza de está acotada:
E [ ∥ gk − ∇ f ( xk ) ∥ 2 ] ≤ E [ ∥ ∇ fi ( xk ) − ∇ fi ( x ˉ ) ∥ 2 ] ≤ L máx 2 ∥ xk − x ˉ ∥ 2 Eizquierda[ | g_k - nabla f(x_k) |^2 derecha] leq Eizquierda[ | nabla f_i(x_k) - nabla f_i(barra{x}) |^2 derecha] leq L_{texto{máx}}^2 | x_k - barra{x} |^2mi[∥gramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa−∇F(Xa)∥2]≤mi[∥∇Fi(Xa)−∇Fi(Xˉ)∥2]≤yomáximo2∥Xa−Xˉ∥2
donde la segunda desigualdad usa cada es f_iFi de Yo y yoyoi-Suavidad.
Vale la pena señalar que el punto de referencia x ˉ barra{x}Xˉ Cuanto más cerca del punto actual xk x_kXa, menor será la varianza de la estimación del gradiente.
Para que el método SVGG sea efectivo, necesitamos actualizar los puntos de referencia con frecuencia. x ˉ barra{x}Xˉ (lo que requiere el cálculo del gradiente completo) se sopesa frente al beneficio de una varianza reducida.Por esta razón, cada uno de nosotros El ta Actualice el punto de referencia una vez en cada iteración para acercarlo a xk x_kXa (Ver línea 11 del Algoritmo II-C).Es decir, el método SVGG contiene dos bucles: un bucle exterior ess, donde se calcula el gradiente de referencia ∇ f ( x ˉ s − 1 ) en f(bar{x}_{s-1})∇F(Xˉs−1)(Línea 4), y un bucle interno donde el punto de referencia se fija y la iteración interna se actualiza en función del paso de gradiente estocástico (22) xk x_kXa(Línea 10).
A diferencia de SAG y SAGA, SVGG sólo requiere O ( d ) O(d)Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(d) de la memoria. Las desventajas de SVGG incluyen: 1) Tenemos un parámetro adicional El ta, es decir, la longitud del bucle interno debe ajustarse; 2) Se deben calcular dos gradientes para cada iteración y se debe calcular el gradiente completo cada vez que se cambia el punto de referencia.
Johnson y Zhang [28] demostraron que SVGG tiene complejidad iterativa O ( ( κ máx + n ) log ( 1 / ϵ ) ) O((kappa_{text{máx}} + n) log(1/épsilon))Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh((κmáximo+norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte)Logramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramo(1/ϵ)) , similar a SAG y SAGA.Este es el número de bucles dentro de la hipótesis. El ta de la colección { 1 , … , m } {1, lpuntos, m}{1,…,metroetroetroetroetroetroetroetroetroetro} Obtenido bajo la condición de muestreo uniforme, donde L máx. L_{texto{máx}}yomáximo, μmμ, Numero de pie γ gamaγ y El ta Se deben satisfacer ciertas dependencias entre ellos.En la práctica, utilizando γ = O ( 1 / L máx ) gamma = O(1/L_{text{máx}})γ=Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(1/yomáximo) y longitud del bucle interior t = nt = na=norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte, SVGG tiende a funcionar bien, que es exactamente la configuración que utilizamos en la Figura 1.
Ahora, existen muchas variaciones del método SVGG original.Por ejemplo, algunas variaciones utilizan El ta distribución alternativa [32], algunas variantes permiten la forma O ( 1 / L máx ) O(1/L_{text{máx}})Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(1/yomáximo) El tamaño del paso [27], [33], [35].También hay algunas variaciones usando ∇ f ( x ˉ ) en f(bar{x})∇F(Xˉ) aproximación de mini lotes para reducir el costo de estas evaluaciones de gradiente completo y aumentar el tamaño del mini lote para preservar las propiedades de la realidad virtual.También hay algunas variantes donde las actualizaciones se repiten en el bucle interno según [54] bueno buenogramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa:
[ g_k = f_{i_k}(x_k) - f_{i_k}(x_{k-1}) + g_{k-1} quad (25) ]
Esto proporciona una aproximación más local. El uso de esta variante de actualización continua (25) muestra ventajas únicas al minimizar funciones no convexas, como analizamos brevemente en la Sección IV.Finalmente, tenga en cuenta que SVGG puede aprovechar ∇ f ( x ˉ s ) en f(bar{x}_s)∇F(Xˉs) valor para ayudar a decidir cuándo terminar el algoritmo.
Algoritmo 3 método SVGG
Una desventaja de los métodos SAG y SVGG es que el tamaño de su paso depende de valores desconocidos que pueden ser desconocidos en algunos problemas. L máx. L_{texto{máx}}yomáximo . Antes de SVRG, el método SDCA [70], como uno de los primeros métodos de realidad virtual, extendió la investigación sobre métodos de descenso de coordenadas a problemas de suma finita. La idea detrás de SDCA y sus variantes es que las coordenadas del gradiente proporcionan una estimación del gradiente natural que reduce la varianza.Específicamente, supongamos j ∈ { 1 , … , d } j en {1, lpuntos, d}yo∈{1,…,d}y definir ∇ jf ( x ) : = ( ∂ f ( x ) ∂ xj ) ej nabla_j f(x) := izquierda( frac{parcial f(x)}{parcial x_j} derecha) e_j∇yoF(X):=(∂Xyo∂F(X))miyo es el ésimo de (f(x)) jjyo derivadas en direcciones de coordenadas, donde ej ∈ R d e_j en mathbb{R}^dmiyo∈Rd es el primero jjyo vector unitario.Una propiedad clave de las derivadas de coordenadas es que ∇ jf ( x ∗ ) = 0 nabla_j f(x^*) = 0∇yoF(X∗)=0, porque sabemos ∇ f ( x ∗ ) = 0 por lo tanto f(x^*) = 0∇F(X∗)=0 .La derivada de esto con cada punto de datos. ∇ fj en f_j∇Fyo diferente, este último es x ∗ x^*X∗ puede que no sea cero. Por lo tanto tenemos:
∥ ∇ f ( x ) − ∇ jf ( x ) ∥ 2 → 0 当 x → x ∗ ( 26 ) | nabla f(x) - nabla_j f(x) |^2 flecha derecha 0 quad text{当} quad x flecha derecha x^* quad (26)∥∇F(X)−∇yoF(X)∥2→0cuandoX→X∗(26)
Esto significa que la derivada de coordenadas satisface la propiedad de reducción de la varianza (12).Además, podemos utilizar ∇ jf ( x ) nabla_j f(x)∇yoF(X) para construir ∇ f ( x ) es f(x)∇F(X) una estimación insesgada de.Por ejemplo, supongamos jjyo es de la coleccion { 1 , … , d } {1, lpuntos, d}{1,…,d} Un índice seleccionado uniformemente al azar en .Por lo tanto, para cualquier i ∈ { 1 , … , d } i en {1, lpuntos, d}i∈{1,…,d},Tenemos P [ j = i ] = 1 d P[j = i] = frac{1}{d}PAGAGAG[yo=i]=d1 . por lo tanto, d × ∇ jf ( x ) d veces nabla_j f(x)d×∇yoF(X) Sí ∇ f ( x ) es f(x)∇F(X) Una estimación insesgada de porque:
E [ d ∇ jf ( x ) ] = d ∑ i = 1 d P [ j = i ] ∂ f ( x ) ∂ xiei = ∑ i = 1 d ∂ f ( x ) ∂ xiei = ∇ f ( x ) Eizquierda[ d nabla_j f(x) derecha] = d suma_{i=1}^{d} P[j = i] frac{parcial f(x)}{parcial x_i} e_i = suma_{i=1}^{d} frac{parcial f(x)}{parcial x_i} e_i = nabla f(x)mi[d∇yoF(X)]=di=1∑dPAGAGAG[yo=i]∂Xi∂F(X)mii=i=1∑d∂Xi∂F(X)mii=∇F(X)
por lo tanto, ∇ jf ( x ) nabla_j f(x)∇yoF(X) Tiene todas las propiedades ideales que esperaríamos de la realidad virtual para estimar gradientes completos, sin necesidad de utilizar covariables. Una desventaja de utilizar este gradiente de coordenadas es que es computacionalmente costoso para nuestro problema de suma (2).Esto se debe a que el cálculo ∇ jf ( x ) nabla_j f(x)∇yoF(X) Es necesario recorrer todo el conjunto de datos porque ∇ jf ( x ) = 1 n ∑ i = 1 n ∇ jfi ( x ) nabla_j f(x) = frac{1}{n} suma_{i=1}^{n} nabla_j f_i(x)∇yoF(X)=norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1∑i=1norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte∇yoFi(X) . Por lo tanto, el uso de derivadas de coordenadas parece incompatible con la estructura de nuestro problema de suma. Sin embargo, a menudo podemos reescribir el problema original (2) en la denominada formulación dual, donde las derivadas de coordenadas pueden explotar la estructura inherente.
Por ejemplo, la fórmula dual del modelo lineal regularizado L2 (15) es:
v ∗ ∈ arg max v ∈ R n 1 n ∑ i = 1 n − ℓ i ∗ ( − vi ) − λ 2 ∥ 1 λ ∑ i = 1 nviai ∥ 2 ( 27 ) v^* en argmax_{v en mathbb{R}^n} frac{1}{n} suma_{i=1}^{n} -ell_i^*(-v_i) - frac{lambda}{2} izquierda| frac{1}{lambda} suma_{i=1}^{n} v_i a_i derecha|^2 cuadrante (27)en∗∈Arkansasgramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoen∈Rnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteortemáximonorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte1i=1∑norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte−ℓi∗(−eni)−2λ
λ1i=1∑norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteeniai
2(27)
en ℓ i ∗ ( v ) ell_i^*(v)ℓi∗(en) Sí yo ell_iℓi conjugado convexo.Podemos usar el mapeo x = 1 λ ∑ i = 1 nviaix = frac{1}{lambda} suma_{i=1}^{n} v_i a_iX=λ1∑i=1norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteeniai para restaurar el problema original (15) xxX variable.resolverá v ∗ v^*en∗ Sustituyendo en el lado derecho del mapeo anterior, podemos obtener la solución de (15) x ∗ x^*X∗。
Tenga en cuenta que este doble problema tiene nnnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte variables reales vi ∈ R v_i en matemáticasbb{R}eni∈R , correspondiente a uno para cada muestra de entrenamiento.Además, cada función de pérdida dual ℓ i ∗ ell_i^*ℓi∗ solo yo v_ieni La función. Es decir, el primer término de la función de pérdida es coordinadamente separable. Esta separabilidad en coordenadas, junto con la forma simple del segundo término, nos permite implementar eficientemente el método de ascenso de coordenadas.De hecho, Shalev-Shwartz y Zhang demostraron que el ascenso coordinado en este problema tiene una complejidad iterativa similar a SAG, SAGA y SVGG. O ( ( κ máx + n ) log ( 1 / ϵ ) ) O((kappa_{text{máx}} + n) log(1/épsilon))Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh((κmáximo+norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte)Logramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramo(1/ϵ))。
El costo de iteración y la estructura del algoritmo también son muy similares: suma por seguimiento ∑ i = 1 nviai suma_{i=1}^{n} v_i a_i∑i=1norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteeniai Para manejar el segundo término en (27), cada iteración de ascenso de coordenadas duales solo necesita considerar una muestra de entrenamiento, y el costo de cada iteración es el mismo que nnnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte Nada que hacer.Además, podemos utilizar una búsqueda de líneas 1D para calcular eficientemente el tamaño del paso para maximizar como yo v_ieni Doble objetivo de la función.Esto significa que incluso sin L máx. L_{texto{máx}}yomáximo O con el conocimiento de las cantidades relevantes, también es posible lograr tiempos de ejecución rápidos en el peor de los casos para los métodos de realidad virtual.
Para implementar el método básico de reducción de la varianza (VR) y lograr un rendimiento razonable, se deben abordar varios problemas de implementación. En esta sección, analizamos varios temas que no se trataron anteriormente.
En el campo de los algoritmos de optimización, especialmente en los métodos de reducción de variación como el gradiente promedio estocástico (SAG), el algoritmo de gradiente promedio estocástico (SAGA) y el gradiente estocástico (SVRG), la configuración del tamaño del paso es una cuestión clave.Aunque para el método de ascenso estocástico de coordenadas duales (SDCA), podemos usar el objetivo dual para determinar el tamaño del paso, la base teórica para los métodos variables originales de SAG, SAGA y SVGG es que el tamaño del paso debe ser γ = O ( 1 L máx ) gamma = O izquierda (frac{1}{L_{text{máx}}} derecha)γ=Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(yomáximo1) forma.Sin embargo, en aplicaciones prácticas, a menudo no sabemos L máx. L_{texto{máx}}yomáximo valor exacto y el uso de otros tamaños de paso puede proporcionar un mejor rendimiento.
Una estrategia clásica para establecer el tamaño del paso en el método de descenso de gradiente completo (GD completo) es la búsqueda de líneas de Armijo.dado el punto actual xk x_kXa y dirección de búsqueda bueno buenogramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa, Línea Armijo busca en γ k gama_kγa se lleva a cabo en la línea, que se define como γ k ∈ { γ : xk + γ gk } gamma_k en {gamma : x_k + gamma g_k}γa∈{γ:Xa+γgramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa}, y se requiere que la función se reduzca suficientemente, es decir:
f ( xk + γ kgk ) < f ( xk ) − c γ k ∥ ∇ f ( xk ) ∥ 2 f(x_k + gamma_k g_k) < f(x_k) - c gamma_k |nabla f(x_k)|^2F(Xa+γagramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa)<F(Xa)−Cγa∥∇F(Xa)∥2
Sin embargo, este enfoque requiere múltiples pasos candidatos. γ k gama_kγa Cálculo f(xk + γ kgk) f(x_k + gamma_k g_k)F(Xa+γagramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa), que evalúa f(x)f(x)F(X) Costo prohibitivo cuando se trata de recorrer todo el conjunto de datos.
Para resolver este problema se puede utilizar un método de variación aleatoria para encontrar aquellos que cumplan las siguientes condiciones γ k gama_kγa:
fik ( xk + γ kgk ) < fik ( xk ) − c γ k ∥ ∇ fik ( xk ) ∥ 2 f_{ik}(x_k + gamma_k g_k) < f_{ik}(x_k) - c gamma_k |nabla f_{ik}(x_k)|^2Fyo soy(Xa+γagramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoa)<Fyo soy(Xa)−Cγa∥∇Fyo soy(Xa)∥2
Este enfoque suele funcionar bien en la práctica, especialmente cuando ∥ ∇ fik ( xk ) ∥ |en la ecuación f_{ik}(x_k)|∥∇Fyo soy(Xa)∥ no está cerca de cero, aunque actualmente no existe ninguna teoría que respalde este enfoque.
Además, Mairal propuso una "técnica de Bottou" para establecer el tamaño del paso en la práctica. Este método realiza una búsqueda binaria tomando una pequeña porción del conjunto de datos (por ejemplo, 5%) para intentar encontrar el tamaño de paso óptimo en una sola pasada a través de esta muestra. Al igual que la búsqueda de líneas de Armijo, este método suele funcionar bien en la práctica, pero nuevamente carece de una base teórica.
Tenga en cuenta que el contenido anterior es una reformulación del texto original y utiliza el formato Markdown para representar fórmulas y variables matemáticas.
Sin embargo, el método SDCA también tiene algunas desventajas.Primero, requiere calcular el conjugado convexo. ℓ i ∗ ell_i^*ℓi∗ en lugar de un simple gradiente. No tenemos un equivalente diferencial automático para conjugados convexos, por lo que esto puede aumentar el esfuerzo de implementación. Trabajos recientes han propuesto métodos SDCA "doble libre" que no requieren conjugación y, en cambio, utilizan gradientes directamente. Sin embargo, en estos métodos ya no es posible realizar un seguimiento del objetivo dual para establecer el tamaño del paso.En segundo lugar, aunque SDCA sólo exige O ( n + d ) O(n + d)Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte+d) memoria para resolver el problema (15), pero para esta categoría de problema, SAG/SAGA sólo necesita O ( n + d ) O(n + d)Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte+d) de la memoria (ver Sección 3).Una variante de SDCA adecuada para problemas más generales con SAG/SAGA O ( nd ) O(nd)Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorted) memoria porque yo v_ieni convertirse en tener Oídod vector de elementos. Un último inconveniente sutil de SDCA es que implícitamente asume una constante de convexidad fuerte. μmμ igual lambdaλ .para μmμ más que el lambdaλ problema, el método de realidad virtual original generalmente supera significativamente a SDCA.
En el campo de la optimización de algoritmos, a menudo nos basamos en resultados teóricos de complejidad iterativa para predecir el peor número de iteraciones necesarias para que un algoritmo alcance una precisión específica. Sin embargo, estos límites teóricos a menudo dependen de algunas constantes que no podemos predecir y, en aplicaciones prácticas, el algoritmo a menudo puede lograr la precisión esperada en menos iteraciones. Por lo tanto, necesitamos configurar algunos criterios de prueba para determinar cuándo se debe terminar el algoritmo.
En el método tradicional de descenso de gradiente completo (GD completo), generalmente usamos la norma del gradiente ∥ ∇ f ( xk ) ∥ | de f(x_k) |∥∇F(Xa)∥ O alguna otra cantidad relacionada con esto para decidir cuándo detener la iteración.Para el método SVGG podemos adoptar el mismo criterio pero usando ∥ ∇ f ( x ˉ s ) ∥ | en f(bar{x}_s) |∥∇F(Xˉs)∥ como base para el juicio.Para el método SAG/SAGA, aunque no calculamos explícitamente el gradiente completo, la cantidad $ g_{bar{k}} $ se aproximará gradualmente ∇ f ( xk ) es f(x_k)∇F(Xa), por lo tanto, utilice ∥ gk ˉ ∥ | g_{bar{k}} |∥gramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoaˉ∥ como condición de parada es una heurística razonable.
En el método SDCA, con algo de trabajo de registro adicional, podemos rastrear el gradiente del objetivo dual sin agregar costos asintóticos adicionales.Además, un enfoque más sistemático sería rastrear la brecha dual, aunque esto aumentaría la O ( n ) O(n)Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte) costo, pero es capaz de proporcionar condiciones de terminación con pruebas de doble brecha. Además, basándose en la condición de optimización de objetivos fuertemente convexos, el método MISO adopta un método de principios basado en un límite inferior cuadrático [41].
Las siguientes son fórmulas matemáticas y variables expresadas en formato Markdown:
Tenga en cuenta que el contenido anterior es una reformulación del texto original y utiliza el formato Markdown para representar fórmulas y variables matemáticas.
Aunque el algoritmo de reducción variacional estocástica de gradiente (SVRG) elimina los requisitos de memoria de los métodos anteriores de reducción de variación, en aplicaciones prácticas, los algoritmos SAG (descenso de gradiente promedio estocástico) y SAGA (descenso de gradiente promedio estocástico con acumulación de gradiente) se utilizan en muchos problemas. tienden a requerir menos iteraciones que el algoritmo SVGG.Esto desencadenó un pensamiento: ¿Existen algunos problemas que permitan a SAG/SAGA O ( nd ) O(nd)Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorted) Los requisitos de memoria se implementan a continuación. Esta sección explora una clase de modelos lineales para los cuales los requisitos de memoria se pueden reducir significativamente.
Considere un modelo lineal donde cada función fi(x) f_i(x)Fi(X) Se puede expresar como ξ i ( ai ⊤ x ) xi_i(mathbf{a}_i^top x)ξi(ai⊤X) .bien xxX La derivada da la forma de gradiente:
∇ fi ( x ) = ξ ′ ( ai ⊤ x ) ai en f_i(x) = xi'(mathbf{a}_i^top x) mathbf{a}_i∇Fi(X)=ξ′(ai⊤X)ai
aquí, ξ′xi'ξ′ expresar ξ xiξ la derivada de.Suponiendo que tenemos acceso directo a los vectores propios ai matemáticabf{a}_iai, entonces para implementar el método SAG/SAGA, solo necesitamos almacenar el escalar ξ ( ai ⊤ x ) xi(mathbf{a}_i^top x)ξ(ai⊤X) .De esta manera, los requisitos de memoria varían de O ( nd ) O(nd)Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorted) reducido a O ( n ) O(n)Ohhhhhhhhhhhhhhhhhhhhhhhhhhhhhh(norteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte) . El algoritmo SVGG también puede aprovechar esta estructura de gradientes: almacenando este nnnorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorteorte escalar, podemos reducir el número de evaluaciones de gradiente requeridas por iteración "interna" de SVGG a 1 para esta clase de problemas.
Existen otro tipo de problemas, como los modelos gráficos probabilísticos, que también ofrecen la posibilidad de reducir los requisitos de memoria [66]. A través de una estructura de datos específica y la optimización del algoritmo, los recursos de memoria requeridos por el algoritmo en tiempo de ejecución se pueden reducir aún más.
Las siguientes son fórmulas matemáticas y variables expresadas en formato Markdown:
En algunos problemas, el gradiente ∇ fi ( x ) en f_i(x)∇Fi(X) Puede contener una gran cantidad de valores cero, como un modelo lineal con características escasas.En este caso, el algoritmo tradicional de descenso de gradiente estocástico (SGD) se puede implementar de manera eficiente, con una complejidad computacional lineal en el número de elementos distintos de cero en el gradiente, que generalmente es mucho menor que la dimensión del problema. Oídod . Sin embargo, en los métodos estándar de reducción variacional (VR), esta ventaja no se aprovecha. Afortunadamente, existen dos formas conocidas de mejorar esto.
La primera mejora fue propuesta por Schmidt et al., que aprovecha la simplicidad del proceso de actualización e implementa una variante de cálculo "sobre la marcha" de modo que el coste de cada iteración es proporcional al número de iteraciones distintas de cero. elementos.Tomando SAG como ejemplo (pero este enfoque funciona para todas las variantes), esto se hace no almacenando el vector completo después de cada iteración. vik_v_{ik}enyo soy, pero solo calcula aquellos correspondientes a elementos distintos de cero vikj v_{ik_j}eniayo, actualizando cada variable desde la última vez que ese elemento era distinto de cero vikj v_{ik_j}eniayo。
El segundo método de mejora fue propuesto por Leblond et al. para SAGA, que actualiza la fórmula. xk + 1 = xk − γ ( ∇ fik ( xk ) − ∇ fik ( x ˉ ik ) + g ˉ k ) x_{k+1} = x_k - gamma(en la barra f_{ik}(x_k) - en la barra f_{ik}(bar{x}_{ik}) + bar{g}_k)Xa+1=Xa−γ(∇Fyo soy(Xa)−∇Fyo soy(Xˉyo soy)+gramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoˉa) Se introduce aleatoriedad adicional. aquí, ∇ fik ( xk ) es f_{ik}(x_k)∇Fyo soy(Xa) y ∇ fik ( x ˉ ik ) en f_{ik}(bar{x}_{ik})∇Fyo soy(Xˉyo soy) es escaso y g ˉ k barra{g}_kgramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoˉa es denso.En este método, el término denso ( g ˉ k ) j (barra{g}_k)_j(gramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoˉa)yo Cada componente de es reemplazado por wj ( g ˉ k ) j w_j (barra{g}_k)_jelyo(gramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoramoˉa)yo,en w ∈ R dw en matemáticasbb{R}^del∈Rd es un vector disperso aleatorio cuyo conjunto de soporte está contenido en ∇ fik ( xk ) es f_{ik}(x_k)∇Fyo soy(Xa) , y se espera que sea un vector constante con todos los elementos iguales a 1. De esta manera, el proceso de actualización sigue siendo imparcial (aunque ahora es escaso) y la mayor varianza no afecta la tasa de convergencia del algoritmo. Leblond et al. proporcionan más detalles.
Las siguientes son fórmulas matemáticas y variables expresadas en formato Markdown: