Alternating Updates for Efficient Transformers
Authors: Cenk Baykal
Dylan J Cutler
Nishanth Dikkala
Nikhil Ghosh
Rina Panigrahy
Xin Wang
Venue: NeurIPS 2023 spotlight (2023)
Keywords: efficiency
efficient transformers
TL;DR: We introduce a method to increase the capacity of modern transformers without significantly increasing the computational burden.

Abstract: It has been well established that increasing scale in deep transformer networks leads to improved quality and performance. However, this increase in scale often comes with prohibitive increases in compute cost and inference latency. We introduce Alternating Updates (AltUp), a simple-to-implement method to increase a model's capacity without the computational burden. AltUp enables the widening of the learned representation, i.e., the token embedding, while only incurring a negligible increase in latency. AltUp achieves this by working on a subblock of the widened representation at each layer and using a predict-and-correct mechanism to update the inactivated blocks. We present extensions of AltUp, such as its applicability to the sequence dimension, and demonstrate how AltUp can be synergistically combined with existing approaches, such as Sparse Mixture-of-Experts models, to obtain efficient models with even 
higher capacity. Our experiments on benchmark transformer models and language tasks demonstrate the consistent effectiveness of AltUp on a diverse set of scenarios. Notably, on SuperGLUE and SQuAD benchmarks, AltUp enables up to $87\%$ speedup relative to the dense baselines at the same accuracy.

Alternating Updates for Efficient Transformers
Cenk Baykal" Google Research
Dylan Cutler Google Research
Nishanth Dikkala
Google Research
Nikhil Ghosh UC Berkeley
Rina Panigrahy
Xin Wang Google Research
Google Research
Abstract
It has been well established that increasing scale in deep transformer networks leads to improved quality and performance. However, this increase in scale often comes with prohibitive increases in compute cost and inference latency. We introduce Alternating Updates (AltUp), simple-to-implement method increase model's capacity without the computational burden. AltUp enables the widening of the learned representation, i.c., the token embedding, while only incurring negligible increase in latency. AltUp achieves this by working representation at each layer and using a predict-an serdict-and-coo and-correct mechanism to update the inactivated blocks. We present extensions of AltUp, such its applicability to the sequence dimension, and demonstrate how AltUp can be synergistically combined with existing approaches, such Sparse Mixture-of -x-peetssss models, obtain efficient models with even higher capacity. Our experiments on benchmark transformer models and language tasks demonstrate the consistent effectiveness AltUp on a diverse set of scenarios. Notably, on SuperGi.UF and SQuAD benchmarks, AltUp enables up 87% speedup relative the dense baselines the same accuracy.
subblock of the widened
Introduction
Contemporary machine learning models have been remarkably successful in many domains, ranging from natural language [6, 20] to computer vision [56, 40]. Many of these successes have come in part through sheer scale. A vast amount of empirical studies justify the conventional wisdom that bigger (models and data sets) is better [19, 24]. Accordingly, state-of-the-art Transformer [48] models often contain billions of parameters and are trained for weeks enormously large data sets using thousands AI accelerators. Their immense size leads to prohibitive compute and energy costs [36] and prevents their deployment to resource-constrainee applications [31].
To alleviate these costs and enable scalability of modern Transformers, a recent line of works have proposed techniques to increase the capacity of models without drastically increasing the computational costs via conditional computation. A notable paradigm is sparsely-activated networks, such as Mixture-of-FF Lixture-of-Expertt of-Experts (MoE) models [11, 59, 35, 1, 28, 43, 45]. The main idea of MoE is to effectively widen each network layer by accessing dynamically invoked parameters, i.e., experts, where each expert corresponds to small subset of disjoint parameters that can be acted on by the input. During training and inference, a given input to the network is routed small subset of experts (parameters) to compute the output. As result, the computation cost remains small relative to the total number of parameters. This scheme enables models with higher capacity with only relatively small increase in computation.
"Correspondence to baykalc@google.co
Work done intern at Google Research
37th Conference on Neural Information Processing Systems (NcurIPS 2023).

---

While prior approaches in conditional computation have predominantly focused on the processing power of transformers. there is research gap in efficiently incorporating widened learned represen- tations. Recent works have empirically and theoretically established that wider token representation (i.e., a larger model dimension) helps in learning more complicated functions by enabling more information to be packed in the representation vectors [19, 24, 54]. This phenomenon is also evident in modern architectures increasing capability. For instance, the representation dimension grows from 512 (small) to 768 (base) and 1024 (large, 3B, and IBB) in T5 models [37], and from 4096 (8B) to 8192 (64B) and 18432 (540B) in PaLM models [6]. A widened representation dimension also significantly improves performance for dual encoder retrieval models [33, 34]. However, naively widening the learned representation requires accordingly increasing the model dimension (see Fig. 1), which quadratically increases the amount of computation in the feedforward computation. In light of the above, natural question arises: can we leverage the benefit of wider representations without incurring the additional cost of wider transformer layers?
lintweight coreccor
lightweight predictor
transformer layer (Ix width)
transformer layer (2x width)
X
transformer layer (2x width)
transformer layer (tx width)
lightweight predictor
embedding layer (2x width)
embedding leyer (2x wiath)
(a) 2x Wider Model
(b) 2x Wider Model with AltUp
Figure 1: An illustration of widening the token representation without (left) and with Alternating Up- dates (right). This widening causes a near-quadratic increase in computation in a vanilla transformer due to the increased layer width. In contrast, Alternating Updates keeps the layer width constant and efficiently computes the output by operating on a sub-block of the representation at each layer.
In this paper, we address this research gap by introducing Alternating Updates (AltUp), technique to incorporate wider representations in a simple and efficient way. AltUp operates by partitioning the widened representation vector into blocks, processing only single block each layer, and using an efficient prediction mechanism to infer the outputs of the other blocks (see Fig. 1). Processing single block in each transformer layer enables AltUp to simultaneously keep the model dimension, hence the computation cost, constant and take advantage of using an increased token dimension. Unlike prior approaches, e.g., Sparse Mixture of Experts, AltUp is easy to implement, requires minimal hyperparameter tuning, and does not necessitate sharding. Moreover, since AltUp focuses on increasing the representation dimension, can be applied synergistically with orthogonal techniques like MoE [60] to obtain complementary performance gains.
In particular, our contributions are:
1. We introduce Alternating Updates (AltUp) bridge the research gap in efficiency techniques by enabling wider representations with little additional computation cost. AltUp is simple- im-mleeeenn, requires minimal hyperparameter tuning, and does not necessitate sharding.
2. We develop two notable extensions of AltUp: (i) Recycled-AltUp. a faster variant of AltUp that requires virtually no additional learnable parameters and (ii) Sequence-AliUp, an extension of the AltUp idea to the sequence dimension.

---

