Title: Communication Efficient Distributed Training with Distributed Lion
Venue: NeurIPS 2024
Accepted: yes
Keywords: Distributed Optimization
Abstract: The Lion optimizer has been a promising competitor with the AdamW for training large AI models, with advantages in memory, computation, and sample efficiency. In this paper, we introduce Distributed Lion, an innovative adaptation of Lion for distributed training environments. Leveraging the sign operator in Lion, our Distributed Lion only requires to communicate binary or lower-precision vectors
between workers to the center server, significantly reducing the communication cost.  
Our theoretical analysis confirms Distributed Lion's convergence properties. Empirical results demonstrate its robustness across a range of tasks, worker counts, and batch sizes, on both vision and language problems. Notably, Distributed Lion attains comparable performance to standard Lion or AdamW optimizers applied on aggregated gradients, but with significantly reduced communication bandwidth. This feature is particularly advantageous for training large models. In addition, we also demonstrate that \mavolion{} presents a more favorable performance-bandwidth balance compared to existing efficient distributed methods such as deep gradient compression and ternary gradients.

Distributed Lion for Communication Efficient Distributed Training

Abstract

The Lion optimizer has been a promising competitor with the AdamW for training large AI models, with advantages in memory, computation, and sample efficiency. In this paper, we introduce Distributed Lion, an innovative adaptation of Lion for distributed training environments. Leveraging the sign operator in Lion, our Distributed Lion only requires to communicate binary or lower-precision vectors between workers to the center server, significantly reducing the communication cost. Our theoretical analysis confirms Distributed Lion's convergence properties. Empirical results demonstrate its robustness across a range of tasks, worker counts, and batch sizes, on both vision and language problems. Notably, Distributed Lion attains comparable performance to standard Lion or AdamW optimizers applied on aggregated gradients, but with significantly reduced communication bandwidth. This feature is particularly advantageous for training large models. In addition, we also demonstrate that Distributed Lion presents a more favorable performancebandwidth balance compared to existing efficient distributed methods such as deep gradient compression and ternary gradients.

1 Introduction

The pursuit of modern artificial intelligence hinges on the training of large-scale models like large language models[28] and large vision models (LVM)[20]. As the stakes - in terms of time, cost, and environmental impact - grow ever higher for training expansive AI systems, the hunt for efficient optimizers becomes critical.

Recently, a new optimization named Lion (evolved sign momentum) [11] has been discovered with an evolutionary program. It was shown that it exhibits performance on par with the current state-ofthe-art AdamW [26] across a wide range of tasks, while reducing the memory cost and training time.

<latexi sh

1_b

64="pQk

Gg qUMov

B/nD

FjI

>A

+X

c

Z

LS

N

P

7

0

wV

W

y

5

Td zY

f

O

3

H

K

2

r

9

R

<latexi sh

1_b

64="pQk

8C

Gg qUMov

B/nD

FjI

>A

+X

c

Z

LS

N

P

7

0

wV

W

y

5

Td zY

f

O

3

H

K

2

r

9

R

<latexi sh

1_b

64="pQk

8C

Gg qUMov

B/nD

FjI

>A

+X

c

Z

LS

N

P

7

0

wV

W

y

5

Td zY

f

O

3

H

K

2

r

9

R

<latexi sh

1_b

64="

duB3K

cD

8f

SLpZ

5GH

T

NY

>A

C

n

V

FJ

U

2vqE

0

k

I

M

7

O

R

m

r

W

z

9

w

+

y

Q

g

o

/

X

j

P

<latexi sh

1_b

64="P

/djYrUX

v

>A

C

n

c

VDLS

N

FJ3

2

E

0

I

p

W

9

5

H

78

u

z

y

K

O

Z

k

R

g

B

G

f

<latexi sh

1_b

64="

D5GBuW0cMURT7Ln

m

fj

AO

>

C

V

wFHXKq gJE

o

I

+p

S

Q

Z

Y

2

3

k

v

r

9

/

y

P

z

8

N

d

<latexi sh

1_b

64="AW

uKUo0y

X

+

L

E

3HRO

I

>

C

c

VD

S

N

FJ

2vq

B

g

Q

r

5

7

T

mY

ZG

n

z

9

w

p

8k

d

M

/

P

j

f

<latexi sh

1_b

64="nIP

XSu

HVN

UMp

FjL5

C3yE

>A

c

B

8

W

Z

gk

w

R9

K

0

m7

zG

f/

T

D

O

2

d

vQY

o

q

J

+

r

workers

server

maj.	vote

δ

1

,t

δ

2

,t

∆

t

binary

(

)

(

)

(

)

δ

3

,t

…

average

∆

t

low-precision

or

Consider optimizing a loss function f D ( x ) on R d with a dataset D , the update rule of Lion is:

where m t plays the role of the momentum, ϵ is the learning rate, β 1 , β 2 ∈ [0 , 1] 2 are two momentum related coefficients, and λ ≥ 0 is the weight decay coefficient. Comparing Lion against AdamW, one observes that Lion only requires the storage of the first-order momentum term, which results in a more relaxed memory requirement.

In this study, we tailor the Lion optimizer for distributed training. The Lion optimizer is particularly suitable for this context due to two main attributes: (1) its simple update mechanism that relies solely on first-order momentum, and (2) its use of the sign( · ) function. We showcase the effective employment of the sign( · ) function to streamline communication processes, leading to the development of a novel distributed training framework named Distributed Lion. Within the Distributed Lion framework, each participating worker independently adjusts the model parameters using a distinct instance of the Lion optimizer, thereby maintaining separate optimizer states. A distinctive feature of this framework is the mode of communication between workers and the central server, which is restricted to binary or low-precision vectors.

Crucially, in this setup, workers convey updates rather than raw gradients to the central server. The server, in turn, aggregates these updates through either a straightforward averaging process (Distributed Lion-Avg) or a majority voting mechanism (Distributed Lion-MaVo). In the case of Distributed Lion-MaVo, the consolidated update is maintained as a binary vector, whereas for Distributed Lion-Avg, given the presence of n workers, each element of the update vector is encoded using log( n ) bits. This approach markedly reduces the bandwidth requirements compared to traditional distributed training methods, which typically rely on high-precision floating-point vectors for communication. The bandwidth efficiencies achieved by our method are detailed in Table 1. Our contributions are: 1) We introduce the Distributed Lion algorithm, a simple yet effective approach to extend Lion to distributed training, where all communications between workers and the server are done through binary or low-precision vectors (Section 2); 2) We provide theoretical analysis to ensure the convergence of Distributed Lion (Section 3); 3) Empirically, we demonstrate that on both vision and language modeling tasks, Distributed Lion achieves comparable performance against applying Lion and Adam with the synchronized gradients from all workers, while being significantly more communication efficient. In addition, we show that Distributed Lion achieves a better trade-off than existing efficient distributed training methods like deep gradient compression [24] and ternary gradients [36] (Section 5).

2 The Distributed Lion

We introduce the distributed learning problem and then our Distributed Lion framework.

2.1 Distributed Training

In distributed training, we aim to minimize the following learning objective:

Here, N denotes the number of workers, {D i } are N datasets, 3 and x is the model parameter (e.g., the weights of a neural network). In the distributed learning setting, each worker i ∈ [ n ] will get its own dataset D i , and we assume there is a centralized server that all workers can communicate with. The simplest distributed training technique is to perform distributed gradient aggregation:

Here, each local gradient g i is an unbiased estimation of the true gradient ∇ x F ( x ) when D i are i.i.d. drawn from the same underlying distribution. The server aggregates all local gradients into g server , and then applies an optimizer like Adam [19] on top of g server. However, the aggregation step requires communicating the full gradient vectors g i , which can be expensive for large models.

Notation. Given a function f ( x ; ξ ) , the gradient ∇ f ( x ; ξ ) is taken with respect to variable x . We use ∥ · ∥ , ∥ · ∥ 1 , and ∥ · ∥ ∞ to denote the ℓ 2 , ℓ 1 , and ℓ ∞ norm, respectively. ξ i,t is the sampled data at time t for the i -th worker and g i,t = ∇ f ( x t ; , ξ i,t ) . We similarly denote z i,t as any variable z at time t from worker i .

