Original: Conﬁdent Adaptive Language Modeling
Revised: Conﬁdent Adaptive Language Modeling

Original: Abstract
Revised: Abstract

Original: Recent advances in Transformer-based large language models (LLMs) have led to signiﬁcant performance improvements across many tasks.
Revised: Recent advances in Transformer-based large language models (LLMs) have led to signiﬁcant performance improvements across many tasks.

Original: These gains come with a drastic increase in the models’ size, potentially leading to slow and costly use at inference time.
Revised: These gains come with a drastic increase in the models’ size, potentially leading to slow and costly use at inference time.

Original: In practice, however, the series of generations made by
Revised: In practice, however, the series of generations made by

Original: LLMs is composed of varying levels of difﬁculty.
Revised: LLMs is composed of varying levels of difﬁculty.

Original: While certain predictions truly beneﬁt from the models’ full capacity, other continuations are more trivial and can be solved with reduced compute.
Revised: While certain predictions truly beneﬁt from the models’ full capacity, other continuations are more trivial and can be solved with reduced compute.

Original: In this work, we introduce Conﬁdent Adaptive
Revised: In this work, we introduce Conﬁdent Adaptive

Original: Language Modeling (CALM), a framework for dynamically allocating different amounts of compute per input and generation timestep.
Revised: Language Modeling (CALM), a framework for dynamically allocating different amounts of compute per input and generation timestep.

Original: Early exit decoding involves several challenges that we address here, such as: (1) what conﬁdence measure to use; (2) connecting sequence-level constraints to local per-token exit decisions; and (3) attending back to missing hidden representations due to early exits in previous tokens.
Revised: Early exit decoding involves several challenges that we address here, such as: (1) what conﬁdence measure to use; (2) connecting sequence-level constraints to local per-token exit decisions; and (3) attending back to missing hidden representations due to early exits in previous tokens.

Original: Through theoretical analysis and empirical experiments on three diverse text generation tasks, we demonstrate the efﬁcacy of our framework in reducing compute—speedup of up to × 3 —while provably maintaining high performance.
Revised: Through theoretical analysis and empirical experiments on three diverse text generation tasks, we demonstrate the efﬁcacy of our framework in reducing compute—speedup of up to × 3 —while provably maintaining high performance.

Original:  Introduction
Revised:  Introduction

Original: Recent advances in Large Language Models (LLMs) have led to breakthroughs in language understanding and language generation across almost every widely-used Natural Language Processing (NLP) task considered in the ﬁeld today [5; 15; 17; 20; 51; 52; 53; 75; 89; 73].
Revised: Recent advances in Large Language Models (LLMs) have led to breakthroughs in language understanding and language generation across almost every widely-used Natural Language Processing (NLP) task considered in the ﬁeld today [5; 15; 17; 20; 51; 52; 53; 75; 89; 73].

Original: Autoregressive language modeling provides a ﬂexible framework for solving complex tasks with a uniﬁed natural language input and output format, while also relaxing the need for large-scale task-speciﬁc data collection and training [67; 15; 17; 58; 80].
Revised: Autoregressive language modeling provides a ﬂexible framework for solving complex tasks with a uniﬁed natural language input and output format, while also relaxing the need for large-scale task-speciﬁc data collection and training [67; 15; 17; 58; 80].

Original: The large size of LLMs, however, results in massive computational load that might be limiting for certain real-world applications (e g., machine translation) [9; 30; 42; 49; 59; 63; 71].
Revised: The large size of LLMs, however, results in massive computational load that might be limiting for certain real-world applications (e g., machine translation) [9; 30; 42; 49; 59; 63; 71].

Original: This is especially pronounced in the autoregressive decoding process where the full stack of Transformer layers is repeatedly computed for each output token [37; 40; 86].
Revised: This is especially pronounced in the autoregressive decoding process where the full stack of Transformer layers is repeatedly computed for each output token [37; 40; 86].

Original: While large models do better in general, the same amount of computation may not be required for every input to achieve similar performance (e.g., depending on if the input is easy or hard) [66].
Revised: While large models do better in general, the same amount of computation may not be required for every input to achieve similar performance (e.g., depending on if the input is easy or hard) [66].

Original: Early exiting is a promising approach to decreasing the computational cost of multilayered architectures such as those used in Transformer-based LLMs, where the number of layers used by the model is dynamically decided on an input-by-input basis [18; 23; 57; 60; 70].
Revised: Early exiting is a promising approach to decreasing the computational cost of multilayered architectures such as those used in Transformer-based LLMs, where the number of layers used by the model is dynamically decided on an input-by-input basis [18; 23; 57; 60; 70].

Original: In this setting, an LLM can choose to generate a new token based off the representation at an intermediate layer instead of using the full model, and save computation as a result.
Revised: In this setting, an LLM can choose to generate a new token based off the representation at an intermediate layer instead of using the full model, and save computation as a result.

Original: A natural question that arises, however, is when is it a good decision to exit early, as opposed to wait?
Revised: A natural question that arises, however, is when is it a good decision to exit early, as opposed to wait?

Original: Naively choosing when to exit can be suboptimal in terms of saving computation time, and also result in unpredictable degradations to model performance, especially when predictions depend on each other, as in autoregressive language generation.
Revised: Naively choosing when to exit can be suboptimal in terms of saving computation time, and also result in unpredictable degradations to model performance, especially when predictions depend on each other, as in autoregressive language generation.

Original: Layer Layer
Revised: Layer Layer

Original: Grant
Revised: Grant

Original: Elliott
Revised: Elliott

Original: Layer Layer
Revised: Layer Layer

Original: Layer Layer
Revised: Layer Layer

Original: Layer Layer
Revised: Layer Layer

Original: Layer Layer
Revised: Layer Layer

Original: Layerhit a
Revised: Layerhit a

Original: Layersix to put <S> …
Revised: Layersix to put <S> …

Original: Example of “ state propagation ” (Dashed arrows show the hidden- states of previous steps used to compute layer 5 at position 6).
Revised: Example of “ state propagation ” (Dashed arrows show the hidden- states of previous steps used to compute layer 5 at position 6).

Original: Early Exit?
Revised: Early Exit?

Original: Layer
Revised: Layer

Original: User-defined 𝛿,𝜖 global tolerance constraints guide the local exiting decisions
Revised: User-defined 𝛿,𝜖 global tolerance constraints guide the local exiting decisions

Original: Layer
Revised: Layer

Original: Layer Layer
Revised: Layer Layer

Original: Layer Layer
Revised: Layer Layer

Original: Layer Layer
Revised: Layer Layer

Original: Layer Layer
Revised: Layer Layer

Original: Layer
Revised: Layer

Original: Layer𝑌 $%&’( 𝑌 )*’’ or 𝑍 +$,+
Revised: Layer𝑌 $%&’( 𝑌 )*’’ or 𝑍 +$,+

Original: Guaranteed 𝛿,𝜖 textual or risk consistency of the full sequence ≈
Revised: Guaranteed 𝛿,𝜖 textual or risk consistency of the full sequence ≈

Original: In this work, we analyze the early exiting paradigm for LLMs, and present a principled method for increasing model efﬁciency while remaining conﬁdent in the quality of the resulting predictions.
Revised: In this work, we analyze the early exiting paradigm for LLMs, and present a principled method for increasing model efﬁciency while remaining conﬁdent in the quality of the resulting predictions.

Original: Speciﬁcally, we develop a method for calibrating local, per-token, exit decisions such that global, sequence-level constraints—as determined by lexical or semantic sequence-level metrics like ROUGE or BLEURT score—are provably maintained with arbitrarily high probability (e.g., 95%).
Revised: Speciﬁcally, we develop a method for calibrating local, per-token, exit decisions such that global, sequence-level constraints—as determined by lexical or semantic sequence-level metrics like ROUGE or BLEURT score—are provably maintained with arbitrarily high probability (e.g., 95%).

Original: This process, which we call C onﬁdent
Revised: This process, which we call C onﬁdent

Original: A daptive L anguage M odeling (CALM), is illustrated in Figure 1.
Revised: A daptive L anguage M odeling (CALM), is illustrated in Figure 1.

Original: Our approach leverages recent techniques in distribution-free risk control in order to create conﬁdent generations with strong statistical guarantees [2; 3; 10].
Revised: Our approach leverages recent techniques in distribution-free risk control in order to create conﬁdent generations with strong statistical guarantees [2; 3; 10].

Original: Concretely, suppose we have been given a calibration set S cal :
Revised: Concretely, suppose we have been given a calibration set S cal :

Original: = { P i } ni =1 ∈ P n of independent and identically distributed (i.i.d.)
Revised: = { P i } ni =1 ∈ P n of independent and identically distributed (i.i.d.)

Original: prompts to our LLM (e.g., paragraphs to be summarized, sentences to be translated, or questions to be answered via language modeling).
Revised: prompts to our LLM (e.g., paragraphs to be summarized, sentences to be translated, or questions to be answered via language modeling).

Original: Let P test be a new i.i.d.
Revised: Let P test be a new i.i.d.

Original: test prompt to our LLM, where Y early :=
Revised: test prompt to our LLM, where Y early :=

Original: LLM early ( P test ) and Y full :=
Revised: LLM early ( P test ) and Y full :=

Original: LLM full ( P test ) are the adaptive and standard outputs of our LLM, respectively.
Revised: LLM full ( P test ) are the adaptive and standard outputs of our LLM, respectively.

Original: In order to be satisﬁed with Y early , we might require it to be textually consistent with
Revised: In order to be satisﬁed with Y early , we might require it to be textually consistent with

Original: Y full .
Revised: Y full .

Original: Given any bounded text dissimilarity function D , we aim to calibrate the early-exiting LLM such that its predictions agree to a tolerance δ with the full model in expectation with high probability,
Revised: Given any bounded text dissimilarity function D , we aim to calibrate the early-exiting LLM such that its predictions agree to a tolerance δ with the full model in expectation with high probability,

Original: [Equation]
Revised: [Equation]

Original: where the randomness is over draws of S cal , and (cid:15) ∈ (0 , 1) .
Revised: where the randomness is over draws of S cal , and (cid:15) ∈ (0 , 1) .

Original: Eq.
Revised: Eq.

Original: (1) has the signiﬁcant advantage of being achievable using only unlabeled calibration data S cal (a quality that is critical for fewshot tasks, for example).
Revised: (1) has the signiﬁcant advantage of being achievable using only unlabeled calibration data S cal (a quality that is critical for fewshot tasks, for example).

Original: Enforcing textual consistency with the original Y full , however, may be unnecessarily strict for certain tasks, especially where multiple generations may be acceptable.
Revised: Enforcing textual consistency with the original Y full , however, may be unnecessarily strict for certain tasks, especially where multiple generations may be acceptable.

Original: As an alternative, given a calibration set of prompts paired with a set of (potentially multiple) target references, S cal :=
Revised: As an alternative, given a calibration set of prompts paired with a set of (potentially multiple) target references, S cal :=

Original: { ( P i , Z i ) } ni
Revised: { ( P i , Z i ) } ni

Original: =1 ∈
Revised: =1 ∈

Original: ( P × 2 Y ) n , and any bounded risk function R , we also consider an objective that enforces risk consistency by limiting the relative increase in risk of the predictions
Revised: ( P × 2 Y ) n , and any bounded risk function R , we also consider an objective that enforces risk consistency by limiting the relative increase in risk of the predictions

Original: Y early compared to Y full , with respect to the set of test-time references Z test , i.e.,
Revised: Y early compared to Y full , with respect to the set of test-time references Z test , i.e.,

Original: [Equation]
Revised: [Equation]

Original: [Equation]
Revised: [Equation]

Original: Within the constraints of either Eq.
Revised: Within the constraints of either Eq.

Original: (1) or Eq.
Revised: (1) or Eq.

Original: (2), the goal of our work is to ﬁnd the most computationally efﬁcient Y early , i.e., generations that exit as early as possible while still maintaining our desired performance guarantees.
Revised: (2), the goal of our work is to ﬁnd the most computationally efﬁcient Y early , i.e., generations that exit as early as possible while still maintaining our desired performance guarantees.

Original: In order to achieve this, it is necessary to develop a reliable signal for how likely local, per-token early-exit decisions are to disrupt the global properties of the complete sequence.
Revised: In order to achieve this, it is necessary to develop a reliable signal for how likely local, per-token early-exit decisions are to disrupt the global properties of the complete sequence.

