Max-Margin Token Selection in Attention Mechanism

Attention mechanism is a central component of the transformer architecture which led to the phenomenal success of large language models. However, the theoretical principles underlying the attention mechanism are poorly understood, especially its nonconvex optimization dynamics. In this work, we explore the seminal softmax-attention model $f(\boldsymbol{X})=\langle \boldsymbol{Xv}, \texttt{softmax}(\boldsymbol{XWp})\rangle$, where $\boldsymbol{X}$ is the token sequence and $(\boldsymbol{v},\boldsymbol{W},\boldsymbol{p})$ are trainable parameters. We prove that running gradient descent on $\boldsymbol{p}$, or equivalently $\boldsymbol{W}$, converges in direction to a max-margin solution that separates $\textit{locally-optimal}$ tokens from non-optimal ones. This clearly formalizes attention as an optimal token selection mechanism. Remarkably, our results are applicable to general data and precisely characterize $\textit{optimality}$ of tokens in terms of the value embeddings $\boldsymbol{Xv}$ and problem geometry. We also provide a broader regularization path analysis that establishes the margin maximizing nature of attention even for nonlinear prediction heads. When optimizing $\boldsymbol{v}$ and $\boldsymbol{p}$ simultaneously with logistic loss, we identify conditions under which the regularization paths directionally converge to their respective hard-margin SVM solutions where $\boldsymbol{v}$ separates the input features based on their labels. Interestingly, the SVM formulation of $\boldsymbol{p}$ is influenced by the support vector geometry of $\boldsymbol{v}$. Finally, we verify our theoretical findings via numerical experiments and provide insights.

Paper

References (100)

Scroll for more · 38 remaining

Similar papers

Peer review

Reviewer CU4X6/10 · confidence 1/52023-06-29

Summary

This paper aims to provide an optimization-theoretic characterization of the softmax attention model $f(X)=v^{\top}X^{\top}{\rm softmax}(XW^{\top}p)$ by linking it to max-margin problems. The authors established the convergence of gradient decent on $p$ for a fixed $v$ choice, and further explored the joint convergence of $(v,p)$ via regularization path analysis. They also showed that the idea on selecting the optimal token via max-margin can be extended to a general nonlinear model. Their results are verified through numerical studies.

Strengths

- Interesting and important result. Attention has played an important role in large language model. However, the theoretical understanding is relatively lack. This paper links the regularized solution and the gradient decent process to the max-margin solution, which may motivate several possible directions for the further research. - Clear presentation with adequate explanation.

Weaknesses

- Some assumptions are relatively strong. In Assumption B, they assume all non-optimal tokens have equal scores, which may not be true in practice. - Lack the convergence of the gradient decent when jointly optimizing $(v,p)$.

Questions

- Why Lemma 1 implies line 92-94?

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

1: Your assessment is an educated guess. The submission is not in your area or the submission was difficult to understand. Math/other details were not carefully checked.

Soundness

2 fair

Presentation

3 good

Contribution

3 good

Limitations

See weaknesses.

Reviewer iE2T5/10 · confidence 3/52023-07-04

Summary

The paper is clear and well-written. Understanding the e optimization dynamics and implicit bias is a significant theoretical issue, especially for morden neural network models. This paper provides a preliminary theoretical analysis of the margin maximization bias of attention-like models. Theoretically, the authors provide some global convergence and local convergence results to characterize the implicit bias of gradient descent for attention-like models.

Strengths

The authors present a comprehensive theoretical analysis of the implicit bias associated with margin maximization in attention-like models. Speficically, they provide theories about global convergence, local convergence, and regularization paths in various training scenarios. This work extends lots of theoretical results on the implicit bias for linear models to the context of attention-like models.

Weaknesses

In this article, the authors investigate a model that bears resemblance to attention but involves a significant degree of simplification compared to standard attention models. The model employed combines $W_K$ and $W_Q$ into a single matrix $W$, while substituting one of the $X$'s with $p$. While attention models are still relatively underexplored in the field of optimization theory, I believe that the level of simplification adopted in this study is overly simplistic and may even be somewhat irrelevant. With such a simplification by the authors, especially for the optimization about $W$ or $p$, it becomes almost a one-layer neural network optimization problem that is largely irrelevant to attention.

Questions