2.2 Distributed Lion

The main idea of Distributed Lion is to leverage the binary nature of the Lion's update for efficient communication. To enable that, we want the workers to only send the binary updates to the server. As a result, we let each worker keep tracks of its own optimizer state, i.e., the momentum m i,t . Then at each step, each worker i first computes:

Then all workers send the δ i,t back to the server. The server receives the binary 'updates" from all workers and then aggregates them. Here, we propose two simple ways for aggregation. Denote S t = ∑ N i =1 δ i,t , which is a vector of integers in { 0 , . . . N } . Define the aggregation as follows:

Algorithm 1 Distributed Lion Training

Inputs: Initial parameters x 0 ∈ R d , datasets {D 1 , . . . , D N } , loss function f , learning rate ϵ , hyper-parameters β 1 , β 2 ∈ [0 , 1] (default to 0 . 9 , 0 . 99 ) 4 , and the weight decay λ .

Initialization: t = 0 , ∀ i, m i, 0 = 0 , and x i, 0 = x 0 .

while not convergent do

Worker-side: Each worker i samples a batch ξ i,t ∈ D i , computes the following, and sends δ i,t to the server:

Server-side: The server computes the aggregated update ∆ t and broadcast it to all workers:

end while

So we simply average or take the majority vote from all { δ i,t } . Here, we denote binary vectors in magenta and low precision vectors in cyan. In the end, the server broadcasts ∆ t back to each worker i , and each worker performs x i,t +1 = x i,t -ϵ (∆ t + λx i,t ) , where ϵ is the step size and λ is the weight decay coefficient.

Communication Cost In both variants of Distributed Lion, the N workers only need to send the binary vectors δ i,t to the server. The server then sends the aggregated update ∆ t back to the workers, which is binary when using the majority vote aggregation, and an integer in { 0 , . . . , N } when using the averaging aggregation. Note that an integer in { 0 , . . . , N } can be represented by at most log( N ) bits. In practice, usually N ≪ 2 32 hence log( N ) < 32 and we still save the communication bandwidth even with the average aggregation, comparing against communicating with floating point numbers (Check Table 1). The full Distributed Lion algorithm is summarized in Algorithm 1.

3 Theoretical Analysis

We provide our theoretical analysis of the Distributed Lion algorithm, both with the averaging and the majority vote aggregation methods. In the following, we first describe that the distributed training problem can be viewed as a constrained optimization problem when Distributed Lion is used. We provide convergence results for Distributed Lion with both aggregation methods.

3.1 Lion as Constrained Optimization

Chen et al. [10] showed that the (global) Lion is a theoretically novel and principled approach for minimizing a general loss function f ( x ) while enforcing a box-constrained optimization problem:

where the constraint is introduced due to the use of the weight decay coefficient λ . Moreover, Chen et al. [10] showed that the Lion dynamics consists of two phases:

1) [Phase 1] When the constraint is not satisfied, that is, x ̸∈ F , where F is the feasible set F def = { x : ∥ λx ∥ ∞ ≤ 1 } , it exponentially decays the distance to F : ∃ α ∈ (0 , 1) , such that

where n ≥ 0 . Hence, x t converges to F rapidly and stays within F once it reaches it.

2) [Phase 2] After λx t enters F , the dynamics minimizes the objective f ( x ) while being confined within the set F . This step is proved in [10] by constructing a Lyapunov function when sign( · ) is treated as the sub-gradient of a convex function.

3.2 Convergence Analysis

In this section, we analyze the convergence of distributed Lion algorithms. Similar to the case of global Lion, we show that distributed Lion also solves the box constrained optimization (6). Its dynamics also unfolds into two phases aligning with Lion's dynamics: Phase I shows rapid convergence to a feasible set F , while Phase II seeks to minize the objective f ( x ) within the feasible set F . Different from the Lyapunov approach used in Chen et al. [10], the proof of our Phase II result is made by introducing a surrogate metric S ( x ) of constrained optimality, and providing upper bound of S ( x t ) following the algorithm. Our analysis makes the following assumptions.

Assumption 3.1 (Variance bound) . D i is i.i.d. drawn from a common distribution π ∗ , and the stochastic sample ξ i ∼ D i is i.i.d. and upon receiving query x ∈ R d , the stochastic gradient oracle gives us an independent unbiased estimate ∇ f ( x ; ξ i ) from the i -th worker that has coordinate bounded variance:

Assumption 3.2 (Smooth and Differentiable f ) . Function f ( · ) is differentiable and L-smooth. Assumption 3.3 (Bias Correction) . Consider the sequence { m i t } t> 0 ,i ∈ [ N ] generated by Algorithm 1, E [ ˜ m i t ] / E [sign( ˜ m i t )] ≥ 0 .

Note that assumption 3.1 and 3.2 are standard in the analysis of stochastic optimization algorithms [8, 34]. When Assumption 3.1 holds, E ∥ 1 N ∑ N i =1 ∇ f ( x ; ξ i ) -∇ f ( x ) ∥ 2 ≤ σ 2 /N . In distributed training setting, m 1 ,t , m 2 ,t , · · · , m N,t are i.i.d., so E [ β 1 m i,t +(1 -β 1 ) g i,t ] and E [sign( ˜ m i t +1 )] don't depend on i . Assumption 3.3 evaluates the discrepancy between the expected value and the expected sign of a measure, positing that the expected values of ˜ m i t and ˜ sign( m i t ) ought to share the same sign.

We now present our results. Similar to the case of global Lion, the dynamics of distributed lion can also be divided into two phases depending on if the constraint x ∈ F is satisfied.

Phase I ( x ̸∈ F ) In line with the behavior observed in the global Lion, when the constraint is not satisfied, both variants of distributed Lion decrease the distance to the feasible set exponentially fast.

Theorem 3.4 (Phase I) . Assume f : R d → R is L -smooth, β 1 , β 2 ∈ (0 , 1) , and β 2 > β 1 , and ϵ, λ > 0 . Let ( x t ) t ≥ 0 be generated by Algorithm 1. Define F = { x : ∥ λx ∥ ∞ ≤ 1 } , and dist( x t , F ) = inf z ∈F ∥ z -x t ∥ w.r.t. any norm ∥·∥ . For any two non-negative integers s ≤ t , then ∀ s ≤ t , we have

Hence, x t converges to F rapidly and stays within F once it arrived.

Phase II ( x ∈ F ) Now, we present the main result of the analysis for Phase II in Theorems 3.6, 3.7, and 3.8. We start with introducing a surrogate metric that quantifies the optimality of the solution within Phase II:

Let's delve into the implications of S ( x ) = 0 .

Proposition 3.5. Assume f is continuously differentiable, λ > 0 , and ∥ λx ∥ ∞ ≤ 1 . Then S ( x ) = 0 implies a KKT stationary condition of min x f ( x ) s.t. ∥ λx ∥ ∞ ≤ 1 .

This KKT score (7) is tailored to encompass the stationary solutions of the box constrained problem as described in (6). Building on this, we then proceed to analyze the convergence for the majority vote, averaging, and global LION strategies throughout this section.

Theorem 3.6 (Majority Vote) . Assumptions 3.1, 3.2, and 3.3 hold, consider the Majority vote scheme in Algorithm 1 , β 1 , β 2 ∈ (0 , 1) , and β 2 > β 1 , and σ ≤ 2 √ dβ 1 β t 2 ∥∇ f ( x 0 ) ∥ , 1 ≤ t ≤ T , and ϵ, λ > 0 . Let ( x t ) t ≥ 0 be generated by Majority Vote, and it is in Phase II: ∥ λx t ∥ ∞ ≤ 1 for all t .

We have

The result above shows that 1 T ∑ T t =1 E [ S ( x t )] decays with a rate of O ( 1 Tϵ + 1 T (1 -β 2 ) + ϵ + 1 √ N ) . This rate is in fact on par with global Lion as we show in the following result.

Theorem 3.7 (Global) . Assumptions 3.1 and 3.2 hold, Consider the scheme in Algorithm (16) , with the same settings in Theorem 3.6, we have