Original: Here, we ﬁrst analyze how errors are propagated in Transformer-based LLMs, and then present an effective and efﬁcient scoring mechanism for assigning “consistent early-exit” conﬁdence scores after each layer used during the generation of a new token.
Revised: Here, we ﬁrst analyze how errors are propagated in Transformer-based LLMs, and then present an effective and efﬁcient scoring mechanism for assigning “consistent early-exit” conﬁdence scores after each layer used during the generation of a new token.

Original: The decision to exit or not is based on these scores, and is carefully calibrated using S cal such that our performance bounds are provably satisﬁed.
Revised: The decision to exit or not is based on these scores, and is carefully calibrated using S cal such that our performance bounds are provably satisﬁed.

Original: Finally, we empirically validate our method on multiple, diverse NLP generation tasks, including text summarization, machine translation, and question answering.
Revised: Finally, we empirically validate our method on multiple, diverse NLP generation tasks, including text summarization, machine translation, and question answering.

Original: Our experiments demonstrate the potential of CALM in reducing the average complexity of the model and accelerating inference by about × 3 while reliably controlling for high performance.
Revised: Our experiments demonstrate the potential of CALM in reducing the average complexity of the model and accelerating inference by about × 3 while reliably controlling for high performance.

Original: Contributions.
Revised: Contributions.

Original: In summary, our main contributions are as follows:
Revised: In summary, our main contributions are as follows:

Original: • A framework (CALM) for reliably accelerating Transformer-based LLM generations.
Revised: • A framework (CALM) for reliably accelerating Transformer-based LLM generations.

Original: • A systematic analysis of the token-wise early exit mechanism that motivates a simple-but-effective class of conﬁdence measures and threshold functions that are used as part of the CALM framework.
Revised: • A systematic analysis of the token-wise early exit mechanism that motivates a simple-but-effective class of conﬁdence measures and threshold functions that are used as part of the CALM framework.

Original: • An empirical demonstration of CALM’s efﬁciency gains on three diverse generation datasets.
Revised: • An empirical demonstration of CALM’s efﬁciency gains on three diverse generation datasets.

Original:  Related Work
Revised:  Related Work

Original: Improving inference-time efﬁciency of LLMs has been an ongoing effort of the research community over the past several years [49; 72; 85], leveraging techniques such as knowledge distillation [6; 32; 36; 69; 69; 78; 56], ﬂoating point quantization [71; 65], layer pruning [24], vector dropping [38], and others [41].
Revised: Improving inference-time efﬁciency of LLMs has been an ongoing effort of the research community over the past several years [49; 72; 85], leveraging techniques such as knowledge distillation [6; 32; 36; 69; 69; 78; 56], ﬂoating point quantization [71; 65], layer pruning [24], vector dropping [38], and others [41].

Original: Another line of work involves conditional computation to train larger models that only use a sparser subset of the full network during inference, for example by routing over mixture-ofexperts [9; 22; 39; 91], recurring modules [18; 29; 35], or accessing external memory [82].
Revised: Another line of work involves conditional computation to train larger models that only use a sparser subset of the full network during inference, for example by routing over mixture-ofexperts [9; 22; 39; 91], recurring modules [18; 29; 35], or accessing external memory [82].

Original: These models, however, still use the same amount of compute for all input examples.
Revised: These models, however, still use the same amount of compute for all input examples.

Original: Here, we focus on adaptive compute , a speciﬁc kind of conditional compute that aims to dynamically allocate different computational power per example, with the goal of reducing the overall complexity while maintaining high performance.
Revised: Here, we focus on adaptive compute , a speciﬁc kind of conditional compute that aims to dynamically allocate different computational power per example, with the goal of reducing the overall complexity while maintaining high performance.

Original: This approach, often referred to as early-exiting [16; 25; 47; 74; 79; 87], is complementary to many of the solutions above and can potentially be combined with them.
Revised: This approach, often referred to as early-exiting [16; 25; 47; 74; 79; 87], is complementary to many of the solutions above and can potentially be combined with them.

Original: Multiple early-exit techniques for encoder-only Transformers (e.g., BERT [20]) have been recently proposed [8; 34; 43; 44; 45; 60; 68; 83; 90; 92].
Revised: Multiple early-exit techniques for encoder-only Transformers (e.g., BERT [20]) have been recently proposed [8; 34; 43; 44; 45; 60; 68; 83; 90; 92].

Original: Most of these methods rely on intrinsic conﬁdence measures (e.g., based on the softmax distribution), while others try to predict the routing in advance [46; 70], or train a small early-exit classiﬁer [57; 84], as we also examine here.
Revised: Most of these methods rely on intrinsic conﬁdence measures (e.g., based on the softmax distribution), while others try to predict the routing in advance [46; 70], or train a small early-exit classiﬁer [57; 84], as we also examine here.

Original: These measures can be calibrated to reliably guarantee consistency of the early prediction with the full model [57].
Revised: These measures can be calibrated to reliably guarantee consistency of the early prediction with the full model [57].

Original: However, the techniques used for encoder-only classiﬁers are unsuitable for global consistency constraints with a sequence of dependent predictions, which are inherent in the decoding process of autoregressive language models, which we address here.
Revised: However, the techniques used for encoder-only classiﬁers are unsuitable for global consistency constraints with a sequence of dependent predictions, which are inherent in the decoding process of autoregressive language models, which we address here.

Original: Our work is also motivated by recent ﬁndings on the existence of saturation events in LMs, where the top-ranked prediction is unchanged after some layer and is propagated upward.
Revised: Our work is also motivated by recent ﬁndings on the existence of saturation events in LMs, where the top-ranked prediction is unchanged after some layer and is propagated upward.

Original: Geva et al.
Revised: Geva et al.

Original: [28] examined interactions of the hidden-state with feed-forward layers to predict these events.
Revised: [28] examined interactions of the hidden-state with feed-forward layers to predict these events.

Original: However, they only consider local single predictions and do not address the challenges involved with sequence generation.
Revised: However, they only consider local single predictions and do not address the challenges involved with sequence generation.

Original: Our early-exit LM architecture most closely relates to Elbayad et al.
Revised: Our early-exit LM architecture most closely relates to Elbayad et al.

Original: [23], who found a tokenlevel early-exit classiﬁer to provide the best efﬁciency-performance tradeoffs on machine translation.
Revised: [23], who found a tokenlevel early-exit classiﬁer to provide the best efﬁciency-performance tradeoffs on machine translation.

Original: Here, we introduce a theoretically-grounded calibration method for provably controlling the quality of the full sequence.
Revised: Here, we introduce a theoretically-grounded calibration method for provably controlling the quality of the full sequence.

Original: By doing so, we provide reliable efﬁciency gains—deriving local early exiting decisions from the global desirable constraints.
Revised: By doing so, we provide reliable efﬁciency gains—deriving local early exiting decisions from the global desirable constraints.

Original: Moreover, we introduce several model improvements and empirical analyses, including (1) analyzing the primary sources of performance degradation, leading us to propose a decaying threshold function for better tradeoff control without inﬂating the search space; (2) improving the early-exit classiﬁer training; and (3) experimenting with two new tasks.
Revised: Moreover, we introduce several model improvements and empirical analyses, including (1) analyzing the primary sources of performance degradation, leading us to propose a decaying threshold function for better tradeoff control without inﬂating the search space; (2) improving the early-exit classiﬁer training; and (3) experimenting with two new tasks.

Original: Our calibration procedure for connecting global constraints to local decisions, relates to recent research around distribution-free uncertainty quantiﬁcation [1; 62; 77].
Revised: Our calibration procedure for connecting global constraints to local decisions, relates to recent research around distribution-free uncertainty quantiﬁcation [1; 62; 77].

Original: Several methods were developed in recent studies to expand and adjust the theoretical framework for obtaining practical efﬁciency gains on target applications [4; 7; 21; 26; 27; 48; 88].
Revised: Several methods were developed in recent studies to expand and adjust the theoretical framework for obtaining practical efﬁciency gains on target applications [4; 7; 21; 26; 27; 48; 88].

Original: Here, we frame our consistency requirements around the Learn then Test (LTT) framework [3], and leverage the approximately monotonic behavior of our conﬁdence measures and the nested structure of our problem, that by deﬁnition guarantees consistency with large enough threshold, to form tight and effective bounds.
Revised: Here, we frame our consistency requirements around the Learn then Test (LTT) framework [3], and leverage the approximately monotonic behavior of our conﬁdence measures and the nested structure of our problem, that by deﬁnition guarantees consistency with large enough threshold, to form tight and effective bounds.

Original:  Early Exiting for Adaptive Language Modeling
Revised:  Early Exiting for Adaptive Language Modeling

Original: In the following, we describe and analyze the early-exiting Transformer LM.
Revised: In the following, we describe and analyze the early-exiting Transformer LM.

Original: We begin with a brief recap of the Transformer architecture (§3.1) and early exiting (§3.2) for convenience, following previous work [23; 70; 76].
Revised: We begin with a brief recap of the Transformer architecture (§3.1) and early exiting (§3.2) for convenience, following previous work [23; 70; 76].

Original: We then investigate the effects of early exiting on model performance, and identify primary sources of performance degradation and how to alleviate them (§3.3)—which guide our architecture and training design (§3.4) and proposed per-token conﬁdence measures (§3.5).
Revised: We then investigate the effects of early exiting on model performance, and identify primary sources of performance degradation and how to alleviate them (§3.3)—which guide our architecture and training design (§3.4) and proposed per-token conﬁdence measures (§3.5).

Original: 1 The Transformer architecture
Revised: 1 The Transformer architecture

Original: We use the Transformer sequence-to-sequence model, based on the T5x implementation [55].
Revised: We use the Transformer sequence-to-sequence model, based on the T5x implementation [55].

Original: Here, we only review simpliﬁed details of the Transformer architecture relevant to early-exiting, and refer the reader to Vaswani et al.
Revised: Here, we only review simpliﬁed details of the Transformer architecture relevant to early-exiting, and refer the reader to Vaswani et al.

Original: [76] for full details.
Revised: [76] for full details.

Original: At a high level, both encoder and decoder networks contain L stacked layers, where each layer is composed of a multi-head self-attention sub-layer, followed by a feedforward sub-layer, each with residual connections and layer normalization.
Revised: At a high level, both encoder and decoder networks contain L stacked layers, where each layer is composed of a multi-head self-attention sub-layer, followed by a feedforward sub-layer, each with residual connections and layer normalization.

Original: The decoder network has an additional multi-head attention sub-layer that attends to the encoder states.
Revised: The decoder network has an additional multi-head attention sub-layer that attends to the encoder states.

Original: Consider a prompt x = ( x 1 , . . .
Revised: Consider a prompt x = ( x 1 , . . .

Original: , x p ) , processed by the encoder to yield encoder states ( e 1 , . . .
Revised: , x p ) , processed by the encoder to yield encoder states ( e 1 , . . .

Original: , e p ) , and the current, partially generated response ( y 1 , . . .
Revised: , e p ) , and the current, partially generated response ( y 1 , . . .

Original: , y t ) .
Revised: , y t ) .

Original: When generating the next token y t +1 , the decoder computes a decoder state d it for layer i out of L as:
Revised: When generating the next token y t +1 , the decoder computes a decoder state d it for layer i out of L as:

Original: [Equation]
Revised: [Equation]

Original: Internal to each of the attention mechanisms, written as Attention( x, z 1: m ) for some input x and sequence of m states z 1: m , x is ﬁrst projected to a query vector q :=
Revised: Internal to each of the attention mechanisms, written as Attention( x, z 1: m ) for some input x and sequence of m states z 1: m , x is ﬁrst projected to a query vector q :=

Original: W Q x ∈ R dim k , while z is projected to a matrix of key-value vectors, K :=
Revised: W Q x ∈ R dim k , while z is projected to a matrix of key-value vectors, K :=

Original: W K z 1: m ∈ R m × dim k and V :=
Revised: W K z 1: m ∈ R m × dim k and V :=

Original: W V z 1: m ∈ R m × dim v .
Revised: W V z 1: m ∈ R m × dim v .

Original: The output o is then computed as o := softmax (cid:0) q K (cid:62) / √ dim k (cid:1) V .
Revised: The output o is then computed as o := softmax (cid:0) q K (cid:62) / √ dim k (cid:1) V .

Original: Multi-head and normalization components are omitted for brevity.
Revised: Multi-head and normalization components are omitted for brevity.

Original: Each layer uses different projections W iQ , W iK , and W iV (which are also unique for computing h it versus a it ).
Revised: Each layer uses different projections W iQ , W iK , and W iV (which are also unique for computing h it versus a it ).

