Buscando por
Tamanhos de Passo por Coordenada Ótimos com
Victor Sanches Portella

ime.usp.br/~victorsp
junto de Frederik Kunstner, Nick Harvey, e Mark Schmidt
Multidimensional Backtracking





Março, 2026
Métodos de Primeira Ordem
Por que otimização de primeira ordem?
Treinar um modelo de ML normalmente é modelado via optimização irrestrita
Modelos de ML tendem a serem GRANDES
\(d\) é GRANDE
Métodos de primeira ordem (ex: usando gradientes) se encaixam
(Ainda mais as versões estocásticas)
\(O(d)\) tempo e espaço por iteração é preferível
O Caso de Otimização Convexa
\(f\) é convexa
Não é o caso de Redes Neurais
Métodos ainda úteis na teoria e prática
Mais condições para obtermos taxas de convergência:
\(L\)-suave
\(\mu\)-fortemente convexa
"Fácil de otimizar"
Gradient Descent

Qual tamanho de passo \(\alpha\) escolher?
Núm. de condição
\(\kappa\) Grande \(\implies\) Função difícil
Condição de Armijo
Qual tamanho de passo escolher?
Se sabemos \(L\), \(\alpha = 1/L\) sempre funciona
a é ótima
E se não conhecemos \(L\)?

"Descent Lemma"
Ideia: Escolher \(\alpha\) grande and checar se "Descent lemma" vale
(Localmente \(1/\alpha\)-suave)
no pior caso
Backtracking Line Search (Busca em linha)
Busca em linha: testa se \(\alpha_{\max}/2\) nos dá progresso o suficiente:
Se falhar, CORTE todos os candidatos maiores que \(\alpha_{\max}/2\)
Além de busca em linha?

Converge em 1 passo

\(P\)
Conseguimos calcular \(P\) automaticamente?
"Se adaptar à \(f\)"
Precondicionador \(P\)
Otimização "Adaptativa"

Métodos "adaptativos"
Podemos convergir mais rápido com um precondicionador (diagonal)
(Quasi-)Newton
Convergência superlinear perto da sol.
O que é um bom \(P\)?
Garantias globais fracas
Online Learning
Garantias formais até no caso adversarial
Muito conservador (ex: AdaGrad)
"Primos" (ex: Adam) tem poucas garantias
Hypergradient
Trata achar \(P\) como um prob. de otimização
Instável e quase zero teoria




"Fixing" AdaGrad

"AdaGrad inspired an incredible number of clones, most of them with similar, worse, or no regret guarantees.(...) Nowadays, [adaptive] seems to denote any kind of coordinate-wise learning rates that does not guarantee anything in particular."
Francesco Orabona in "A Modern Introduction to Online Learning", Sec. 4.3

State of Affairs
adaptive methods
only guarantee (globally)
In Smooth
and Strongly Convex optimization,
Should be better if there is a good Preconditioner \(P\)
Online Learning
Smooth Optimization
1 step-size
\(d\) step-sizes
(diagonal preconditioner )
Backtracking Line-search
Diagonal AdaGrad
Multidimensional Backtracking
Scalar AdaGrad
(and others)
(and others)
(non-smooth optmization)
Preconditioner Search
Precondicionador (Diagonal) Ótimo
Tamanho de passo ótimo: o maior que garante progresso
Precondicionador ótimo: maior (??) que garante progresso
\(L\)-suave
\(\mu\)-fort. convexa
\(f\) é
and
Precondicionador Diagonal Ótimo
\(\kappa_* \leq \kappa\), idealmente \(\kappa_* \ll \kappa\)
Sobre matrizes diagonais
minimiza \(\kappa_*\) tal que
De Busca em linha para busca de precondicionador
Busca em Linha
Vale a pena se \(\sqrt{2d} \kappa_* \ll 2 \kappa\)

Multidimensional Backtracking
(nosso alg.)
# backtracks \(\lesssim\)
# backtracks \(\leq\)
Multidimensional Backtracking
Por que a busca ingênua não funciona?
Busca em linha:
"Progresso como se \(f\) fosse
\(\frac{2}{\alpha_{\max}}\)-smooth"
Se não, CORTA candidatos maiores que \(\alpha_{\max}/2\)
Testa se \(\alpha_{\max}/2\) garante progresso suficiente:
Passo candidatos: intervalo \([0, \alpha_{\max}]\)
Por que a busca ingênua não funciona?
Busca de precondicionador:
Testa se \(P\) garante progresso o suficiente
Precondicionadores candidatos: diagonais contidas num hipercubo
Se não, CORTE tudo maior que \(P\)

"Progresso se \(f\) fosse
\(P\)-suave"
Convexidade ao resgate
Se \(P\) não garante progresso suficiente,
Quais candidatos podemos jogar fora?
\(P \) garante progresso suficiente \(\iff\) \(h(P) \leq 0\)
Convexidade \(\implies\)
induz um hiperplano separador
"Hypergradient"