Theorem 3.8 (Averaging) . Assumptions 3.1 and 3.2 hold, consider the Averaging scheme in Algorithm 1 , with the same settings in Theorem 3.6, we have

The Averaging method's convergence bound doesn't improve with more workers since 1 N ∑ N i =1 sign( δ i,t ) doesn't approximate sign( ∑ N i =1 δ i,t ) effectively, unlike the Majority Vote's approach sign( ∑ N i =1 sign( δ i,t )) .

4 Related Work

In this section, we provide a summary of optimizers that use the sign function and existing literature on bandwidth-friendly distributed training.

Sign Operation in Optimization The sign operation is integral to optimization for several reasons. Primarily, it acts as a normalization mechanism by disregarding the magnitude of gradients, thereby equilibrating updates across different dimensions and potentially facilitating the avoidance of saddle points. Additionally, the binary nature of the sign function's output significantly reduces the memory footprint required for storing gradient updates. The concept of sign-based optimization dates back to RProp [30] and has seen renewed interest with the advent of SignSGD and its momentum-enhanced variant, Signum [4]. A more recent advancement is the generalized SignSGD algorithm introduced by [14], which incorporates a preconditioner, making it a superset of SignSGD and akin to Adam in certain aspects. A noteworthy addition to sign-based optimizers is the Lion optimizer, which emerged from evolutionary program search, achieving performance comparable to Adam [19] and AdamW [26] for the first time. Lion distinguishes itself from Signum by employing a different convex combination for outputting local updates, a technique referred to as the doubleβ scheme, reminiscent of Nesterov's momentum update, and encapsulates Signum as a particular case. On the theoretical front, SignSGD and Signum have been shown to exhibit convergence rates comparable to traditional SGD [4]. Recent work by [34] has extended the theoretical understanding by providing a convergence theory that relaxes the requirements for bounded stochastic gradients and enlarged batch sizes. Additionally, Lion has demonstrated its capability in performing constrained optimization under the ℓ ∞ -norm constraint [10].

Distributed Training In addressing the communication constraints of distributed training, the research community has devised several innovative strategies, prominently featuring asynchronous Stochastic Gradient Descent (SGD), gradient quantization, and sparsification techniques. Asynchronous SGD offers a solution by enabling parameter updates immediately after back-propagation, bypassing the need for gradient synchronization, thereby expediting the training process [9, 40, 25]. Li et al. [21] utilizes sketch-based algorithms for lossless data compression [23], achieving an asymptotically optimal compression ratio [22]. However, its applicability is limited to highly sparse

gradients, making it orthogonal to our research. In the realm of gradient quantization, methods such as 1-bit SGD [33], QSGD [2], and TernGrad [36] are pivotal. These approaches compact the gradient data, substantially reducing the required communication bandwidth, with 1-bit SGD demonstrating a tenfold acceleration in speech applications and both QSGD and TernGrad confirming the feasibility of quantized training in maintaining convergence. Moreover, gradient sparsification further mitigates the communication load by transmitting only the most substantial gradients. Techniques like threshold quantization and Gradient Dropping [1] exemplify this, with Gradient Dropping notably achieving a 99 reduction in gradient exchange with minimal impact on performance metrics, such as a mere 0.3 loss in BLEU score for machine translation tasks. The recent Deep Gradient Compression (DGC) strategy [24] also contributes to this field by incorporating momentum correction and local gradient clipping among other methods to maintain accuracy while significantly reducing communication demands, albeit at the cost of increased computational overhead. Compared to gradient quantization methods, Distributed Lion uniquely leverages the binary nature of Lion's update and can be viewed as performing quantization on updates rather than the gradient.

5 Experiment

In this section, we perform a thorough evaluation of the Distributed Lion algorithm, employing both the averaging and majority vote aggregation methods. The design of our experiments is aimed at addressing the following questions to ascertain the algorithm's efficacy and performance:

(Q1) How does Mavolion perform in comparison to traditional global distributed training methods, which aggregate gradients from local workers to apply an optimizer to the collective gradient?

(Q2) How does Mavolion measure up against established methodologies known for their communication efficiency in distributed training?

(Q3) How does Distributed Lion scale on large vision or language problems?

5.1 Comparing Distributed Lion Against Established Methods on CIFAR-10

To address Q1 and Q2 , we compare Distributed Lion with both the averaging and the majority vote methods, against established low-bandwidth distributed training techniques and the global distributed training methods. We consider the following baseline methods: 1) Global AdamW (G-AdamW) , where we apply AdamW with the averaged gradients from all workers. 2) Global Lion (G-Lion) , where we apply Lion with the averaged gradients from all workers. Note that Global AdamW and Global Lion serve as the performance and communication upper bounds. 3) Distributed Lion with Averaged Updates (D-Lion (Avg)) , In contrast to the majority vote mechanism used in Distributed Lion, this variant averages the binary update vectors from all workers. While D-Lion (Avg) might offer improved performance in principle, it comes at the cost of non-binary communication from the server to the workers. 4) TernGrad [36]. The main idea is to tenarize the gradient into a vector of {-1 , 0 , 1 } , which is similar to what Lion does. But this process is done on the gradient level instead of on the update level 5) Gradient Dropping (GradDrop) [1]. The main idea is to drop insignificant gradient entries and only transmit sparse gradient signals. 6) Deep Gradient Compression (DGC) [24]. DGC is built on top of the GradDrop, but additionally applies momentum correction, local gradient clipping, momentum factor masking, and warm-up training.

Experiment Setup For GradDrop, DGC, and TernGrad, we choose the compression rate of 0 . 04 (note that 1 / 32 = 0 . 03125 ) to match the bandwidth of the D-Lion (MaVo). We conduct experiments on the CIFAR-10 dataset using a vision transformer (ViT) with 6 layers, 8 heads, and a hidden dimension of 512. This is because ViT has arguably become the most widely used architecture in computer vision, and we empirically found no additional gain in performance when using a larger ViT on CIFAR-10. In addition, to validate how Distributed Lion performs with different numbers of workers, we consider k ∈ { 4 , 8 , 16 , 32 } , each worker at each step samples an i.i.d batch of size 32.

We list the optimal hyperparameters selected for each method from Figure 2 in Table 4. The learning rates are selected from { 0 . 00005 , 0 . 001 , 0 . 005 , 0 . 01 } and the weight decays are selected from { 0 . 0005 , 0 . 001 , 0 . 005 } . For each experiment, we use a cosine learning rate scheduler and run for 200 epochs, and we ensure that in each epoch, each local worker sees the entire dataset once.

k	=	4

k	=	8

k	=	16

k	=	32

Test	Acc.

Epoch

Epoch

Epoch

Epoch

Each experiments are conducted with three random seeds { 42 , 52 , 62 } , which results in a total of 4 × 7 × 3 = 84 experiments.

0

25

50

75

Bits / Iteration

10.0

12.5

15.0

17.5

20.0

Error (1 - Accuracy)

G-AdamW

G-Lion

GradDrop (0.96)

TernGrad

DGC (0.96)

D-SIGNUM (Avg)

D-SIGNUM (MaVo)

D-Lion (Avg)

D-Lion (MaVo)

Observation We plot the testing accuracy (Test Acc.) over epochs for different methods in Figure 2, the best testing accuracy of different methods over the number of workers in Figure 3, and the performance versus per-iteration bandwidth in Figure 4 when using k = 4 workers. From the above plots, we make the following observations.

Compared to global methods, D-Lion (MaVo) performs on par with G-Lion. D-Lion (Avg) performs slightly worse than G-Lion but is on par with G-Adamw (Figure 2).

Compared to established communication efficient methods, both D-Lion (MaVo) and D-Lion (Avg) outperform GradDrop, DGC and TernGrad by a large margin (Figure 2).

We observe that both D-Lion (MaVo) and D-Lion (Avg) exhibit strong performance while being 30x more communication efficient than global distributed training methods like G-AdamW. To broaden our comparison, we introduced two additional baseline methods: DSIGNUM (Avg) and D-SIGNUM (MaVo) . These baselines apply our proposed techniques to the SIGNUM framework instead of Lion. 5 We set β = 0 . 99 for D-SIGNUM. According to our results, depicted in Figure 4, these SIGNUM-based methods do not perform as well as their Lion-based counterparts.