Original: Finally, after layer L , a distribution over vocabulary tokens y t +1 ∈ Y is computed via a softmaxnormalized linear classiﬁer W L , where p ( y t +1 | d Lt ) =
Revised: Finally, after layer L , a distribution over vocabulary tokens y t +1 ∈ Y is computed via a softmaxnormalized linear classiﬁer W L , where p ( y t +1 | d Lt ) =

Original: softmax( W L d Lt ) .
Revised: softmax( W L d Lt ) .

Original: 3.2 Decoding with early exiting
Revised: 3.2 Decoding with early exiting

Original: Instead of always making a prediction based on the representation at the ﬁnal layer, d Lt , the key idea in early-exiting is to choose y t +1 more quickly, if conﬁdent, by computing p ( y t +1 | d it )
Revised: Instead of always making a prediction based on the representation at the ﬁnal layer, d Lt , the key idea in early-exiting is to choose y t +1 more quickly, if conﬁdent, by computing p ( y t +1 | d it )

Original: =
Revised: =

Original: softmax( W i d it ) for some intermediate layer i < L .
Revised: softmax( W i d it ) for some intermediate layer i < L .

Original: Concretely, let c it ∈ [0 , 1] denote some local conﬁdence score for layer i while processing token t , where higher values indicate a higher propensity to exit early (we will propose effective instantiations of c it in §3.5).
Revised: Concretely, let c it ∈ [0 , 1] denote some local conﬁdence score for layer i while processing token t , where higher values indicate a higher propensity to exit early (we will propose effective instantiations of c it in §3.5).

Original: Let λ it ∈
Revised: Let λ it ∈

Original: [0 , 1] denote some local early-exiting threshold, where the model exits early if c it ≥ λ it , or otherwise proceeds to compute the next representation, d i +1 t .
Revised: [0 , 1] denote some local early-exiting threshold, where the model exits early if c it ≥ λ it , or otherwise proceeds to compute the next representation, d i +1 t .

Original: The (greedily chosen) prediction y t +1 can then be written as:
Revised: The (greedily chosen) prediction y t +1 can then be written as:

Original: [Equation]
Revised: [Equation]

Original: Note that due to the self-attention mechanism of the Transformer, computing the input hidden state h it for layer i depends on d i − 1 1: t − 1 , i.e., the output hidden states of the previous layer for all the tokens that have been generated so far.
Revised: Note that due to the self-attention mechanism of the Transformer, computing the input hidden state h it for layer i depends on d i − 1 1: t − 1 , i.e., the output hidden states of the previous layer for all the tokens that have been generated so far.

Original: Therefore, if the model has early exited at some layer j < i − 1 for a token s < t , then d i − 1 s is not available.
Revised: Therefore, if the model has early exited at some layer j < i − 1 for a token s < t , then d i − 1 s is not available.

Original: As an approximation, we set d ks = d
Revised: As an approximation, we set d ks = d

Original: js for all layers k > j following Elbayad et al.
Revised: js for all layers k > j following Elbayad et al.

Original: [23], with the understanding that this will introduce some error.
Revised: [23], with the understanding that this will introduce some error.

Original: In the next section, in addition to other factors, we will analyze the impact of this copied state on performance.
Revised: In the next section, in addition to other factors, we will analyze the impact of this copied state on performance.

Original: 3.3 The effects of early exiting on error propagation
Revised: 3.3 The effects of early exiting on error propagation

Original: We perform several controlled experiments to investigate the behavior and the potential of earlyexiting during decoding.
Revised: We perform several controlled experiments to investigate the behavior and the potential of earlyexiting during decoding.

Original: We use an 8-layer T5 encoder-decoder and the CNN/DM dataset for these experiments.
Revised: We use an 8-layer T5 encoder-decoder and the CNN/DM dataset for these experiments.

Original: See §5 for more details on this model and data.
Revised: See §5 for more details on this model and data.

Original: 3.3.1 State propagation
Revised: 3.3.1 State propagation

Original: First, we control for the correctness of the predicted tokens to examine the effect of state copying (§3.2), and also measure an approximate upper bound for compute reduction.
Revised: First, we control for the correctness of the predicted tokens to examine the effect of state copying (§3.2), and also measure an approximate upper bound for compute reduction.

Original: We use an oracle conﬁdence measure that exits at the earliest layer that agrees with the top prediction (i.e., replacing the conditions in Eq.
Revised: We use an oracle conﬁdence measure that exits at the earliest layer that agrees with the top prediction (i.e., replacing the conditions in Eq.

Original: 4 with arg max p ( y t +1 | d it ) =
Revised: 4 with arg max p ( y t +1 | d it ) =

Original: arg max p ( y t +1 | d Lt ) ).
Revised: arg max p ( y t +1 | d Lt ) ).

Original: Hence, the only factor that can cause divergence in the generation is the state copying mechanism for skipped layers.
Revised: Hence, the only factor that can cause divergence in the generation is the state copying mechanism for skipped layers.

Original: The results of this experiment are highly encouraging.
Revised: The results of this experiment are highly encouraging.

Original: This oracle achieves an ROUGE-L score of 38.24, compared to 38.32 with the full model, while only using an average of 1.53 layers per token.
Revised: This oracle achieves an ROUGE-L score of 38.24, compared to 38.32 with the full model, while only using an average of 1.53 layers per token.

Original: We also try an oracle that always uses d 11: t − 1 and it reaches 38.

Revised: We also try an oracle that always uses d 11: t − 1 and it reaches 38.

Original: ROUGE-L.
Revised: ROUGE-L.

Original: These results indicate that (1) the model is robust to state copying from lower layers, and (2) there is remarkable potential for saving compute—by up to × 5 . 2 —while preserving performance, given a good conﬁdence measure.
Revised: These results indicate that (1) the model is robust to state copying from lower layers, and (2) there is remarkable potential for saving compute—by up to × 5 . 2 —while preserving performance, given a good conﬁdence measure.

Original: We also experiment with copying the projected states K j , V j to skipped layers k > j .
Revised: We also experiment with copying the projected states K j , V j to skipped layers k > j .

Original: This version of the oracle results in a signiﬁcant drop in performance to 23.02 ROUGE-L. Overall, we conjecture
Revised: This version of the oracle results in a signiﬁcant drop in performance to 23.02 ROUGE-L. Overall, we conjecture

Original: >
Revised: >

Original: [Figure]
Revised: [Figure]

Original: that the self-attention at layer i for token t can safely use hidden-states d js for j < i − 1 as key-values of tokens s < t , as long as the projections W iK/V of layer i are used.
Revised: that the self-attention at layer i for token t can safely use hidden-states d js for j < i − 1 as key-values of tokens s < t , as long as the projections W iK/V of layer i are used.

Original: Notably, this projection can now be computed concurrently for all skipped layers as they all use the same d from the exited layer.
Revised: Notably, this projection can now be computed concurrently for all skipped layers as they all use the same d from the exited layer.

Original: 3.3.2 Sensitivity to local errors
Revised: 3.3.2 Sensitivity to local errors

Original: Next, we examine the impact of local token modiﬁcations—which might occur due to early exits—on the whole generated sequence.
Revised: Next, we examine the impact of local token modiﬁcations—which might occur due to early exits—on the whole generated sequence.

Original: We experiment with two kinds of perturbations: sampling-based , where we select the 10th-ranked token according to layer L ; and layer-based , where we select the the ﬁrst layer’s prediction at timestep t .
Revised: We experiment with two kinds of perturbations: sampling-based , where we select the 10th-ranked token according to layer L ; and layer-based , where we select the the ﬁrst layer’s prediction at timestep t .

Original: All other tokens are predicted greedily by layer L .
Revised: All other tokens are predicted greedily by layer L .

Original: As shown in
Revised: As shown in

Original: Figure 2a, earlier perturbations result in lower sequence-level scores as there are more tokens that might suffer from the divergence.
Revised: Figure 2a, earlier perturbations result in lower sequence-level scores as there are more tokens that might suffer from the divergence.

Original: The degradation, though, is much smaller with layer- compared to sampling-based perturbations since, in practice, the early exit predictions are mostly accurate.
Revised: The degradation, though, is much smaller with layer- compared to sampling-based perturbations since, in practice, the early exit predictions are mostly accurate.

Original: Decaying threshold.
Revised: Decaying threshold.

Original: Following the above observation, we introduce a decaying early-exiting threshold that is more permissive towards exiting as the decoding process continues.
Revised: Following the above observation, we introduce a decaying early-exiting threshold that is more permissive towards exiting as the decoding process continues.

Original: Motivated by the logarithmic behavior in Figure 2a, we use an exponential function with a user-deﬁned temperature τ :
Revised: Motivated by the logarithmic behavior in Figure 2a, we use an exponential function with a user-deﬁned temperature τ :

Original: [Equation]
Revised: [Equation]

Original: (5) where N is the maximum output length.
Revised: (5) where N is the maximum output length.

Original: Figure 2b illustrates this function.
Revised: Figure 2b illustrates this function.

Original: Essentially, this function presents an effective compromise between simply using the same threshold for all tokens, and searching over a huge space of per-position different thresholds.
Revised: Essentially, this function presents an effective compromise between simply using the same threshold for all tokens, and searching over a huge space of per-position different thresholds.

Original: Practically, it supports ﬁner and better control over the performance-efﬁciency tradeoff compared to a single threshold.
Revised: Practically, it supports ﬁner and better control over the performance-efﬁciency tradeoff compared to a single threshold.

Original: Figure 2c presents the outcomes of a search over λ with steps of 0 .
Revised: Figure 2c presents the outcomes of a search over λ with steps of 0 .

Original: 01 and softmax-based conﬁdence (§3.5).
Revised: 01 and softmax-based conﬁdence (§3.5).

Original: With the single threshold variant ( τ = 0 ), attempting to improve the efﬁciency will lead to a drastic drop of more than 10 points in the textual similarity against the full model’s prediction.
Revised: With the single threshold variant ( τ = 0 ), attempting to improve the efﬁciency will lead to a drastic drop of more than 10 points in the textual similarity against the full model’s prediction.

Original: In contrast, the decaying thresholds reveal several intermediate points with desirable tradeoffs to consider.
Revised: In contrast, the decaying thresholds reveal several intermediate points with desirable tradeoffs to consider.

Original: 3.4 Training early exit classiﬁers for local consistency
Revised: 3.4 Training early exit classiﬁers for local consistency

Original: While our goal is to preserve the quality of the complete output sequence, we note that this doesn’t necessarily demand local token-level consistency.
Revised: While our goal is to preserve the quality of the complete output sequence, we note that this doesn’t necessarily demand local token-level consistency.

Original: Consider the target sequence “the concert was wonderful and long.”
Revised: Consider the target sequence “the concert was wonderful and long.”

Original: An output that switches the order of adjectives to “the concert was long and wonderful” would be called consistent by most semantic measures (and obtain 100 token- F 1 score).
Revised: An output that switches the order of adjectives to “the concert was long and wonderful” would be called consistent by most semantic measures (and obtain 100 token- F 1 score).

Original: Yet, the sentences diverge at the ﬁrst adjective long which is semantically different from wonderful .
Revised: Yet, the sentences diverge at the ﬁrst adjective long which is semantically different from wonderful .

Original: Training for global consistency, however, could be challenging [81] as it depends on possibly noisy signals that might affect the learning, and also breaks the efﬁcient teacher-forcing training strategy of LMs that relies on local-decisions.
Revised: Training for global consistency, however, could be challenging [81] as it depends on possibly noisy signals that might affect the learning, and also breaks the efﬁcient teacher-forcing training strategy of LMs that relies on local-decisions.

Original: On the other hand, perfect local consistency implies global consistency.
Revised: On the other hand, perfect local consistency implies global consistency.

Original: Therefore, we opt to train for local consistency, which requires minimal changes to the training procedure, and relax the local requirement to a global one during inference.
Revised: Therefore, we opt to train for local consistency, which requires minimal changes to the training procedure, and relax the local requirement to a global one during inference.

Original: Speciﬁcally, similar to Elbayad et al.
Revised: Speciﬁcally, similar to Elbayad et al.

Original: [23], we average losses for each layer to obtain the objective
Revised: [23], we average losses for each layer to obtain the objective

Original: L =
Revised: L =

Original: L (cid:88) i =
Revised: L (cid:88) i =

Original: ω
Revised: ω

Original: i L i , where
Revised: i L i , where

Original: L (cid:88) i =
Revised: L (cid:88) i =

Original: ω i = 1 .
Revised: ω i = 1 .