My primary concern is whether the training dynamics of standard attention models $Atten(X)=W_V X \mathbb{S}(X^\top W_K^\top W_Q X)$ closely resemble the training dynamics of the attention-like model in this study. Specifically, I find it difficult to discern the training behavior of $W_K$ and $W_Q$, which are crucial components in standard attention, from the results presented by the authors. If the authors could provide further clarification on this matter, I could change my perspective.

Rating

5: Borderline accept: Technically solid paper where reasons to accept outweigh reasons to reject, e.g., limited evaluation. Please use sparingly.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

2 fair

Presentation

2 fair

Contribution

2 fair

Limitations

As previously mentioned, the main limitation of the article lies in the oversimplification of the attention model, and it remains uncertain whether the training dynamics of the attention model differ fundamentally from the training dynamics of the attention-like model proposed by the authors.

Reviewer 8XUp7/10 · confidence 3/52023-07-07

Summary

The paper focuses on the attention mechanism which is commonly used in transformer architectures. In particular, the authors introduce a certain attention model and investigate its optimization dynamics and inductive biases under various assumptions on token's scores. In particular, the setting is a single-head attention mechanism trained by gradient descent and with decreasing losses, such as logistic or linear loss for binary classification. The results mainly hold for attention with linear head and fixed classifier head however some of the results hold without these limitations. The first main contribution of the paper is proving (under the assumption that all non-optimal tokens have the same score value) directional convergence of tunable prompt (denoted by $p$) to a certain max-margin solution which separate one token from the rest of tokens for each input. However, the imposed assumption on score values can be limiting; thus the authors assert that proving local convergence is possible if the initialization is within a cone of the final solution. The paper also studies some extensions such as the joint optimization of the classifier head and trainable parameters and demonstrate that under a specific label margin conditions, the classifier head and trainable parameters converge to their respective max-margin solutions. Some numerical results on synthetic data are designed to validate the claims of the paper.

Strengths

The paper is the first work on the implicit bias behavior of GD for the attention mechanism. Understanding implicit bias is crucial for several directions such as fairness, optimization behavior and generalization bounds. Some assumptions of this work are idealized, but that is fine given that it one of the first solid works in this direction. The most important aspect of the paper is giving a formalized understanding of the attention mechanism as a token-selection mechanism and providing sufficient conditions for convergence to a solution which favors optimal tokens. By connecting the attention mechanism to the implicit bias literature and the max-margin SVM formulation (which for the attention mechanism takes a new and interesting form), the study establishes a solid foundation for future research. The required work for obtaining the results is non-trivial and sufficiently distinct from previous works in implicit-bias literature. The paper is also well-written in most parts, although some parts of the paper become very technical with little intuition and thus it can be difficult to clearly understand the results such as the results in section 2.3.

Weaknesses

some questions and minor weaknesses and suggestions: - Regarding theorem 1, the fact that any initialization leads to convergence is rather counter-intuitive. Does the assumptions of Theorem 1 imply that the problem convex or is there any other reason? - Also related to theorem 1, it is not trivial why parameters norm ($|| p_t ||$) is diverging since $p_t$ is inside the soft-max. can the authors please explicitly specify the behavior of $|| p_t ||$ in the statement of theorem? We know for GD on ReLU neural networks that parameters norm diverges, but that is due to using ReLU non-linearities which implies that the loss prefers large first-layer weights. - The contributions section can be more specific by providing more details for contributions; for example in line 52 the authors can be more specific in explaining their contributions for the model with non-linear head and specifing the key distinctions with previous parts. - How are the values of $\mu$ and $R$ determined in theorem 3? This can be insightful as they are the key parameters in specifying the cone.

Questions

please see the section above.

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

2 fair

Contribution

3 good

Limitations

The authors adequately discuss the limitations throughout the paper. I do not see any potential negative impact with this work.

Reviewer 5i578/10 · confidence 3/52023-07-07

Summary