We notice that the overall performance of the same optimizer is worse as k is larger, this is consistent with the observation made in DGC [24]. We hypothesize that this may be due to the larger effective batch size resulting in smaller stochasticity, which is consistent with why D-Lion (MaVo) performs a bit better than G-Lion on CIFAR-10 (Figure 3).

5.2 Scale to Larger Models on Larger Datasets

To answer Q3 , we validate Distributed Lion on several large-scale setups including both vision and natural language processing tasks. Under this setting, we compare D-Lion (MaVo) and D-Lion (Avg) against G-AdamW and G-Lion. For the vision task, we tested ViT-S/16 [16] and ViT-B/16 on the ImageNet-1K [31] classification benchmark. For the natural language processing task, we perform both language pretraining and finetuning tasks. This is because Lion has shown good results on language modeling. For the language model pretraining task, we pretrain GPT2++ [29] (the GPT-2 model with modern training techniques adopted from the LLaMA model [35]) on the OpenWebText [17] benchmark, for both 350M and 760M size models. For the language model finetuning task, we conduct few-shot finetuning of the LLaMA 7B model [35] and evaluate the models' downstream performance on standard downstream evaluation benchmarks [13, 37, 12, 27, 7, 32].

Experiment Setup For the ImageNet-1K benchmark, we train all methods for 300 epochs, using a global batch size of 4096 and data augmentations MixUp [39] of 0.5 and AutoAug [15]. When training ViT-S/16, we use a learning rate of 3 e -3 for G-AdamW, with betas of (0 . 9 , 0 . 999) and a weight decay of 0.1. For G-Lion, D-Lion (MaVo), and D-Lion (Avg), we use a learning rate of 3 e -4 , betas of (0 . 9 , 0 . 99) , and a weight decay of 1.0. As for ViT-B/16, we use a learning rate of 1 e -3 for G-AdamW, with betas of (0 . 9 , 0 . 999) and a weight decay of 1.0, while for all Lion variants, we use a learning rate of 1 e -4 , betas of (0 . 9 , 0 . 99) , and a weight decay of 10.0. For pretraining language models on the OpenWebText dataset, we build GPT2++ models using the original GPT2 model, but with modern training techniques from the LLaMA model, including using the Gated Linear Unit activation for the multilayer layer perceptron layers (MLPs) and the RMSNorm [38] instead of the LayerNorm [3]. Following the Chinchilla scaling law [18], we trained the 350M model for 14,000 iterations and the 760M model for 30,000 iterations, both with 1,024 tokens. For G-AdamW, we use a learning rate of 3 e -4 , betas of (0 . 95 , 0 . 99) , and a weight decay of 0.1. For all Lion variants, we use a learning rate of 9 e -5 , betas of (0 . 9 , 0 . 99) , and a weight decay of 1.0. All the models are trained under a global batch size of 480. For the instruction finetuning task, we instruct finetune a LLaMA 7B model for 3 epochs with batch size 32. We use 2 e -5 learning rate, betas of (0 . 9 , 0 . 999) , 0 weight decay for G-AdamW and 6 e -6 , (0 . 9 , 0 . 99) betas, 0 . 01 weight decay for all Lion variants. For all pretraining experiments, we use 4 nodes × 8 gpus = 32 workers. For instruction finetuning experiments, we use 4 workers per experiment.

Observation We summarize the results in Table 2 (ImageNet 1K and OpenWebText Language Model Pretraining) and Table 3 (Instruction Finetuning). Both D-Lion (Avg) and D-Lion (MaVo)

can maintain a performance similar to, or even better than, that of G-AdamW and G-Lion, on both large-scale vision and language tasks. We observe that D-Lion (Avg) outperforms D-Lion (MaVo) on ImageNet, and observe the opposite on language modeling and instruction finetuning. We hypothesize that these differences are due to the impact of global batch size. As a result, we recommend using D-Lion (Avg) / (MaVo) when the global batch size is large / small.

6 Conclusion and Future Work

In this paper, we introduced Distributed Lion, a communication-efficient distributed training strategy that builds upon the Lion optimizer's binary update mechanism. Distributed Lion is designed to minimize communication overhead by allowing workers to independently manage their optimizer states and exchange only binary or low-precision update vectors with the server. We proposed two aggregation techniques within the Distributed Lion framework: average-based (Distributed Lion Avg) and majority vote-based (Distributed Lion MaVo) algorithms. We provide both theoretical and empirical results to demonstrate Distributed Lion's effectiveness, scalability, and efficiency. Notably, we show that Distributed Lion performs significantly better than existing communication-friendly methods. In the meantime, Distributed Lion demonstrates performance on par with strong global distributed training baselines, while being 32x more communication efficient. As our method is orthogonal to existing communication-efficient methods, an interesting future direction is to combine both techniques for further improvement. As a limitation, currently Distributed Lion (Avg / MaVo) performs inconsistently across different datasets and benchmarks, it will be an interesting future research direction to understand when and why one performs better than the other.

7 Acknowledgment

The research is conducted in Statistics & AI group at UT Austin, which receives supports in part from NSF CAREER1846421, SenSE2037267, Office of Navy Research, and NSF AI Institute for Foundations of Machine Learning (IFML).

References

Alham Fikri Aji and Kenneth Heafield. Sparse communication for distributed gradient descent. arXiv preprint arXiv:1704.05021 , 2017.

Dan Alistarh, Demjan Grubic, Jerry Li, Ryota Tomioka, and Milan Vojnovic. Qsgd: Communication-efficient sgd via gradient quantization and encoding. Advances in neural information processing systems , 30, 2017.

Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450 , 2016.

Jeremy Bernstein, Yu-Xiang Wang, Kamyar Azizzadenesheli, and Anima Anandkumar. signSGD: Compressed Optimisation for Non-Convex Problems, August 2018. arXiv:1802.04434 [cs, math].

Jeremy Bernstein, Yu-Xiang Wang, Kamyar Azizzadenesheli, and Animashree Anandkumar. signsgd: Compressed optimisation for non-convex problems. In International Conference on Machine Learning , pages 560-569. PMLR, 2018.

Jeremy Bernstein, Jiawei Zhao, Kamyar Azizzadenesheli, and Anima Anandkumar. signsgd with majority vote is communication efficient and fault tolerant. arXiv preprint arXiv:1810.05291 , 2018.

Yonatan Bisk, Rowan Zellers, Jianfeng Gao, Yejin Choi, et al. Piqa: Reasoning about physical commonsense in natural language. In Proceedings of the AAAI conference on artificial intelligence , volume 34, pages 7432-7439, 2020.

Léon Bottou, Frank E Curtis, and Jorge Nocedal. Optimization methods for large-scale machine learning. SIAM review , 60(2):223-311, 2018.

Jianmin Chen, Xinghao Pan, Rajat Monga, Samy Bengio, and Rafal Jozefowicz. Revisiting distributed synchronous sgd. arXiv preprint arXiv:1604.00981 , 2016.

Lizhang Chen, Bo Liu, Kaizhao Liang, and Qiang Liu. Lion secretly solves constrained optimization: As lyapunov predicts. arXiv preprint arXiv:2310.05898 , 2023.

Xiangning Chen, Chen Liang, Da Huang, Esteban Real, Kaiyuan Wang, Yao Liu, Hieu Pham, Xuanyi Dong, Thang Luong, Cho-Jui Hsieh, et al. Symbolic discovery of optimization algorithms. arXiv preprint arXiv:2302.06675 , 2023.

Christopher Clark, Kenton Lee, Ming-Wei Chang, Tom Kwiatkowski, Michael Collins, and Kristina Toutanova. Boolq: Exploring the surprising difficulty of natural yes/no questions. In NAACL , 2019.

Peter Clark, Isaac Cowhey, Oren Etzioni, Tushar Khot, Ashish Sabharwal, Carissa Schoenick, and Oyvind Tafjord. Think you have solved question answering? try arc, the ai2 reasoning challenge. ArXiv , abs/1803.05457, 2018.