Original: L is the negative log-likelihood loss.
Revised: L is the negative log-likelihood loss.

Original: We set ω i =
Revised: We set ω i =

Original: i/ (cid:80)
Revised: i/ (cid:80)

Original: Lj =1 j to favor higher layers, and ﬁnd this objective to mostly preserve the full model’s performance compared to regular training.
Revised: Lj =1 j to favor higher layers, and ﬁnd this objective to mostly preserve the full model’s performance compared to regular training.

Original: We note that there is some misalignment between this training and inference behavior due to the hidden states of skipped layers.
Revised: We note that there is some misalignment between this training and inference behavior due to the hidden states of skipped layers.

Original: However, as discussed in §3.3.1, the performance is not affected if the hidden-state is copied.
Revised: However, as discussed in §3.3.1, the performance is not affected if the hidden-state is copied.

Original: 3.5 Local conﬁdence measures
Revised: 3.5 Local conﬁdence measures

Original: We experiment with three conﬁdence measures for Eq.
Revised: We experiment with three conﬁdence measures for Eq.

Original: (4) that differ in their parameter and compute operation efﬁciencies.
Revised: (4) that differ in their parameter and compute operation efﬁciencies.

Original: Our experiments (§6) will also show that they differ in their predictive power.
Revised: Our experiments (§6) will also show that they differ in their predictive power.

Original: Softmax response.
Revised: Softmax response.

Original: We take the difference between the top two values of Softmax( W i d it ) .
Revised: We take the difference between the top two values of Softmax( W i d it ) .

Original: With a large output vocabulary, this results in many ﬂoating point operations (FLOPs)—though, the next layer i + 1 can start its computation in parallel, avoiding additional runtime.
Revised: With a large output vocabulary, this results in many ﬂoating point operations (FLOPs)—though, the next layer i + 1 can start its computation in parallel, avoiding additional runtime.

Original: Hidden-state saturation.
Revised: Hidden-state saturation.

Original: As a simple parameter-free and fast to compute alternative, we take the cosine similarity sim
Revised: As a simple parameter-free and fast to compute alternative, we take the cosine similarity sim

Original: ( d it , d i − 1 t ) for i > 1 .
Revised: ( d it , d i − 1 t ) for i > 1 .

Original: By deﬁnition, the ﬁrst possible exit is at the second layer (unless λ = 0 ).
Revised: By deﬁnition, the ﬁrst possible exit is at the second layer (unless λ = 0 ).

Original: This measure tries to identify early saturation events of the hidden-state [28].
Revised: This measure tries to identify early saturation events of the hidden-state [28].

Original: Early exit classiﬁer.
Revised: Early exit classiﬁer.

Original: We train a dedicated linear classiﬁer M to predict the likelihood of exiting with local consistency given the current hidden-state: c it =
Revised: We train a dedicated linear classiﬁer M to predict the likelihood of exiting with local consistency given the current hidden-state: c it =

Original: M ( d it ) .
Revised: M ( d it ) .

Original: This measure is very fast to compute at inference, and adds only | d | + 1 new parameters.
Revised: This measure is very fast to compute at inference, and adds only | d | + 1 new parameters.

Original: To avoid any impact on the core model’s performance, we train it as a second step where we freeze all parameters other than M .
Revised: To avoid any impact on the core model’s performance, we train it as a second step where we freeze all parameters other than M .