3. We present an extensive evaluation of AltUp on T5 models on various benchmark language tasks. Our experimental results show that AltUp and its variants uniformly lead to models with improved speed-accuracy trade-offs. Notably, on SuperGI. .UE and SQuAD benchmarks, AltUp enables up 87% speedup relative to the dense baselines at the same accuracy.
2
Related Work
Prior work rich with a diverse set of techniques to increase the efficiency of contemporary transformer models. Here, we cover the most relevant subset of state-of-the-art techniques and refer the interested reader to [47] for a more comprehensive survey.
Recent works have introduced extremely large, yet scalable models with the use of conditional routing of imputs learnable subset of parameters. These sparsely-activater models have achieved state-of- the-art performance on various benchmarks [11] and exhibit favorable theoretical properties [4, 1]. Notably, the Sparse Mixture of Experts (SMoE) [45, 57, 22] family of models use learned softmax probability distribution to conditionally direct the computation to experts, i.c., subsets of network parameters. By routing the computation to a small subset of parameters on an input-dependent basis, SMoE leads to higher capacity models with a relatively small and controllable increase in computation. Switch Transformers [12] show that routing to single expert on an input-dependent basis reduces computation and outperforms prior SMoE approaches language tasks. Deja Vu [32] centers around selecting subsets of the attention and MLP parameters to apply for each input (contextual sparsity). Our work is orthogonal to Deja Vu and synergistic with these approaches at large it focuses on conditional computation.
Follow-up work on SMoE include those that improve the load balancing of experts [60, 291, use rein- forcement learning learn the routing function [7], and leverage smooth top-k expert selection [18] (see [11] for survey). Other choices for the routing function include non-learnable ones such as Locality Sensitivity Hashing (LSH) [35] which generally maps similar inputs to the same expert, Hash Layers that use boken-based hashing [43], and language-specing deterministic routing [10]. Residual Mixture of Experts [51] separates the expert weights into input-independen and input-dependent components.
Conditionally accessing external memory another related approach vastly increase model capacity at the cost of relatively small increase in computation [15, 14]. For examples, Memorizing Transformers [53]. Memformer [52], and Product key memory [27] leverage dynamic memory to encode and retrieve relevant information. Additional works include those that use an immensely large untrainable corpus, such as Wikipedia, REALM [17], or a trillion token database, RETRO [2]. These prior works that focus on routing(expert bbased mechanisms often necessitate complicated, sharded implementations due to the sheer number additional parameters that they introduce often on the order of billions. Our work, the other hand, is sinple-to-implement and requires virtually no hyperparameter tuning. Moreover, AltUp can be synergistically combined with sparsely-activated models like MoE to obtain complementary improvements in efficiency.
Additional relevant works in the realm of efficient transformers include Funnel transformers [8], Reformers [25]. Performers [5], Big-Bird [58]. and LongT5 [16], among others. These works notably present methods to reduce the quadratic cost of the attention mechanism of transformers. Another flavor of methods complementary to our work is that of adaptive computation, e.g., CALM [44], DynaBERT [21] CascadeBERT [30] and DeeCap [13], where different amounts of computational power is allotted on an example-specific basis via some type of early-exit strategy. AltUp achieves its efficiency via the orthogonal direction of conditionally leveraging wider token representations, and hence can be easily combined with these efficiency techniques and others (e.g., quantization [55],
Attentot [9]).
3 Alternating Updates
In this section, we introduce the method of Alternating Updates (AltUp), an approach enable increased token dimension with little additional computation cost.
3

---

3.1 Background
At a high level, a standard transformer with L layers generates d-dimensional representation by applying a sequence layers transformer layers Li...., , Lr. as follows. For particular input token within a sequence of length N. the initial token representation
E R is computed by an embedding table lookup. Subsequently, this d-dimensional representation refined across the transformer layers by iteratively computing 24+1 = (x,) for each layer i E [L]; here and throughout [N] denotes the set (1.... ) for N E N. Each transformer layer L; R droodel - Rdmoddal has width dmadel (with dmodel = d in the standard setting) and contains an attention block and a FeedForward (FFN) block. The width of the layer dmodel controls the dimensions of the matrices involved in the attention and FFN blocks. Consequently, the computation cost of attention and FFN scales with ( dmnddl) and O D(Ndmodde) respectively. The output, T2++1 is the output token representation generated by the transformer. This computation is usually followed by linear layer operation that maps from the d-dimensional representation LL+1 to V/l-dimensional logits (in O( (Vld) time), followed by softmax non-linearity to generate the probabilities over the vocabulary V.
Increasing the representation dimension d is a way to enhance the capacity of the transformer model, as wider representation enables the transformer to store richer information about the input and helps in learning more complicated functions [19, 24. 54]. Naively widening the token representation d requires widening each layer as well, since dmodel must match d in a standard transformer model. However, the computation time of each transformer layer grows roughly quadratically with dmadel. notably for relatively short input sequences. This means that, growing the token dimension from to 2d, for example, leads to a model that is at least 2 times (and closer to 4 times for small N) slower than the original model with d-dimensional representation.
3.2 Alternating Updates
The core idea of Alternating Updates is to widen the representation vector, but perform computation with d-dimensional sub-block, and estimate the updated representation using a Tredict-Computt Correct algorithm, as illustrated in Figure I, right. More specifically, AltUp expands the representation width from d to Kd, for integers K > 1, d (for example, K = 2 in Fig. 1), but uses layers of width dmodel = d (not dmodel = Kd) to transform the representation vector. By keeping the width of each transformer layer constant, AltUp avoids incurring the quadratic increase in computation cost that would otherwise be present with naive expansion of the representation.
Alg. 1 depicts the details of the per-layer computation involved in transformer with AltUp with Kd- dimensional representation vector. The input to the AltUp layer is assumed to be the concatenation of d-dimensional contiguous subblocks Zold = concat(z)) 2 .... x xxKK E Rd Inspired by predictor-correeto methods used to solve ordinary differential equations [3]. AltUp first generates a prediction z for each of the subblocks E [K] (Line 1). This prediction takes the form of a mixture of subblocks 3² = Σラ= Pi.j:Cadd where Pr, E R for i E [K] are learnable scalars. Subsequently, one of the K sub-blocks chosen and the computation with the unexpanded transformer layer of width dmodel = d is performed on this sub-block (Line 2). Finally, the result of this computation is used in the correction step to generate the updated representation for each sub-block (Line 3).
Computation time We see from Alg. that AltUp introduces negligible amount of additional computation per layer, as the prediction and correction steps involve only vector addition and scalar- vector multiplications (dd operations). Thus, relative the computation cost of transformer layer with width d (which we incur on Line 2 in AltUp), the cost of AltUp is only an additional (dk3) per token, where d is the original model dimension and K is the factor of increase in the representation dimension (typically K- = 2 or K- = 4, see Sec. 5). This additional (dd)²) cost per token is factor of d smaller than the (dd K2) per token cost of the FFN block alone in a K-times wider transformer layer. In fact, an AltUp layer does not lead to an increased computation time relative to d w-ddt transformer layer asymptotically, since the (dk2) additional cost per token per layer is dominated by the cost of the FFN block as K < d in practice. At a higher level, AltUp requires using an embedding table with width Kd and invoking the final linear operation with K Kdd-dimensional vectors. The initial embedding lookup using wider table and the linear softmax operation with Kd (instead of d) dimensional vectors may lead to a perceptible increase computation time. However, since we only incur this additional cost in the beginning and the end, these factors are often inconsequential,

---

Algorithm Alternating Updates (AltUp) Layer
Input:
Pold concat old: "old" x old) RaK; dk -imeensional input representation vector
to the layer, where s'old _ 1,2, .... K are contiguous sub-blocks of Told-
Output:
Fnew E Raak The layer's dk -imennsoooi output representation.
1: Predict: for each E [K], predict the updated representation with trainable lincar map:
K
Pt.s Pt.j old
where Pi.j E ER, E [K] are trainable scalars.
2: Compute: select sub-block j" E [K] and update this block with L:
F = C(rdla))
3: Correct: for each i E [K], correct the prediction with the computation result:
L 5¹ gg:(0"" 55),
where Ii E I., i E [K] are trainable scalars.
and increasingly so for deeper transformers. Nevertheless, present extension to AltUp in Sec. 4 that avoids this slowdown altogether for specialized applications.
Parameter count AltUp introduces K2 K additional learnable parameters per layer, where K22 is due to pi.j j E [K] and is result of gs. E [K] Since K & d, this is an imperceptible amount of additional parameters per layer in practice. Zooming out, AltUp with an expansion factor of K requires a K d-width embedding table, and consequently requires (K 1)) V additional parameters, where V the vocabulary size. In Sec, 4, we present variant that requires additional embedding parameters to be added to the model.
Memory footprint Due the increase in the representation dimension, AltUp incurs a slightly higher activation memory footprint compared to the baseline model during training. In particular, transformer model with I. layers, model dimension h, batch size b, sequence length 8, and number of attention heads a has an activation memory footprint of shh 5as/h) [26]. Adding AltUp (with K 2) to this model leads to an additional activation memory of (sbh + 22bhh 3sthL, which is less than 10% of the vanilla transformer's. Moreover, significant portion of memory is used by the weight parameters which only increase marginally with AltUp. Model parallelism and techniques such gradient checkpointing, sequence parallelism, or selective activation recomputation can mitigate the memory impact of wider activation vector even further. During inference, the memory footprint of activations is dominated by the Key- Gey-Value cache, which is unaffected by the additional activations introduced by AltUp.
Selection of sub-blocks The selection of the sub-block j* for the computation step in Algorithm I can be any user-specified technique. We consider two simple, deterministic selection methods in this paper and leave more sophisticated methods for future work: (i) same: choose the same sub-block for all the layers in neural network and (ii) alternating (default method): for sequence of layers, alternating through the sub-blocks, that is, if the sub-blocks are indexed with zero-based index, then sub-block l mod K is selected for the computation step for layer E [L]. This alternating selection the default for Algorithm (hence the name Alternating Updates). We compare the two selection methods empirically in the supplementary material and find that using alternating blocks performs better empirically.
4 AltUp Extensions
In this section, we present extensions of the core AltUp idea introduced in the previous section.
5

---

4.1 Recycled-AltUp: Faster AltUp via embedding recycling
The AltUp formulation presented in Sec. 3 adds an insignificant amount of per-layer computa- tion, however, it does require using K K-times wider embedding table. In certain scenarios where the vocabulary V is very large, this may lead to a non-trivial amount of added computa- tion for the initial embedding lookup and the fi- nal linear softmax operation. A colossal vocab- ulary may also lead to an undesirable amount of added embedding parameters. Recycled-AltUp is an extension of AltUp that avoids these com- putational and parameter costs by keeping the embedding table's width d-dimensional.
softmax
final softmma computation with d-dim
d-dim
add chuniss downproject d-dimensional nepe.
subvector
subdivide d-dim chunks.
Output representation (25 dimensional)
transformer layers Alllp (2x)
Embed lookup
Embed looluup
embedding
Recycle by
conccatennting emized
Embed lookup (d-dim)
Figure depicts an example application of Re- eycled AltUp with K = 2. The general idea is
Figure 2: Recycled-AltUp with K
to recycle the initial d-dimensional lookup by replicating the d-dimensional lookup K times. Hence, Recycled-A
virtually adds no addi- tional parameters relative to the baseline width d model. Subsequently, the regular AltUp layers (Alg. 1) are applied until the last linear softmax operation. To avoid the computational cost of this fi- nal operation, Recycled AltUp downprojects the ddddimensional representation vector IL+1 E gd to d-dimensional representation by simply clementwise-adddng the d-dimensional contiguous sub- blocks in ((Kd) time. Applying the linear + softmax operation this down-projected vector implies that the computation cost of this operation is now ((V)d) rather than ((K)Vdd) effectively reducing the amount of computation by O(KK- 1)[Vld). Our results in Sec. 5 show that Recycle-Altu improved speed and reduced parameter count may make it more appealing for certain applications.
4.2 Sequence-AltUp: Extension of AltUp to the sequence dimension
Here, we introduce Sequence-AlUUp a natural extension of Alternating Updates to reduce the apparent sequence length. This extension is motivated by the computation cost associated with the cost of the attention mechanism for long input sequence lengths. Our approach is similar its goal to that of prior techniques focused on designing efficient attention mechanisms to reduce the quadratic dependency of attention cost on the sequence length: Funnel transformers [8], Reformers [25], Performers [5], Big- Big-Bird [58], and LongT5 [16].
Similar to the Funnel transformer [8]. Sequence-AltUp uses a simple striding operation reduce the sequence length. Only sampled tokens are processed by the transformer layer while the rest of the tokens require little computation, leading to a computation cost reduction by a factor of where l: is the stride parameter. In this way, Sequence-AltU) is similar to AltUp in that it applies the predict-compute-coree
the sequence dimension, but it different from AltUp in that it does not increase the sequence dimension.
algorithm (Algorithm
Figure 3 depicts the baseline stride-and-skip technique (left) and the proposed Sequence-AltUp method (right). Given an input sequence of vectors (#o -1. -1) to a transformer layer L, we propose the following extension of Algorithm 1 to reduce the effective sequence length by factor of k. First, we apply lightweight predictor on the full sequence to obtain a predicted output (No, ... - Next, we subsample the input with a fixed stride k and apply L on the subsampled input and get computed output ý (jo, Ök. T2k.... .... (1(())))k)+ Finally, we use lightweight corrector to combine ý and ÿ to form the final output sequence. This design allows unsampled token vectors to obtain contextual information, even though they are not processed by the transformer layer directly-analogous to inactivated sub-blocks in original AltUp. In contrast, a simple stride-and-skip approach (Figure 3, left) lacks the ability to bring contextual information to the skipped tokens. We present the full algorithm pseudocode and implementation details of Sequence-AltUp in the supplementary material.
1)/b)++))
L( Ii:. [[T---

---

transformer
layer
Parsformet bywe
diipping
Food
sokan scpping
0
(a) Stride-and-skiy
(b) Sequence-Alts
Figure 3: An illustration Sequence- (right) and the baseline Stride-and-skin method (left). Sequence-AltUp has virtually the same computation cost as Stride-and-skip. but enables contextual information passing to the skipped tokens.
5 Results
In this section, we apply AltUp and its variants to benchmark language models and tasks. We proceed by outlining the experimental setting below. In Secs. 5.1 and 5.2 we present the performance of AltUp on standard benchmarks with varying configurations and model sizes; in Secs. 5.3 and 5.4 we evaluate the performance of AltUp extensions and demonstrate their effectiveness. We present the full details of our evaluations and additional experimental results in the supplementary; namely, the supplementary contains additional evaluations that demonstrate the synergistic combination of AltUp with other conditional compute techniques, additional finetune results, and complementary ablation studies. Overall, our results consistently show that AltUp and its variants enable sizeable performance gains, e.g., up to 87% faster models, across all evaluations on standard benchmarks.
Setting performed all of our experiments using T5-model architectures [37] of varying sizes (small, base, large, and 3B) which pretrained the C4 dataset for 500, 000 steps with batch size of 256. The pretrained models were then finetuned on either the GLUE [50], SuperGLUE (SG) [49], SQuAD [39] or Trivia-QA (closed-bool book) [23, 42] benchmark tasks for a further 50, 000 steps with batch-size 256. The pretraining task to predict corrupted text spans, and the finetuning tasks are re-cast into text generation tasks. We report both pretraining and finetuning metrics: for pretraining, we report span prediction accuracy on a hold-out validation set, and for finetuning, we follow the same recipe the T5 models, see [37] for more details. The supplementary contains the full details of our evaluations and hyperparameters.
5.1 Alternating updates on benchmarks
First, we investigate whether incorporating AltUp on baseline model leads to an unambiguously better model when we consider the predictive performance and actual observed latency (not theoretical FLOPSS.. To this end, we compare the dense T55-Base/Large/X1 arge/XII. models to models augmented with AltUp with K = 2 on GLUE, SuperGLUE, SQuAD, and TriviaQA (losed-book) finetuning tasks. Figure plots the performance and normalized speed of the evaluated models.
As the figure depicts, models augmented with AltUp are uniformly faster than the extrapolated dense models at the same accuracy. For example, we observe that a T5 large model augmented with AltUp leads 27%, 39%, 87%. and 29% speedup on GLUE, SuperGLUE, SQuAD, and Trivia-Q.. QA benchmarks, respectively. Moreover, we see that AltUp's relative performance improves as we apply to larger models (compare relative speedup of T5 Base + AltUp to that of Large + AltUp). This demonstrates the scalability of AltUp to and its improved performance on even larger models. Overall, AltUp consistently leads models with better predictive performance than the corresponding baseline models with the same speed on all model sizes and benchmarks.
7

---

39% rol speddup
89
XL
27% rel. speedup
Super average score
62
L+ Altupa
L+ ARUp2s
80
87
70
GLUR
86
9% rel. speedup
17% rel. speedup
76
85
B AZx
AlU
3x 10 1X
6'
10' pertitions
2x
1x
10"
Intency
partition))
Inference latency (batch $22
256, 2 data partitions, 4 mode parttion)
(a) GLUE
(b) SuperGLUE
94.5
87 sponoup
94.0
Alt
33
XL
speedup.
93.5
TheaDA (close book)
32
ArtUpzs
83.0
31
62.5
34% rel. speedup
B AltUp2x
speedup
52.0
29
Alxd52x
20
40-1
10
10P
4x10
20
Inference Intency itatch size 256, dota partitons, mode partitins)
Inference Istency (betchricee 258, date paraitone, model partiltons)
(c) SQuAD
(d) Trivia-QA QA
Figure 4: Evaluations of AltUp T5 models of various sizes and popular benchmarks. AltUp consistently leads to sizeable speedups relative to baselines at the same accuracy. Latency is measured on TPUv3 with 8 cores. Relative speedup is defined latency delta divided by AltUp latency.
5.2 AltUp with varying representation size
In the previous subsection, we had used value of K = 2 for the runs with AlIUp. As discussed in Sec. 3, K controls the width of the representation vector, and is the only hyperparameter required by AltUp. Can we obtain even more performant models by using a larger expansion factor K? Here, we compare the performance AltUp with 2 to AltUp with a larger expansion factor 4.
Table I: Performance of AltUp with varying representation dimension scaling parameter K on T5.
Model
Pretrain Accuracy
GL.UF
SG
SQuAD (EM/F1)
TriviaQA (EM/F1)
S
61.21
75.83
59.52
76.44//4..7
19.03/22.88
S AltUp (K=2)
61.86
76.82
59.60
77.51/85.75
19.27/22.98
S AltUp (K=4)
62.00
76.40
59.54
76.38/84. 88.86
28.07/22.84
B
66.42
84.25
73.56
83.78/91.19
23.1/27.50
B + AltUp (K=2)
66.96
85.32
75.80
85 22/2/22.6
24.35 78
B AltUp (K=4)
67.18
84.95
78.91
84.82/92.00
24.41/28. 9.00
L
69.13
87.23
81.21
86.77/93.55
26.15/30.70
L ++ AltUp (K=2)
69.32
88.20
82,75
87.81/96 /9/4999999
27.10/32 /32.04
L. AltUp (K=4)
69.55
88.42
82.94
87 07.59/91.02
27.36/32 /32.//32242
Table summarizes the results with AltUp instantiated on T5 small, base, and large sized models with hyperparameter K = 2 and K = 4. We observe that larger value of K = 4 leads to strict improvements pretrain accuracy over AltUp with K = for all models (Table 1, column 2). This is perhaps intuitive, as wider representation vector enables more information to be learned during the pretraining stage. Interestingly, however, a larger K does not always lead to better finetune performance, especially for smaller models. For example, despite having a worse pretrain accuracy, AltUp with = 2 better than AltUp with = 4 on all finetune tasks GLUE, SuperGLUFF, and SQuAD. We see similar phenomenon occur for the Base model, but here K = 4 is better on GLUE;

---

and on Large, the trend reverses: K = 4 is better on every metric except for SQuAD. Our results indicate that larger value K has potential increase the performance of models on pretrain and fine-tune metrics when AltUp is applied to larger models. We note that there is inherent trade-off between a larger factor K and trainability, however, as a larger value of K leads to less frequent activation of each sub-block which may impair performance. We envision that practitioners can pick a value of other than the default K = 2 to optimize performance on an application-specin basis.
5.3 Recycled-AltUp
Next, we consider the performance of the lightweight extension of AltUp, Recycled-AltUp. introduced in Sec. 4. We apply Recycled-AltU) with K = 2 to TS base, large, and XL models and compare its pretrain accuracy and speed to those of baselines. We record both the training speed and inference speed of the resulting models. Since Recycled-AltUp does not require expansion in the embedding table dimension (see Sec. 4), we remark that the models augmented with have virtually the same number of trainable parameters as the baseline models.
Pretrain Accuracy
Pretrain Accuracy
x
x.9
6.9 10
608x10
608
T5 [B. Lt)
models
LL)
607
x.7
Recycled AltUp
Recycled AltUlp
10
10?
10
10²
Normalized Training Speed
Normalized Inference Speed
Figure 5: Recycled-AltUp T5-B/L/XL compared to baselines. Recycled-AltUp leads to strict improvements in pretrain performance without incurring any perceptible slowdown.
The results of our experiments are shown in Fig. 5. The figures for both the training and inference speed show that models with Recycled-AltUp clearly improve over baselines in pretrain accuracy, without any perceptible slowdown. While Recycled-Alde AAtllpp''ss predictive strength generally falls below that of standard AltUp (cf., pretrain values for AltUp in Table 1), its improved speed and reduced parameter count may make it more suitable for certain applications - see Recycled-AltU) Fine-tune evaluations in the Appendix (Sec. G). We present additional fine-tuning results with Recycled-AltU) in the supplementary material; overall, our results demonstrate that Recycled-AltUp is similarly effective on fine-tuning tasks.
5.4 Sequence-AltUp
Here, we evaluate Sequence-AltUp (from Sec. 4) to reduce the apparent sequence length for the T5 base model. particular, we apply average pooling, stride-andsskig and Sequence-AltU to the encoder layers to reduce the apparent input sequence length. We apply stride-and-skip and
Sequence-AltUi to layers 2,.... L 1 of the encoder, rather than all the layers, with stride length as we found that this configuration results in better accuracy/speed trade-off for both techniques. For average pooling, the sequence length is immutably reduced from the start according to the method.
Table 2: Performance and pretrain speed of different methods for sequence length reduction on T5.
Model
Pretrain Accuracy
Finetune GLUE
Finetune SG
Speed
S
61.21
59.52
76.44/84 /84.97
166.1
(Baseline)
66.42
73.56
83.78 83.78/91.11 /91.19
52.4
Average pooling
63.89
57.85
71.37 71.37/81.88 88.87
91.9
Stride-and-Skip
65.02
65.98
79.72/87 64
79.4
Sequence-Alte
65.39
66.94
81.67 /1.67/89.37 /89.37
74.9