Michael Crawshaw, Mingrui Liu, Francesco Orabona, Wei Zhang, and Zhenxun Zhuang. Robustness to unbounded smoothness of generalized signsgd. arXiv preprint arXiv:2208.11195 , 2022.

Ekin D Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V Le. Autoaugment: Learning augmentation policies from data. arXiv preprint arXiv:1805.09501 , 2018.

Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929 , 2020.

Aaron Gokaslan and Vanya Cohen. Openwebtext corpus. http://Skylion007.github.io/ OpenWebTextCorpus , 2019.

Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch, Elena Buchatskaya, Trevor Cai, Eliza Rutherford, Diego de Las Casas, Lisa Anne Hendricks, Johannes Welbl, Aidan Clark, et al. Training compute-optimal large language models. arXiv preprint arXiv:2203.15556 , 2022.

Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980 , 2014.

Alexander Kirillov, Eric Mintun, Nikhila Ravi, Hanzi Mao, Chloe Rolland, Laura Gustafson, Tete Xiao, Spencer Whitehead, Alexander C Berg, Wan-Yen Lo, et al. Segment anything. arXiv preprint arXiv:2304.02643 , 2023.

Haoyu Li, Qizhi Chen, Yixin Zhang, Tong Yang, and Bin Cui. Stingy sketch: a sketch framework for accurate and fast frequency estimation. Proceedings of the VLDB Endowment , 15(7):1426-1438, 2022.

Haoyu Li, Liuhui Wang, Qizhi Chen, Jianan Ji, Yuhan Wu, Yikai Zhao, Tong Yang, and Aditya Akella. Chainedfilter: Combining membership filters by chain rule. Proceedings of the ACM on Management of Data , 1(4):1-27, 2023.

Haoyu Li, Yuchen Xu, Jiayi Chen, Rohit Dwivedula, Wenfei Wu, Keqiang He, Aditya Akella, and Daehyeok Kim. Accelerating distributed deep learning using lossless homomorphic compression, 2024.

Yujun Lin, Song Han, Huizi Mao, Yu Wang, and William J Dally. Deep gradient compression: Reducing the communication bandwidth for distributed training. arXiv preprint arXiv:1712.01887 , 2017.

Bo Liu, Rachita Chhaparia, Arthur Douillard, Satyen Kale, Andrei A Rusu, Jiajun Shen, Arthur Szlam, and Marc'Aurelio Ranzato. Asynchronous local-sgd training for language modeling. arXiv preprint arXiv:2401.09135 , 2024.

Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101 , 2017.

Todor Mihaylov, Peter Clark, Tushar Khot, and Ashish Sabharwal. Can a suit of armor conduct electricity? a new dataset for open book question answering. In Conference on Empirical Methods in Natural Language Processing , 2018.

OpenAI. Gpt-4 technical report. ArXiv , abs/2303.08774, 2023.

Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. OpenAI blog , 1(8):9, 2019.

Martin Riedmiller and Heinrich Braun. A direct adaptive method for faster backpropagation learning: The rprop algorithm. In IEEE international conference on neural networks , pages 586-591. IEEE, 1993.

Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C. Berg, and Li Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. International Journal of Computer Vision (IJCV) , 115(3):211-252, 2015.

Maarten Sap, Hannah Rashkin, Derek Chen, Ronan LeBras, and Yejin Choi. Socialiqa: Commonsense reasoning about social interactions. arXiv preprint arXiv:1904.09728 , 2019.

Frank Seide, Hao Fu, Jasha Droppo, Gang Li, and Dong Yu. 1-bit stochastic gradient descent and its application to data-parallel distributed training of speech dnns. In Fifteenth annual conference of the international speech communication association , 2014.

Tao Sun, Qingsong Wang, Dongsheng Li, and Bao Wang. Momentum ensures convergence of signsgd under weaker assumptions. In International Conference on Machine Learning , pages 33077-33099. PMLR, 2023.

Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, et al. Llama: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971 , 2023.

Wei Wen, Cong Xu, Feng Yan, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Terngrad: Ternary gradients to reduce communication in distributed deep learning. Advances in neural information processing systems , 30, 2017.

Rowan Zellers, Ari Holtzman, Yonatan Bisk, Ali Farhadi, and Yejin Choi. Hellaswag: Can a machine really finish your sentence? arXiv preprint arXiv:1905.07830 , 2019.

Biao Zhang and Rico Sennrich. Root mean square layer normalization. Advances in Neural Information Processing Systems , 32, 2019.

Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412 , 2017.

Shuxin Zheng, Qi Meng, Taifeng Wang, Wei Chen, Nenghai Yu, Zhi-Ming Ma, and Tie-Yan Liu. Asynchronous stochastic gradient descent with delay compensation. In International Conference on Machine Learning , pages 4120-4129. PMLR, 2017.

A Additional Experiment Details

In this section, we provide additional experiment details.

CIFAR Experiments We list the optimal hyperparameters selected for each method from Figure 2 in Table 4. The learning rates are selected from { 0 . 00005 , 0 . 001 , 0 . 005 , 0 . 01 } and the weight decays are selected from { 0 . 0005 , 0 . 001 , 0 . 005 } . For each experiment, we use a cosine learning rate scheduler and run for 200 epochs, and we ensure that in each epoch, each local worker sees the entire dataset once.

B Theory

This section is focusing on the proof of Lion dynamics, and will be organized into these folders:

Phase I:

-Constraint enforcing: Discrete time

Phase II:

-Majority Voting convergence

-Avg update convergence

-Global LION convergence

In line with the behavior observed in the global Lion approach, Lion under a distributed setting also exhibits the two phases. In Section B.1, we show that converging to box can be exponentially fast using our Algorithm 1. We start with introducing a notion of KKT score function that quantifies a stationary solution to the box constrained optimization problem (6) in Section B.2. Building on this, we then proceed to analyze the convergence in terms of the KKT score function for the majority vote (Section B.2.1), averaging (Section B.2.2), and global LION strategies (Section B.2.3).

B.1 Phase I: Constraint Enforcing

We study phase I in this section. We show that when the constraint is not satisfied, both variants of distributed Lion decrease the distance to the feasible set exponentially fast.

Theorem B.1 (Phase I) . Assume f : R d → R is L -smooth, β 1 , β 2 ∈ (0 , 1) , and β 2 > β 1 , and ϵ, λ > 0 , and 1 -ϵλ ∈ (0 , 1) . Let ( x t ) t ≥ 0 be generated by Algorithm 1. Define F = { x : ∥ λx ∥ ∞ ≤ 1 } , and dist( x t , F ) = inf z ∈F ∥ z -x t ∥ w.r.t. any norm ∥·∥ .

For any two non-negative integers s ≤ t , then ∀ s ≤ t , we have

Rewrite the update into the following form:

Define w s → t = (1 -ϵλ ) t -s . Unrolling this update yields,

We have z s → t ∈ F since -∆ t /λ ∈ F . For any ϵ > 0 , let ˆ x s ∈ F be the point satisfying ∥ ˆ x s -x s ∥ ≤ dist( x s , F ) + η . Hence, we have

As η → 0 , we achieve the desired result.

B.2 Phase II

We study the convergence of Phase II in this section. We begin by defining a KKT score function to quantify stationary solutions for the box-constrained optimization problem discussed in Section B.2. Following this, we analyze convergence through the KKT score across majority vote (Section B.2.1), averaging (Section B.2.2), and global Lion strategies (Section B.2.3).

First, we list the following assumptions used in our proof.

Assumption B.2 (Smooth and Differentiable f ) . Function f ( · ) is differentiable and L-smooth.

Assumption B.3 (Variance bound) . D i is i.i.d. drawn from a common distribtion π ∗ , and the stochastic sample ξ i ∼ D i is i.i.d. and upon receiving query x ∈ R d , the stochastic gradient oracle gives us an independent unbiased estimate ∇ f ( x ; ξ i ) from the i -th worker that has coordinate bounded variance:

Assumption B.4 (Bias Correction) . Consider the sequence { m i t } t> 0 ,i ∈ [ N ] generated by Algorithm 1, E [ ˜ m i t ] / E [sign( ˜ m i t )] ≥ 0 .