This work studies the mechanism for relevant token selection in the attention model by drawing connections with the implicit bias literature and max-margin SVM formulation. The authors consider the prompt attention model $f(X)=v^TX^T\text{softmax}(XW^Tp)$, with tokenized input $X$, value weights $v$, key-query weights $W$, and tunable token/prompt $p$. They show that running gradient descent (GD) on $p$ and $W$ (for fixed $W$ and $p$, respectively) is equivalent, so they consider optimizing only $p$ for fixed $W$. They consider a data setting where the quality of $t^{th}$ token of input $X$ is determined by its scores $Yv^Tx_t$, with the globally optimal tokens being the ones with the highest scores. First, they consider optimizing $p$ when $v$ is fixed using a loss that is decreasing and smooth. In this setting, they show the following results: - Under an assumption on the token scores, $p$ converges (in direction) to the global max-margin solution, which separates the globally optimal tokens from the rest. - They also develop a regularization path analysis to show global convergence by relaxing the said assumption. - The main result shows that with an appropriate initialization and a small enough step size, the GD iterates of $p$ converge (in direction) to a local max-margin solution that separates the locally-optimal tokens from the rest. Here, locally optimal tokens are defined as the ones which have higher scores than their SVM neighbors. Next, they consider the joint optimization of $p$ and $v$ using logistic loss. In this case, for a given $p$, if the resulting features are separable, $v$ has an implicit bias to converge to the max-margin solution as the problem is linear in $v$. Here, optimal tokens as the ones that maximize the downstream label margin. They show that: - When the attention features (for the max-margin $p$) are all support vectors (for the respective max-margin $v$), both $v$ and $p$ converge to their respective max-margin solutions. - When this is not the case (i.e. the attention features are not all support vectors), $p$ asymptotically selects one token per input, and it suffices to select tokens with the highest scores while also mixing other tokens. This does not impact the margin of $v$, which still converges to the max-margin solution. Throughout, the authors illustrate these results through numerical experiments.

Strengths

1. This work gives interesting theoretical insights into the mechanism for relevant token selection in the attention model. 2. It lays the groundwork to analyze attention mechanism using the lens of implicit bias and motivates several interesting directions for future work. 3. Overall, it is an interesting paper, with clear exposition and well-connected ideas. It makes several meaningful contributions (as listed in the summary).

Weaknesses

1. The experimental results seem limited and the paper would benefit from the inclusion of more experiments. 2. Some points of discussion can enhance intuition, and certain aspects regarding figures need some clarification.

Questions

1. Experiments: - The numerical experiments illustrate the theoretical results well. However, it would be good to include additional experiments on semi-synthetic or real datasets, such as those considered in [1], [2]. - Fig. 1(b) illustrates the local convergence of $p$ in the red or blue direction, depending on the initialization. It would be helpful to see if there are cases when the GD iterates do not converge to either of the two solutions shown in Fig. 1(b). This would give some insight into the gap between the empirical observations and the theoretical result for this case. 2. Discussion/clarification: - Points of discussion: - Generally, margin maximization refers to separating samples/features from two classes, whereas in this work, the main contribution is to show that the tunable prompt converges to a solution that separates the globally/locally optimal tokens from non-optimal ones. I suggest including more discussion on this part in the introduction. Relatedly, it would help to clarify lines 36-37. - In Section 2, choice of $v$ determines the scores, and hence the solution learned by $p$. Some discussion on this would be nice. - The data setting is interesting, but since there are a lot of cases, it would be helpful to show some connections between (some of) the synthetic data setting(s) and some datasets that are commonly used in practice. - In the discussion on convergence to the local max-margin soution, and the description of Fig. 1(b) in Section 2.2, it would be helpful to clarify that depending on the initialization, the GD iterates will converge to either the global max-margin (when initialized in the cone associated with that solution) or the local max-margin. - Figures: - In Fig. 1(a), it is unclear what the role of the blue line (local max-margin solution) is, since both the non-opt tokens take the same value. - Fig. 1(c) description needs some clarification. The separating hyperplane in. the figure looks like it's the max-margin solution for the teal datapoint, but not the max-margin across all three colors (margin with green is small). - In Figs. 2(b) and (c), it would be helpful to have the legend for red and blue curves associated with $p$ and $v$, respectively. - Other: - There are some typos/inconsistencies in the proof of Lemma 1 that should be corrected. - Theorem 2 shows global convergence of $p$ via regularization path analysis. It can be moved above assumption B to improve flow, as it is more general. - In Section 2.2, it would be helpful to use some specific notation for the solution that separates the locally optimal tokens from the rest ($p^{mm}(\alpha)$), such as $p^{mm}_l$. - Fig. 2(a) comparing the transient dynamics for correlation and logistic loss is interesting. However, it needs a minor clarification in the description. It is stated that when $p$ selects the optimal token, the gradient norm $\propto \gamma_i$ for correlation loss, and $\propto \gamma_ie^{-\gamma_i}$ for logistic loss, and we can compare loss for tokens with different scores. However, if $p$ selects the optimal token, the score would be fixed. Maybe, it can be rephrased to “if $p$ selects the token with score $\gamma_i$”. - In Section 3.1, label margin is defined as $\frac{1}{||v_{mm}||}$, but in the example, label margin $\gamma$ is defined as $||v_*||$. It would be helpful to mention what $v_*$ is for clarity. References: [1] Samet Oymak, Ankit Singh Rawat, Mahdi Soltanolkotabi, and Christos Thrampoulidis. On the role of attention in prompt-tuning. In ICLR 2023 Workshop on Mathematical and Empirical Understanding of Foundation Models, 2023. [2] Hongkang Li, Meng Wang, Sijia Liu, and Pin-Yu Chen. A theoretical understanding of shallow vision transformers: Learning, generalization, and sample complexity. arXiv preprint arXiv:2302.06015, 2023.