---

Table 2 presents the comparisons on pretrain and finetune metrics (GLUE and SuperGLUB) and pretrain speed (measured by the number of sequences per second per core). The table additionally lists the relevant metrics for T5 Base (which is the baseline model) and T5 Small as reference points the table. We observe that average pooling gives large speed-up, but suffers from severe quality degradation, especially on the finetune metrics where it performs even worse than T5 small. Stride-and-skip and Sequence-AltUp on the other hand, offer an improved quality and speed trade-off relative to T5 Base. In particular, Sequence-Altt is only slightly slower than stride-and-skip (yet, still R 40% faster than the baseline), but is much closer to the baseline model's quality.
Conclusion
We propose the method of Alternating Updates (AltUp) to increase the capacity of modern transformer models without incurring significant increase in latency. Our approach bridges the research gap in efficient transformers by enabling the use of wider token representations without widening the transformer layers. AltUp utilizes lightweight prediction and correction steps update wider representation vector without increasing the transformer layer's computation cost. As a result, achieve strong performance improvements on language modeling and language understanding benchmarks. We present extensions of AltUp that enable additional gains in efficiency. Given its orthogonal scope. AltUp can be synergistically applied with existing techniques like MoE. On popular language understanding and QA benchmarks, AltUp enables up to 87% speedup relative to the dense baselines at the same accuracy.
Limitations and future work A current limitation of the technique we propose is the lack of a deep theoretical understanding of its properties due to the complicated nature of rigorously analyzing transformer models. An interesting open question is whether it would be possible to analyze AltUp by relating its performance to block compressed layer, and transitively relating that to wide layer without block compression. A deeper understanding of AltUp may also shed light on the optimal hyperparameter K on application-specifs basis. In future work, we plan conduct theoretical investigation of alternating updates to develop deeper understanding of its effectiveness across differing applications. We also plan experiment with the use of very large expansion factor K.
Broader Impact Training and deploying modern neural network models consumes colossal amounts of resources. This leads to detrimental effects on the environment and hampers the widespread applicability and democratization of AI. We envision that AltUp can serve as a valuable component of efficient architectures of the future and help alleviate these negative impacts.
Acknowledgments
We would like to thank Ravi Kumar, Erik Vee, and Nikhil Vyas for constructive discussions and their feedback.
References
[1] Cenk Baykal, Nishanth Dikkala, Rina Panigrahy, Cyrus Rashtchian, and Xin Wang. A theoretical view on sparsely activated networks, arXiv preprint arXiv:2208 NXX1:2208.00461, 2022. 1,
[2] Sebastian Borgeaud, Arthur Mensch, Jordan Hoffmann, Trevor Cai, Eliza Rutherford, Katie Millican, George Bm Van Den Driessche, lean-Baptiste Lespiau, Bogdan Damoc, Aidan Clark, et al. Improving language models by retrieving from trillions of tokens. In International Conference on Muchine Leurning, pages 2240- PMLR, 2022. 3
[3] John Charles Butcher. Numerical methods for ordinary differential equations. John Wiley & Sons, 2016.
[4] Zixiang Chen, Yihe Deng, Yue Wu, Quanquan Gu, and Yuanzhi Li. Towards understanding mixture of experts in deep learning. arXiv preprint arXiv:2208. 02813, 2022. 3
[5] Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarlos, Peter Hawkins, Jared Davis, Afroz Mohiuddin, Lukasz Kaiser, et al. Rethinking attention with performers. arXiv preprint arXiv:2009.14794 2020. 3,
10