Here we define the a KKT score function for box constrained problem (6):

Proposition B.5. Assume f is continuously differentiable, λ > 0 , and ∥ λx ∥ ∞ ≤ 1 . Then S ( x ) = 0 implies a KKT stationary condition of min x f ( x ) s.t. ∥ λx ∥ ∞ ≤ 1 .

Proof. We will verify that S ( x ) = 0 coincides with the first order KKT conditions of the box constrained optimization problem (6).

Recall the box constrained problem in (6), we can rewrite it into the following formulation:

Let µ = ( µ 1 , µ 2 , · · · , µ d ) ⊤ and ˜ µ = (˜ µ 1 , ˜ µ 2 , · · · , ˜ µ d ) ⊤ , then its first order KKT stationary condition can be written as:

Expressing S ( x ) element-wisely, we obtain:

where x k denotes the k -th element of vector x . Since ∥ λx ∥ ∞ ≤ 1 , we have S k ( x ) ≥ 0 , because

Hence, if S ( x ) = 0 , we have S k ( x ) = 0 for each component k . It means that we have either sign( ∂ x k f ( x )) + λx k = 0 or ∂ x k f ( x ) = 0 for each coordinate k .

There are two primary cases to consider for each k :

Case I : ∂ x k f ( x ) = 0 . This suggests that we reach a stationary condition of f ( x ) w.r.t. coordinate x k , and the KKT condition is satisfied in this case with µ k = ˜ µ k = 0 .

Case II : sign( ∂ x k f ( x )) + λx k = 0 , it follows that x k = -1 λ sign( ∂ x k f ( x )) .