Rating

8: Strong Accept: Technically strong paper, with novel ideas, excellent impact on at least one area, or high-to-excellent impact on multiple areas, with excellent evaluation, resources, and reproducibility, and no unaddressed ethical considerations.

Confidence

3: You are fairly confident in your assessment. It is possible that you did not understand some parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

3 good

Presentation

3 good

Contribution

4 excellent

Limitations

N/A

Reviewer SE936/10 · confidence 2/52023-07-26

Summary

This paper proposes to give a mathematical explanation and analysis for widely used attention mechanism. They formulate normal attention, self-attention and prompt tuning into one single formulation. And they connected attention to max-margin problems.

Strengths

1. This paper proposes a mathematical analysis for attention mechanims, which deepen our understanding of the operator. 2. The authors formulate several kinds of attentions and prompt-tuning into one single formulate, which is practical and novel.

Weaknesses

1. To be honest, I am not an expert for this area. I appreciate the author's effort on the mathmatical part for deep learning. However, I think it would be better to give conclusions and design guidances based on the authors' observations. For example, can we link and explain some phenomena or pains during attention-based model training? Can we improve or accelerate training by improving network structure or losses? 2. The authors discuss attention modules based on isolated simple operators. I think it is very helpful. However, I wonder if we extend to real large-scale attention based models, do the conclusions remain the same?

Questions

Please address the questions in weakness part.

Rating

6: Weak Accept: Technically solid, moderate-to-high impact paper, with no major concerns with respect to evaluation, resources, reproducibility, ethical considerations.

Confidence

2: You are willing to defend your assessment, but it is quite likely that you did not understand the central parts of the submission or that you are unfamiliar with some pieces of related work. Math/other details were not carefully checked.

Soundness

4 excellent

Presentation

3 good

Contribution

3 good

Limitations

As indicated in weakness part.

Reviewer sy1C7/10 · confidence 1/52023-07-27

Summary

The paper focusses on the optimization dynamics of attention mechanism. The authors analyze a softmax-attention model and demonstrate that running gradient descent on its parameters leads to a max margin solution, separating optimal tokens from non-optimal ones. The authors also present a regularization path analysis, demonstrating the convergence of solutions for nonlinear classifier heads. Overall, the paper aims to enhance the understanding of attention mechanisms and their optimization dynamics in large language models.

Strengths

1. Comprehensive Characterization: The paper analyzes the fundamental attention model and its connection to max-margin problems. Analysis of this connection is quite original to the best of my knowledge. It overall advances the understanding of the attention mechanism from another theoretical perspective. 2. Convergence Insights: The paper looks into the convergence characterstics of gradient descent for tuning the token/prompt. This analysis can be used to drive futher improvements in optimization of large language models. 3. Joint Parameter Analysis: Through the analysis of the regularization paths, this work highlights the implicit biases and interactions between parameters (v, p), and describing their joint convergence. 4. Implications for Future Research: The work suggests promising avenues for future studies, such as exploring similar analysis for self-attention layers and multiple tunable tokens. 5. Real-World Relevance: Exhaustively understanding attention mechanisms in large language models is crucial for enhancing their performance in natural language processing tasks. 6. Numerical Validation: The authors provide empirical evidence supporting their theoretical findings through numerical experiments.

Weaknesses