---

[6] Aakanksha Chowdhery, Sharan Narang, Jacob Devlin, Maarten Bosma, Gaurav Mishra, Adam Roberts, Paul Barham. Hyung Won Chung, Charles Sutton, Sebastian Gehrmann, et al. Palm: Scaling language modeling with pathways. arXiv preprini urXiv:2204.0233 0, 2022. 1,2
[7] Aidan Clark, Diego de Las Casas, Aurelia Guy, Arthur Mensch, Michela Paganini, Jordan Hoffmann, Bogdan Damoc, Blake Hechtman, Trevor Cai, Sebastian Borgeaud, et al. Unified scaling laws for routed language models. International Conference on Machine Learning. pages 4057-4086 PMLR, 2022. 3
[8] Zihang Dai, Guokun Lai, Yiming Yang, and Quoc Le. Funnel-transformer: Filtering out sequential redundancy for efficient language processing. Advances in neural information processing systems, 33:4271-423 -2822, 2020. 3, 6
[9] Tri Dao, Dan Fu, Stefano Ermon, Atri Rudra, and Christopher Ré. Flashattention: Fast and memory-efficient exact attention with io-awareness. Advances Neural Information Processing Systems, 35:16344416359, 2022.
[10] Angela Fan, Shruti Bhosale, Holger Schwenk, Zhiyi Ma, Ahmed Ki-Kis, Siddharth Goyal, Mandeep Baines, Onur Celebi, Guillaume Wenzek, Vishrav Chaudhary, et al. Beyond english- centric multilingual machine translation. Mach. Learn. Res., 22(107): 2021. 3
[11] William Fedus, Jeff Dean, and Barret Zoph. A review of sparse expert models in deep learning. arXiv preprint arXiv:2209.0/660 2022. 3, 16
[12] William Fedus, Barret Zoph, and Noam Shazeer. Switch transformers: Scaling to trillion parameter models with simple and efficient sparsity, 2021. 3, 17
[13] Zhengcong Fei, Xu Yan, Shuhui Wang, and Qi Tian. Deecap: dynamic early exiting for efficient image captioning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 22216-12226, 2022. 3
[14] Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv preprint I 2014. 3
[15] Alex Graves, Greg Wayne, Malcolm Reynolds, Tim Harley, Ivo Danihelka, Agnieszka Grabska- Barwińska, Sergio Gómez Colmenarejo, Edward Grefenstette, Tiago Ramalho, John Agapiou, Hybrid computing using a neural network with dynamic external memory. Nature,
538(7626):441-476 2016. 3
[16] Mandy Guo, Joshua Ainslie, David Uthus, Santiago Ontanon, Jianmo Ni, Yun-Hsuan Sung, and Yinfei Yang. Long15: Efficient text-to-text transformer for long sequences. arXiv preprint arXiv:2112.07916, 2021. 3,6
[17] Kelvin Guu, Kenton Lee, Zora Tung, Panupong Pasupat, and Mingwei Chang. Retrieval augmented language model pre-training. In International Conference on Machine Learning, pages 3929-3938. PMLR, 2020. 3
[18] Hussein Hazimeh, Zhe Zhao, Aakanksha Chowdhery, Maheswaran Sathiamoorthy, Yihua Chen, Rahul Mazumder, Lichan Hong, and Ed Chi. Dselect-k: Differentiable selection in the mixture of experts with applications to multi-task learning. Advances in Neural Information Processing Systems, 11129335-299445 2021. 3
[19] Danny Hernandez, Jared Kaplan, Tom Henighan, and Sam McCandlish. Scaling laws for transfer. arXiv preprint
2021. 1,
[20] 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.
[21] Lu Hou, Zhiqi Huang, Lifeng Shang, Xin Jiang, Xiao Chen, and Qun Liu. Dynabert: Dynamic bert with adaptive width and depth. Advances Neural Information Processing Systems, 33:9782-9793, 2020. 3
11

---