-if sign( ∂ x k f ( x ) = 1 , then ∂ x k f ( x ) ≥ 0 , and the KKT condition is satisfied with µ k = 0 and ˜ µ k = ∂ x k f ( x ) /λ

-if sign( ∂ x k f ( x )) = -1 , then ∂ x k f ( x ) ≤ 0 , and the KKT condition is satisfied with ˜ µ k = 0 and µ k = ∂ x k f ( x ) /λ .

It turns out the two cases above exactly covers the KKT stationary solution pair ( x, µ, ˜ µ ) of the box constrained problem in (6).

In conclusion, S ( x ) = 0 signifies reaching a stationary point of the bound-constrained optimization problem, as formulated in (6), providing critical insights into the convergence behavior of the algorithm under consideration.

B.2.1 Majority Vote

Assume f : R d → R is L -smooth, and N is the number of workers, on the i -th worker, consider the following scheme based on the majority vote:

Theorem B.6 (Convergence in Phase II) . Assumption B.2 B.3 B.4 hold, consider the scheme in Algorithm 11, and β 1 , β 2 ∈ (0 , 1) , and β 2 > β 1 , and ϵ, λ > 0 . ∥ λx 0 ∥ ∞ ≤ 1 .

We have

Proof. Following Theorem B.1 from phase 1, once we have ∥ λx 0 ∥ ∞ ≤ 1 , we stay within the constraint set with ∥ λx t ∥ ≤ 1 for all subsequent time t ≥ 0 .

For notation, write ˜ M t +1 = ∑ N i =1 sign( ˜ m i t +1 ) . This yields x t +1 = x t -ϵ sign( ˜ M t +1 ) -ϵλx t . We have

where we used ∥ x t +1 -x t ∥ 2 = ϵ 2 ∥ ∥ sign( ˜ M t +1 ) + λx t ∥ ∥ 2 ≤ 4 ϵ 2 d , because ∥ λx t ∥ ∞ ≤ 1 .

∥ ∥ By Assumption B.3, ˜ m 1 t +1 , ˜ m 2 t +1 , · · · , ˜ m N t +1 are i.i.d., so E [ ˜ m i t +1 ] and E [sign( ˜ m i t +1 )] don't depend on i . Hence we can define R t +1 = E [ ˜ m i t +1 ] / E [sign( ˜ m i t +1 )] , where the division operation is element wise, so R t +1 ∈ R d .

̸

By Assumption 3.3, R t is non-negative, one special case for the ratio R t is when E [sign( ˜ m i t [ k ])] = 0 , yet E [ ˜ m i t [ k ]] = 0 , leading to R t [ k ] = + ∞ for k ∈ [ d ] . In such instance, P ( ˜ m i t [ k ] > 0) = 1 / 2 derived from the equation E [sign( ˜ m i t [ k ])] = 2 P ( ˜ m i t [ k ] > 0) -1 = 0 , for k ∈ [ d ] .

First, recognizing that E [sign( ˜ M t [ k ])] = 0 is straightforward as we model it as a binomial distribution with success probability p = 1 / 2 for t > 0 . This leads to the result E ∇ f ( x t )[ k ] ( sign( ∇ f ( x t )[ k ]) -sign( ˜ M t [ k ]) ) = E |∇ f ( x t )[ k ] | .

Given that E [ X ] = arg min z E ∥ X -z ∥ 2 defines the expectation of a random variable X as the value z minimizes the expected euclidean distance to X , and the median X = arg min z E ∥ X -z ∥ 1 defines the median as the value z minimizing the expected absolute distance to X , for a R.V. X in R , recall our case where P ( ˜ m i t [ k ] > 0) = 1 / 2 , which is equivalent to that the median is 0 . From this, it follows that

To bound the last term in (12) ⟨∇ f ( x t ) , sign( ∇ f ( x t )) -sign( ˜ M t +1 ) ⟩ , we follow a structured approach. Here's an outline for bounding this term:

To bound the last term in Equation (12), ⟨∇ f ( x t ) , sign( ∇ f ( x t )) -sign( ˜ M t +1 ) ⟩ , we follow a structured approach:

Transform Inner Product into Norm of Difference : Using Lemma B.8 to convert the inner product ⟨∇ f ( x t ) , sign( ∇ f ( x t )) -sign( ˜ M t +1 ) ⟩ into the norm of a difference.

Introduce R t as a De-bias Ratio : R t is defined to adjust or correct for any bias in the expected value of ˜ m i t and the expected sign of ˜ m i t as in Assumption B.4.

Handle Cases of R t Separately : Given the possibility of R t [ k ] = + ∞ , it's essential to treat the scenarios of R t [ k ] < + ∞ and R t [ k ] = + ∞ with separate proofs.

For R t [ k ] < + ∞ , standard bounding techniques can be applied, potentially leveraging properties of R t to establish a finite upper bound.

For R t [ k ] = + ∞ , it's actually bounding ∥∇ f ( x t ) ∥ . This can be bounded by the variance of the stochastic gradient g i t .

Merge Cases with Finite ρ t Replacing R t : After separately proving bounds for each case of R t , the results are unified by substituting R t with a finite ρ t , where ρ t serves a similar purpose but ensures a manageable, finite adjustment.

Case I (Finite R t +1 )

The first step is to expand this inner product, we have

By definition of R t , it is a debiasing ratio between E [ ˜ m i t +1 ] and E [sign( ˜ m i t +1 )] , so we construct a difference between 1 N ∑ N i =1 sign( ˜ m i t +1 [ k ]) and 1 N ∑ N i =1 ˜ m i t +1 [ k ] by decoupling the difference between ∇ f ( x t )[ k ] /R t +1 [ k ] and 1 N sign( ˜ m i t +1 [ k ]) .

The first term E ∣ ∣ ∣ ∇ f ( x t )[ k ] -1 N ∑ N i =1 ˜ m i t +1 [ k ] ∣ ∣ ∣ doesn't depend on R t +1 , we can bound this term across d coordinates using Lemma B.10:

The second term E R t +1 [ k ] ∣ ∣ ∣ 1 N ∑ N i =1 ˜ m i t +1 [ k ] /R t +1 [ k ] -1 N ∑ N i =1 sign( ˜ m i t +1 [ k ]) ∣ ∣ ∣ can be decoupled into the variance of 1 N ∑ N i =1 sign( ˜ m i t +1 [ k ]) and the variance of 1 N ∑ N i =1 ˜ m i t +1 [ k ] :

Now we have got the variance of 1 N ∑ N i =1 sign( ˜ m i t +1 [ k ]) and the variance of 1 N ∑ N i =1 ˜ m i t +1 [ k ] , let us bound them one by one:

The variance of 1 N ∑ N i =1 ˜ m i t +1 [ k ]

where C = β 2 1 (1 -β 2 ) 1 1+ β 2 +(1 -β 1 ) 2 .

In above, we have the bound of the last term in (12) ⟨∇ f ( x t ) , sign( ∇ f ( x t )) -sign( ˜ M t +1 ) ⟩ :

Case II (Infinite R )

From our discussion above, we know that P ( ˜ m i t [ k ] > 0) = 1 / 2 since E [sign( ˜ m i t [ k ])] = 2 P ( ˜ m i t [ k ] > 0) -1 = 0 , where k ∈ [ d ] . For notion, write D = { j ∈ [ d ] | E [sign( ˜ m i t +1 [ j ])] = 0 } . In this case, we have

So, the inner product ⟨∇ f ( x t ) , sign( ∇ f ( x t )) -sign( ˜ M t +1 ) ⟩ is still bounded. Hence we can merge both cases into a unified bound by simply replacing R t by ρ t :

Adding one constant D ≥ 1 to make the bound in finite case adpative to infinite case:

Hence,

Finally, we have the bound for both cases:

Then we have

Hence, a telescope yields

where ρ = max 1 ≤ t ≤ T ∥ ρ t ∥ .

Lemma B.7. Let ( X,Y ) is a joint random variable on R d × R d . For any constant a ∈ (0 , + ∞ ) , we have √

Proof. Without loss of generality, set a = 1 .

where ∥·∥ 1 is the ℓ 1 norm and ∥·∥ denotes the Euclidean norm.

Lemma B.8. For any x, y ∈ R , we have

Lemma B.9. Let X be a random variable in R , we have E ∥ sign( X ) -E [sign( X )] ∥ 2 < 1 .

Proof. The result is a direct derivation from Bernoulli distribution's variance,

Lemma B.10. Following the same setting in Theorem B.6, we have

Proof. We use the notions: g i t := ∇ f ( x t ; ξ i t ) , M t = 1 N ∑ N i =1 m i t , ε t := M t - ∇ f ( x t ) , g t = 1 N ∑ N i =1 g i t , δ t := g t -∇ f ( x t ) , and s t = ∇ f ( x t -1 ) -∇ f ( x t )

That is

Under the L -smoothness assumption B.2:

where ε is the step size. Using mathematical induction, we have

By taking the norms of both sides of the above equation and using the strong bound 13 we obtain

Taking expectations on both sides,

Note that r.v.s ( δ i ) 1 ≤ i ≤ t are mean zero, using B.11, we have

Hence,

Note that M 0 = 0 under our setting, so ε 0 = -∇ f ( x 0 ) , we have

Lemma B.11 (Cumulative error of stochastic gradient [4]) . Assume the same settings as in Theorem B.6. Define Y k := ∑ k l =1 α ℓ δ l where δ t := g t -∇ f ( x t ) with g t = ∑ N i =1 g i t and g i t := ∇ f ( x t ; ξ i t ) following the update in (11) , and { α ℓ : ℓ = 0 , 1 , . . . } is a deterministic sequence. Then Y k is a martingale, and

Proof. We simply check the definition of martingales. First, we have

Second, again using the law of total probability,

This completes the proof that it is a martingale. We now make use of the properties of martingale difference sequences to establish a variance bound on the martingale.

As a direct result of Lemma B.11, we have the following.

Lemma B.12. Under the same settings as in Theorem 3.6, we have

Proof.

Note that

By using lemma B.11, we have

B.2.2 Averaging Update Convergence

Assume f : R d → R is L -smooth, N is the number of workers, on the i -th worker, consider the following scheme based on the averaging:

Theorem B.13 (Convergence in Phase II) . Under Assumption B.2 B.3, consider the scheme in (15) , and β 1 , β 2 ∈ (0 , 1) , and β 2 > β 1 , and ϵ, λ > 0 . ∥ λx 0 ∥ ∞ ≤ 1 . We have

Proof. For notation, write ˜ M t +1 = ∑ N i =1 sign( ˜ m i t +1 ) . This yields x t +1 = x t -ϵ ˜ M t +1 -ϵλx t . Following Theorem B.1 from phase 1, once we have ∥ λx 0 ∥ ∞ ≤ 1 , we stay within the constraint set with ∥ λx t ∥ ≤ 1 for all subsequent time t ≥ 0 .

Following a similar procedure in B.6, we have

Let us bound the last term ⟨∇ f ( x t ) , sign( ∇ f ( x t )) -˜ M t +1 ⟩ ,

Then we have

Hence, a telescope yields

B.2.3 Global Lion Convergence

Assume f : R d → R is L -smooth, N is the number of workers, on the i -th worker, consider the following scheme based on the global Lion:

Theorem B.14 (Convergence in Phase II) . Under Assumption B.2 and B.3, consider the scheme in (16) , and β 1 , β 2 ∈ (0 , 1) , and β 2 > β 1 , and ϵ, λ > 0 . ∥ λx 0 ∥ ∞ ≤ 1 . We have

Proof. For notation, write ˜ G t +1 = 1 N ∑ N i =1 ˜ m i t +1 . This yields x t +1 = x t -ϵ sign( ˜ G t +1 ) -ϵλx t . Following Theorem B.1 from phase 1, once we have ∥ λx 0 ∥ ∞ ≤ 1 , we stay within the constraint set with ∥ λx t ∥ ≤ 1 for all subsequent time t ≥ 0 .

Following the same procedure in B.6, we have

Then we have

Hence, a telescope yields

NeurIPS Paper Checklist

1. Claims

Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?

Answer:[Yes]

Justification: The claims are supported with theoretical and empirical results.

2. Limitations

Question: Does the paper discuss the limitations of the work performed by the authors?

Answer: [Yes]

Justification: In the Conclusion section, we mentioned that Distributed Lion can be further improved when combined with compression techniques. Currently, a limitation is that D-Lion (Avg) and D-Lion (MaVo) perform inconsistently across datasets and benchmarks, and it will be good to understand why in future work.

3. Theory Assumptions and Proofs

Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?

Answer: [Yes]

Justification: We list our assumptions and results explicit in the theory section.

4. Experimental Result Reproducibility

Question: Does the paper fully disclose all the information needed to reproduce the main experimental results of the paper to the extent that it affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?

Answer: [Yes]

Justification: We provide the benchmark, algorithm, and hyperparameters for reproducing our results.

5. Open access to data and code

Question: Does the paper provide open access to the data and code, with sufficient instructions to faithfully reproduce the main experimental results, as described in supplemental material?

Answer: [NA] .

Justification: All the data we use are public. We will release code upon acceptance.

6. Experimental Setting/Details

Question: Does the paper specify all the training and test details (e.g., data splits, hyperparameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?

Answer: answerYes

Justification: We provide the details for training and testing in the experiment section for reproducing our results.

7. Experiment Statistical Significance

Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?

Answer: [NA] .

Justification: We average the results over 3 seeds and report the mean in Figure 2 for the CIFAR experiment. But for larger scale experiment, it is extremely computationally expensive to conduct the experiments multiple times, and it is known that the result is relatively stable. Hence we only run once for each large-scale experiment.

8. Experiments Compute Resources

Question: For each experiment, does the paper provide sufficient information on the computer resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?

Answer: [Yes]

Justification: We provided how many workers are needed for each experiment, the GPU resource can be arbitrary as long as it fits in memory.

9. Code Of Ethics

Question: Does the research conducted in the paper conform, in every respect, with the NeurIPS Code of Ethics https://neurips.cc/public/EthicsGuidelines ?

Answer: [Yes]

Justification: We think our paper confirms in every respect with the Code of Ethics.

10. Broader Impacts

Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?

Answer: [Yes]

Justification: We do not think our work leads to any negative societal impact.

11. Safeguards

Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?

Answer: [NA] .

Justification: We think the paper poses no such risks.

12. Licenses for existing assets

Question: Are the creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?

Answer: [Yes]

Justification: we cite the data and benchmarks we use, and the baseline methods we compare against.

13. New Assets

Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?

Answer: [NA] .

Justification: The paper does not release new assets.

14. Crowdsourcing and Research with Human Subjects

Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?

Answer: [NA] .

Justification: The paper does not involve crowdsourcing nor research with human subjects.

15. Institutional Review Board (IRB) Approvals or Equivalent for Research with Human Subjects

Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?

Answer: [NA] .

Justification: The paper does not involve crowdsourcing nor research with human subjects.

Peer reviews:
{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThe paper introduces Distributed Lion, a variant of the Lion optimizer, tailored for distributed training environments. Lion, known for its memory and computational efficiency, is adapted to reduce communication costs between workers and a central server. This is achieved by communicating binary or low-precision vectors rather than high-precision floating-point vectors. The paper presents theoretical convergence properties and empirical results that demonstrate Distributed Lion’s robustness and efficiency across various tasks, worker counts, and batch sizes. It shows comparable performance to standard Lion or AdamW optimizers but with significantly reduced communication bandwidth.\n\nSTRENGTHS:\n+ Innovation in Communication Efficiency: The use of binary or low-precision vectors for communication significantly reduces bandwidth requirements, which is a critical factor in distributed training.\n+ Theoretical Validation: The paper provides a solid theoretical foundation confirming the convergence properties of Distributed Lion.\n+ Empirical Evidence: Extensive experiments demonstrate the robustness and efficiency of Distributed Lion across a variety of tasks, making a strong case for its practical applicability.\n\nWEAKNESSES:\n- Incompatible with Allreduce: after converting the gradients to binary or low-precision, Allreduce cannot be used for gradient synchronization. One of my concerns is about its communication efficiency in real-world distributed systems, especially training with a high number of workers.\n- Computation Overhead: While the communication cost is reduced, the overhead of converting updates to binary or low-precision vectors and back might offset some of the gains in certain scenarios. It helps if the end-to-end training throughput comparison is reported.\n\nQUESTIONS:\nWhat is the fundamental difference between distributed Lion and SIGNUM-like algorithms?\n\nLIMITATIONS:\nN/A", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 2, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-06-26"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nLarge-scale AI model training has increasingly higher requirements on time, cost and environmental impact, so it is crucial to develop efficient optimizers. As an emerging optimizer, Lion optimizer has advantages in memory, computation and sample efficiency compared with AdamW. Distributed Lion: The paper proposes Distributed Lion, which is an innovative adaptation of Lion optimizer in distributed training environment. Using symbolic operations in Lion, Distributed Lion only requires binary or low-precision vectors to be communicated between working nodes and central servers, significantly reducing communication costs.\n\nSTRENGTHS:\n1. Distributed Lion significantly reduces communication overhead by communicating only binary or low-precision vectors between workers, which is particularly beneficial for large-scale distributed training.\n2. The paper provides theoretical analysis to prove the convergence of Distributed Lion.\n3. Experimental results show that Distributed Lion can achieve comparable performance to the standard Lion or AdamW optimizer while reducing communication bandwidth.\n\nWEAKNESSES:\n1. The actual updating on local worker parameters is gradients, while the communicated message is signs. While the theoretical analysis shows this updating can guarantee the convergence, the actual updating style looks like the quantization. The important baselines like QSGD and SignSGD are missed. \n2. The performance of Distributed Lion can be sensitive to hyperparameter choices, especially those related to communication and aggregation strategies.\n3. The code is not provided. Thus the reproducibility of the experiments is weakened.\n4. The experiment performance on the CIFAR-10 is very low. Considering that the well-known validation performance of CIFAR-10 can be achieved as 94%, the proposed results are around 90%. Why the performance decreases?\n5. The important baseline SGD with momentum is not provided.\n6. The convergence curves on training with ImageNet and OpenWebText are not provided. This makes it hard to identify the convergence speedup between different optimizers.\n7. The wall-clock time is not provided. The quantization operation and the majority vote require extra time, it will be better to show this optimizer can reduce the real-world throughputs.\n\nQUESTIONS:\n1. How do you ensure that the hyper-parameters of different optimizers are set as a suitable combination for them? Suitable hyper-parameter settings can ensure the fair comparison.\n\nIf the above weaknesses and questions are addressed, I'm happy to raise the score.\n\nLIMITATIONS:\nTwo minor points considering the realistic device constraints:\n1. The experiment scalability is with 32 GPUs, which is not a large scale distributed training setting.\n2. The training model is small-scale with less than 1B parameters.", "TITLE": "Official Review", "RECOMMENDATION": 5, "REVIEWER_CONFIDENCE": 5, "SOUNDNESS_CORRECTNESS": 2, "DATE": "2024-06-28"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper extends the Lion optimizer to data parallel distributed training. Unlike optimizers like SGD and Adam, the binary update in Lion can be exploited to minimize the communication. They investigate two cost effective methods for the communication of  binary updates; averaging and majority vote. Experimental results show that both methods yield competitive results to global Lion and AdamW.\n\nSTRENGTHS:\nThe convergence analysis provided in Section 3 gives some reassurance to this non-conventional optimization method. Results are promising and experimental conditions seem adequate.\n\nWEAKNESSES:\nThe proposed method is a trivial extension of Lion to data parallel distributed training, so the only interesting contribution seems to be the convergence analysis. \n\nThe main contribution of this work is supposed to be the reduction of communication overhead, but there are no results showing the actual breakdown of the training time. Therefore, it is not possible to determine whether the reduction of communication volume is actually contributing to the reduction of the overall training time. Since the results seem to vary quite a bit for different models and datasets, such information is useful for determining whether the experiments are conducted for configurations that actually show a significant impact on the training time. There remains a possibility that the current method does not work as well for extremely large models trained with ZeRO 3 data parallelism, which is where the communication overhead really becomes a problem.\n\nQUESTIONS:\nHow different are the global binary updates between averaging and majority vote?\nAre the results similar because they are similar or despite their large difference?\n\nLIMITATIONS:\nThe limitations pointed out above are not explicitly stated in the paper.", "TITLE": "Official Review", "RECOMMENDATION": 6, "REVIEWER_CONFIDENCE": 4, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-12"}

{"IS_META_REVIEW": false, "comments": "SUMMARY:\nThis paper proposes Distributed Lion, a new variant of Lion optimizer for distributed training. The proposed algorithm only requires to communicate binary or lower-precision vectors between workers to the center server, significantly reducing the communication cost. The theoretical analysis proves the convergence of the proposed algorithms. The empirical results show that the proposed algorithms have comparable model performance on CV/NLP applications but with significantly less communication overhead compared to the baselines.\n\nSTRENGTHS:\n1. This paper proposes Distributed Lion, a new variant of Lion optimizer for distributed training.\n\n2. The proposed algorithm only requires to communicate binary or lower-precision vectors between workers to the center server, significantly reducing the communication cost.\n\n3. The theoretical analysis proves the convergence of the proposed algorithms. The empirical results show that the proposed algorithms have comparable model performance on CV/NLP applications but with significantly less communication overhead compared to the baselines.\n\nWEAKNESSES:\n1. According to Assumption 3.1, the convergence requires i.i.d. local datasets, while real-world distributed training typically uses non-i.i.d. local data.\n\n2. In the empirical results, there seems to be no wall-clock time for training is reported. Note that the overall goal of communication reduction is to reduce the training time. Thus, it is important to report loss/acc vs. wall-clock time in the experiments.\n\nQUESTIONS:\n1. Is it possible to provide a convergence analysis based on non-i.i.d. data?\n\n2. For the experiments, are the local dataset on each worker i.i.d. or non-i.i.d.?\n\n3. Since the proposed algorithm can compress the communication to an extreme extend, I wonder whether it could also be applied to the federated learning scenario, where the local datasets are not only non-i.i.d., but also highly heterogeneous.\n\n4. Is there any empirical results reporting wall-clock time of training?\n\nLIMITATIONS:\nThe limitations are well discussed and addressed in this paper.", "TITLE": "Official Review", "RECOMMENDATION": 7, "REVIEWER_CONFIDENCE": 3, "SOUNDNESS_CORRECTNESS": 3, "DATE": "2024-07-12"}