1. Lack of Concrete Examples: The paper could definitely benefit from providing more examples to illustrate the concepts. The findings of the paper are very abstract and make it hard for readers to grasp the implications. 2. Limited support from other works: While the paper thoroughly analyzes the attention mechanism from a max-margin problem perspective, it does not highlight directly if the claims align with other relvant theoretical analysis of attention mechanism. 3. Complexity of Analysis: The optimization-theoretic characterization might be challenging for readers without a strong background in the subject, making it less accessible to a broader audience. 4. Lack of application to Real-World Data: The paper leaves uncertainty about the applicability of the findings in practical attention based model design and applications.

Questions

1. Can you provide more concrete examples illustrating the application of the findings to real-world LLM tasks? 2. How do the revealed implicit biases in the joint parameter analysis affect the interpretability and generalization capabilities of the attention model? 3. Can you elaborate on how the optimization-theoretic characterization and convergence insights presented in your work can be practically leveraged to enhance the training and fine-tuning of large language models?

Rating

7: Accept: Technically solid paper, with high impact on at least one sub-area, or moderate-to-high impact on more than one areas, with good-to-excellent evaluation, resources, reproducibility, and no unaddressed ethical considerations.

Confidence

1: Your assessment is an educated guess. The submission is not in your area or the submission was difficult to understand. Math/other details were not carefully checked.

Soundness

3 good

Presentation

3 good

Contribution

3 good

Limitations

The work is highly theoretical and does not present any potential negative societal impacts to the best of my knowledge.

Reviewer 5i572023-08-11

Thank you for the detailed responses. All concerns have been addressed and the experimental results shared by the authors further strengthen the paper. Hence, I have increased the score to 8.

Authorsrebuttal2023-08-11

Response to Reviewer 5i57

We thank you for your thorough review and valuable suggestions that significantly improved the quality of our work.

Reviewer iE2T2023-08-11

Thanks for the reviewer's response. Now I acknowledge the insights provided by this work. However, I still have the following concerns: 1. I am still confused about the model. In practice, it is common to use $Atten(X)$ based on the dot-product $\left<W_KX, W_Q X\right>$. The model in this work is a bit strange, and it is unclear why the authors changed the $W_K^\top W_QX$ in it to $W p$. At least, the authors should suggest some motivation for changing $Atten(X)$ in this way 2. In practice, it is hard to train Attention-based Transformer models, i.e., the loss is difficult to converge to $0$. However, the margin-maximization implicit bias is usually observed at the terminal stage of training. Can this implicit bias be observed in the practical setting of training Transformer? 3. Most methods and techniques in this work are extended from the linear model (Ji and Telgrasky), such as the regularized path. Could the authors briefly clarify the difference in proof technique?

Authorsrebuttal2023-08-12

Response to Questions 1 and 2