[22] Robert A Jacobs, Michael Jordan, Steven J Nowlan, and Geoffrey E Hinton. Adaptive mixtures of local experts, Neural computation. 3(1):79-87) 87, 1991.
[23] Mandar Joshi, Eunsol Choi, Daniel S Weld, and Luke Zettlemoyer. Triviaqa: A large scale distantly supervised challenge dataset for reading comprehension. arXiv preprint arXiv: 717770005555 2017. 7
[24] Jared Kaplan, Sam McCandlish, Tom Hemighan, Tom B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models, arXiv preprint urX1v:2001.08361, 2020. 1,2,4
[25] Nikita Kitaev, Lukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer. arXiv preprint urXiv:2001.0445:/ 2020. 3, 6
[26] Vijay Anand Korthikanti, Jared Casper, Sangkug Lym, Lawrence McAfee, Michael Ander- sch, Mohammad Shoeybi, and Bryan Catanzaro. Reducing activation recomputation in large transformer models. Proceedings of Machine Learning and Systems, 5, 2023. 5
[27] Guillaume Lample, Alexandre Sablayrolles, Mare' Aurelio Ranzato, Ludovic Denoyer, and Hervé Jégou. Large memory layers with product keys. Advances in Neural Information Processing Systems, 32, 2019. 3
[28] Dmitry Lepikhin, HyoukJoong Lee. Yuanzhong Xu, Dehao Chen, Orhan Firat, Yanping Huang, Maxim Krikun, Noam Shazeer, and Zhifeng Chen. Gshard: Scaling giant models with condi- tional computation and automatic sharding. arXiv preprint arXiv:2006. /6668, 2020. 1
[29] Mike Lewis, Shruti Bhosale, Tim Dettmers, Naman Goyal, and Luke Zettlemoyer. Base layers: Simplifying training of large, sparse models. In International Conference on Machine Learning. pages
PMLR, 2021. 3
[30] Lei Li, Yankai Lin, Deli Chen, Shuhuai Ren, Peng Li, Jie Zhou, and Xu Sun. Cascadebert: Accelerating inference of pre-trained language models via calibrated complete models cascade. arXiv preprint arXiv:20/2. 11.22002..44668 /4622, 2020. 3
[31] Lucas Liebenwein, Cenk Baykal, Brandon Carter, David Gifford, and Daniela Rus. Lost in pruning: The effects of pruning neural networks beyond test accuracy. Proceedings of Machine Learning and Systems, 3:93- 138, 2021.
[32] Zichang Liu, Jue Wang, Tri Dao. Tianyi Zhou, Binhang Yuan, Zhao Song, Anshumali Shrivas- tava, Ce Zhang, Yuandong Tian, Christopher Re, et al. Deja vu: Contextual sparsity for efficient Ilms at inference time. In International Conference on Machine Learning, pages 22137-22176. PMLR, 2023. 3
[33] Yi Luan, Jacob Eisenstein, Kristina Toutanova, and Michael Collins. Sparse, dense, and attentional representations for text retrieval. Transactions of the Association for Computational Linguistics, 9:329-345, 2021. 2
[34] Aditya Menon, Sadeep Jayasumana, Ankit Singh Rawat, Seungyeon Kim, Sashank Reddi, and Sanjiv Kumar. In defense of dual-encoders for neural ranking. In International Conference Machine Learning, pages 15376-15400, PMLR, 2022.
[35] Rina Panigrahy, Xin Wang, and Manzil Zaheer. Sketch based memory for neural networks. In International Conference on Artificial Intelligence and Statistics, pages 3169-3177. PMLR, 2021. 1, 16
[36] David Patterson, Joseph Gonzalez, Quoe Le, Chen Liang, Lluis-Miquel Munguia, Daniel Rothchild, David So, Maud Texier, and Jeff Dean. Carbon emissions and large neural network training. arXiv preprint arXiv: 104. 10350, 2021. 1
[37] Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter Liu, et al. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res,, 21(140):1-67, 2020. 2, 7, 15
12

---

[38] Samyam Rajbhandari, Conglong Li, Zhewei Yao, Minjia Zhang, Reza Yazdani Aminabadi, Ammar Ahmad Awan, Jeff Rasley, and Yuxiong He. Deepspeed-moe: Advancing mixture-of- experts inference and training to power next-generation ai scale. In International Conference
on Machine Learning, pages 18332-18346. PMIR, 2022. 16
[39] Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. Squad: 100,000+ questions for machine comprehension of text. arXiv preprini 166.005566 2016. 7
[40] Carlos Riquelme, Joan Puigcerver, Basil Mustafa, Maxim Neumann, Rodolphe Jenatton, André Susano Pinto, Daniel Keysers, and Neil Houlsby. Scaling vision with sparse mixture of experts. Advances in Neural Information Processing Systems, 34:8583-885 8595, 2021.
[41] Adam Roberts, Hyung Won Chung, Anselm Levskaya, Gaurav Mishra, James Bradbury, Daniel Andor, Sharan Narang, Brian Lester, Colin Gaffney, Afroz Mohiuddin, Curtis Hawthorne, Aitor Lewkowyez, Alex Salcianu, Mare van Zee, Jacob Austin, Sebastian Goodman, Livio Baldini Soares, Haitang Hu, Sasha Tsvyashchenko, Aakanksha Chowdhery, Jasmijn Bastings, Jannis Bulian, Xavier Garcia, Jianmo Ni, Andrew Chen, Kathleen Kenealy, Jonathan H. Clark, Stephan Lee, Dan Garrette, James Lee-Thorp, Colin Raffel, Noam Shazeer, Marvin Ritter, Maarten Bosma, Alexandre Passos, Jeremy Mlaitin-Shepard Noah Fiedel, Mark Omernick, Brennan Saeta, Ryan Sepassi, Alexander Spiridonov, Joshua Newlan, and Andrea Gesmundo. Scaling up models and data with t5x and seqio. arXiv preprint arXiv:2203.171889 2022. 15
[42] Adam Roberts, Colin Raffel, and Noam Shazeer. How much knowledge can you pack into the parameters of a language model? arXiv preprint arXiv:2002.082: 10, 2020. 7
[43] Stephen Roller, Sainbayar Sukhbaatar, Jason Weston, et al. Hash layers for large sparse models. Advances Neural Information Processing Systems, 34: 1 17555-1766, 2021. 1,3
[44] Tal Schuster, Adam Fisch, Jai Gupta, Mostafa Dehghani, Dara Bahri, Vinh Q Tran, Yi Tay, and Donald Metzler. Confident adaptive language modeling. arXiv preprint arXiv: 220.0001... 2022. 3
[45] Noam Shazeer, Azalia Mirhoseini, Krzysztof Maziarz, Andy Davis, Quoc Le, Geoffrey Hinton, and Jeff Dean. Outrageously large neural networks: The sparsely-gate mixture-of-expeer layer. arXiv preprint arXiv: 7063388.. 2017. 1, 3, 16
[46] Noam Shazeer and Mitchell Stem. Adafactor: Adaptive learning rates with sublinear memory cost. In International Conference on Machine Learning, pages 4596-4604. PMLR, 2018. 15
[47] Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. Efficient transformers: A survey, ACM Computing Surveys (CSUR), 2020.
[48] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, E ukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, volume 30, 2017. 1
[49] Alex Wang, Yada Pruksachatkun, Nikita Nangia, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. Superglue: A stickier benchmark for general-purpose language understanding systems. Advances in neural information processing systems, 32, 2019. 7
[50] Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel R Bowman. Glue: A multi-task benchmark and analysis platform for natural language understanding. arXiv preprint
2018. 7
[51] Lemeng Wu, Mengchen Liu, Yinpeng Chen, Dongdong Chen, Xiyang Dai, and Lu Yuan. Residual mixture of experts. arXiv preprint Siti:22044006336 2022.
[52] Qingyang Wu, Zhenzhong Lan, Jing Gu, and Zhou Yu. Menformer: The memory-augmented transformer. arXiv preprint arXiv:2010.0689), 2020.
[53] Yuhuai Wu, Markus N Rabe, Del esley Hutchins, and Christian Szegedy. Memorizing trans- formers. arXiv preprint arXiv:2203.08913 2022,
13

---

[54] Greg Yang and Edward J Hu. Feature learning in infinite-width neural networks. arXiv preprint
arXiv:2011.1452. 2020. 2, 4
[55] Zhewei Yao, Reza Yazdani Aminabadi, Minjia Zhang, Xiaoxia Wu, Conglong Li, and Yuxiong He. Zeroquant: Efficient and affordable post-training quantization for large-scale transformers. Advances in Neural Information Processing Systems, 35:27168 2711168-77711111 2022. 3
[56] Jiahui Yu, Zirui Wang, Vijay Vasudevan, Legg Yeung, Mojtaba Seyedhosseini, and Yonghui Wu. Coca: Contrastive captioners are image-text foundation models. arXiv preprint arXiv:2205.01917, 2022.
[57] Seniha Esen Yuksel, Joseph N Wilson, and Paul D Gader. Twenty years of mixture of experts. IEEE transactions on neural networks and learning systems, 237 2012.
[58] Manzil Zaheer, Guru Guruganesh, Kumar Avinava Dubey, Joshua Ainslie, Chris Alberti, Santi- ago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, et al. Big bird: Transformers for longer sequences. Advances neural information processing systems, 33:17283-17297, 2020. 3,6
[59] Yangi Zhou, Tao Lei. Hanxiao Liu, Nan Du, Yanping Huang, Vincent Zhao, Andrew Dai, Zhifeng Chen, Quoc Lc, and James Laudon. Mixture-of-experrs with expert choice routing. arXiv preprint arXiv:2202.09368, 2022. I
[60] Barret Zoph, Irwan Bello, S ameer Kumar, Nan Du, Yanping Huang, Jeff Dean, Noam Shazeer, and William Fedus. Designing effective sparse expert models. arXiv preprint arXiv:2202.08900. 2022. 2, 3, 17
14

---

Supplementary Material for Alternating Updates for Efficient Transformers
In this supplementary. present the full details and hyperparameters of our evaluations, provide details of our algorithmic contributions, and present complementary empirical results that support the effectiveness the presented work.
A Experimental Setup
We experiment with various T5 baseline model sizes: small (S), base (B), large (L.) and XI.. The base (B), large (L.), and XI. models follow the same model configurations as in the T5 paper, while the small model shallower than the '5 paper [37] to cover a larger range of model sizes (4 encoder/decoder layers instead of encoder/decoder layers). In particular,
use the T5 version 1.1 models with gated GELU feedforward network and pre layer norm. The models are implemented on top of the T5X [41] codebase. During pretraining, use 256 batch size, Adafactor optimizer [46] with base learning rate 1.0 and reciprocal square-root decay with 10000 warmup steps, and zero dropout. During finetuning, 256 batch size, Adafactor optimizer with constant learning rate of 0.001 and 0.1 dropout. Unless explicitly stated, we pretrain for 500k steps and finetune for 50k steps. Our experiments were implemented in Python and run TPUv3 with cores.
B Parameter Counts and Speed
Here, we present the number of additional parameters needed by adding AltUp, its speed, and its pretrain accuracy on T5 models of varying sizes. In the following tables, the embedding parame- ters include input embedding table parameters (shared between encoder and decoder) and output embedding table. Non-embedding parameters include all the transformer blocks. Train speed is measured by number of examples per second per core. Table documents the parameter count and training speed comparison. Note that Alternating Updates increases the number of embedding param- eters while leaving the non-embedding parameters roughly the same. Since the narrow transformer layer computation is not changed by alternating updates and since the predict and correct steps are lightweight (see Sec. 3), we incur a relatively small increase in the computation cost compared to dense 2x width model.
Model
# emb params
# non-emb params
train speed
S
3.29E+07
3.78E+07
166.1
S AltUp
6.58E+07
3.99E+07
119.4
B
4.93E+07
1.98E+08
52.4
B
AltUp
9,87E+07
2.12E+08
42.3
L
6.58E+07
7.17E+08
17.1
L + AltUp
1.32E+08
7.68E+08
14.4
Table 3: Model size and train speed comparisons T5X models with AltUp instantiated with K = 2.
Table 4 documents the parameter count, training speed and pretrain accuracy comparison when the representation dimension is scaled up with AltUp or dense scaling. Note that Alternating Updates increases the number of embedding parameters while leaving the non-embedding parameters roughly the same, providing an efficient way to scale up the representation dimension relative to a K-times wider model.
Table contains pretrain performances for TS XI. sized models. We note the AltUp technique continue to offer quality boost at the billion parameters scale (note that T5XL has roughly 3B parameters), suggesting that AltUp is robust technique for increasing model capacity for modern large language models.
C Combination with MoE
Here, we investigate whether AltUp can be combined with orthogonal techniques, namely MoE, to obtain additive performance gains in pretrain accuracy for T5 small, base, and large models. In
15

