PaperHub
4.0
/10
Rejected3 位审稿人
最低3最高6标准差1.4
3
6
3
3.0
置信度
正确性2.3
贡献度2.7
表达3.0
ICLR 2025

Second-Order Forward-Mode Automatic Differentiation for Optimization

OpenReviewPDF
提交: 2024-09-13更新: 2025-02-05
TL;DR

This paper introduces a new second-order hyperplane search that uses forward-mode automatic differentiation. We include empirical and theoretical results.

摘要

Forward gradient methods offer a promising alternative to backpropagation. Optimization that only requires forward passes could simplify hardware implementation, improve parallelism, lower memory cost, and allow for more biologically plausible learning models. This has motivated recent forward-mode automated differentiation (AD) methods. This paper presents a novel second-order forward-mode AD method for optimization that generalizes a second-order line search to a $K$-dimensional hyperplane. Unlike recent work that relies on directional derivatives (or Jacobian–Vector Products, JVPs), we use hyper-dual numbers to jointly evaluate both directional derivatives and their second-order quadratic terms. As a result, we introduce forward-mode weight perturbation with Hessian information for K-dimensional hyper-plane search (FoMoH-$K$D). We derive the convergence properties of FoMoH-$K$D and show how it generalizes to Newton’s method for $K = D$. We demonstrate this generalization empirically, and compare the performance of FoMoH-$K$D to forward gradient descent (FGD) on three case studies: Rosenbrock function used widely for evaluating optimization methods, logistic regression with 7,850 parameters, and learning a CNN classifier with 431,080 parameters. Our experiments show that FoMoH-$K$D not only achieves better performance and accuracy, but also converges faster, thus, empirically verifying our theoretical results.
关键词
OptimizationAutomatic Differentiation

评审与讨论

审稿意见
3

This paper investigates the effectiveness of the second-order differentiation in forward automated differentiation. This paper and regards the forward propagation with dual number as the objective function applied second-order Taylor-series expansion to. By using dual numbers, the proposed method estimates the Hessian matrix and applies the approximated Newton's method for the optimization.

优点

  1. This paper is well-written and easy to follow. Assumptions and mathematical expansions are explained in detail.
  2. Experimental results demonstrate the proposed method is more efficient than baseline first-order methods in terms of iterations of parameter updates.
  3. Convergence properties are proved in theory, and the proposed method is guaranteed to be consist with Newton's method.

缺点

  1. I am not very sure that this paper addresses a new topic in machine learning. The explanation of the proposed method seems to address general optimization problems but does not seem to focus on the problem in machine learning. For examples, this paper does not explicitly address the difficulty of accessing the objective function due to large datasets like SGD, and not address the difficulty of non-convexity caused by nonlinear models. Since I do not have much expertise in optimization theory or operations research, I cannot evaluate the novelty of this paper well in the context of optimization theory. Even so, I doubt the proposed method is very novel because the used mathematical tools are fundamental and the addressed objective function does not seem very difficult. Is the research problem specialized for machine learning problems? And, is the paper new even in the context of the optimization problem?

  2. While this paper evaluates the convergence of the proposed method in terms of iterations, it does not evaluate the runtime of the proposed method. The proposed method requires an inverse of Hessian matrices, and I think its computational cost can be high. Does the overhead of the proposed method not increase the runtime in one iteration? If it does, the proposed method is still faster than baselines in terms of runtime until convergence? To emphasize the practical usefulness of the proposed method, this paper needs the evaluation of runtime.

  3. It is not clear that the proposed method is scalable for recent deep neural network model architectures. (Fournier et al., 2023) seems to show that the first-order forward gradient method is applicable to ResNet18. Is the proposed method applicable to such modern architectures?

问题

  1. Why is this paper suitable for publication as machine learning research? What is the difficult point of the optimization method in machine learning, and how does the paper address it? If the approximation of a second-order method using dual numbers is new, why has no literature in optimization theory or operations research discussed it?

  2. Does not the overhead of the proposed method increase the runtime in one iteration? If it does, the proposed method is still faster than baselines in terms of runtime until convergence?

  3. How is the scalability of the proposed method?

评论

Thanks for your review. We will do our best to respond to your concerns.

I am not very sure that this paper addresses a new topic in machine learning / Why is this paper suitable for publication as machine learning research?

As we outline in the introduction, using forward-mode automatic differentiation for optimization instead of reverse-mode automatic differentiation is picking up more interest within the machine learning community (See Baydin et al., 2022, Ren et al., 2022; Fournier et al., 2023 etc.). Therefore, we believe this paper adds value to the existing literature by focusing on second-order forward mode AD and how it might be useful for optimization. We believe this work to be the first tackling this problem and therefore think that the empirical results along with the theory are suitable for publication. We also highlight the comments from the other reviewers that believe our work to be a contribution to the community.

Does the overhead of the proposed method not increase the runtime in one iteration?

Thanks for highlighting this point in regards to runtime. Since we are only inverting Hessians defined on hyperplanes with low dimensions, the increase in runtime does not have a significant effect on performance. To show this, we now include the same plot as in Figure 2 in the appendix, with the x-axis swapped for wall-clock time. Hopefully this addition will help provide an answer to this comment.

Scalability

Thank you for your comments. This is definitely a direction we would like to explore next.

评论

Thank you for the feedback. However, my concern about novelty still remains.

I am not sure that this paper discusses previous work well. For example, [a] seems to address a similar problem in 2011, and [b] is a lecture note about the second-order automatic differentiation using hyper-dual numbers. [a] and [b] do not seem to be studies in a machine learning community. Thus, there might be significant differences in this paper. However, since this paper does not seem to address the optimization problem specialized for machine learning, I could not understand the novelty of this paper clearly.

Do you have convincing reasons why no literature in optimization theory or operations research discussed the problem in this paper? Or, can you provide previous work in broader research areas and discuss the differences?

[a] Fike, Jeffrey, et al. "Optimization with gradient and hessian information calculated using hyper-dual numbers." 29th AIAA Applied Aerodynamics Conference. 2011.
[b] Fike, Jeffrey A., and Juan J. Alonso. "Automatic differentiation through the use of hyper-dual numbers for second derivatives." Recent Advances in Algorithmic Differentiation. Springer Berlin Heidelberg, 2012.