Ideia principal
Convexidade ao resgate
Se \(P\) não garante progresso suficiente,
Quais candidatos podemos jogar fora?
\(P \) garante progresso suficiente \(\iff\) \(h(P) \leq 0\)

Boxes vs Ellipsoids
\(P\) perto da origem \(\implies\) queda de volume em caso de corte
\(P\) perto da borda \(\implies\) melhor taxa de convergência
Elipisoides ao resgate!
that maximizes
Ellipsoid Method to the Rescue
that maximizes
\(\Omega(d^3)\) de tempo por iteração
O problema é muito simétrico!
\(O(d)\) por iteração
Experimentos


Experimentos

Conclusões
Trabalhos seguintes com novas ideias para otimização adaptativa
Um uso de "hypergradients" baseado em teoria
ML Opt encontra Métodos de corte
Obrigado!

arxiv.org/abs/2306.02527





Additional Slides
Box as Feasible Sets



How Deep to Query?

Ellipsoid Method to the Rescue

Convexity to the Rescue

Gradient Descent and Line Search
Why first-order optimization?
Training/Fitting a ML model is often cast a (uncontrained) optimization problem
Usually in ML, models tend to be BIG
\(d\) is BIG
Running time and space \(O(d)\) is usually the most we can afford
First-order (i.e., gradient based) methods fit the bill
(stochastic even more so)
Usually \(O(d)\) time and space per iteration
Convex Optimization Setting
\(f\) is convex
Not the case with Neural Networks
Still quite useful in theory and practice
More conditions on \(f\) for rates of convergence
\(L\)-smooth
\(\mu\)-strongly convex
Gradient Descent

Which step-size \(\alpha\) should we pick?
Condition number
\(\kappa\) Big \(\implies\) hard function
What Step-Size to Pick?
If we know \(L\), picking \(1/L\) always works
and is worst-case optimal
What if we do not know \(L\)?
Locally flat \(\implies\) we can pick bigger step-sizes
If \(f\) is \(L\) smooth, we have

"Descent Lemma"
Idea: Pick \(\eta\) big and see if the "descent condition" holds
(Locally \(1/\eta\)-smooth)
Beyond Line-Search?

Converges in 1 step

\(P\)
\(O(d)\) space and time \(\implies\) \(P\) diagonal (or sparse)
Can we find a good \(P\) automatically?
"Adapt to \(f\)"
Preconditioer \(P\)
"Adaptive" Optimization Methods
Adaptive and Parameter-Free Methods
Preconditioner at round \(t\)
AdaGrad from Online Learning
or
Better guarantees if functions are easy
while preserving optimal worst-case guarantees in Online Learning
Attains linear rate in classical convex opt (proved later)
But... Online Learning is too adversarial, AdaGrad is "conservative"
In OL, functions change every iteration adversarially
"Fixing" AdaGrad

But... Online Learning is too adversarial, AdaGrad is "conservative"
"Fixes": Adam, RMSProp, and other workarounds
"AdaGrad inspired an incredible number of clones, most of them with similar, worse, or no regret guarantees.(...) Nowadays, [adaptive] seems to denote any kind of coordinate-wise learning rates that does not guarantee anything in particular."
Francesco Orabona in "A Modern Introduction to Online Learning", Sec. 4.3

Hypergradient Methods
Idea: look at step-size/preconditioner choice as an optimization problem
Gradient descent on the hyperparameters
How to pick the step-size of this? Well...

Little/ No theory
Unpredictable
... and popular?!
Second-order Methods
Newton's method
is usually a great preconditioner
Superlinear convergence
...when \(\lVert x_t - x_*\rVert\) small
Newton may diverge otherwise
Using step-size with Newton and QN method ensures convergence away from \(x_*\)
Worse than GD
\(\nabla^2 f(x)\) is usually expensive to compute
should also help
Quasi-Newton Methods, e.g. BFGS
State of Affairs
(Quasi-)Newton: needs Hessian, can be slower than GD
Hypergradient methods: purely heuristic, unstable
Online Learning Algorithms: Good but pessimistic theory
at least for smooth optimization it seems pessimistic...
Online Learning
Smooth Optimization
1 step-size
\(d\) step-sizes
(diagonal preconditioner )
Backtracking Line-search
Diagonal AdaGrad
Coordinate-wise
Coin Betting
(non-smooth opt?)
Multidimensional Backtracking
Scalar AdaGrad
Coin-Betting
What does it mean for a method to be adaptive?
Por que a busca ingênua não funciona?
Busca em linha: testa se \(\alpha_{max}/2\) garante progresso suficiente:
Armijo condition
Se não, CORTA candidatos maiores que \(\alpha_{\max}/2\)
Busca por precondicionador:
Testamos se \(P\) garante progresso suficiente:
Espaço de candidatos: matrizes com diagonais em um cubo
Se não, CORTA candidatos maiores que \(P\)
Preconditioner Search - 20 min - SeMaP
By Victor Sanches Portella
Preconditioner Search - 20 min - SeMaP
- 3