> **Q1-1:** I am still confused about the model. In practice, it is common to use $Atten(X)$ based on the dot-product $<W_KX, W_QX>$. The model in this work is a bit strange, and it is unclear why the authors changed the in it to $W_K^\top W_QX$ to $Wp$. **Response:** As mentioned in our initial response, the main claim that softmax-attention weights, trained with gradient descent, converge to a max-margin solution that effectively separates locally-optimal tokens from non-optimal ones unsurprisingly **remains valid when optimization problem is formulated using $ W_KW_Q^\top$ decomposition** and the gradient descent updates $ W_K,W_Q$ seperatly. Our new experiments (Figure 1 in the attached file) and subsequent analyses, which establish a correlation between $p$ and the matrices $W_K$ and $W_Q$, further shows that their combined product matrix $W_{\text{prod}} = W_KW_Q^\top$ asymptotically approaches the solution seen in our SVM. Note that $W_{\text{prod}}$ is what matters for the eventual model; this is why we directly used it in our exposition. However, based on the reviewer's concern - We will start our exposition with $(W_K, W_Q)$ and then combine them into $W_{\text{prod}}$. - We will also discuss the mapping we constructed for $W_K, W_Q$ and explain that their $W_{\text{prod}}$ is also similarly predictable and goes to the SVM solution empirically. > **Q1-2:** At least, the authors should suggest some motivation for changing $Atten(X)$ in this way. **Response:** Our attention model is $f(X)=\left<Xv,\mathbb{S}(X W^\top p)\right>$. There are three motivations for this: **I. Prompt-Tuning and '[CLS]' Token**: In practice, the model arises from prompt-tuning [Lester et al. EMNLP’21] or the '[CLS]' token [Devlin et al. NAACL’19]. To see this, following [Oymak et al. ICML'23] (see their Sec 2.1), let $p$ be a tunable prompt (attached to input $X$) and consider the cross-attention between prompt-attached input $[X;p]$ and $[X]$. Within this cross-attention layer, this results in the output $\qquad \text{Attn}([X;p],X)=\mathbb{S}([X;p]WX^\top)XV=[\mathbb{S}(XWX^\top)XV; \mathbb{S}(p^TWX^\top)XV]$ $\qquad$ Thus, the output associated with the tunable prompt has the form $V^\top X^\top \mathbb{S}(XW^\top p)$ which is exactly our model. **II. Unveiling the Self-Attention Mechanism:** The model recovers self-attention when the sample size is $n=1$. Observe that *first token output* of the self-attention is given by $\text{Attn}(X)=V^\top X^\top \mathbb{S}(X W^\top x_1)$. Setting $a\gets x_1$ in Lemma 1, our results recover this self-attention setting. That is also how we recently discovered implicit bias of self-attention admits an SVM for $n>1$. Please see initial response and the connection between SA-ERM and S-ATT-SVM. **III. Connection to Matrix Factorization:** The model is fundamental in nature. If you remove the softmax, it becomes a rank-1 matrix learning model where the goal is learning $(v,p)$ from labels of the form $y=v^\top X^\top Xp=\left<X^\top X,pv^\top \right>$. There is a vast literature on this. We believe extending such a matrix factorization viewpoint to softmax nonlinearity is mathematically fundamental and interesting. > **Q2.** In practice, it is hard to train Attention-based Transformer models, i.e., the loss is difficult to converge to 0. However, the margin-maximization implicit bias is usually observed at the terminal stage of training. Can this implicit bias be observed in the practical setting of training Transformer? **Response:** The loss in Theorems 1-4 **does not converge to zero**. This is because we keep $v$ fixed and only train $p$. Since $v$ remains fixed and attention outputs a convex combination of tokens, the model cannot drive the output to $\infty$ and reduce the loss to zero. We believe that this distinction also represents a **significant difference** from margin maximization in logistic regression applied to separable data [Soudry et al. JMLR’18, Ji and Telgarsky ICLR 2019]. We offer empirical evidence that self-attention's implicit bias can be predicted through a minor adjustment of our ATT-SVM. Additionally, in Section 4, we elaborate on how these theoretical insights extend to nonlinear prediction heads, such as MLP. Given these considerations, we maintain that our findings offer valuable insights for transformers. At the very least, our experiments with real data (refer to attached Fig 2) demonstrate that the empirical phenomena in the optimization dynamics of transformers align with our theory. Specifically, softmax/attention maps become sparser over time, while the norm of the attention weights continues to increase over the same period. This observation essentially aligns with our theoretical proposition: softmax saturates on optimal tokens, and the weights tend toward infinity.

Authorsrebuttal2023-08-12

Response to Question 3