---

Model
# emb params
# non-emb params
Train speed
Pretrain accuracy
TS Base
4.93E+07
1,98E+08
52.4
65.29
TS Base AltUp2x
9.87E+07
2.12E+08
42.3
65.78
T5 Base + Dense2X
9.87E+07
3.97E+08
32.9
66.45
TS Base Alt
1.97E+08
2,41E+08
28.1
66.00
TS Base Dense4X
1.97++08
7.93E+08
12.6
67.01
Table 4: AltUp compared with dense scaling evaluated at 250k: pretrain steps.
Model
# emb params
# non-emb params
Train speed
Pretrain accuracy
T5 XL
1.32E+08
2.72E+09
3.6
70.01
T5 XL + AltUp2x
2.63E+08
2.92E+09
3.0
70.61
Table 5: Pretrain performances for T5 XL sized models. Pretrain accuracy is measured 400k steps.
AltUp continues to offer performance boost even on the scale of models with billions of parameters.
particular, we consider the partial experts setting similar to [38, 35], where at each layer, in addition to the layer's module, we route the input to smaller expert module and combine the outputs of the main and auxiliary modules the input to the subsequent layer (see Fig. 6).
main
expert
partial experts
router
router
self telf-attention
self-attention
(a) Mixture of Experts
Mixture of Partial Experts
Figure 6: The partial experts setting in the context of the evaluations in Sec. C. The standard MoE model (left) routes the inputs to one or more of n experts based on routing function. Mixture of Partial Experts (right) always routes the input to the main expert and additionally routes the input to one or more partial experts; the output is function of the main expert's 's and partial experts' outputs.
The MoE layer routes an input token x to k of n experts where each expert is itself a parametrized subnetwork (e.g., a fully-connected layer). Following [11], we let (-E(-) and (x) denote the set of experts and the output of lookup the input token x to expert i, respectively. For an input token ar learnable weight matrix W is applied to obtain the logits h(x) Wa. The lookup probabilities are computed by taking the softmax of h(x))
exp(h,(x)) (x(x)) Eje(n exp(h)(x))
Ei [n].
The token is routed the expert(s) T [n] with the top-k probabilities p(z)). Since this operation not differentiable, the output y is computed as a probability weighted combination of the experts' outputs to enable gradients to propagate back to the router parameters [45], i.e..
y Σ B.)
16

---

For MoE, we used the simplified implementation of the top-1 softmax routing of [12]. We use 128 experts each per encoder and decoder layer, with each expert representing a 2 layer fully-connected neural network with hidden dimension 16. For sake of the synergistic demonstration even with the core MoE. implementation, we did not incorporate a sophisticated mechanism for load balancing such as load balancing loss [12] or router z. loss [60]. We use multiplicative jitter noise sampled from uniform distribution over [1 - E, s]dn with E = 0.01. The router matrix was initialized by
drawing from zero mean Normal distribution with standard deviation 2 X 10
Method
T5 Small
T5 Base
TS Large
Bascline
59.10
63.35
65.58
MoE [60]
59.42
63.62
65.71
AltUp (K=2)
59.67
63.97
65.73
AltUp (K=2) + MoE
59.91
64.13
65.95
Table 6: Pretrain accuracy 100k steps of T5 models augmented with Alternating Updates (see Sec. 3) and MoE. MoE synergistically combines with Alternating Updates and enables further increases in model capacity.
Table synthesizes the pretraining performance on the C4 dataset at 100k training steps of AltUp and compared techniques on T5 Small, Base, and Large models. Perhaps most notably, we show that combining AltUp and MoE leads even further sizable improvements in the pretrain performance (last row of Table 6). For example, the combination of MoE and AltUp improves over the baseline by 0.81, over AltUp alone by 0.24, and over MoE alone by 0.49. For all model sizes, the combination of AltUp and MoE is synergistic and leads to significant improvements compared to not only the baseline, but also to each approach in isolation.
D Alternating updates with varying block selection
In this section, we present empirical results on the alternating updates technique and comparison with other techniques that widen token representation vectors. We increase the token representation dimension by factor of 2 (corresponding to K = 2 in Algorithm 1) unless otherwise specified. The model capacity increase comes from a wider embedding table at the bottom layer of the model while the transformer layers remain the same, which results in minimal additional computation cost.
Model
Pretrain Accuracy
Finetune GLUE
Finetune SG
Finetune SQuAD (EM/FI)
S (baseline)
61.21
75.83
59.52
76.44/8 /4.998
+ Sum
61.67
77.54
59.63
75.06/ 75.06/83.82
S + SameUp
61.91
77.75
60.81
76.85 /8555
+ AltUp
61.86
76.82
59.60
77.51/85. 79
(bascline)
66.42
84.25
73.56
83.78/91.19
+ Sum
66.82
84.85
75.2
84.36/91.38
SameUp
66.82
84.06
74.15
84.41/91.
B + AllUp
66.96
85.32
75.80
85. 85.24/ 35.24/92.38
(baseline)
69.13
87.23
81.21
86. 77 86.77/93.56 /93.56
I. + Sum
69.09
86.18
78.93
86. 19/93.08
+ SameUp
69.45
87.95
82.72
87.65, 17..65/94.1 /94.13
L AltUp
69.32
88.20
82.75
87.58/94.22 /94.27
Table 7: Comparison of Algorithm with various sub-block selection methods on TS-S/B/L.
In Table we compare the summation method (Sum) which additional embedding vectors are added to the token representation vector, Algorithm 1 with same block selection (SameUp), and Algorithm with alternating block selection (AltUp), all on top the T5 version 1. small (S), base Ceaettion-Comuut-CCCC Correct scheme described in Sec.
(B), and large (I.) models. We observe the with same and alternating block selection methods outperforms the summation method. For the small models, same block selection method performs better in most tasks, while for the base and
17

---