To show this, we now include the same plot as in Figure 2 in the appendix, with the x-axis swapped for wall-clock time. Hopefully this addition will help provide an answer to this comment.

Thank you for the new figure! I understand that FoMoH-KD with high dimensions does not have much larger computational cost than that with low-dimensions. In my understanding, there are no results of FGD in a new figure. Could you compare the proposed method with the baselines?

审稿意见
6

The paper presents a forward-mode-only optimization method that uses second order information on randomly sampled hyperplanes. The method makes use of (K^2 + K)/2 calls to a "double" forward-mode AD, implemented with hyper-dual numbers, computing along the way the Hessian projected onto the drawn plane. The paper presents theoretical results on convex and quadratic functions that also relates it to the Newton method, alongside some empirical validation on a test function and two learning problems.

优点

  • The significance of developing a preforming optimization method that does not rely on reverse-mode differentiation is very high, and the proposed method seems to make a concrete step in this direction
  • The paper is mostly well written and easy to follow, the notation is clear (although a few passages could be made clearer, see below)
  • The work does a good job introducing the concept of dual and hyper-dual numbers, which I expect the community to benefit from
  • The theoretical results clearly show the advantages of the proposed method over FGD, as well as the larger scale experiment.

缺点

  • One main promise of forward mode differentiation is to vastly decrease the memory requirement for large models, however the paper does not empirically quantifies the advantage of FoMoH in this regard. It would be nice to include memory footprint comparisons (as well as perhaps a table summarizing the runtime and memory complexity of key algorithms)
  • I would have appreciated some larger scale experiment with transformer architectures, e.g. for fine-tuning LLMs, which could be an interesting application of the proposed method
  • Some details could be better specified in the main paper:
    • It is not entirely clear to me by reading the paper if the (hyper-)dual numbers allow for the computation of JVPs and bilinear hessian products by just "tracking the epsilons" while computing the function, or if one has actually to implement the above-mentioned operations (I think it's the first). One "implementation" example would help focus ideas.
    • I'm a bit confused about the origin of Equation (1) right. Do the expressions for the κ\kappa come from manipulation of the resulting Taylor expansion or is it "set by design" (to mimic Newton updates)? In general, I would have appreciated some more details around lines 227 to 240
    • the learning rate scheduler seems like an important addition for empirical performance, some more details (e.g. which scheduler, how did you choose its hyperparamters) in the main paper would be welcomed.
    • some more discussion on relations between FoMoH-1d, FoMoH-BP and FGD would have been nice. For me it is not immediately clear why FoMoH-1d consistently underperforms FGD on the learning tasks and why FoMoH-BP consistently performs on par with BP.
    • what does BP stand for in the experiments? Is it plain (stochastic?) gradient descent or some other adaptive method?

问题

  1. Is it correct to say that the method performs Newton steps in the sampled subspaces (assuming learning rate being 1)? If not, what's the relationship between the two?
  2. the κi\kappa_i's need not be positive, correct?
  3. in the learning tasks, are also examples being smapled (i.e. mini-batch updates?). If so, is the proposed method sensitive to the mini-batch size?
  4. Do you think the proposed method could be relevant also for forward-mode gradient-based hyperparameter optimization?
评论

Thanks very much for your review. We appreciate the highlighted strengths and will do our best to respond to your questions and comments:

Is it correct to say that the method performs Newton steps in the sampled subspaces?

Correct!

The κi\kappa_i's need not be positive, correct?

Correct!

One implementation example:

Thanks very much for pointing this out. In the code that we will make open-source after review, we have a notebook example where we show this for simple sinusoidal functions. Specifically, we define a hyper-dual number in a notebook and then implement a sine function on the hyper-dual number. We then plot the primal component, as well as the JVP and the Bilinear term, by tracking the epsilons. Hopefully this implementation will help.

I'm a bit confused about the origin of Equation (1) right.

Thanks for pointing this out. As you noted in a later question, it is set by design to perform Newton updates in the subspace. We added Figure 5 in App. A to try and show this clearer thanks to this comment.

The learning rate scheduler seems like an important addition for empirical performance … more details in the main paper would be welcomed

Agreed. We have now added this to the main paper, but we still rely on the appendix for the exact parameters.

What does BP stand for in the experiments? Is it plain (stochastic?) gradient descent or some other adaptive method?

It is plain stochastic gradient descent. We have now explicitly referred to SGD in the paper.

Do you think the proposed method could be relevant also for forward-mode gradient-based hyperparameter optimization?

Thanks for pointing us to this reference, this could be a really interesting direction to look down. It does look like this work might be relevant to forward-mode gradient-based hyperparameter optimization.

Thanks once again for your detailed review! We have updated the paper accordingly and we hope that our response provided additional clarification.

评论

Dear authors,

thanks for your replies which directly answer my questions. I also have read the other reviews and discussion. While I still find this work very promising, I have decided to lower my score due to the open issues in the proof and the lack of experiments on settings that would truly benefit from the introduced method.

审稿意见
3

The authors present a new optimization method relying on forward mode automatic differentiation (AD). Namely, the authors propose to use second order directional derivatives computed along random directions to precondition stochastic estimates of the gradients obtained by forward mode automatic differentiation along these same random directions. The proposed Forward Mode Second-order Hyperplane Search (FoMoH) interpolates between using an approximate Cauchy stepsize (that is a Cauchy stepsize computed with a quadratic approximation of the objective) along a random direction and an approximate Newton step. The proposed method is shown to outperform a standard forward gradient descent on the Rosenbrock function, a logistic regression problem, and the MNIST image classification task with a CNN.

优点

  • The idea of exploiting second order directional derivatives is original and could be further explored.
  • The proposed method shows clearly superior performance than a simple forward gradient descent.

缺点

Unfortunately the paper does not give justice to the potential of the main idea. Improvements are necessary and possible:

  • The method does not require introducing dual numbers. Computing second order directional derivatives can easily be done with nested forward mode autodiff:
import jax

def hqp(fun, w, v1, v2):
  def dir_der_v1(w):
    return jax.jvp(fun, (w,), (v1,))[1]
  return jax.jvp(dir_der_v1, (w,), (v2,))[1]

The above may be slightly slower than the implementation with dual numbers (the difference is probably minimal) but it is also much simpler to implement than having to adopt a new kind of automatic differentiation library. If one want the best possible implementation, then Taylor-mode automatic differentiation can also be used but again the benefits are really minor. Algorithm 1 is then unnecessarily complicated when it could be written in just K calls to the above function to define the approximate Hessian. Presenting the algorithm with a simple implementation that any user could recode in at most 50 lines of code in jax or pytorch would greatly improve the potential adoption of the method.

  • Unfortunately, the proofs are not rigorous, nor are the claims.
    • Theorem 1 is a corollary of Theorem 2 so no need to present it. Also results like limt+θt=θ\lim_{t \rightarrow +\infty} \theta_t = \theta^* are meaningless: we don't want to wait the time of the universe to see convergence. Rates like the ones provided in Theorem 2 are relevant.
    • In all claims, detail the setting: what algorithm is used, what is theta_t, what is the expectation taken against etc... You may not do that in the main text by lack of space but at least make sure that the appendix contains a result that details all assumptions.
    • The proof of theorem 2 is unfortunately not well detailed:
      • Please give a detailed proof that θ~t+1=θ~t+P(θ~θ~t)\tilde \theta_{t+1} = \tilde \theta_t + P(\tilde \theta^* - \tilde \theta_t). We are dealing with quadratics so the proof should boil down to simple linear algebra. Avoid intuitive arguments, just write the equations one by one showing the results. I personally will refuse this paper to be accepted without detailed proofs.
      • Give a proper reference for the fact that the expectation of a projection matrix defined from Gaussian variables is the scaled identity
      • First line of last set of equations of the proof of theorem 2 should read θ~t+1θ~=(1K/D)(θ~tθ~)\tilde \theta_{t+1} - \tilde \theta^* = (1- K/D)(\tilde \theta_t - \tilde \theta^*)
      • Please be rigorous when you write expectations. You need to detail each time with respect to which randomness you are taking the expectation. For example at one point you write θ~t+1=E[θ~t+P(θ~θ~t)]\tilde \theta_{t+1} = \mathbb{E}[\tilde \theta_t + P(\tilde \theta^* - \tilde \theta_t)] but so then θ~t+1\tilde \theta_{t+1} is not random. Unless you meant E[θ~t+1]=E[\tilde \theta_{t+1}] = . Such lack of rigor is detrimental to the potential of the idea.
      • Section B.4 contains multiple errors:
        • Reaching a critical point does not imply that you reach a minimum unless you make additional assumptions like convexity.
        • Again be rigorous in the use of expectations, one usually use conditional expectations conditioned on the previous iterate for example.
        • The provided rate is clearly not linear. Consider rereading in details the reference for example.
  • Second order methods may generally be very sensitive to the batch-size. It would be great to plot a sensitivity analysis of the method with the batch-size for e.g. a given learning rate.
  • Consider another dataset than MNIST. MNIST is well known to be particularly easy and may not reflect potential challenges that the method can have.

问题

  • First it would be great to revise the proofs to make them rigorous.
  • Could you add a full mathematical definition of FoMoH-BP?
  • What is the logistic regression model? I suppose it is not a regression but a classification problem first? Then if you use 7850 parameters it's probably not a simple linear model but some form of Multi-Layer Perceptron?
  • Detail the CNN architecture used in the experiment.
  • In the abstract, you mention alternative (orthogonal to be exact) methods for forward gradients. They are never compared in the experiments. It would be great to have them.
  • By curiosity how can analog optical systems compute derivatives of intermediate functions to implement forward mode automatic differentiation? The reference provided by the authors does not mention AD, at least from its abstract.
  • You mention "linesearch" in line 243 but there is no linesearch at all in the algorithm. What do you mean by linesearch?
评论

Thanks very much for your review. Your comments have been really insightful and have given us a chance to improve components of the paper. In particular the comments on making the proofs more rigorous have directly targeted where we also perceived weaknesses and have significantly helped to strengthen them. I have updated the paper accordingly on OpenReview, but I want to directly highlight the improvements here. We hope this answers your concerns (if any context is missing, in the text below, it should be in the updated paper):

Please give a detailed proof that θ~t+1=θ~t+P(θ~θ~t)\tilde{\boldsymbol{\theta}}_{t+1}=\tilde{\boldsymbol{\theta}}_t+\mathbf{P}(\tilde{\boldsymbol{\theta}}^* - \tilde{\boldsymbol{\theta}}_t):

We start from the FoMoH-KKD update step (see Eq. 3 in updated paper) applied to the transformed space θ~\tilde{\boldsymbol{\theta}}: θ~t+1=θ~tV(V2f(θ~t)V)1Vf(θ~t)\tilde{\boldsymbol{\theta}}_{t+1} = \tilde{\boldsymbol{\theta}}_t -\mathbf{V}\left(\mathbf{V}^{\top} \nabla^2 f(\tilde{\boldsymbol{\theta}}_t) \mathbf{V}\right)^{-1} \mathbf{V}^{\top} \nabla f(\tilde{\boldsymbol{\theta}}_t) and then using 2f(θ~t)=2I\nabla^2 f(\tilde{\boldsymbol{\theta}}_t) = 2\mathbf{I}, and f(θ~t)=2θ~t+bGΛ1/2\nabla f(\tilde{\boldsymbol{\theta}}_t) = 2\tilde{\boldsymbol{\theta}}_t + \mathbf{b}^{\top}\mathbf{G}\boldsymbol{\Lambda}^{-1/2} (these definitions come from the diagonalized quadratic function) gives:

θ~t+1=θ~t12V(VV)1V(2θ~t+bGΛ1/2)\tilde{\boldsymbol{\theta}}_{t+1} = \tilde{\boldsymbol{\theta}}_t - \frac{1}{2}\mathbf{V}\left(\mathbf{V}^{\top}\mathbf{V}\right)^{-1} \mathbf{V}^{\top} \left( 2\tilde{\boldsymbol{\theta}}_t + \mathbf{b}^{\top}\mathbf{G}\boldsymbol{\Lambda}^{-1/2}\right)

Finally, noting that θ~=12bGΛ1/2\tilde{\boldsymbol{\theta}}^* = -\frac{1}{2} \mathbf{b}^{\top}\mathbf{G}\boldsymbol{\Lambda}^{-1/2} from setting the gradient to zero, we get

= \tilde{\boldsymbol{\theta}}_t + \mathbf{P} \left( \tilde{\boldsymbol{\theta}}^* -\tilde{\boldsymbol{\theta}}_t \right)$$ Please see the continuation of this response in the next comment.
评论

Give a proper reference for the fact that the expectation of a projection matrix defined from Gaussian variables is the scaled identity:

We added appendix B.3 to show this proof which uses the rotational invariance property of the normal distribution and Schur’s Lemma. To highlight the result: Let RRD×D\mathbf{R} \in \mathbb{R}^{D\times D} be an orthogonal matrix such that RR=ID\mathbf{R}\mathbf{R}^{\top} = \mathbf{I}_D. Then rotating V\mathbf{V} gives V=RV\mathbf{V}' = \mathbf{R}\mathbf{V}. We then use the rotational invariance property of the normal distribution to give V\buildreld=RV\mathbf{V} {\buildrel d \over =} \mathbf{R}\mathbf{V}, where \buildreld=\buildrel d \over = denotes equality in distribution. We define a transformed projection matrix:

P=V(VV)1V=RV(VRRV)1VR=RPR.\mathbf{P}' = \mathbf{V}'(\mathbf{V}'^{\top}\mathbf{V}')^{-1} \mathbf{V}'^{\top} = \mathbf{R} \mathbf{V}(\mathbf{V}^{\top} \mathbf{R}^{\top}\mathbf{R}\mathbf{V})^{-1} \mathbf{V}^{\top}\mathbf{R}^{\top} = \mathbf{R} \mathbf{P} \mathbf{R}^{\top}.

Since V\buildreld=V\mathbf{V}' {\buildrel d \over =} \mathbf{V}, then P\buildreld=P\mathbf{P} {\buildrel d \over =} \mathbf{P}', and E[P]=E[RPR]=RE[P]R=E[P]\mathbb{E}[\mathbf{P}'] = \mathbb{E}[\mathbf{R} \mathbf{P} \mathbf{R}^{\top}] = \mathbf{R} \mathbb{E}[\mathbf{P}] \mathbf{R}^{\top} = \mathbb{E}[\mathbf{P}]. As a result of the last equation, we get the relation RE[P]=E[P]R\mathbf{R} \mathbb{E}[\mathbf{P}] = \mathbb{E}[\mathbf{P}]\mathbf{R} by post-multiplying by R\mathbf{R}. Therefore, E[P]\mathbb{E}[\mathbf{P}] commutes with all R\mathbf{R} in the orthogonal group. Then using Schur's Lemma E[P]=cID\mathbb{E}[\mathbf{P}] = c\mathbf{I}_D for some constant cc. To determine cc, we take the trace of both sides, and use linearity of expectation to move the trace inside the expectation: tr(E[P])=tr(cID)\mathrm{tr}(\mathbb{E}[\mathbf{P}]) = \mathrm{tr}(c\mathbf{I}_D) E[tr(V(VV)1V)]=cD\mathbb{E}[\mathrm{tr}(\mathbf{V}(\mathbf{V}^{\top}\mathbf{V})^{-1} \mathbf{V}^{\top})] =c D Then, using the identity tr(AB)=tr(BA)\mathrm{tr}(\mathbf{AB}) = \mathrm{tr}(\mathbf{BA}) for ARD×K\mathbf{A} \in \mathbb{R}^{D\times K} and BRK×D\mathbf{B} \in \mathbb{R}^{K\times D}:

E[tr(VV(VV)1)]=cD \mathbb{E}[\mathrm{tr}(\mathbf{V}^{\top}\mathbf{V}(\mathbf{V}^{\top}\mathbf{V})^{-1})] =c D E[tr(IK)]=K=cD    c=K/D \mathbb{E}[\mathrm{tr}(I_K)] = K =c D \implies c = K/D\notag

Thus,

E[P]=KDID\mathbb{E}[\mathbf{P}] = \frac{K}{D}\mathbf{I}_D

Please be rigorous when you write expectations:

We have now edited the paper to ensure this. Furthermore, in investigating our proof, we realised that to fully complete it, we needed to transform back from θ~\tilde{\boldsymbol{\theta}} to \boldsymbol{\theta}. Therefore, we included an additional step from Equation 5 in B.2 that bounds the rate of convergence of the expected error according to the condition number of Q\mathbf{Q}. This update should also add more rigour.

Section B.4 contains multiple errors:

We have fixed these errors by assuming convexity, by using conditional expectations, and we now refer to the rate as “sub-linear”. Really appreciate you spotting this.

We now move to your other comments:

The method does not require introducing dual numbers…

We have now highlighted this in the paper and agree that it is necessary to include to improve the potential adoption of the method. Specifically, we link from the main paper to a new section of the appendix that includes your nested forward-mode implementation in JAX, and cite your review as the reason for its inclusion (see new footnote 3).

Could you add a full mathematical definition of FoMoH-BP

We have added a new App. C.1 to include this definition.

What is the logistic regression model?

Thanks for highlighting this, we meant to write multinomial logistic regression where the model is given by sofmax(WX+b)\mathrm{sofmax}(\mathbf{WX}+\mathbf{b}), for WR10×784\mathbf{W} \in \mathbb{R}^{10\times784}, and bR10\mathbf{b} \in \mathbb{R}^{10}. We have updated the text.

Detail the CNN architecture used in the experiment

We have now added this.

By curiosity how can analog optical systems compute derivatives…

Thanks - this is a good question. The referenced paper, Pierangeli et al. 2019, is more to highlight emerging unconventional hardware that might cause us to think about other optimization paradigms. Pierangeli et al. 2019 is a paper on performing computations with light. But another interesting paper that looks to train on unconventional hardware includes Wright et al. 2022 (see https://www.nature.com/articles/s41586-021-04223-6).

You mention "linesearch" in line 243…

Thanks for pointing this out. By line search, we mean that we sample a v\mathbf{v}, which is the descent direction, and then we apply the FoMoH-1D update step to determine how far to move along v\mathbf{v}.

Once again, we really appreciate the detail in which you went through the paper and we believe these changes significantly improve the paper.

评论

Thanks for the answer. The proof for the expectation of the projection is neat. I'm adding some additional comments now so that you can keep on providing details, I may give further answers later.

When I said simple linear algebra I meant that, for f(x)=12θAθ+θbf(x) = \frac{1}{2} \theta^\top A \theta + \theta^\top b, you can simply write the equations as (using that θ=A1b\theta^* = -A^{-1} b, f(θ)=Aθ+b\nabla f(\theta) = A\theta + b, 2f(θ)=A\nabla^2 f(\theta) = A),

θt+1θ=(IV(VAV)1V)A(θtθ)\theta_{t+1} - \theta^* = (I - V(V^\top A V)^{-1} V^\top) A(\theta_t - \theta^*)

Then you can rewrite the above equation as

A1/2(θt+1θ)=(IA1/2V(VAV)1VA1/2)A1/2(θtθ)A^{1/2}(\theta_{t+1} - \theta^*) = (I - A^{1/2}V(V^\top A V)^{-1} V^\top A^{1/2}) A^{1/2}(\theta_t - \theta^*)

Denoting θˉt=A1/2θt\bar \theta_t = A^{1/2}\theta_t, we get

θˉt+1θˉ=(IA1/2V(VAV)1VA1/2)(θˉtθˉ)\bar \theta_{t+1} - \bar \theta^* = (I - A^{1/2}V(V^\top A V)^{-1} V^\top A^{1/2}) (\bar \theta_t - \bar \theta^*)

Note here the discrepancy between the equation above and the equation you give for θ~t\tilde \theta_t. In other words on one hand you define θ~t=θˉ\tilde \theta_t = \bar \theta (up to a factor 2), on the other hand you define θ~t\tilde \theta_t by the recursion

θ~t+1θ~=(IV(VV)1V)(θ~tθ~).\tilde \theta_{t+1} - \tilde \theta^* = (I - V(V^\top V)^{-1} V) (\tilde \theta_t - \tilde \theta^*).

We may have that E[θ~t]=E[θˉt]E[\tilde\theta_t] = E[\bar \theta_t] but it is a bit unclear at first glance. I hope you also see that simple linear algebra makes for simpler arguments than using some "intuitive" change of variables.

Minor details:

  • Remove Theorem 1. It's meaningless and detrimental to the paper right now. Theorem 2 provides the meaningful results.
  • You are considering a strongly convex quadratic, not just a convex quadratic if you want cond(Q)\mathrm{cond}(Q) to be well defined and even the iterations to be well defined (if Q=0Q=0 the iterations are ill-defined even if it is a convex quadratic).
  • Define a quadratic as f(θ)=12θAθ+θbf(\theta) = \frac{1}{2} \theta^\top A \theta + \theta^\top b as above. Choosing QQ or AA is a question of taste but the 1/21/2 factor simplifies a lot the exposition and the reading.
评论

Thanks for your comments and sorry for the delayed response, I have had to travel this week.

Remove Theorem 1. It's meaningless and detrimental to the paper right now. Theorem 2 provides the meaningful results.

We agree and have removed Theorem 1 in the updated paper. Any equations that we referred to in the removed Theorem 1 have now been directly included in the updated proof.

You are considering a strongly convex quadratic

Agreed. Thanks for spotting this!

Define a quadratic as f(θ)=12θAθ+θbf(\boldsymbol{\theta}) = \frac{1}{2} \boldsymbol{\theta}^{\top}\mathbf{A}\boldsymbol{\theta} + \boldsymbol{\theta}^{\top}\mathbf{b}...

We have now edited the paper to use this formulation to make it read easier. Thanks for this suggestion.

We hope that the incorporation of the above suggestions to the proofs have helped further refine the proofs.

评论

Thanks, could you please answer my comments about the discrepancy between θˉt\bar \theta_t and θ~t\tilde \theta_t that I pointed out in the previous comment? Said simply, a Newton method is affine invariant, so considering the optimization of f(A1/2θ)f(A^{-1/2}\theta) or f(θ)f(\theta) amounts to the same iterates up to the change of variable. On the other hand, a gradient descent is not affine invariant: optimizing f(A1/2θ)f(A^{-1/2}\theta) or optimizing f(θ)f(\theta) do not produce the same iterates. It is unclear why your proposed method could be affine invariant when it's considering a subspace. Essentially your proof would work if

E[A1/2V(VAV)1VA1/2]=k/dIE[A^{1/2} V (V^\top A V)^{-1} V A^{1/2}] = k/d I

One can actually run some simulations to test that.

import jax
import jax.numpy as jnp
import jax.random as jrd

jax.config.update("jax_enable_x64", True)

def test(identity_hessian):
  n = 10**7
  d = 4
  k = 2
  Vs = jrd.normal(jrd.PRNGKey(0), (n, d, k))
  if identity_hessian:
    A = jnp.eye(d)
    Asqrt = A
  else:
    A = jrd.normal(jrd.PRNGKey(1), (d, d))
    U, _, _ = jnp.linalg.svd(A)
    S = jnp.diag(jnp.exp(-jnp.arange(0, d, dtype=jnp.float32)))
    A = U @ S @ U.T
    Asqrt = U @ jnp.sqrt(S) @ U.T

  def proj(V):
    return Asqrt @ V @ jnp.linalg.solve(V.T @ A @ V, V.T @ Asqrt)

  projs = jax.vmap(proj)(Vs)
  got = jnp.mean(projs, axis=0)
  print(got)

test(identity_hessian=False)

You'll see that for identity_hessian=True we get k/dIk/d I but for identity_hessian=False we are far from getting this result. For sure, these are only simulations with 10710^7 samples, but in any case, I would love an actual proof.

评论

Thanks, I apologise, I misunderstood the comment. Your observation is completely correct. We also ran similar empirical tests. This is the reason why we now derive bounds on the error that depend on the geometry of the function (i.e. the condition number of A\mathbf{A}.)

To be explicit, we perform the optimization step in the transformed space and then work from the error in transformed space (i.e. starting from θ~t+1=θ~t+P(θ~θ~t)\tilde{\boldsymbol{\theta}}_{t+1} = \tilde{\boldsymbol{\theta}}_t + \mathbf{P} ( \tilde{\boldsymbol{\theta}}^* -\tilde{\boldsymbol{\theta}}_t )) back to the error in the original space. Therefore starting with the transformed space:

E[θ~t+1θ~]=θ~t+KD(θ~θ~t)θ~\mathbb{E}[\tilde{\boldsymbol{\theta}}_{t+1} - \tilde{\boldsymbol{\theta}}^*] = \tilde{\boldsymbol{\theta}}_t + \frac{K}{D}(\tilde{\boldsymbol{\theta}}^* - \tilde{\boldsymbol{\theta}}_t) - \tilde{\boldsymbol{\theta}}^*

E[θ~t+1θ~]=DKDθ~tθ~\|\|\mathbb{E}[\tilde{\boldsymbol{\theta}}_{t+1} - \tilde{\boldsymbol{\theta}}^*]\|\| = \frac{D-K}{D}\|\| \tilde{\boldsymbol{\theta}}_t - \tilde{\boldsymbol{\theta}}^* \|\|

We now transform back to original θ\boldsymbol{\theta} using θ~=Λ1/2Gθ\tilde{\boldsymbol{\theta}} = \boldsymbol{\Lambda}^{1/2}\mathbf{G}^{\top}\boldsymbol{\theta}: E[Λ1/2G(θt+1θ)]=DKDΛ1/2G(θtθ)\|\| \mathbb{E}[\boldsymbol{\Lambda}^{1/2}\mathbf{G}^{\top}(\boldsymbol{\theta}_{t+1} - \boldsymbol{\theta}^*)]\|\| = \frac{D-K}{D}\|\| \boldsymbol{\Lambda}^{1/2}\mathbf{G}^{\top}(\boldsymbol{\theta}_t - \boldsymbol{\theta}^*)\|\|

E[et+1]A=DKDetA\|\|\mathbb{E}[\mathbf{e}_{t+1}]\|\| _{\mathbf{A}} = \frac{D-K}{D}\|\|\mathbf{e}_t\|\| _{\mathbf{A}}

To get back to the Euclidean norm we use the relation λminx2xAλmaxx,\sqrt{\lambda_{\text{min}}}\|\|\mathbf{x}\|\| _2\leq\|\|\mathbf{x}\|\| _{\mathbf{A}} \leq \sqrt{\lambda _{\text{max}}} \|\|\mathbf{x}\|\|,

where λmin,λmax\lambda_{\text{min}}, \lambda_{\text{max}} are the maximum and minimum Eigenvalues of A\mathbf{A}, we have the following bounds on the norm of the errors:

For et\mathbf{e}_t:

DKDλmin(A)et2DKDetADKDλmax(A)et2\frac{D-K}{D} \sqrt{\lambda _{\text{min}}(\mathbf{A})} \|\|\mathbf{e}_t\|\| _2 \leq \frac{D-K}{D} \|\|\mathbf{e}_t\|\| _{\mathbf{A}} \leq \frac{D-K}{D} \sqrt{\lambda _{\text{max}}(\mathbf{A})}\|\|\mathbf{e}_t\|\| _2

For E[et+1]\mathbb{E}[\mathbf{e}_{t+1}]:

λmin(A)E[et+1]2E[et+1]Aλmax(A)E[et+1]2\sqrt{\lambda_{\text{min}}(\mathbf{A})} \|\|\mathbb{E}[\mathbf{e}_{t+1}]\|\| _2 \leq \|\| \mathbb{E}[\mathbf{e} _{t+1}] \|\| _{\mathbf{A}} \leq \sqrt{\lambda _{\text{max}} (\mathbf{A})} \|\| \mathbb{E}[\mathbf{e} _{t+1}]\|\| _2

We then use these two inequalities to rearrange to get upper and lower bounds respectively (exact rearrangement is in the paper):

E[et+1]2DKDλmax(A)λmin(A)et2\|\| \mathbb{E}[\mathbf{e} _{t+1}] \|\| _2 \leq \frac{D-K}{D} \frac{\sqrt{\lambda _{\text{max}}(\mathbf{A})}}{\sqrt{\lambda _{\text{min}}(\mathbf{A})}} \|\| \mathbf{e}_t\|\| _2

DKDλmin(A)λmax(A)et2E[et+1]2 \frac{D-K}{D} \frac{\sqrt{\lambda _{\text{min}}(\mathbf{A})}}{\sqrt{\lambda _{\text{max}}(\mathbf{A})}}\|\|\mathbf{e}_t\|\| _2 \leq \|\|\mathbb{E}[\mathbf{e} _{t+1}]\|\| _2

Leading to the final bounds on the Euclidean norm of the expected error at t+1t+1:

DKD(cond(A))1et2E[et+1]2DKD(cond(A))et2\frac{D-K}{D} \left(\sqrt{\mathrm{cond}(\mathbf{A})}\right)^{-1}\|\|\mathbf{e}_t\|\| _2 \leq \|\|\mathbb{E}[\mathbf{e} _{t+1}]\|\| _2 \leq \frac{D-K}{D} \left(\sqrt{\mathrm{cond}(\mathbf{A})}\right)\|\|\mathbf{e}_t\|\| _2

Therefore, to summarise, I was not able to prove the case for the projection matrix when the Hessian is A\mathbf{A}, and my best solution is to bound the error according to the geometry of A\mathbf{A}.

Once again, appreciate the significant effort that you have put in to improve this paper.

评论

Please, read carefully my comments. Essentially, you don't have that et+1=A1/2e~t+1e_{t+1} = A^{1/2}\tilde e_{t+1}, not even in expectation. Your algorithm is not affine invariant, so running it in one space or the other changes the iterates.

By the way, you really do not need to introduce the svd of A, using the square root matrix of A is sufficient and clarifies the presentation.

评论

Thank you. I will incorporate the following into the paper as it shows that going from θθ~\boldsymbol{\theta} \rightarrow \tilde{\boldsymbol{\theta}} can be explained better in κ\boldsymbol{\kappa} and κ~\tilde{\boldsymbol{\kappa}}. Essentially, we show there is a linear relationship in expectation between κ\boldsymbol{\kappa} and κ~\tilde{\boldsymbol{\kappa}}, such that a geometric decrease in the error of κ~\tilde{\boldsymbol{\kappa}} means a geometric decrease in the error of the original subspace κ~\tilde{\boldsymbol{\kappa}}:

We start from θ~\tilde{\boldsymbol{\theta}} and convert to the corresponding κ~\tilde{\boldsymbol{\kappa}}:

θ~=A12θ=A12Vκ\tilde{\boldsymbol{\theta}} = \mathbf{A}^{-\frac{1}{2}}\boldsymbol{\theta} = \mathbf{A}^{-\frac{1}{2}} \mathbf{V} \boldsymbol{\kappa}

We note that θ~=Vκ~\tilde{\boldsymbol{\theta}} = \mathbf{V}\tilde{\boldsymbol{\kappa}}, therefore:

Vκ~=A12Vκ\mathbf{V}\tilde{\boldsymbol{\kappa}} = \mathbf{A}^{-\frac{1}{2}} \mathbf{V} \boldsymbol{\kappa}

(VV)κ~=VA12Vκ    κ~=(VV)1VA12Vκ(\mathbf{V}^{\top} \mathbf{V})\tilde{\boldsymbol{\kappa}} = \mathbf{V}^{\top}\mathbf{A}^{-\frac{1}{2}} \mathbf{V} \boldsymbol{\kappa} \implies \tilde{\boldsymbol{\kappa}} = (\mathbf{V}^{\top} \mathbf{V})^{-1} \mathbf{V}^{\top}\mathbf{A}^{-\frac{1}{2}} \mathbf{V} \boldsymbol{\kappa}

Using κ~\tilde{\boldsymbol{\kappa}}, we write the FoMoH-KKD update step:

Vκ~t+1=Vκ~tV(V2f(θ~t)V)1Vf(θ~t)\mathbf{V}\tilde{\boldsymbol{\kappa}}_{t+1} = \mathbf{V}\tilde{\boldsymbol{\kappa}}_t -\mathbf{V}\left(\mathbf{V}^{\top} \nabla^2 f(\tilde{\boldsymbol{\theta}}_t) \mathbf{V}\right)^{-1} \mathbf{V}^{\top} \nabla f(\tilde{\boldsymbol{\theta}}_t)

VΔκ~=V(V2f(θ~t)V)1Vf(θ~t)\mathbf{V} \Delta \tilde{\boldsymbol{\kappa}}= -\mathbf{V}\left(\mathbf{V}^{\top} \nabla^2 f(\tilde{\boldsymbol{\theta}}_t) \mathbf{V}\right)^{-1} \mathbf{V}^{\top} \nabla f(\tilde{\boldsymbol{\theta}}_t),

where Δκ~=κ~t+1κ~t\Delta \tilde{\boldsymbol{\kappa}} = \tilde{\boldsymbol{\kappa}}_{t+1} -\tilde{\boldsymbol{\kappa}}_t, then

VVΔκ~=VV(V2f(θ~t)V)1Vf(θ~t)\mathbf{V}^{\top} \mathbf{V} \Delta \tilde{\boldsymbol{\kappa}} = -\mathbf{V}^{\top} \mathbf{V}\left(\mathbf{V}^{\top} \nabla^2 f(\tilde{\boldsymbol{\theta}}_t) \mathbf{V}\right)^{-1} \mathbf{V}^{\top} \nabla f(\tilde{\boldsymbol{\theta}}_t)

Δκ~=(V2f(θ~t)V)1Vf(θ~t).\Delta \tilde{\boldsymbol{\kappa}} = - \left(\mathbf{V}^{\top} \nabla^2 f(\tilde{\boldsymbol{\theta}}_t) \mathbf{V}\right)^{-1} \mathbf{V}^{\top} \nabla f(\tilde{\boldsymbol{\theta}}_t).

We use f(θ~)=Vg(κ~)\nabla f(\tilde{\boldsymbol{\theta}}) = \mathbf{V}\nabla g(\tilde{\boldsymbol{\kappa}}) and 2f(θ~)=V2g(κ~)V\nabla^2 f(\tilde{\boldsymbol{\theta}}) = \mathbf{V}\nabla^2 g(\tilde{\boldsymbol{\kappa}})\mathbf{V}^{\top} to rearrange the equation above in terms of κ~\tilde{\boldsymbol{\kappa}}:

Δκ~=(VV2g(κ~t)VV)1VVg(κ~t)\Delta \tilde{\boldsymbol{\kappa}} = - \left(\mathbf{V}^{\top} \mathbf{V}\nabla^2 g(\tilde{\boldsymbol{\kappa}}_t)\mathbf{V}^{\top} \mathbf{V}\right)^{-1} \mathbf{V}^{\top} \mathbf{V}\nabla g(\tilde{\boldsymbol{\kappa}}_t)

Finally, we derive Δκ~\Delta \tilde{\boldsymbol{\kappa}} in terms of κ\boldsymbol{\kappa}, using g(κ~)=(VV)1VA12Vg(κ)\nabla g(\tilde{\boldsymbol{\kappa}}) = (\mathbf{V}^{\top} \mathbf{V})^{-1} \mathbf{V}^{\top} \mathbf{A}^{-\frac{1}{2}} \mathbf{V}\nabla g(\boldsymbol{\kappa}) and 2g(κ~)=(VV)1VA12V2g(κ)VA12V(VV)1\nabla^2 g(\tilde{\boldsymbol{\kappa}}) = (\mathbf{V}^{\top} \mathbf{V})^{-1} \mathbf{V}^{\top} \mathbf{A}^{-\frac{1}{2}} \mathbf{V}\nabla^2 g(\boldsymbol{\kappa}) \mathbf{V}^{\top} \mathbf{A}^{-\frac{1}{2}} \mathbf{V} (\mathbf{V}^{\top} \mathbf{V})^{-1}:

Δκ~=(VV(VV)1VA12V2g(κ)VA12V(VV)1VV)1VV(VV)1VA12Vg(κ)\Delta \tilde{\boldsymbol{\kappa}} = - \left(\mathbf{V}^{\top} \mathbf{V} (\mathbf{V}^{\top} \mathbf{V})^{-1} \mathbf{V}^{\top} \mathbf{A}^{-\frac{1}{2}} \mathbf{V}\nabla^2 g(\boldsymbol{\kappa}) \mathbf{V}^{\top} \mathbf{A}^{-\frac{1}{2}} \mathbf{V} (\mathbf{V}^{\top} \mathbf{V})^{-1} \mathbf{V}^{\top} \mathbf{V} \right)^{-1} \mathbf{V}^{\top} \mathbf{V} (\mathbf{V}^{\top} \mathbf{V})^{-1} \mathbf{V}^{\top} \mathbf{A}^{-\frac{1}{2}} \mathbf{V}\nabla g(\boldsymbol{\kappa})

=(VA12V2g(κ)VA12V)1VA12Vg(κ)= - \left( \mathbf{V}^{\top} \mathbf{A}^{-\frac{1}{2}} \mathbf{V}\nabla^2 g(\boldsymbol{\kappa}) \mathbf{V}^{\top} \mathbf{A}^{-\frac{1}{2}} \mathbf{V} \right)^{-1} \mathbf{V}^{\top} \mathbf{A}^{-\frac{1}{2}} \mathbf{V}\nabla g(\boldsymbol{\kappa})

=(VA12V)1(2g(κ))1g(κ) = - (\mathbf{V}^{\top} \mathbf{A}^{-\frac{1}{2}} \mathbf{V})^{-1} \left(\nabla^2 g(\boldsymbol{\kappa})\right)^{-1} \nabla g(\boldsymbol{\kappa})

=(VA12V)1Δκ    Δκ=(VA12V)Δκ~=(\mathbf{V}^{\top} \mathbf{A}^{-\frac{1}{2}} \mathbf{V})^{-1} \Delta \boldsymbol{\kappa} \implies \Delta \boldsymbol{\kappa} = (\mathbf{V}^{\top} \mathbf{A}^{-\frac{1}{2}} \mathbf{V}) \Delta \tilde{\boldsymbol{\kappa}}

Since E[VA12V]=tr(A12)IK\mathbb{E}[\mathbf{V}^{\top} \mathbf{A}^{-\frac{1}{2}} \mathbf{V}] = \mathrm{tr(\mathbf{A}^{-\frac{1}{2}})}\mathbf{I}_K, this results in a linear relationship between Δκ~\Delta \tilde{\boldsymbol{\kappa}} and Δκ\Delta \boldsymbol{\kappa}. Therefore a geometric decrease in the rate of E[κ~κ~]\mathbb{E}[\tilde{\boldsymbol{\kappa}} - \tilde{\boldsymbol{\kappa}}^*] implies a geometric decrease in the original space E[κκ]\mathbb{E}[\boldsymbol{\kappa} - \boldsymbol{\kappa}^*] due to the proportionality.

评论
  1. Define κ~\tilde \kappa. You cannot assert θ~=Vκ~\tilde \theta = V\tilde \kappa as long as you have not defined κ~\tilde \kappa. And please, do not use words. Use equations referring to θ,A,V\theta, A, V etc... You also need to introduce subscripts.
  2. Consider A=IA = I in your proof. Do you get the same rate as the proof you did before?
  3. You are getting a rate in κ~t+1κ~t\tilde \kappa_{t+1} - \tilde \kappa_t. We need a rate in κ~tκ~\tilde \kappa_t - \tilde \kappa_* I could continue.

Recall from my previous comments that, for θˉt=A1/2θt\bar \theta_t = A^{1/2}\theta_t, we have

θˉt+1θˉ=(IA1/2V(VAV)1VA1/2)(θˉtθˉ)\bar \theta_{t+1} - \bar \theta^* = (I - A^{1/2}V(V^\top A V)^{-1} V^\top A^{1/2}) (\bar \theta_t - \bar \theta^*)

What you need to show then is that

IE[A1/2V(VAV)1VA1/2]2c<1\|I - E[A^{1/2}V(V^\top A V)^{-1} V^\top A^{1/2}]\|_2 \leq c < 1

where M2\||M\|_2 denotes the spectral norm of a matrix MM.

This thread is at its 4th message since pointing out some holes in the proof. I won't continue now. The answers provided by the authors are not rigorous. As long as the proofs are not resolved, I will lower my score. I cannot accept a paper with wrong theoretical statements.

Moreover, several of my other concerns have not been answered such as comparing to other methods for forward gradients and give sensibilities to batch-size.

AC 元评审

The paper introduces a new second-order forward-mode automatic differentiation method for optimization. It generalizes a second-order line search to a K-dimensional hyperplane search using hyper-dual numbers. The method is evaluated on the Rosenbrock function, logistic regression, and learning a CNN classifier.

According to the reviewers, the paper is well-written and easy to follow. The proposed method is shown to be more efficient than baseline first-order forward-mode methods in terms of iterations.

However, reviewers pointed out the lack of coverage of related works, that the method is not scalable for recent deep neural network model architectures, and that the paper does not evaluate the runtime of the proposed method. It was also questioned whether dual numbers are really necessary to present the proposed method. More importantly, a reviewer pointed out holes in the proof of Theorem 2 that the authors were unable to fix.

As a result, we believe the paper is not ready for publication yet.

审稿人讨论附加意见

  • One reviewer meticulously examined the proofs and mathematical derivations in the paper, pointing out several areas where they felt the rigor was lacking. This led to multiple rounds of revisions and clarifications from the authors, particularly concerning the convergence properties of the method and the use of expectations. However, the authors were unable to fix the issues.
  • The reviewers suggested including comparisons with other forward gradient methods to provide a more comprehensive evaluation of the proposed method's performance. The authors responded by clarifying the relationship between their method and existing ones but did not include additional experimental comparisons.  
  • Concerns were raised about the scalability of the method to larger deep learning models and datasets. The reviewers requested experiments on more complex architectures and larger datasets to demonstrate the practicality of the method for modern deep learning applications.  
  • Some reviewers questioned the novelty of the proposed method, arguing that similar ideas had been explored in the optimization literature.
最终决定

Reject