> **Q3:** Most methods and techniques in this work are extended from the linear model (Ji and Telgrasky), such as the regularized path. Could the authors briefly clarify the difference in proof technique? **Response:** The connection between exponentially-tailed functions and margin maximization represents the shared intuition between our work and previous literature on logistic regression, including [Ji et al. COLT20]. Notably, the regularization path arguments have existed for over 20 years [Rosset et al. NeurIPS03] and have motivated our study. However, we introduce novel methods and techniques, elaborated upon below, that extend beyond the scope of the linear models. **1. [Ji et al. COLT20] utilize convex optimization analysis or not**. Linear models with a convex loss function inherently exhibit convexity, leading gradient descent to converge toward a single global direction. Theorem 1 in [Ji et al. COLT20] demonstrates that when the loss is convex and decreasing to $0$, the regularization path predicts the trajectory of gradient descent, with the authors effectively utilizing convex analysis. However, even when considering the simplest scenario we can formulate, our problem remains non-convex. To illustrate this concretely, let's set: - $\ell(x)=-x$ - Choose $n=1$ sample and $T=2$ tokens. Ensure that the tokens have unit $\ell_2$ norm and are orthogonal. - Set $v=x_1$, $p=cx_1$ with $c\in \mathbb{R}$, resulting in $x_2^\top v=x_2^\top p=0$. Following this setup, the training objective takes the shape: $\max_p L(p):= \mathbb{S}([c, 0])_1 = \frac{e^c}{1+e^c}.$ This function corresponds to the standard logistic function and is non-convex. Consequently, the framework presented in [Ji et al. COLT20] substantially differs from our context, where gradient descent can provably converge to distinct locally-optimal directions. These directions (as outlined in Definition 2) possess a nontrivial characterization, yet we effectively describe them and establish the guaranteed convergence of gradient descent. **2. Locally Optimal Solutions, Conic Initialization, and Gradient Correlation.** As discussed in response to Reviewer 8XUp, our proof deviates from relying on convexity and instead centers on constructing a cone around $p^{mm}$. Let's refer to this cone as $\mathcal{C}_{\mu}(p^{mm})$ for simplicity, as defined in Eq. (5) on page 5. The framework of this constructed cone serves as the cornerstone of our analysis, unfolding as follows: * **S1**: Our initial focus resides in demonstrating the absence of finite stationary points within $\mathcal{C}_{\mu}(p^{mm})$ unequivocally emphasizing that the single locally optimal solution within the cone is $p^{mm}$. * **S2**: Within this established cone, we leverage the advantageous gradient correlation, provided in Lemma 5. For example, in Lemma 5, we establish that for any choice of $\pi$, there exists $R_{\pi}$ such that: $ \langle \nabla \cal{L}(p), \frac{p}{|| p||}\rangle \geq (1+\pi) \langle \nabla \mathcal{L}(p), \frac{p^{mm}}{|| p^{mm}||} \rangle.$ * **S3**: It is rigorously proven that gradient descent remains confined within the cone $\mathcal{C}_{\mu}(p^{mm})$ when initiated within it. * **S4**: By leveraging the well-established descent properties of gradient descent, we illustrate the directional convergence towards $p^{mm}$. Our novel cone construction and **S1-S3** steps distinguish themselves from the linear models literature. While convexity simplifies gradient correlation in **S2**, presenting this result in a nonconvex setting is both novel and intriguing. Conversely, **S4** aligns with standard gradient descent analysis, paralleling the intuition that $p(t) \rightarrow \infty$, ultimately converging to the maximum margin solution. **3. ATT-SVM: A Novel Token-Separating SVM Formulation.** It's important to highlight that our ATT-SVM significantly differs from existing SVM formulations in the linear models' literature. While the logistic<->SVM connection typically revolves around standard classification, our ATT-SVM focuses on token separation within input sequences. Furthermore, our regularization path results and findings also bring novelty. Despite the comparative simplicity of analyzing regularization paths over gradient descent, the theories and findings in both Sections 3 and 4 are far from trivial. A prime example of this complexity lies in the nuanced differentiation between Sections 3.1 and 3.2. This intricate understanding demands a delicate characterization of problem geometry concerning support vectors and their contributions to the ultimate logistic loss. For in-depth insights, refer to the proofs of Theorems 5 and 6 in the appendix. In summary, our nonconvex formulation, conic-based analysis of gradient descent, and attention SVM formulation significantly distinguish themselves from existing literature on linear models, including [Ji et al. COLT20].

Reviewer iE2T2023-08-18

Thank you for the detailed responses. Technically, this work is solid. It introduces new techniques for analyzing the maximum margin implicit bias in nonlinear models and offers new insights into attention's dynamics. My current recommendation is split between 4 and 5. I still have some reservations over the "attention-like" model in this work. In practice, I have rarely seen such an "attention-like" model. Nevertheless, this work makes a technically sound contribution, and the theoretical insights from the "attention-like" model align well with experimental results for attention. I raise my recommendation to 5 and encourage the authors to clarify the motivations for studying this "attention-like" model in the final version.

Authorsrebuttal2023-08-18

Response to Reviewer iE2T

We appreciate the time and effort you invested in reviewing our paper. Your valuable suggestions will be incorporated into the final revision.

Reviewer CU4X2023-08-12

Thanks for the rebuttal

I have read the rebuttal and all the other reviews. To be honest, I am not an expert for this area. After reading the rebuttal, I think this paper has good contributions and the new experiments strengthen the results. Thus I increase my score from 5 to 6.

Authorsrebuttal2023-08-12

Response to Reviewer CU4X

We appreciate your time and insights in reviewing the paper. Thank you.

Reviewer 8XUp2023-08-18

Thank you for the detailed response. I will maintain my score.

Reviewer SE932023-08-22

Thank you for the response. I will slightly increase score.

Program Chairsdecision2023-09-21

Decision

Accept (spotlight)

© 2026 NYSGPT2525 LLC