large models, alternating block selection method performs better in most tasks. We note all three methods bring improvements in both pretraining and finetuning, and AltUp is generally the most effective one. While pretraining accuracies for all three methods are mostly similar, differences in finetuning metries are large, and AltUp generally achieves roughly twice the gains of the other two variants. Moreover, we observe that the gains of AltUp in pretraining accuracies show diminishing returns when model sizes grows, but the gains finetuning metrics do not.
E Additional Evaluations
In addition to the T5- 15-based evaluations presented in the main body of the paper, we conducted preliminary study on a lightweight BERT model. The model has 12 layers, 256 model dimension, and 4 attention heads. On masked language pretraining task (with BERT pretraining data), lightweight- BERT achieves 54.7 7 MLM accuracy while lightweight-BERR AltUp (K" = 2) achieves 56.2 MLM accuracy.
In Fig. 4, observed that SuperGLUE particularly exceptional in terms of the diminishing returns with respect to the model capacity. For example, in any of the other plots (GLUE, SQuAD, Trivia- QA), we see that the dense baselines fall well below the lines formed by AltUp's s data points. order to obtain more direct comparison on SuperGLUU. we compared I. AltUp with size-matched dense baseline T5L+44, which adds encoder layers and decoder layers to the TSL. model. Note this model has the same number of parameters as L AltUp, but uses more computation and is roughly 10% slower than L + AltUp. On SuperGLUE, T5L+4 achieves an average score 82.57, versus 82.75 for L + AltUp. Therefore, AltUp is not only faster, but more performant when compared to dense baseline. Note that this is specific to SuperGLUE, and we see larger speedups up to 87% on other datasets.
F Sequence-AlUp Details
Here, we provide the full pseudocode of Sequence-AltUp from Sec. 4 (see Alg. 2).
Algorithm 2 AltUp extension to sequence dimension
Input: A sequence of vectors (Jo, 32, .... 2T- 1), where at; E RRd Transformer layer L. and stride parameter
Output: A sequence of vectors y (Vo- 1/2 ... 1T-
1: Prediction: predict the output sequence with trainable linear map:
U: a + Li/Li/
for i = 0,,,,, 1, where a1 a2 E R are trainable scalars;
2: Computation: subsample the input sequence with stride and apply the transformer layer on the subsampled sequence:
(jo, Tk. .... -1) = L(xo, 3ke FI(T 1y/k(=));
Correction:
correct the prediction with the computation result:
yi 0: b(ū s/bj*k D(a/kjak)
for i = 0, 1,..., T 1,, where b E IR is trainable scalar.
G Recycled-AltUp Fine-tune Evaluations
We conclude the supplementary material by presenting evaluations with Recycled-AltUp as described in Sec. 4. Table 8 presents the results of our pretrain and fine-tune evaluations T5 Small, Base, and Large. The pretrain accuracy is the one reported at 500k steps, and we fine-tune for an additional 50% steps for the fine-tune evaluations.
Consistent with our results presented in the main body of our paper, we observe that AltUp and Recycled-AltUp both provide clear and consistent gains over the baseline virtually all pretrain
18

---

Model
Pretrain Acc.
GLUE
SG
SQUAD (EM/FI)
TriviaQA (EM/F1)
61.21
75.83
59.52
76.44/84.97
19.03/22.83
+ Recycled-AltU
61.33
77.24
59.12
77.76/80 88..6
19.06/22.77
+ AltUp
61.86
76.82
59.60
77.51/85.79
19.27 19.27/22.95
B
66.42
84.25
73.56
83.78/91.19
23.1/27.56
+ Recycled-AlUp
66.63
85.60
74.83
84.81/91.93
22.72/277.1
B + AliUp
66.96
85.32
75.80
85. 35.24/92.33
24.35 14.35/22.77 /228.7 78
69.13
87.23
81.21
86.77/93.56
26.15/30.7
L+ Recycled-AltUp
69.30
87.91
82.53
87.37 /93.89
27.51 32.38
L AltUp
69.32
88.20
82.75
87.81 94.29
27.10/32 /2.044
Table 8: The performance of baseline, Recycled-AltUp, and AltUp on pretrain and fine-tune evaluation metrics. Recycled-AltUp and AltUp were instantiated with K 2 for all evaluations.
and fine-tune metrics. As conjectured in Sec. 4 Recycled-AltUp generally does not provide the full benefits of AltUp terms of pretrain and fine-tune accuracies, however, this gap seems to shrink for larger models. Moreover, Recycled-AltUp has the appeal that it practically adds no additional parameters to the model and, as result, has roughly the same speed as the baseline model (see Fig. 5). nature of Recycled-Altue translate to clear gains over the dense baselines. We envision that Recycled-Altup improved speed and reduced parameter count may make more appealing for certain applications.
Given the lightweight and
these improvements directly
19


Reviews:
[{"review_id": "RwDOL2oCYr", "reviewer": "Reviewer_RDoa", "summary": "This paper proposes AltUp, a new method for reducing the inference cost of Transformers by not computing blocks of the FFN layers. The authors find real-world speedups at inference time without sacrificing accuracy on benchmark tasks.", "questions": "1. What are similar baselines in the literature that should be compared against to contextualize the strength and novelty of results?", "limitations": "Yes", "rating": 6, "confidence": 3, "soundness": 2, "presentation": 3, "contribution": 3, "strengths": "The results are strong - it is impressive to get real-world speedup using sparsity without sacrificing accuracy. The idea is simple and appears to work well on hardware. Overall good work.", "weaknesses": "The evaluation section is missing baselines to compare against. It is hard to evaluate novelty without also evaluating against similar works that use sparsity to accelerate model inference.\n\nOne example of recent work that is very similar is Deja Vu (https://openreview.net/forum?id=wIPIhHd00i). I'm not 100% sure when the paper went public relative to the NeurIPS deadline so it is fine if that one turns out to be concurrent, but it is a little odd to me that there would be no baselines at all.\n\nIt would also be useful to contextualize the results against complementary methods such as quantization.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your supportive review and helpful feedback.  Please see our specific comments below.\n\n### Comparison to Deja Vu\n\nThank you for your helpful reference to Deja Vu [1]. As we state in our coverage of prior work, virtually all prior approaches in conditional computation, such as MoE, apply to selecting a subset of parameters of the MLPs and/or attention blocks to activate, usually in an input-specific way. This includes the work in Deja Vu, which centers around selecting subsets of the attention and MLP parameters to apply for each input (contextual sparsity) . Our work is orthogonal to Deja Vu and synergistic with these approaches at large as it focuses on conditional computation along the *representation dimension*  (shown in Sec. C of the appendix for MoE, for example). However, as you guessed, we weren’t aware of Deja Vu at the time of our submission and will include it in a discussion of related work.\n\n\n### Contextualization of the strength and novelty of results relative to baselines\n\nTo the best of our knowledge, our work is the first in conditional **representation** computation for transformers, which makes it challenging to find similar baselines for comparison. We would like to emphasize that the dense T5 baselines depicted in Figures 4 and 5, as well as our comparisons to 2x and 4x dense baselines in Table 4 of the appendix, serve as comparison points since these models are well-optimized and popularly-deployed T5 models. Any speedups over these baseline dense models with Alternating Updates signify gains that can be further improved by combining it with other techniques such as Deja Vu, MoE, or quantization. For instance, Sec. C of the supplementary material depicts this synergistic combination with MoE (see Table 6).\n\n\nThe favorable properties of our method and its operation on the **representation** dimension make it difficult to directly compare to existing techniques. For example, an MoE T5 model [2], Switch-Base, leads to a 2.5x speed-up measured in pretrain accuracy (not downstream evaluations) relative to a T5-Large dense model. However, Switch-Base contains 10x more parameters than a T5-Large dense model (7B vs. 0.7B), necessitates careful sharding along the model and expert dimensions, introduces auxiliary losses for load balancing and stability that need to be implemented, and requires tedious hyper-parameter tuning. Even when resources are available for sharding, there is a high degree of implementation and maintenance complexity involved with sharding-aware models. These challenges are in contrast to AltUp, which introduces an often negligible amount of additional parameters (especially with Recycled-AltUp), does not require sharding, and only introduces a single integral hyperparameter $K$ with a default value that works well across the scenarios we considered.\n\nMore generally, we view AltUp as an orthogonal method that can work synergistically with existing approaches like MoE or quantization (which reportedly provides 4-5x speedup [3]). Thank you again for your constructive feedback, we will include this discussion surrounding the contextualization of our results and comparison to baselines in our final submission.\n\n\n[1] https://openreview.net/forum?id=wIPIhHd00i\n\n[2] https://arxiv.org/abs/2101.03961 \n\n[3] https://proceedings.neurips.cc/paper_files/paper/2022/hash/adf7fa39d65e2983d724ff7da57f00ac-Abstract-Conference.html \n"}, {"review_id": "p0JyKnbvHG", "reviewer": "Reviewer_UGzF", "summary": "\nThe study introduces Alternating Updates, a novel method to increase the capacity of transformer models without significantly raising latency. AltUp broadens the token representation, operating on a subblock of the widened representation at each layer, and employs a predict-and-correct mechanism for updating inactive blocks. AltUp also extends to the sequence dimension and can work synergistically with existing techniques like Sparse Mixture-of-Experts models. This allows for the creation of efficient models with high capacity. The effectiveness of the method is demonstrated across various scenarios, with notable performance improvements in language modeling and understanding benchmarks. It allows for a speedup of up to 87% on SuperGLUE and SQuAD benchmarks without accuracy loss.", "questions": "- how the model would perform on the LRA benchmark?\n- how is it comparable with other efficient attention variations?\n- does the model scales up to other domains beyond GLUE and SuperGLUE bechmarks?", "limitations": "The authors have openly discussed some limitations of their work, recognizing that there is a lack of a deep theoretical understanding of the properties of their proposed technique, AltUp, given the complexity of analyzing transformer models. They acknowledge that the optimal hyperparameter K might vary on an application-specific basis and plan to investigate this in the future.", "rating": 7, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "- the paper is scientifically sound and well written", "weaknesses": "The authors did not mention other efficient transformer variants and their latency times (e.g. Flash attention), therefore it is hard to judge the model's performance.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We are grateful for the reviewer’s careful consideration of our paper and their helpful feedback. Please see our specific comments below.\n\n### Comparison to other efficient transformer variants\n\nAs we mention in our response to Reviewer RDoa, the favorable properties of our method and its operation on the representation dimension make it difficult to directly compare to existing techniques which target different components of the architecture. For example, an MoE T5 model [1], Switch-Base, leads to a 2.5x speed-up measured in pretrain accuracy (not downstream evaluations) relative to a T5-Large dense model. However, Switch-Base contains 10x more parameters than a T5-Large dense model (7B vs. 0.7B), necessitates careful sharding along the model and expert dimensions, introduces auxiliary losses for load balancing and stability that need to be implemented, and requires tedious hyper-parameter tuning. Even when resources are available for sharding, there is a high degree of implementation and maintenance complexity involved with sharding-aware models. These challenges are in contrast to AltUp, which introduces an often negligible amount of additional parameters (especially with Recycled-AltUp), does not require sharding, and only introduces a single integral hyperparameter $K$ with a default value that works well across the scenarios we considered.\n\nMore generally, we view AltUp as an orthogonal method that can work synergistically with existing approaches like MoE or Flash Attention (which provides up to 3x speedup [2]). We will include this contextualization in our final submission so that it is easier to judge the improvements with AltUp.\n\n\n### Remaining questions\n1. In our work, we adopted the standard T5 training procedure, with an input sequence length of 512 and target sequence length of 114.  This makes our trained models ill-suited for long input tasks, such as LRA. For example, LongT5 and CoLT5 models are T5 based models targeting long contexts and they are pre-trained with input sequence length of 4098 and target sequence length of 920. We leave long-context evaluations with our approach to future work.\n2. As we highlight in our submission, our approach is a conditional computation approach where the conditionality is in activating a subblock of the token representation at each layer. So for AltUp with $K=2$, for example, the efficiency comes from using attention and MLP blocks that operate on a $d$-dimensional input, while we maintain a $2d$-dimensional representation from one layer to the next. This differs from the more well studied  efficient attention work that focuses on the *sequence* dimension with the goal of reducing the quadratic dependence of attention on the sequence length, e.g., Longformer, Linformer, Performer, BigBird. As with MoE, these efficient attention mechanisms are orthogonal to our approach and can be combined synergistically. \n3. In addition to GLUE and SuperGLUE benchmarks, our evaluations (Fig. 4 and Table 1) contain results for SQuAD and TriviaQA. These datasets are considered fairly standard and comprehensive for the evaluation of T5 models [4]. Evaluations on translation tasks are not feasible due to the monolingual vocabulary. Nevertheless, we have recently obtained promising preliminary results on MBPP and MATH datasets that follow the same trends as those in our submission.\n\n\n[1] https://arxiv.org/abs/2101.03961 \n\n[2] https://arxiv.org/abs/2205.14135 \n\n[3] https://huggingface.co/blog/long-range-transformers \n\n[4] https://arxiv.org/pdf/1910.10683.pdf \n"}, {"review_id": "S9En7FAuFn", "reviewer": "Reviewer_raib", "summary": "The paper proposes a novel technique named “AltUp” to expand Transformer’s feature dimension while preserving the computation cost. The key idea of AltUp is to divide wide hidden features into multiple blocks, where only one block is processed by Transformer sub-layers, while the other blocks are computed through a linear combination of all blocks. The position of the updated block alters across layers. Furthermore, the authors present two variants of AltUp, “Recycled-AltUp” and “Sequence-AltUp”, which focus on reducing the embedding parameters and effective sequence length, respectively. Experimental results show that the models trained with AltUp are up to 87% faster in inference compared to the model with the same performance.", "questions": "* (Minor) Is Conformer (L214) an appropriate example for “striding operation”?\n* (Suggestion) I basically agree with that ‘large K leads to less frequent activation’ (L279-280), but could this issue be compensated by 2-4x longer training steps?\n", "limitations": "The authors have discussed the limitations in Section 6.", "rating": 8, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 4, "strengths": "* The concept of “widening representations” is unique and hasn’t been explored much before. This approach effectively disentangles the computation and feature dimensions. Importantly, the paper introduces a non-trivial solution that minimizes additional computation costs.\n* AltUp demonstrates promising speedup across various model sizes, with K=2 generally performing better than the original version.\n", "weaknesses": "* Experiments are conducted on T5 models; however, the paper could be strengthened if encoder-only or decoder-only architectures are also evaluated.\n* The concept of “Sequence-AltUp” may be considered somewhat different from the “widening representations”. Maybe this could be justified by “effective width for each token” … More clarification would be helpful.\n", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your supportive review and insightful suggestions. Please find below our specific responses.\n\n1. Thank you for suggesting experiments on other architectures. We conducted a preliminary study on a lightweight BERT model which has 12 layers, 256 model dimensions, and 4 attention heads. On masked language pretraining task (trained on the BERT pretraining data), we observe lightweight-BERT achieves 54.7 MLM accuracy while lightweight-BERT + AltUpx2 achieves 56.2 MLM accuracy. We will include these empirical results in the updated version of the paper. \n2. Thank you for pointing out this potential source of ambiguity and for your suggestion. You are fully right that Sequence-AltUp is different from the widened representations idea since it applies the predict-compute-correct idea of Algorithm 1 to the sequence dimension but does not increase the sequence dimension. We revised our paper to clarify the text surrounding Sequence-AltUp based on your helpful suggestion of framing it as increasing the effective width of each token.\n3. You are right that Conformer is not an appropriate example for “striding operation” on Line 14. We have updated the paper to remove this ambiguity. Thank you for your careful consideration of our work.\n4. That is a great point – we definitely believe that a larger number of train steps can help with the infrequent activations that arise when we use a large value of $K$. Our ongoing work is focused on training recipes to enable the application of AltUp with a very large expansion factor $K$.\n"}, {"review_id": "3FWHDSe51h", "reviewer": "Reviewer_2iUa", "summary": "This work proposes an efficient way to increase the width of transformer models, i.e. Alternating Updates (AltUp). AltUp can increase the width of one existing model with little computation overhead. Authors evaluated their approach on T5 model and see some improvements on well-established benchmarks including GLUE SG SQuAD and TriviaQA.", "questions": "1) Would AltUp introduce more activation? If yes, although AltUp introduces little flops, given the fixed hardware, the max batch size would be smaller. For instance, if the original T5 base can use batch size = 256 on 16 TPUs, your AltUp would only be able to use batch size = 128. Then, to support a larger global batch size, you have to use gradient accumulation. This issue would be more serious for a longer sequence.", "limitations": "Theoretical analysis is good. But as stated in the weakness section,  my main concern is whether the AltUp is working well enough to let more people try and use it. If AltUp is not working well enough on the official paper, since trying a new approach is expensive in scaling transformer, people will not really use the model and then this work would have little impact.", "rating": 6, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "1) This paper is well-motivated. Scaling efficiently is indeed an important topic. Considering scaling is so useful, how to save the cost of scaling up is very helpful to our community.\n2) Authors conduct a comprehensive evaluation and explored various modifications of this approach, such as Recycled-AltUp and Sequence-Altup.", "weaknesses": "My main concern is about the effectiveness of the proposed model. In Figure 4, we can see AltUp cannot bring a very significant improvement. For instance, in Figure 4b, if we connect B+AltUp and L+AltUp, the L without AltUp will almost appear on the line. Certainly, the x-axis is at log scale, it is not totally fair by using this line. However, it shows that the improvement of AltUp is indeed not very significant.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "Thank you for your careful consideration of our paper and constructive feedback. \n\n### Effectiveness of AltUp\n\nWe would like to point out that AltUp achieves significant speedups in *wall-clock time* (not only theoretical FLOPS) compared to dense baselines as shown in our evaluations in Sec. 5. In fact, AltUp enables up to 87% speedup relative to the dense baselines at the same accuracy for SQuAD and is highly effective on the other evaluated datasets as well. \n\nRegarding your point about Figure 4b: here, we show the comparison of T5 dense baselines and compare them to T5 Base + AltUp2x and T5 Large + AltUp2x. We use a log-scale because it is standard in prior work in this area, e.g., in scaling laws for neural language models [1,2]. As we can see in Figure 4b, there is a clear trend of diminishing returns (even in the log-scale, even for the baselines) as we go from T5L to T5XL. This means that it is not entirely fair to connect the B+AltUp point to L+AltUp and state that L lies on this line, since L+AltUp is well past the point of diminishing returns that the models experience as we increase their capacity. We would like to highlight that SuperGLUE is particularly exceptional in terms of this diminishing returns phenomenon. For example, if we conduct the same point connecting procedure in any of the other plots (GLUE, SQuAD, Trivia-QA), we see that the dense baselines fall well below the lines formed by AltUp’s data points. \n\nIn order to make this comparison for SuperGLUE more direct, we compared L + AltUp with a size-matched dense baseline – T5L+4, which adds 4 encoder layers and 4 decoder layers to the T5L model. Note that this model has the same number of parameters as L + AltUp, but uses more computation and is roughly 10% slower than L + AltUp. On SuperGLUE, T5L+4 achieves an average score of 82.57, versus the average score of 82.75 for L + AltUp. Therefore, AltUp achieves better quality even when compared to a compute-heavier dense baseline. Note that this is specific to SuperGLUE, and we see larger speedups – up to 87% – on other datasets. We would be happy to include this discussion in our final submission.\n\nMoreover, we would like to highlight that the lightweight version of AltUp, Recycled-AltUp (from Sec. 4), adds virtually no additional latency or additional parameters to the dense baseline models and strictly improves their performance (see Fig. 5). In Table 8 of the appendix, we also demonstrate that Recycled-AltUp leads to similar gains as AltUp does on GLUE, SuperGLUE, SQuAD, and TriviaQA. Given the lightweight and latency-matching nature of Recycled-AltUp, these improvements directly translate to clear gains over the dense baselines. We will clarify this point in our revision and highlight the effectiveness and practicality of AltUp.\n\n\n\n### AltUp and Activation Memory Footprint\n\nAlthough AltUp has a higher activation memory footprint compared to the baseline *during training*, this memory footprint is largely negligible when compared to the activation memory footprint of the baseline. Thus, AltUp would not need a drastic reduction in batch size in practical applications. \n\nFollowing the computations in “Reducing Activation Recomputation in Large Transformer Models” [1], a transformer model with $L$ layers, model dimension $h$, batch size $b$, sequence length $s$ and number of attention heads $a$ has total activation memory of \n\n$ s b h L (34 + 5 a s / h) $. \n\nWhen we add AltUp (with $K=2$) on this model, the additional activation memory due to is \n\n$ (s b h + 2 s b h) L = 3 s b h L$,\n\nwhich is less than 10% of the vanilla transformer’s activation memory footprint. Moreover, a significant portion of memory is used by the weight parameters which only increase marginally with AltUp. Overall this results in a <10% additional memory usage with AltUp. In addition, since the additional blocks are inexpensive to recompute, we can also recompute these blocks in the backprop without storing them. Model parallelism and techniques such as gradient checkpointing, sequence parallelism, or selective activation recomputation can mitigate the impact of a wider activation vector even further. \n\n\nDuring inference, the memory footprint of activations is mostly due to the size of the KV cache. In AltUp, since each transformer layer takes a single sub-block, the additional activations introduced by AltUp do not show up in the KV cache. \n\n[1] https://arxiv.org/abs/2203.15556 \n\n[2] https://arxiv.org/pdf/2001.08361.pdf \n"}]

Author rebuttal:

Meta-review: The paper proposes a new method to expand the hidden state size of neural network models. The proposed method is both computational and parameter-efficient. All reviewers agree that the paper is strong enough to be accepted by NeurIPS.
Decision: Accept (spotlight)