Original: We simply use a per-layer independent cross-entropy loss against a consistency oracle 1 [arg max( p ( y t +1 | d it )
Revised: We simply use a per-layer independent cross-entropy loss against a consistency oracle 1 [arg max( p ( y t +1 | d it )

Original: =
Revised: =

Original: arg max( p ( y t +1 | d Lt )] , and average across the L − 1 layers.
Revised: arg max( p ( y t +1 | d Lt )] , and average across the L − 1 layers.

Original: We also experimented with the geometriclike training of Elbayad et al.
Revised: We also experimented with the geometriclike training of Elbayad et al.

Original: [23], but ﬁnd it to be less effective here (see App. D).
Revised: [23], but ﬁnd it to be less effective here (see App. D).

Original: The two objectives are closely related, but the geometric one ignores any signal from the states post the ﬁrst oracle exit.
Revised: The two objectives are closely related, but the geometric one ignores any signal from the states post the ﬁrst oracle exit.

Original:  Calibrating Local Early Exits from Global Constraints
Revised:  Calibrating Local Early Exits from Global Constraints

Original: We now describe our calibration procedure for ﬁnding a shared exit threshold λ ∈ [0 , 1] that can be used directly in Eq.
Revised: We now describe our calibration procedure for ﬁnding a shared exit threshold λ ∈ [0 , 1] that can be used directly in Eq.

Original: (4), or via Eq.
Revised: (4), or via Eq.

Original: (5), such that we provably satisfy our desired global constraints over the fully generated sequences.
Revised: (5), such that we provably satisfy our desired global constraints over the fully generated sequences.

Original: At a high level, our approach uses the following basic recipe:
Revised: At a high level, our approach uses the following basic recipe:

Original: We specify a grid of possible values of Λ = ( λ 1 , . . .
Revised: We specify a grid of possible values of Λ = ( λ 1 , . . .

Original: , λ k )
Revised: , λ k )

Original: that
Revised: that

Original: may
Revised: may

Original: result
Revised: result

Original: in
Revised: in

Original: acceptable
Revised: acceptable

Original: generations; 2.
Revised: generations; 2.

Original: We choose the lowest valid λ ∈ Λ that we can identify with rigorous statistical testing tools.
Revised: We choose the lowest valid λ ∈ Λ that we can identify with rigorous statistical testing tools.

Original: Let P test be an i.i.d.
Revised: Let P test be an i.i.d.

Original: prompt given to the LLM at test time, and let Y full :
Revised: prompt given to the LLM at test time, and let Y full :

Original: =
Revised: =

Original: LLM full ( P test ) ∈ Y and
Revised: LLM full ( P test ) ∈ Y and

Original: Y early :=
Revised: Y early :=

Original: LLM early ( P test , λ ) ∈ Y denote the full and adaptive responses, respectively.
Revised: LLM early ( P test , λ ) ∈ Y denote the full and adaptive responses, respectively.

Original: Optionally, let Z test be a set of gold references for our task, if assumed.
Revised: Optionally, let Z test be a set of gold references for our task, if assumed.

Original: Our goal, as introduced in §1, is to ﬁnd a valid λ using S cal such that we satisfy either of two types of global “consistency” constraints:
Revised: Our goal, as introduced in §1, is to ﬁnd a valid λ using S cal such that we satisfy either of two types of global “consistency” constraints:

Original: Deﬁnition 1 (Textual consistency) .
Revised: Deﬁnition 1 (Textual consistency) .

Original: An adaptive LLM is textually consistent if given any bounded text dissimilarity function, D : Y × Y → R , and tolerance δ ∈ R , E (cid:2) D
Revised: An adaptive LLM is textually consistent if given any bounded text dissimilarity function, D : Y × Y → R , and tolerance δ ∈ R , E (cid:2) D

Original: ( Y early , Y full ) (cid:3) ≤ δ .
Revised: ( Y early , Y full ) (cid:3) ≤ δ .

Original: Deﬁnition 2 (Risk consistency) .
Revised: Deﬁnition 2 (Risk consistency) .

Original: An adaptive LLM is risk consistent if given any bounded risk function, R : Y × 2 Y → R , and tolerance δ ∈ R , E
Revised: An adaptive LLM is risk consistent if given any bounded risk function, R : Y × 2 Y → R , and tolerance δ ∈ R , E

Original: [ R ( Y early , Z test )] ≤ E [ R ( Y full , Z test )]
Revised: [ R ( Y early , Z test )] ≤ E [ R ( Y full , Z test )]

Original: + δ .
Revised: + δ .

Original: Without loss of generality, we will assume that D and R are always normalized to the unit interval [0 , 1] , and therefore will only be considering tolerances δ ∈ (0 , 1) .
Revised: Without loss of generality, we will assume that D and R are always normalized to the unit interval [0 , 1] , and therefore will only be considering tolerances δ ∈ (0 , 1) .

Original: At a glance, to ﬁnd a λ that produces a consistent LLM early , we cast our problem as a multiple hypothesis testing problem over a large array of k candidate classiﬁer exit thresholds, Λ = ( λ 1 , . . .
Revised: At a glance, to ﬁnd a λ that produces a consistent LLM early , we cast our problem as a multiple hypothesis testing problem over a large array of k candidate classiﬁer exit thresholds, Λ = ( λ 1 , . . .

Original: , λ k ) , and apply the Learn then Test (LTT) framework of Angelopoulos et al.
Revised: , λ k ) , and apply the Learn then Test (LTT) framework of Angelopoulos et al.

Original: [3] to identify a subset of statistically valid, constraint-satisfying thresholds Λ valid ⊆ Λ .
Revised: [3] to identify a subset of statistically valid, constraint-satisfying thresholds Λ valid ⊆ Λ .

Original: Our ﬁnal λ is then chosen as λ :=
Revised: Our ﬁnal λ is then chosen as λ :=

Original: min(Λ valid ∪ { 1 } ) .
Revised: min(Λ valid ∪ { 1 } ) .

Original: 4.1 The Learn then Test calibration framework
Revised: 4.1 The Learn then Test calibration framework

Original: Choosing a value of λ that rigorously satisﬁes our consistency objectives is challenging, as the performance impact of increasing or decreasing λ is not necessarily monotonic.
Revised: Choosing a value of λ that rigorously satisﬁes our consistency objectives is challenging, as the performance impact of increasing or decreasing λ is not necessarily monotonic.

Original: Naively setting λ , for example, based simply on average calibration set performance, can lead to statistically invalid results in our ﬁnite-sample, distribution-free setting.
Revised: Naively setting λ , for example, based simply on average calibration set performance, can lead to statistically invalid results in our ﬁnite-sample, distribution-free setting.

Original: The LTT framework proposed by Angelopoulos et al.
Revised: The LTT framework proposed by Angelopoulos et al.

Original: [3] solves this problem by reframing hyper-parameter selection as a multiple testing problem.
Revised: [3] solves this problem by reframing hyper-parameter selection as a multiple testing problem.

Original: Let Λ =
Revised: Let Λ =

Original: ( λ 1 , . . .
Revised: ( λ 1 , . . .

Original: , λ k ) be a ﬁnite grid of hyper-parameter values that may, or may not, obtain valid consistency.
Revised: , λ k ) be a ﬁnite grid of hyper-parameter values that may, or may not, obtain valid consistency.

Original: For example, when searching for a value of λ ∈ [0 , 1] , we might consider the evenly spaced set Λ
Revised: For example, when searching for a value of λ ∈ [0 , 1] , we might consider the evenly spaced set Λ

Original: = { i k +1 : i = 1 , . . .
Revised: = { i k +1 : i = 1 , . . .

Original: , k } .
Revised: , k } .

Original: LTT then identiﬁes a subset of values, Λ valid ⊆ Λ , where
Revised: LTT then identiﬁes a subset of values, Λ valid ⊆ Λ , where

Original: P
Revised: P

Original: [Equation]
Revised: [Equation]

Original: LLM early ( P test , λ ) and LLM full ( P test ) are not consistent (cid:17)
Revised: LLM early ( P test , λ ) and LLM full ( P test ) are not consistent (cid:17)

Original: [Equation]
Revised: [Equation]

Original: [Equation] [Equation]
Revised: [Equation] [Equation]

Original: Here, we are using consistency to refer to either textual consistency or risk consistency.
Revised: Here, we are using consistency to refer to either textual consistency or risk consistency.

Original: Eq.
Revised: Eq.

Original: (7) can be satisﬁed by applying standard multiple hypothesis testing techniques as long as super-uniform p-values, p j , are supplied for each value λ j ∈ Λ that support the null hypothesis
Revised: (7) can be satisﬁed by applying standard multiple hypothesis testing techniques as long as super-uniform p-values, p j , are supplied for each value λ j ∈ Λ that support the null hypothesis

Original: [Equation]
Revised: [Equation]

Original: not consistent
Revised: not consistent

Original: [Equation]
Revised: [Equation]

Original: (8) λ j is placed in Λ valid if H j is rejected, and discarded otherwise.
Revised: (8) λ j is placed in Λ valid if H j is rejected, and discarded otherwise.

Original: This yields a consistent LLM early .
Revised: This yields a consistent LLM early .

Original: Proposition 1 (LTT for CALM) .
Revised: Proposition 1 (LTT for CALM) .

Original: Suppose p j is super-uniform for all j under H j for some speciﬁed tolerance δ ∈ (0 , 1) .
Revised: Suppose p j is super-uniform for all j under H j for some speciﬁed tolerance δ ∈ (0 , 1) .

Original: Let A be any family-wise error rate (FWER) controlling procedure at a level (cid:15) ∈ (0 , 1) , where A ( p 1 , . .
Revised: Let A be any family-wise error rate (FWER) controlling procedure at a level (cid:15) ∈ (0 , 1) , where A ( p 1 , . .

Original: , p k ) selects H j to reject.
Revised: , p k ) selects H j to reject.

Original: Choosing λ :=
Revised: Choosing λ :=

Original: min(Λ valid ∪ { 1 } ) then yields a consistent LLM early with probability at least 1 − (cid:15) .
Revised: min(Λ valid ∪ { 1 } ) then yields a consistent LLM early with probability at least 1 − (cid:15) .

Original: Note that a FWER-controlling procedure at a level (cid:15) is an algorithm that decides to accept or reject hypotheses { H i } ki =1 , while ensuring that the probability of falsely rejecting any H j is less than (cid:15) .
Revised: Note that a FWER-controlling procedure at a level (cid:15) is an algorithm that decides to accept or reject hypotheses { H i } ki =1 , while ensuring that the probability of falsely rejecting any H j is less than (cid:15) .

Original: The proof of Proposition 1, given in Appendix A.1, follows directly from Theorem 1 of Angelopoulos et al.
Revised: The proof of Proposition 1, given in Appendix A.1, follows directly from Theorem 1 of Angelopoulos et al.

Original: [3], and the fact that LLM early ( P test , 1) =
Revised: [3], and the fact that LLM early ( P test , 1) =

Original: LLM full ( P test ) by construction per Eq.
Revised: LLM full ( P test ) by construction per Eq.

Original: (4), so that we can always use λ = 1 as a valid fallback if we fail to identify non-empty Λ valid .
Revised: (4), so that we can always use λ = 1 as a valid fallback if we fail to identify non-empty Λ valid .

Original: In the next sections, we describe how we calculate valid p-values using S cal , and our choice of FWER-controlling procedure.
Revised: In the next sections, we describe how we calculate valid p-values using S cal , and our choice of FWER-controlling procedure.

Original: 4.2 Deﬁning p-values for consistent early-exiting
Revised: 4.2 Deﬁning p-values for consistent early-exiting

Original: LTT relies on valid p-values p j , where p j is a random variable satisfying P ( p j ≤ u ) ≤ u under H j for all u ∈ [0 , 1] .
Revised: LTT relies on valid p-values p j , where p j is a random variable satisfying P ( p j ≤ u ) ≤ u under H j for all u ∈ [0 , 1] .

Original: For our purposes, we can obtain valid p-values from the empirical consistency of
Revised: For our purposes, we can obtain valid p-values from the empirical consistency of

Original: LLM early ( P i , λ ) measured over the random calibration sample, S cal .
Revised: LLM early ( P i , λ ) measured over the random calibration sample, S cal .

Original: Since we have assumed w.l.o.g. that either of our bounded consistency functions D and R from Defs.
Revised: Since we have assumed w.l.o.g. that either of our bounded consistency functions D and R from Defs.

Original: 1 and 2 have been normalized to lie in [0 , 1] , we can, for example, obtain a valid p-value by simply inverting Hoeffding’s inequality:
Revised: 1 and 2 have been normalized to lie in [0 , 1] , we can, for example, obtain a valid p-value by simply inverting Hoeffding’s inequality:

Original: [Equation]
Revised: [Equation]

Original: 9) where (cid:98) E ( λ j ) :
Revised: 9) where (cid:98) E ( λ j ) :

Original: = 1 n (cid:80) ni
Revised: = 1 n (cid:80) ni

Original: =

Revised: =

Original: L i ( λ j ) is the empirical average of random variable L i ( λ j ) ∈ [0 , 1] , with
Revised: L i ( λ j ) is the empirical average of random variable L i ( λ j ) ∈ [0 , 1] , with

Original: L i ( λ j ) :
Revised: L i ( λ j ) :

Original: = D ( LLM early ( P i , λ j ) , LLM full ( P i )) or (10)
Revised: = D ( LLM early ( P i , λ j ) , LLM full ( P i )) or (10)

Original: L i ( λ j ) := max (0 , R ( LLM early ( P i , λ j ) , Z i ) − R ( LLM
Revised: L i ( λ j ) := max (0 , R ( LLM early ( P i , λ j ) , Z i ) − R ( LLM

Original: [Equation]
Revised: [Equation]

Original: ( P i ) , Z i )) , (11) for textual consistency versus risk consistency, respectively.
Revised: ( P i ) , Z i )) , (11) for textual consistency versus risk consistency, respectively.

Original: Note that, as a technicality of enforcing the r.v.
Revised: Note that, as a technicality of enforcing the r.v.

Original: L i ( λ j ) to be within [0 , 1] , Eq.
Revised: L i ( λ j ) to be within [0 , 1] , Eq.

Original: (11) computes a conservative estimate of the difference in the empirical risk that doesn’t reward instances in which the risk of the early-exit model is lower.
Revised: (11) computes a conservative estimate of the difference in the empirical risk that doesn’t reward instances in which the risk of the early-exit model is lower.

Original: 4.3 Efﬁcient ﬁxed sequence testing
Revised: 4.3 Efﬁcient ﬁxed sequence testing

Original: The more values of λ we test, the higher the chance that we might accidentally choose a λ that does not in fact result in consistent generations, despite whatever misleading performance we might have measured by chance on S cal .
Revised: The more values of λ we test, the higher the chance that we might accidentally choose a λ that does not in fact result in consistent generations, despite whatever misleading performance we might have measured by chance on S cal .

Original: As part of LTT, we must select a multiple testing procedure that corrects for this (i.e., that controls the FWER at level (cid:15) ).
Revised: As part of LTT, we must select a multiple testing procedure that corrects for this (i.e., that controls the FWER at level (cid:15) ).

Original: Though the precise dependence between the early-exit LLM’s performance and λ is unknown, in practice we ﬁnd that it tends to be fairly smooth and roughly monotonic.
Revised: Though the precise dependence between the early-exit LLM’s performance and λ is unknown, in practice we ﬁnd that it tends to be fairly smooth and roughly monotonic.

Original: That is, nearby thresholds λ
Revised: That is, nearby thresholds λ

Original: ≈ λ (cid:48) tend to perform similarly, whereas λ > λ (cid:48) tends to result in relatively more consistent performance.
Revised: ≈ λ (cid:48) tend to perform similarly, whereas λ > λ (cid:48) tends to result in relatively more consistent performance.

Original: Taking advantage of this structure, we choose to employ ﬁxed sequence testing (FST) as our FWER-controlling procedure [3; 11].
Revised: Taking advantage of this structure, we choose to employ ﬁxed sequence testing (FST) as our FWER-controlling procedure [3; 11].

Original: Here we deﬁne a sequence of descending thresholds λ 1 > λ 2 > . . .
Revised: Here we deﬁne a sequence of descending thresholds λ 1 > λ 2 > . . .

Original: λ k with a relatively coarse step size (e.g., increments of 0 . 05 ).
Revised: λ k with a relatively coarse step size (e.g., increments of 0 . 05 ).

Original: For each λ j in order , we compute p j , and reject H j if p j ≤ (cid:15) .
Revised: For each λ j in order , we compute p j , and reject H j if p j ≤ (cid:15) .

Original: The ﬁrst time we fail to reject H j , we immediately terminate our search, and return λ j − 1 to use as our calibrated threshold (or 1 , if we fail to reject H 1 ).
Revised: The ﬁrst time we fail to reject H j , we immediately terminate our search, and return λ j − 1 to use as our calibrated threshold (or 1 , if we fail to reject H 1 ).

Original: An Algorithm of the full procedure is provided in Appendix E.
Revised: An Algorithm of the full procedure is provided in Appendix E.

Original: [Figure]
Revised: [Figure]

Original:  Experimental Setting
Revised:  Experimental Setting

Original: [Figure]
Revised: [Figure]

Original: [Table]
Revised: [Table]

Original: We empirically evaluate our methods on three popular text generation tasks that vary in their target generation length and extractive degrees against the input.
Revised: We empirically evaluate our methods on three popular text generation tasks that vary in their target generation length and extractive degrees against the input.

Original: CNN/DM [31] is a collection of news articles to be summarized in few sentences.
Revised: CNN/DM [31] is a collection of news articles to be summarized in few sentences.

Original: WMT
Revised: WMT

Original: EN-FR [13] contains English sentences (one per example) to be machine translated to French.
Revised: EN-FR [13] contains English sentences (one per example) to be machine translated to French.

Original: Open-book SQ U AD 1.1 [54] is a QA dataset with Wikipedia paragraphs paired with questions, where the target answer is a text span from the input.
Revised: Open-book SQ U AD 1.1 [54] is a QA dataset with Wikipedia paragraphs paired with questions, where the target answer is a text span from the input.

Original: Length statistics of the validation sets are summarized in Table 1.
Revised: Length statistics of the validation sets are summarized in Table 1.

Original: Model.
Revised: Model.

Original: We implement CALM on top of the T5 encoder-decoder model that showed good performance on the tasks above [53], using the T5X framework [55].
Revised: We implement CALM on top of the T5 encoder-decoder model that showed good performance on the tasks above [53], using the T5X framework [55].

Original: We use the 8 layers T5 1.1 model that doesn’t share input and output embeddings.
Revised: We use the 8 layers T5 1.1 model that doesn’t share input and output embeddings.

Original: We share all output embeddings for the softmax predictions, and the early-exit classiﬁer across all decoder layers.
Revised: We share all output embeddings for the softmax predictions, and the early-exit classiﬁer across all decoder layers.

Original: Based on validation results, we set the temperature of our decaying threshold to τ = 4 for the softmax and classiﬁer measures of CNN/DM and WMT.
Revised: Based on validation results, we set the temperature of our decaying threshold to τ = 4 for the softmax and classiﬁer measures of CNN/DM and WMT.

Original: In other settings, we use τ = 0 .
Revised: In other settings, we use τ = 0 .

Original: See App.
Revised: See App.

Original: C for more details, and App.
Revised: C for more details, and App.

Original: B.3 for a 12 layers T5 model.
Revised: B.3 for a 12 layers T5 model.

Original: Evaluation metrics.
Revised: Evaluation metrics.

Original: We use the standard metrics for each task: ROUGE-L for CNN/DM, BLEU [50] for WMT, and Token-F1 [54] for SQ U AD.
Revised: We use the standard metrics for each task: ROUGE-L for CNN/DM, BLEU [50] for WMT, and Token-F1 [54] for SQ U AD.

Original: We rely on the same metrics for computing the risk and textual distance, other than BLEU which is a corpus-level metric that doesn’t directly enable expectation control.
Revised: We rely on the same metrics for computing the risk and textual distance, other than BLEU which is a corpus-level metric that doesn’t directly enable expectation control.

Original: Instead, we use the BLEURT learned metric [61].
Revised: Instead, we use the BLEURT learned metric [61].

Original: For a given metric m ( y early , y full or z test ) ∈ [0 , 1] , we use 1 − m for distance or risk computation, respectively.
Revised: For a given metric m ( y early , y full or z test ) ∈ [0 , 1] , we use 1 − m for distance or risk computation, respectively.

Original: Our main efﬁciency metric is the average number of decoder layers used per output token, as it directly measures complexity reduction without conﬂating with implementation or infrastructure speciﬁc details [19].
Revised: Our main efﬁciency metric is the average number of decoder layers used per output token, as it directly measures complexity reduction without conﬂating with implementation or infrastructure speciﬁc details [19].

Original: For reference, we also report the average decoder FLOPs reduction per token [23].
Revised: For reference, we also report the average decoder FLOPs reduction per token [23].

Original: Also, we compute an estimated speedup of the whole encoder-decoder model for generating the full sequence, based on TPUv3 benchmarking with 200 examples in Colab (see App.
Revised: Also, we compute an estimated speedup of the whole encoder-decoder model for generating the full sequence, based on TPUv3 benchmarking with 200 examples in Colab (see App.

Original: C for details).
Revised: C for details).

Original: Calibration experiments.
Revised: Calibration experiments.

Original: For each task, we use the validation and test sets to evaluate our calibration method (§4) (for SQ U AD we only use the validation set as the test answers are hidden).
Revised: For each task, we use the validation and test sets to evaluate our calibration method (§4) (for SQ U AD we only use the validation set as the test answers are hidden).

Original: We runrandom trials per target tolerance δ and consistency objective (textual or risk), where we partition the data to 80% calibration ( S cal ) and 20% test ( P test ).
Revised: We runrandom trials per target tolerance δ and consistency objective (textual or risk), where we partition the data to 80% calibration ( S cal ) and 20% test ( P test ).

Original: We set (cid:15) = 0 .
Revised: We set (cid:15) = 0 .

Original: for all experiments.
Revised: for all experiments.

Original: Baselines.
Revised: Baselines.

Original: We emphasize that the CALM framework is general for any autoregressive multi-layered
Revised: We emphasize that the CALM framework is general for any autoregressive multi-layered

Original: LM with any conﬁdence measure, allowing controlled consistency by Eq.
Revised: LM with any conﬁdence measure, allowing controlled consistency by Eq.

Original: (1) or Eq.
Revised: (1) or Eq.

Original: To empirically evaluate the efﬁciency gains enabled by our proposed conﬁdence measures, we compare with static baselines that use the same number of layers for all tokens.
Revised: To empirically evaluate the efﬁciency gains enabled by our proposed conﬁdence measures, we compare with static baselines that use the same number of layers for all tokens.

Original: We also compare our early-exit classiﬁer training with the geometric method of [23] in Appendix D. Also, we compute an oracle local measure (§3.3.1) as an upper-bound estimate of the performance-efﬁciency tradeoff.
Revised: We also compare our early-exit classiﬁer training with the geometric method of [23] in Appendix D. Also, we compute an oracle local measure (§3.3.1) as an upper-bound estimate of the performance-efﬁciency tradeoff.

Original:  Experimental Results
Revised:  Experimental Results

Original: We ﬁrst report the empirical performance-efﬁciency tradeoff achieved with each conﬁdence measure.
Revised: We ﬁrst report the empirical performance-efﬁciency tradeoff achieved with each conﬁdence measure.

Original: For each task and measure, we evaluate the full range of λ on the validation set, with steps of 0 . 05 .
Revised: For each task and measure, we evaluate the full range of λ on the validation set, with steps of 0 . 05 .

Original: [Table]
Revised: [Table]

Original: The results, presented in Figure 3, show the power of the softmax response measure, allowing only minor performance loss while reducing more than half of the layers in all three tasks.
Revised: The results, presented in Figure 3, show the power of the softmax response measure, allowing only minor performance loss while reducing more than half of the layers in all three tasks.

Original: The early-exit classiﬁer, that is more FLOP-efﬁcient, is also effective, mostly when targeting high performance (right hand side of plots).
Revised: The early-exit classiﬁer, that is more FLOP-efﬁcient, is also effective, mostly when targeting high performance (right hand side of plots).

Original: The simple and parameter-free state saturation measure is competitive, but often falls bellow the static baseline, despite enabling per-token exit decisions.
Revised: The simple and parameter-free state saturation measure is competitive, but often falls bellow the static baseline, despite enabling per-token exit decisions.

Original: The dynamic oracle obtains compelling efﬁciency gains, using only 1.5, 1.3, and 1.2 layers on average for summarization, WMT, and QA, respectively, without losing any performance.
Revised: The dynamic oracle obtains compelling efﬁciency gains, using only 1.5, 1.3, and 1.2 layers on average for summarization, WMT, and QA, respectively, without losing any performance.

Original: This illustrates the full potential of CALM and leaves further room for improvements with better conﬁdence measures.
Revised: This illustrates the full potential of CALM and leaves further room for improvements with better conﬁdence measures.

Original: It also shows the effectiveness of inference-time state propagation for skipped layers (§3.3.1).
Revised: It also shows the effectiveness of inference-time state propagation for skipped layers (§3.3.1).

Original: 6.1 Calibrated performance with guaranteed textual or risk consistency
Revised: 6.1 Calibrated performance with guaranteed textual or risk consistency

Original: Next, we examine the outcomes of the calibration process.
Revised: Next, we examine the outcomes of the calibration process.

Original: Since the obtained risk is guaranteed to be valid (i.e., ≤ δ at least 95% of the time), we focus here on efﬁciency gains per chosen δ .
Revised: Since the obtained risk is guaranteed to be valid (i.e., ≤ δ at least 95% of the time), we focus here on efﬁciency gains per chosen δ .

Original: We refer the reader to Appendix B for empirical validation and for additional results and qualitative examples.
Revised: We refer the reader to Appendix B for empirical validation and for additional results and qualitative examples.

Original: Table 2 presents the efﬁciency gains per choice of δ for each consistency objective and conﬁdence measure.
Revised: Table 2 presents the efﬁciency gains per choice of δ for each consistency objective and conﬁdence measure.

Original: We examine larger δ values for textual consistency as this is generally a stricter requirement since the full model’s error is not considered.
Revised: We examine larger δ values for textual consistency as this is generally a stricter requirement since the full model’s error is not considered.

Original: Across all, the softmax conﬁdence measure leads to the greatest decrease in number of decoder layers required.
Revised: Across all, the softmax conﬁdence measure leads to the greatest decrease in number of decoder layers required.

Original: Accordingly, softmax mostly enables the highest speedup gains of up to about three times faster than running through all the model’s layers.
Revised: Accordingly, softmax mostly enables the highest speedup gains of up to about three times faster than running through all the model’s layers.

Original: The very lightweight early-exit classiﬁer sometimes provides better gains than softmax, even if more decoding layers are used.
Revised: The very lightweight early-exit classiﬁer sometimes provides better gains than softmax, even if more decoding layers are used.

Original: Since the speedup is computed over the full generated output, we see more gains on the longer outputs of summarization and translation where the decoding takes most of the time, compared to the short QA outputs where the whole decoding time is not much longer than the encoding time.
Revised: Since the speedup is computed over the full generated output, we see more gains on the longer outputs of summarization and translation where the decoding takes most of the time, compared to the short QA outputs where the whole decoding time is not much longer than the encoding time.

Original: These encouraging efﬁciency gains are enabled even with the rigorous performance guarantees that are sometimes conservative (e.g., Eq.
Revised: These encouraging efﬁciency gains are enabled even with the rigorous performance guarantees that are sometimes conservative (e.g., Eq.

Original: We note that relaxing these constraints, or tightening the conﬁdence intervals (e.g., with larger calibration sets), can further improve the empirical gains.
Revised: We note that relaxing these constraints, or tightening the conﬁdence intervals (e.g., with larger calibration sets), can further improve the empirical gains.

Original: The softmax operation over the full output vocabulary is FLOPs heavy (though, this compute can potentially be paralleled), sometime leading to increased total FLOPs, even with fewer used layers.
Revised: The softmax operation over the full output vocabulary is FLOPs heavy (though, this compute can potentially be paralleled), sometime leading to increased total FLOPs, even with fewer used layers.

Original: The state-based and early-exit classiﬁer measures require minimal FLOPs and provide a good alternative with compelling efﬁciency gains, if total (parallizeable, or not) FLOPs is of concern.
Revised: The state-based and early-exit classiﬁer measures require minimal FLOPs and provide a good alternative with compelling efﬁciency gains, if total (parallizeable, or not) FLOPs is of concern.

Original: 6.2 Example output: effectively distributing the model’s capacity across timesteps
Revised: 6.2 Example output: effectively distributing the model’s capacity across timesteps

Original: Figure 4 presents two CALM summary generations for an article from the CNN/DM dataset, compared to the output of the full model (See Figure B.5 in the Appendix for examples from the other tasks).
Revised: Figure 4 presents two CALM summary generations for an article from the CNN/DM dataset, compared to the output of the full model (See Figure B.5 in the Appendix for examples from the other tasks).

Original: Y (2)early uses a lower conﬁdence threshold for early exiting compared to Y (1)early .
Revised: Y (2)early uses a lower conﬁdence threshold for early exiting compared to Y (1)early .

Original: The colors, depicting the number of decoder layers used per output token, illustrate how CALM obtains efﬁciency
Revised: The colors, depicting the number of decoder layers used per output token, illustrate how CALM obtains the

Original: [Figure]
Revised: [Figure]

Original: , demonstrated here on a CNN/DM example with softmaxbased conﬁdence measure.
Revised: , demonstrated here on a CNN/DM example with softmax-based conﬁdence measure.

Original: Y (1)early and Y (2)early use different  thresholds for early exiting.
Revised: Y (1)early and Y (2)early use different conﬁdence thresholds for early exiting.

Original: Bellow the text, we report the measured textual and risk consistency of each of the two outputs, along with efﬁciency gains.
Revised: Bellow the text, we report the measured textual and risk consistency of each of the two outputs, along with efﬁciency gains.

Original: The colors represent the number of decoding layers used for each token—light green shades indicate less than half of the total layers.
Revised: The colors represent the number of decoding layers used for each token—light green shades indicate less than half of the total layers.

Original:  gains.
Revised: efﬁciency gains.

Original: Only a few selected tokens use the full capacity of the model (colored in red), while for most tokens the model exits after one or few decoding layers (colored in green).
Revised: Only a few selected tokens use the full capacity of the model (colored in red), while for most tokens the model exits after one or few decoding layers (colored in green).

Original: The example in Figure 4 also demonstrates one difference between the two types of consistency constraints, given a reference output Z test .
Revised: The example in Figure 4 also demonstrates one difference between the two types of consistency constraints, given a reference output Z test .

Original: Textual consistency D ( Y early , Y full ) generally (though, not always) degrades (i.e., increases) when decreasing the conﬁdence threshold as the outputs tend to more signiﬁcantly diverge from Y full .
Revised: Textual consistency D ( Y early , Y full ) generally (though, not always) degrades (i.e., increases) when decreasing the conﬁdence threshold as the outputs tend to more signiﬁcantly diverge from Y full .

Original: The trend of risk consistency, however, depends also on the reference output Z test .
Revised: The trend of risk consistency, however, depends also on the reference output Z test .

Original: If Y full ≈ Z test then the two constraints are nearly the same.
Revised: If Y full ≈ Z test then the two constraints are nearly the same.

Original: In this example, they are sufﬁciently different that Y (2)early obtained better (lower) risk even though the textual distance from Y full is higher.
Revised: In this example, they are sufﬁciently different that Y (2)early obtained better (lower) risk even though the textual distance from Y full is higher.

Original: On the one hand, given the availability of reference outputs for calibration, this suggests that for an imperfect model, risk consistency could lead to more aggressive early-exiting while maintaining the quality of generations.
Revised: On the one hand, given the availability of reference outputs for calibration, this suggests that for an imperfect model, risk consistency could lead to more aggressive early-exiting while maintaining the quality of generations.

Original: On the other hand, since the Relu in Eq.
Revised: On the other hand, since the Relu in Eq.

Original: (11) doesn’t reward negative risk differences, the beneﬁts might not fully materialize.
Revised: (11) doesn’t reward negative risk differences, the beneﬁts might not fully materialize.

Original: Overall, the two constraints provide different alternatives for the user to choose from depending on the availability of reference outputs, the performance of the full model, and the exact desired performance guarantees.
Revised: Overall, the two constraints provide different alternatives for the user to choose from depending on the availability of reference outputs, the performance of the full model, and the exact desired performance guarantees.

Original:  Conclusion
Revised:  Conclusion

Original: We present conﬁdent adaptive language modeling (CALM) for dynamically allocating different amounts of compute per generated token, following explicitly deﬁned tolerance levels on the full generation output.
Revised: We present conﬁdent adaptive language modeling (CALM) for dynamically allocating different amounts of compute per generated token, following explicitly deﬁned tolerance levels on the full generation output.

Original: This paper covers both modeling solutions and analyses towards this goal, as well as a theoretically-grounded framework for provably controlling the quality of the full output to meet the user-speciﬁed tolerance levels.
Revised: This paper covers both modeling solutions and analyses towards this goal, as well as a theoretically-grounded framework for provably controlling the quality of the full output to meet the user-speciﬁed tolerance levels.

Original: We investigate the effects of local early exiting during decoding on the ﬁnal output, leading us to propose a decaying function over the initial threshold that enables ﬁner control over the performance-efﬁciency tradeoffs without inﬂating the search space.
Revised: We investigate the effects of local early exiting during decoding on the ﬁnal output, leading us to propose a decaying function over the initial threshold that enables ﬁner control over the performance-efﬁciency tradeoffs without inﬂating the search space.

Original: We also study different solutions for addressing missing computations of early-exited tokens that are dependent upon for future tokens.
Revised: We also study different solutions for addressing missing computations of early-exited tokens that are dependent upon for future tokens.

Original: Overall, our complete adaptive compute framework for LMs requires minimal modiﬁcations to the underlying model and enables efﬁciency gains while satisfying rigorous quality guarantees for the output.
Revised: Overall, our complete adaptive compute framework for LMs requires minimal modiﬁcations to the underlying model and enables efﬁciency gains while satisfying rigorous quality guarantees for the output.

Original: Also, our oracle experiments and runtime analysis demonstrates the full potential of this framework and leave room for future research to further improve the efﬁciency in a controllable way.
Revised: Also, our oracle experiments and runtime analysis demonstrates the full potential of this framework and leave room for future research to further improve the efﬁciency in a controllable way.

Original: Acknowledgements
Revised: Acknowledgements

Original: We thank Ionel Gog for signiﬁcantly improving the implementation after submission.
Revised: We thank Ionel Gog for signiﬁcantly improving the implementation after submission.

Original: We also thank
Revised: We also thank

Original: Anselm Levskaya, Hyung Won Chung, Seungyeon Kim, Tao Wang, Paul Barham, and Michael Isard for great discussions and code suggestions.
Revised: Anselm Levskaya, Hyung Won Chung, Seungyeon Kim, Tao Wang, Paul Barham, and Michael Isard for great discussions and code suggestions.

Original: We thank Orhan Firat, Carlos Riquelme, Aditya Menon,
Revised: We thank Orhan Firat, Carlos Riquelme, Aditya Menon,

Original: Zhifeng Chen, Sanjiv Kumar, and Jeff Dean for helpful discussions and feedback on the project.
Revised: Zhifeng Chen, Sanjiv Kumar, and Jeff Dean for helpful discussions and feedback on the project.

Original: A Mathematical Details A.1 Proof of Proposition
Revised: A Mathematical Details A.1 Proof of Proposition

Original: Proof.
Revised: Proof.

Original: Deﬁne λ to be risk-controlling if LLM early ( P test , λ ) LLM full ( P test ) are consistent.
Revised: Deﬁne λ to be risk-controlling if LLM early ( P test , λ ) LLM full ( P test ) are consistent.

Original: Suppose Λ valid is non-empty.
Revised: Suppose Λ valid is non-empty.

Original: Then all λ ∈ Λ valid are risk-controlling w.p. ≥ 1 − (cid:15) , per Thm. 1 of Angelopoulos et al.
Revised: Then all λ ∈ Λ valid are risk-controlling w.p. ≥ 1 − (cid:15) , per Thm. 1 of Angelopoulos et al.

Original: Furthermore, per Eq.
Revised: Furthermore, per Eq.

Original: (4) for λ
Revised: (4) for λ

Original: = 1 we have LLM early ( P test , 1) =
Revised: = 1 we have LLM early ( P test , 1) =

Original: LLM full ( P test ) by deﬁnition, since sup M i ( h i ) = 1 , ∀ i ∈ [1 , . . .
Revised: LLM full ( P test ) by deﬁnition, since sup M i ( h i ) = 1 , ∀ i ∈ [1 , . . .

Original: , L ] .
Revised: , L ] .

Original: Thus λ = 1 is also risk-controlling by deﬁnition.
Revised: Thus λ = 1 is also risk-controlling by deﬁnition.

Original: Combined, all λ ∈ Λ valid ∪{ 1 } are risk-controlling w.p. ≥ 1 − (cid:15) , and therefore λ :=
Revised: Combined, all λ ∈ Λ valid ∪{ 1 } are risk-controlling w.p. ≥ 1 − (cid:15) , and therefore λ :=

Original: min(Λ valid ∪{ 1 } ) is always well-deﬁned and guaranteed to be risk-controlling w.p. ≥ 1 − (cid:15) .
Revised: min(Λ valid ∪{ 1 } ) is always well-deﬁned and guaranteed to be risk-controlling w.p. ≥ 1 − (cid:15) .

Original: B Additional Results
Revised: B Additional Results

Original: We provide additional experimental results to supplement Section 6.
Revised: We provide additional experimental results to supplement Section 6.

Original: In Section B.1, we include calibration plots, for both the validation and test sets, with the full range of δ , also showing the standard deviation across random trials.
Revised: In Section B.1, we include calibration plots, for both the validation and test sets, with the full range of δ , also showing the standard deviation across random trials.

Original: In Section B.2, we present a few example outputs with a visualization of the per-token early-exit decisions to illustrate CALM’s behavior.
Revised: In Section B.2, we present a few example outputs with a visualization of the per-token early-exit decisions to illustrate CALM’s behavior.

Original: In Section B.3, we include results of a larger 12-layer model, showing the generalizability of our framework to other conﬁgurations.
Revised: In Section B.3, we include results of a larger 12-layer model, showing the generalizability of our framework to other conﬁgurations.

Original: B.1 Calibration results for the full tolerance range
Revised: B.1 Calibration results for the full tolerance range

Original: We present complementary results to Table 2.
Revised: We present complementary results to Table 2.

Original: Figure B.1 and Figure B.2 present the empirical consistencies and efﬁciency gains for textual and risk consistency constraints, respectively.
Revised: Figure B.1 and Figure B.2 present the empirical consistencies and efﬁciency gains for textual and risk consistency constraints, respectively.

Original: Figure B. and Figure B.4 report the same on the validation datasets.
Revised: Figure B. and Figure B.4 report the same on the validation datasets.

Original: First, we observe that the calibration holds empirically, achieving risk values that are not greater than the speciﬁed δ (i.e., being under the diagonal in the upper subplots).
Revised: First, we observe that the calibration holds empirically, achieving risk values that are not greater than the speciﬁed δ (i.e., being under the diagonal in the upper subplots).

Original: We also see that the risk is often lower than allowed for (a good thing), especially with the risk consistency objective.
Revised: We also see that the risk is often lower than allowed for (a good thing), especially with the risk consistency objective.

Original: This is due to the conservativeness of our measure (Eq.
Revised: This is due to the conservativeness of our measure (Eq.

Original: (11)), not rewarding instances where the early prediction has lower risk.
Revised: (11)), not rewarding instances where the early prediction has lower risk.

Original: While obtaining lower risk than the target is not a downside, this indicates that there is further potential in improving the efﬁciency gains achieved per δ .
Revised: While obtaining lower risk than the target is not a downside, this indicates that there is further potential in improving the efﬁciency gains achieved per δ .

Original: Yet, even with the rigorous and conservative theoretical guarantees, we already obtain signiﬁcant efﬁciency gains that, naturally, increase with larger tolerance values.
Revised: Yet, even with the rigorous and conservative theoretical guarantees, we already obtain signiﬁcant efﬁciency gains that, naturally, increase with larger tolerance values.

Original: [Figure] [Figure]
Revised: [Figure] [Figure]

Original: B.2 Qualitative examples
Revised: B.2 Qualitative examples

Original: Figure B.5 presents two example outputs of CALM for instances from the  translation, and questionanswering (QA) datasets (See Figure 4 for summarization).
Revised: Figure B.5 presents two example outputs of CALM for instances from the machine translation, and question-answering (QA) datasets (See Figure 4 for summarization).

Original: The colors depict the per-token number of decoder layers that were used for generating that output.
Revised: The colors depict the per-token number of decoder layers that were used for generating that output.

Original: We also report the risk values for textual and risk consistency of both outputs, as well as the speedup compared to the full model.
Revised: We also report the risk values for textual and risk consistency of both outputs, as well as the speedup compared to the full model.

Original: We observe that the textual distance generally increases as we accelerate the decoding.
Revised: We observe that the textual distance generally increases as we accelerate the decoding.

Original: Though, the outputs still remain relatively similar to the full model even when using very few layers.
Revised: Though, the outputs still remain relatively similar to the full model even when using very few layers.

Original: The risk consistency doesn’t always correlate with the textual one when the full model’s risk is non-zero.
Revised: The risk consistency doesn’t always correlate with the textual one when the full model’s risk is non-zero.

Original: In some cases, the accelerated output has even lower risk than the full model’s output.
Revised: In some cases, the accelerated output has even lower risk than the full model’s output.

Original: This demonstrates the value of having both our textual and risk consistency conﬁgurations, which the user can pick from based on their objective, and whether quality reference outputs for calibration are available or not.
Revised: This demonstrates the value of having both our textual and risk consistency conﬁgurations, which the user can pick from based on their objective, and whether quality reference outputs for calibration are available or not.

Original: Interestingly, following our initial intuition, CALM distributes the compute unevenly, using very few layers for certain “easy” tokens, and additional compute to “hard” tokens.
Revised: Interestingly, following our initial intuition, CALM distributes the compute unevenly, using very few layers for certain “easy” tokens, and additional compute to “hard” tokens.

Original: Examining the examples, we see that many times “hard” generation steps come at the beginning of sentences, or when generating a verb.
Revised: Examining the examples, we see that many times “hard” generation steps come at the beginning of sentences, or when generating a verb.

Original: We leave further investigations on perceived difﬁculties to future work.
Revised: We leave further investigations on perceived difﬁculties to future work.

Original: B.3 T5-base results
Revised: B.3 T5-base results

Original: While throughout the rest of this paper we experiment with a 8-layer encoder-decoder T5 model.
Revised: While throughout the rest of this paper we experiment with a 8-layer encoder-decoder T5 model.

Original: We include here results for a 12-layer T5-base model that besides the additional layers is also larger in its internal dimensions, having 12 attention heads and 64, 768, and 2048 dimensions for the attention head, embeddings, and MLP, respectively.
Revised: We include here results for a 12-layer T5-base model that besides the additional layers is also larger in its internal dimensions, having 12 attention heads and 64, 768, and 2048 dimensions for the attention head, embeddings, and MLP, respectively.

Original: Figure B.6 shows the empirical performance-efﬁciency tradeoffs achieved with this model on the three tasks.
Revised: Figure B.6 shows the empirical performance-efﬁciency tradeoffs achieved with this model on the three tasks.

Original: Overall, we the trends are very similar to the one observed with the 8-layer model (Figure 3).
Revised: Overall, we the trends are very similar to the one observed with the 8-layer model (Figure 3).

Original: One exception is the SQ U AD model where the static baseline that uses only one or two decoder layers completely fails.
Revised: One exception is the SQ U AD model where the static baseline that uses only one or two decoder layers completely fails.

Original: This suggests that the actual predictions of this model are starting to be formed only from the third layer.
Revised: This suggests that the actual predictions of this model are starting to be formed only from the third layer.

Original: Also, the local oracle measure on SQ U AD obtains slightly lower global performance compared to the full model, also suggesting that in this case the hidden-state of the very low layers might not be a good enough representation for followup generations.
Revised: Also, the local oracle measure on SQ U AD obtains slightly lower global performance compared to the full model, also suggesting that in this case the hidden-state of the very low layers might not be a good enough representation for followup generations.

Original: Yet, the softmax and early-exit classiﬁer conﬁdence measure provide good proxies for the consistency
Revised: Yet, the softmax and early-exit classiﬁer conﬁdence measure provide good proxies for the consistency

Original: [Figure] [Figure]
Revised: [Figure] [Figure]

Original: and often outperform the static baselines.
Revised: and often outperform the static baselines.

Original: In the other two datasets, the local oracle matches the performance of the full model, similar to the behavior of the 8-layer model.
Revised: In the other two datasets, the local oracle matches the performance of the full model, similar to the behavior of the 8-layer model.

Original: Figure B.7 and Figure B.8 present the validity and efﬁciency gains of our calibration procedure on the 12-layer model for textual and risk consistency objectives, respectively.
Revised: Figure B.7 and Figure B.8 present the validity and efﬁciency gains of our calibration procedure on the 12-layer model for textual and risk consistency objectives, respectively.

Original: We observe a largely similar behavior as the 8-layer model, showing the generality of our framework to other conﬁgurations of the backbone language model.
Revised: We observe a largely similar behavior as the 8-layer model, showing the generality of our framework to other conﬁgurations of the backbone language model.

Original: [Table]
Revised: [Table]

Original: Notez que la théorie (néo-)classique de l’économie est totalement incapable de répondre à une telle question, car pour elle, il n’existe pas de limite intrinsèque
Revised: Notez que la théorie (néo-)classique de l’économie est totalement incapable de répondre à une telle question, car pour elle, il n’existe pas de limite intrinsèque

Original: à la croissance économique, et il n’existe aucun élément susceptible de contraindre, de plus en plus fortement décennie après décennie, le rythme de croissance économique.
Revised: à la croissance économique, et il n’existe aucun élément susceptible de contraindre, de plus en plus fortement décennie après décennie, le rythme de croissance économique.

Original: Il convient de noter que la théorie économique néo-classique est totalement incapable de répondre à une telle question parce que, en ce qui concerne la théorie, il n
Revised: Il convient de noter que la théorie économique néo-classique est totalement incapable de répondre à une telle question parce que, en ce qui concerne la théorie, il n

Original: [Table]
Revised: [Table]

Original: y a pas de limites intrinsèques à la croissance économique et rien n'empêche la croissance économique de s
Revised: y a pas de limites intrinsèques à la croissance économique et rien n'empêche la croissance économique de s

Original: [Table]
Revised: [Table]

Original: affermir et de s
Revised: affermir et de s

Original: [Table]
Revised: [Table]

Original: affermir, décennie après décennie
Revised: affermir, décennie après décennie

Original: [Table]
Revised: [Table]

Original: de
Revised: de

Original: [Table]
Revised: [Table]

Original: in Van Binsbergen v
Revised: in Van Binsbergen v

Original: [Table]
Revised: [Table]

Original: van de Bedrijfvereniging voor de Metaalnijverheid a Dutch lawyer […]
Revised: van de Bedrijfvereniging voor de Metaalnijverheid a Dutch lawyer […]

Original: [Table]
Revised: [Table]

Original: [Figure] [Figure]
Revised: [Figure] [Figure]

Original: C Implementation Details
Revised: C Implementation Details

Original: As mentioned in Section 5, we build on the T5 encoder-decoder model [53], and us the T5X repository [55] for implementing CALM.
Revised: As mentioned in Section 5, we build on the T5 encoder-decoder model [53], and us the T5X repository [55] for implementing CALM.

Original: Appendix E describes the main algorithmic components.
Revised: Appendix E describes the main algorithmic components.

Original: Our main experiments use the T5 1.1 version with 8 layers for both the encoder and decoder modules, 6 attention heads with dimensions of 64, 512, and 1024 for the attention head, embeddings, and MLP, respectively.
Revised: Our main experiments use the T5 1.1 version with 8 layers for both the encoder and decoder modules, 6 attention heads with dimensions of 64, 512, and 1024 for the attention head, embeddings, and MLP, respectively.

Original: The vocabulary contains 32,128 tokens.
Revised: The vocabulary contains 32,128 tokens.

Original: This model doesn’t share the input and output embeddings.
Revised: This model doesn’t share the input and output embeddings.

Original: For our early-exit head, we share the output embeddings between all intermediate with the top one, not introducing any new parameters to the model.
Revised: For our early-exit head, we share the output embeddings between all intermediate with the top one, not introducing any new parameters to the model.

Original: Our binary early-exit classiﬁer is also
Revised: Our binary early-exit classiﬁer is also

Original: [Figure] [Figure]
Revised: [Figure] [Figure]

Original: shared across all layers, adding only a very small amount of new parameters.
Revised: shared across all layers, adding only a very small amount of new parameters.

Original: We add early-exit heads to all layers.
Revised: We add early-exit heads to all layers.

Original: We ﬁne-tune the models on the training set of each task for a maximum of 500K steps, and choose the best checkpoint by performance on the validation set (using the full models’ predictions).
Revised: We ﬁne-tune the models on the training set of each task for a maximum of 500K steps, and choose the best checkpoint by performance on the validation set (using the full models’ predictions).

Original: We use a batch size of 128, the regular LM cross-entropy loss, the AdaFactor optimizer [64], and experiment with learning rates 10 − 3 and 10 − 4 .
Revised: We use a batch size of 128, the regular LM cross-entropy loss, the AdaFactor optimizer [64], and experiment with learning rates 10 − 3 and 10 − 4 .

Original: We aggregate the loss of individual layers with a weighted average, as discussed in Section 3.4.
Revised: We aggregate the loss of individual layers with a weighted average, as discussed in Section 3.4.

Original: For the early-exit classiﬁer training, we use an unweighted average (See Appendix D for more details).
Revised: For the early-exit classiﬁer training, we use an unweighted average (See Appendix D for more details).

Original: We use 64 TPUv3 chips for training.
Revised: We use 64 TPUv3 chips for training.

Original: For inference, we use a single TPUv4 chip with a batch size of one, simulating a one-at-a-time processing setting, that is convenient when serving models for online requests.
Revised: For inference, we use a single TPUv4 chip with a batch size of one, simulating a one-at-a-time processing setting, that is convenient when serving models for online requests.

Original: As described in Section 3.2, CALM exits early whenever the per-token conﬁdence value c (Section 3.5) exceeds the possibly-decaying threshold λ (Section 3.3.2) derived from the user-deﬁned δ, (cid:15) tolerance levels and textual or risk consistency objective (Section 4).
Revised: As described in Section 3.2, CALM exits early whenever the per-token conﬁdence value c (Section 3.5) exceeds the possibly-decaying threshold λ (Section 3.3.2) derived from the user-deﬁned δ, (cid:15) tolerance levels and textual or risk consistency objective (Section 4).

Original: If necessary, the hidden-state is propagated to the skipped layers (Section 3.3.1).
Revised: If necessary, the hidden-state is propagated to the skipped layers (Section 3.3.1).

Original: C.1 FLOPs and speedup computations
Revised: C.1 FLOPs and speedup computations

Original: We detail our procedures for approximating the reference efﬁciency gains using the FLOPs and speedup measures.
Revised: We detail our procedures for approximating the reference efﬁciency gains using the FLOPs and speedup measures.

Original: For FLOPs computation, to be consistent with Elbayad et al.
Revised: For FLOPs computation, to be consistent with Elbayad et al.

Original: [23] (See their
Revised: [23] (See their

Original: Appendix B), we adopt their formula to compute the average decoder FLOPs per output token.
Revised: Appendix B), we adopt their formula to compute the average decoder FLOPs per output token.

Original: To measure the speedup of early exiting with CALM, we execute 200 inference predictions for each task under each examined conﬁguration in a JIT compiled function in colab with TPUv3.
Revised: To measure the speedup of early exiting with CALM, we execute 200 inference predictions for each task under each examined conﬁguration in a JIT compiled function in colab with TPUv3.

Original: We ignore the time of the ﬁrst execution, since it is drastically slower due to compilation, and average the rest of the measured times.
Revised: We ignore the time of the ﬁrst execution, since it is drastically slower due to compilation, and average the rest of the measured times.

Original: For each inference prediction, we use batch size one, and measure the full generation time including both the encoder and all decoding steps until completion.
Revised: For each inference prediction, we use batch size one, and measure the full generation time including both the encoder and all decoding steps until completion.

Original: For each examined conﬁdence measure (softmax, state, or classiﬁer), we compute the speedup by comparing to the average inference time of the full model that uses all layers, by setting the conﬁdence threshold to maximum.
Revised: For each examined conﬁdence measure (softmax, state, or classiﬁer), we compute the speedup by comparing to the average inference time of the full model that uses all layers, by setting the conﬁdence threshold to maximum.

Original: We note that our implementation adds conditionals between layers that add some overhead to the compute graph.
Revised: We note that our implementation adds conditionals between layers that add some overhead to the compute graph.

Original: Yet, even compared to a conditional-free implementation, the gains of CALM’s early exits often outweigh the overheads of the added conditionals.
Revised: Yet, even compared to a conditional-free implementation, the gains of CALM’s early exits often outweigh the overheads of the added conditionals.

Original: We leave studying further technical improvements to the implementation to future work.
Revised: We leave studying further technical improvements to the implementation to future work.

Original: D Training Details of the Early Exit Classiﬁer
Revised: D Training Details of the Early Exit Classiﬁer

Original: [Table]
Revised: [Table]

Original: As discussed in Section 3.5, we train the early exit classiﬁer to predict whether the top-ranked prediction of a speciﬁc intermediate layer is the same as the prediction of the top layer.
Revised: As discussed in Section 3.5, we train the early exit classiﬁer to predict whether the top-ranked prediction of a speciﬁc intermediate layer is the same as the prediction of the top layer.

Original: This classiﬁer is using the intermediate hidden-state as its input features.
Revised: This classiﬁer is using the intermediate hidden-state as its input features.

Original: The target labels are computed on-the-ﬂy following an oracle that compares the intermediate prediction head with the prediction of the full model ( 1 [arg max( p ( y t +1 | d it ) =
Revised: The target labels are computed on-the-ﬂy following an oracle that compares the intermediate prediction head with the prediction of the full model ( 1 [arg max( p ( y t +1 | d it ) =

Original: arg max( p ( y t +1 | d Lt )] ).
Revised: arg max( p ( y t +1 | d Lt )] ).

Original: We use the same training hyper-parameters used for the full model, but freeze all parameters of the backbone model (to eliminate any affect on the model’s performance) and only train the newly added parameters for early-exit classiﬁer, which are shared across all layers.
Revised: We use the same training hyper-parameters used for the full model, but freeze all parameters of the backbone model (to eliminate any affect on the model’s performance) and only train the newly added parameters for early-exit classiﬁer, which are shared across all layers.

Original: Following the setup above, we compute the binary cross-entropy loss for each layer individually, and aggregate by taking the unweighted average across all layers.
Revised: Following the setup above, we compute the binary cross-entropy loss for each layer individually, and aggregate by taking the unweighted average across all layers.

Original: We use the loss value on the validation set to pick the best checkpoint.
Revised: We use the loss value on the validation set to pick the best checkpoint.

Original: We also explore with the geometric-like objective proposed by Elbayad et al.
Revised: We also explore with the geometric-like objective proposed by Elbayad et al.

Original: Their approach views the exiting decisions as a Bernoulli process, using the “exit”/ “don’t exit” predicted probabilities.
Revised: Their approach views the exiting decisions as a Bernoulli process, using the “exit”/ “don’t exit” predicted probabilities.

Original: The goal is to make an “exit” prediction at the ﬁrst true layer, determined by the oracle, and “don’t exit” predictions by all preceding layers.
Revised: The goal is to make an “exit” prediction at the ﬁrst true layer, determined by the oracle, and “don’t exit” predictions by all preceding layers.

Original: Accordingly, the training objective maximizes the probability of this oracle-guided event, modeled as a product of all respective predicted probabilities.
Revised: Accordingly, the training objective maximizes the probability of this oracle-guided event, modeled as a product of all respective predicted probabilities.

Original: In practice, due to numerical instability of this product operation, we maximize the summation over the log probabilities.
Revised: In practice, due to numerical instability of this product operation, we maximize the summation over the log probabilities.

Original: Table D.1 presents the F 1 validation scores of “don’t exit” predictions (with a 0 .
Revised: Table D.1 presents the F 1 validation scores of “don’t exit” predictions (with a 0 .

Original: 5 threshold) by early-exit classiﬁer, measured against the oracle for layers 1,4, and 7.
Revised: 5 threshold) by early-exit classiﬁer, measured against the oracle for layers 1,4, and 7.

Original: Our per-layer independent training objective outperforms the geometric-like objective across all layers and tasks.
Revised: Our per-layer independent training objective outperforms the geometric-like objective across all layers and tasks.

Original: The advantage is typically most pronounced for higher layers.
Revised: The advantage is typically most pronounced for higher layers.

Original: We conjecture that this is due to the equal weight of the independent objective that utilizes signal from all layers, whereas the geometric-like objective only learns from layers up to the ﬁrst oracle exit.
Revised: We conjecture that this is due to the equal weight of the independent objective that utilizes signal from all layers, whereas the geometric-like objective only learns from layers up to the ﬁrst oracle exit.

Original: 2: λ min
Revised: 2: λ min

Original: 1 3: Λ do 5:
Revised: 1 3: Λ do 5:

Original: 6: p
Revised: 6: p

Original: =
Revised: =

Original: 9: λ j 10: min
Revised: 9: λ j 10: min

Original: Algorithm 1 describes the calibration process of CALM for obtaining global textual or risk δ, (cid:15) consistency (Section 4).
Revised: Algorithm 1 describes the calibration process of CALM for obtaining global textual or risk δ, (cid:15) consistency (Section 4).

Original: The JAX [14] code for training CALM models and for executing the early-exit functionality at inference-time is available at: https://github.com/google-research/t5x/tree/ main/t5x/contrib/calm
Revised: The JAX [14] code for training CALM models and for executing the early-exit functionality at inference-time is available at: https://github.com/google-research/t5x/tree/ main/t5x/contrib/calm