---
title: "ShadowLLM — paper by Akhauri et al. (2024)"
description: "ShadowLLM predicts which attention heads and neurons can be skipped, improving the balance between inference speed and answer quality."
canonical: "https://research.elamur.ai/free/en/papers/akhauri-2024-shadowllm-predictor-based-contextual-sparsity/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/akhauri-2024-shadowllm-predictor-based-contextual-sparsity/)

[home](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2024](https://md.research.elamur.ai/free/en/papers/2024/) / ShadowLLM: Predictor-based Contextual Sparsity for Large Language Models

# ShadowLLM: Predictor-based Contextual Sparsity for Large Language Models

Paper · 2024 · Yash Akhauri, Ahmed F. AbouElhamayed, Jordan Dotzel et al.

**Authors:** [Yash Akhauri](https://md.research.elamur.ai/free/en/authors/yash-akhauri/), [Ahmed F. AbouElhamayed](https://md.research.elamur.ai/free/en/authors/ahmed-f-abouelhamayed/), [Jordan Dotzel](https://md.research.elamur.ai/free/en/authors/jordan-dotzel/), [Zhiru Zhang](https://md.research.elamur.ai/free/en/authors/zhiru-zhang/), [Alexander M. Rush](https://md.research.elamur.ai/free/en/authors/alexander-m-rush/), [Safeen Huda](https://md.research.elamur.ai/free/en/authors/safeen-huda/) and [Mohamed S. Abdelfattah](https://md.research.elamur.ai/free/en/authors/mohamed-s-abdelfattah/) · **Year:** 2024 · **Venue:** Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2024.emnlp-main.1068/)
- [PDF](https://aclanthology.org/2024.emnlp-main.1068.pdf)
- [DOI 10.18653/v1/2024.emnlp-main.1068](https://doi.org/10.18653/v1/2024.emnlp-main.1068)

## What it is about

ShadowLLM predicts which attention heads and neurons can be skipped, improving the balance between inference speed and answer quality. · about 36 minutes to read

**In this deep dive**

1. [Summary](#dd-summary)
2. [Ideas worth borrowing](#dd-ideas-worth-borrowing)
3. [How Mova uses it](#dd-how-mova-uses-it)
4. [The problem and its context](#dd-the-problem-and-its-context)
5. [The method, step by step](#dd-the-method-step-by-step)
6. [Experiments and results](#dd-experiments-and-results)
7. [What the ablations show](#dd-what-the-ablations-show)
8. [Limitations](#dd-limitations)
9. [What came after](#dd-what-came-after)

### Summary

Running a large language system efficiently requires deciding which computations an input actually needs. Removing the same components permanently can make execution cheaper, but it can also discard something essential for another question. ShadowLLM investigates a more selective approach: contextual sparsity, in which the attention heads and feed-forward neurons retained during inference depend on the current input. Its contribution to [efficient inference](https://md.research.elamur.ai/free/en/topics/efficient-models/) concerns both sides of that decision: how to identify important components during preparation, and how to predict their importance cheaply during deployment.

The paper argues that activation magnitude is an incomplete guide to importance. A component can produce a substantial activation without being especially consequential for the answer. Conversely, a less conspicuous component can matter because the loss is sensitive to its contribution. The authors compare criteria drawn from pruning and architecture-search research, including activation norms, gradients, combinations of activations and gradients, and more elaborate sensitivity measures. Their preferred criterion, plainact, combines a component’s value with information about how changing it affects the loss. It offers a useful compromise: it preserves downstream quality and is comparatively easy for a small predictor to learn.

ShadowLLM also changes where prediction happens. [DejaVu](https://md.research.elamur.ai/free/en/papers/liu-2023-deja-vu-contextual-sparsity-efficient/) uses predictors interspersed through the network. ShadowLLM instead uses the output of the first attention layer to estimate importance throughout the remaining computation. The first layer remains dense, providing the observation from which the predictor works. This design reduces repeated predictor execution and permits a global ranking, allowing different layers to retain different amounts of computation. The paper finds that this flexibility generally preserves quality better than imposing an identical pruning proportion on every layer.

The experiments examine OPT systems and [Llama 2](https://md.research.elamur.ai/free/en/papers/touvron-2023-llama-2-open-foundation-fine/), using downstream accuracy and WikiText2 perplexity alongside execution measurements. A concrete comparison on OPT-13B reports average zero-shot accuracy of 61.19% for ShadowLLM and 59.28% for a DejaVu-style predictor, with latencies of 2562 ms and 2981 ms respectively. The performance study reports an average 16.2% improvement over DejaVu for generation of 128 tokens at 50% sparsity, and an average 21.25% advantage during decoding. These results support the combination of a better importance target and a simpler prediction schedule. They do not establish that arbitrary computation can be removed safely, that every gradient-informed criterion is practical, or that the reported gains extend unchanged to other architectures and deployment conditions.

### Ideas worth borrowing

Predict consequences rather than activity. A large intermediate value is evidence that something happened, but not necessarily that it mattered to the final decision. ShadowLLM’s comparison of magnitude and gradient-informed criteria makes this distinction operational. Elsewhere, a parser feature, retrieval source, or reasoning branch can be evaluated by its effect on the eventual result rather than by how frequently or strongly it activates.

Choose a target that can be predicted. An excellent importance measure is of limited operational value if estimating it requires information unavailable during execution. The paper therefore evaluates both the quality of a pruning criterion and the ability of a predictor to reproduce its ranking. This principle applies whenever expensive analysis supplies supervision for a cheaper decision rule: the target must be useful and learnable.

Make an early observation serve later decisions. ShadowLLM obtains a shared representation near the beginning of processing and uses it to plan computation across subsequent layers. Reusing an early observation can avoid repeated dispatch and estimation costs. Similar reasoning applies to document processing, staged search, and task routing, provided that the early evidence actually contains enough information for the later choices.

Allocate resources across the whole system. Equal pruning proportions are simple, but they assume that every layer deserves the same remaining budget. Global ranking relaxes that assumption. The transferable idea is to allocate a shared budget according to measured importance, while checking that scores from different components are comparable and that indispensable operations remain protected.

Measure the cost of making the decision. The paper shows why a small arithmetic budget can conceal substantial execution overhead. Repeated predictor calls introduce scheduling, memory, and kernel-launch costs that FLOPs alone do not describe. Any adaptive pipeline should therefore measure the complete process, including the mechanism that decides what work to omit.

Match evaluation boundaries to deployment boundaries. The authors calculate perplexity separately within documents because their sparsity decisions concern document-level context. This changes the resulting scores and their comparability with conventional evaluations. The broader lesson is to make context availability explicit: an evaluation should expose exactly the information that the deployed decision procedure can use.

### How Mova uses it

Mova is a transparent language system written in Rust. Its native core relies on explicit linguistic structure, rules, learned parameters, and graph knowledge rather than next-token prediction. ShadowLLM therefore offers several transferable design ideas without supplying a ready-made replacement for Mova’s existing mechanisms. The status marks below describe proposed correspondences with documented Mova capabilities. They are not application receipts, and the available implementation record does not establish a measured ShadowLLM transfer.

Idea: Evaluate consequences instead of raw activity. Where: Pruning Criteria and Advantages of Gradient-Informed Criteria. Area: evaluation and rule selection. Mova: частково є (regression gates for global extensions and held-out self-play in `world`). Mova already tests whether proposed changes preserve or improve results. The paper suggests making the distinction between activity and usefulness explicit when ranking rules: a often firing rule need not contribute much, while an infrequent rule may prevent a serious error. A proposed extension would record outcome changes when a candidate rule is withheld. Why Mova: this could help prioritize useful repairs without rewarding rules merely for producing more annotations.

Idea: Select supervision for both usefulness and learnability. Where: Learning Pruning Criteria with Predictors and Figure 14. Area: training and statistics. Mova: частково є (teacher-separated annotation and tested training paths in `annot`, `tools/cycle`, and `tools/enrich`). Reviewed supervision already passes through separate preparation and admission steps. A further hypothesis is to assess whether a proposed target can be recovered reliably from the native features available to its intended consumer. A label that needs unavailable evidence may be sound as a review judgment but unsuitable as an operational prediction target. Why Mova: this would distinguish a representation problem from a difficult or unstable training target.

Idea: Reuse an early observation for later routing. Where: Predictors For Neuron Ranking and Figure 4. Area: operational planning. Mova: частково є (`layers` routing and the configured native deputy in `tools/octopus`). These components already turn structured observations into bounded decisions. ShadowLLM suggests testing whether a shared early observation can support several later routing choices without repeated interpretation. This would remain limited to configured capabilities; a successful parse would still not establish the intended action. Why Mova: it could reduce repeated work while keeping capability selection inspectable.

Idea: Allocate a shared budget across processing stages. Where: Figure 6 and the global-versus-local pruning analysis. Area: resource allocation. Mova: нове. Mova has bounded workers and task execution, but the documented evidence does not establish a comparable allocator that redistributes one processing budget across linguistic and reasoning stages using calibrated utility scores. Such an allocator could compare candidate searches or checks while preserving mandatory operations. Why Mova: some inputs may need extra coreference work while others need deeper quantitative reasoning, making equal stage budgets wasteful.

Idea: Measure complete adaptive execution. Where: Performance and Figures 10–12. Area: systems evaluation. Mova: частково є (`tools/jobs` logs estimates and actual use; `tools/twin` supports measured runs and calibration). The paper reinforces measuring routing, serialization, dispatch, and result inspection together with the selected operation. A proposed evaluation would compare the same supported workload with and without an adaptive selector. Why Mova: a selector that saves nominal operations may still slow the actual task.

Idea: Preserve evaluation context boundaries. Where: Appendix B, On Perplexity Calculation. Area: evaluation and data handling. Mova: вже є (fresh-process retained-school assessment and question-only examination in the retention path). Mova distinguishes retained knowledge from replayed lessons. The paper supports applying the same discipline to every reported result: identify which document, graph, and earlier state were visible when a decision was made. This is an existing methodological connection, not evidence that the two evaluation procedures measure the same capability.

Idea: Distinguish contextual omission from permanent removal. Where: Introduction and Figure 2. Area: rule architecture. Mova: частково є (domain routing through `layers` and configured worker capabilities). A domain can already remain unused when the context does not call for it. A broader proposal would distinguish a reversible decision not to run an optional analysis from deleting that analysis from the system. Why Mova: keeping a capability available protects unusual constructions or tasks that are uncommon in ordinary workloads.

Idea: Measure how importance changes across inputs. Where: Figure 3. Area: statistics and diagnostics. Mova: нове. The paper measures variation in head rankings across inputs before motivating dynamic selection. Mova could similarly inspect whether a rule family, graph lookup, or reader profile contributes differently across document types and questions. No such cross-input importance study is established by the available record. Why Mova: adaptation is useful only when the preferred allocation actually changes with context.

Idea: Compare rankings as well as final decisions. Where: Figure 5 and Learning Pruning Criteria with Predictors. Area: statistics. Mova: частково є (confidence analysis in `prag/src/eval.rs`). Existing confidence diagnostics examine correctness across confidence groups. A ranking diagnostic could additionally compare a cheap selector’s ordering with a more expensive reviewed ordering. These tests answer different questions and should remain separate. Why Mova: a selector may choose the right top candidate while ordering alternatives poorly, which matters when the budget changes.

Idea: Make scores comparable before global selection. Where: the predictor analysis accompanying Figure 6. Area: mathematics and calibration. Mova: нове. ShadowLLM’s global pruning depends on comparing importance across layers. An analogous Mova allocator would need declared score meanings across modules rather than directly comparing unrelated confidence values. Normalization alone would require validation against actual outcomes. Why Mova: a numerically large score from one module should not automatically outrank stronger evidence expressed on another scale.

Idea: Protect the observation needed by the selector. Where: Predictors For Neuron Ranking. Area: dependency management. Mova: частково є (the native UD-to-frame pipeline and source-bound operational interfaces). ShadowLLM preserves the first layer because the predictor depends on its output. Mova can apply the same principle when optimizing pipelines: an optional downstream operation may be skipped, but the evidence required to justify that decision must remain available. Why Mova: otherwise an optimization can silently remove the basis for its own claimed reliability.

Idea: Compare early prediction with richer prediction. Where: the Full Sequence ShadowLLM comparison and Figure 5. Area: architecture evaluation. Mova: нове. The paper tests a more expensive predictor that sees the complete embedded input, then weighs its ranking quality against its cost. Mova could compare a light structural router with a richer document-level analysis on the same supported tasks. Why Mova: richer input should earn its execution cost through better decisions instead of being assumed beneficial.

Idea: Use expensive analysis offline and a cheaper approximation online. Where: Pruning Criteria and Predictors For Neuron Ranking. Area: training architecture. Mova: вже є (offline teacher review in `annot` and `tools/cycle`, with native school assessment kept separate). The connection is procedural: costly preparation can produce supervision for later native execution. ShadowLLM’s gradient calculations and Mova’s teacher review are different mechanisms, and neither makes the other’s conclusions automatically valid. Both require testing the deployed system instead of substituting the preparation process for it.

Idea: Examine target outliers before fitting a predictor. Where: Figure 14 and Learning Pruning Criteria with Predictors. Area: statistics and training data. Mova: нове. The paper links difficult prediction to score range and outliers for some criteria. Mova could inspect whether supervision or routing scores are dominated by exceptional records before interpreting a weak predictor as insufficient capacity. Why Mova: this could reveal targets that need a better representation, a different aggregation, or an explicit exceptional case.

Idea: Separate local explanations from global budgets. Where: Figure 6. Area: reasoning and operational control. Mova: частково є (local reasons in frames and world answers, together with conductor-level routing in `layers`). A shared budget need not replace the explanation attached to each selected operation. A proposed allocator should retain which evidence made a local operation useful and which budget decision admitted it. Why Mova: system-wide optimization remains reviewable only when individual omissions and selections can be explained.

Idea: Test task accuracy and broader quality separately. Where: Figures 15–16 and Advantages of Gradient-Informed Criteria. Area: evaluation. Mova: вже є (separate parser, school, mathematical, and story-reader assessments). ShadowLLM shows why one favorable metric does not settle the choice of an importance criterion. The corresponding Mova practice is to avoid treating success on one benchmark as proof that a rule or representation is generally sound. A change can improve one consumer while degrading another.

Idea: Use static removal as a diagnostic baseline. Where: Figures 15–16 and Appendix A.2. Area: experimental design. Mova: частково є (controlled rules-off comparisons and ablations in the documented language work). Permanent omission can provide a useful reference even when contextual selection is the intended method. For a proposed router, Mova could compare always running an optional analysis, never running it, and selecting it from context. Why Mova: this would show whether adaptation adds value beyond a simpler fixed policy.

Idea: Vary the context used to create supervision. Where: Enhancing Pruning with Few-Shot Examples and Figure 13. Area: annotation and training data. Mova: частково є (teacher prompts include an agreed draft and a temporary-world summary). The paper finds that examples supplied during criterion calculation affect the resulting pruning quality. A Mova hypothesis is to compare bounded annotation contexts while holding the reviewed task and later evaluation fixed. Why Mova: supervision may change because the reviewer saw different evidence, not because the learner changed.

Idea: Keep aggregate evidence distinct from instance evidence. Where: the discussions of jacov and epenas. Area: statistics and provenance. Mova: вже є (`tools/dictindex` separates corpus statistics, occurrence witnesses, reviewed labels, and dictionary admission). ShadowLLM explains that a measure built from relationships across examples cannot automatically become a score for an isolated input. Mova’s dictionary proposals similarly require care: a useful corpus-level association does not establish the meaning of every occurrence.

Idea: Validate a transferred criterion in its new domain. Where: Limitations and Appendix A.2. Area: method transfer. Mova: вже є (source-bound groupants, declared conformance profiles, and regression-gated extensions). Some criteria in ShadowLLM originate in settings with different activation assumptions. Mova should apply the same scrutiny when borrowing a linguistic rule, statistical selector, or mathematical approximation: state the original assumptions and test the new use separately.

Idea: Diagnose dispatch overhead independently of arithmetic. Where: Predictors For Neuron Ranking and Performance. Area: operational systems. Mova: частково є (persistent workers and explicit worker protocols). Persistent execution may already avoid some setup costs, but a measured decomposition of parsing, transport, queueing, and handler execution is a further proposal. Why Mova: improvements should target the bottleneck actually responsible for task latency.

Idea: Preserve independent task results alongside aggregates. Where: Figure 8 and Model Quality. Area: evaluation reporting. Mova: вже є (course-level reports, question traces, and separate task benchmarks). ShadowLLM’s taskwise comparison complements its average accuracy. Mova can retain this discipline when evaluating adaptive execution: report which tasks improved or regressed instead of allowing an aggregate to conceal a systematic failure.

Idea: Treat the cheap prediction as a proposal with a fallback. Where: the deployment motivation in Predictors For Neuron Ranking. Area: operational reliability. Mova: частково є (`Route::Escalate`, explicit gaps, and unsupported-request failures). ShadowLLM does not establish a general fallback policy, but its reliance on predicted importance motivates a Mova-specific extension: uncertain resource selection could retain the fuller analysis or escalate. Why Mova: this would let efficiency experiments preserve explicit failure behavior instead of silently omitting necessary reasoning.

Idea: Use one shared representation for specialized decisions. Where: ShadowLLM’s first-layer predictor design. Area: data processing. Mova: вже є (the shared document parse and retained graph used by the mouse team in `retention/mice.rs`). The analogy is limited but concrete: several decisions can reuse one prepared representation. The existing mice mechanism does not implement neural sparsity, and its shared graph does not establish that every specialist has enough information for every question.

Idea: Measure the policy at more than one resource budget. Where: the sparsity sweeps in Figures 6–7 and Figure 12. Area: evaluation and resource control. Mova: нове. An optional-analysis policy could be assessed across several declared budgets instead of at one favorable operating point. The outcome would need to include answer quality and actual execution cost. Why Mova: a policy useful under a generous budget may fail when the available work is reduced.

Idea: Keep prediction quality separate from downstream correctness. Where: Figure 5, Figure 14, and Evaluation. Area: evaluation methodology. Mova: частково є (`prag` confidence diagnostics and separate native task assessments). Agreement with a reference ranking measures reproduction of that ranking; it does not prove that the resulting answer is correct. A proposed routing study should therefore report selector fidelity and task outcomes independently. Why Mova: a precisely copied but unsuitable selection target can still produce consistently poor decisions.

### The problem and its context

#### Why permanent pruning is not enough

The paper begins with a deployment problem. Large [language models](https://md.research.elamur.ai/free/en/concepts/language-model/) can perform tasks from examples placed in their input, yet their size makes latency-sensitive use expensive. The authors connect this setting to [in-context learning](https://md.research.elamur.ai/free/en/concepts/few-shot-learning/), citing [Language Models are Few-Shot Learners](https://md.research.elamur.ai/free/en/papers/brown-2020-language-models-few-shot-learners/) and work on demonstrations, including [Rethinking the Role of Demonstrations](https://md.research.elamur.ai/free/en/papers/min-2022-rethinking-role-demonstrations-what-makes/). The important deployment property is that the task can change with the input. A computation that is dispensable for one prompt may matter for another.

Pruning reduces execution requirements by omitting selected structures. In the setting studied here, those structures are attention heads and feed-forward neurons inside a [transformer](https://md.research.elamur.ai/free/en/concepts/transformer/). An attention head supplies one part of the attention computation. A feed-forward neuron contributes within the network’s multilayer perceptron, or MLP. Removing whole structures creates a different practical problem from merely setting scattered individual parameters to zero: the inference system must select and execute the retained operations.

Static pruning uses the same retained structure for all inputs. Its simplicity is attractive because no runtime selector is needed. However, the authors describe earlier task-specific pruning research, including [Are Sixteen Heads Really Better than One?](https://md.research.elamur.ai/free/en/papers/michel-2019-sixteen-heads-really-better-than/), as insufficient for preserving the flexibility they seek. Their concern is the effect on downstream tasks performed through input context. A permanently discarded head cannot return when another input needs it.

Contextual sparsity makes the retained structure input-dependent. This introduces an additional responsibility: before an operation is omitted, some mechanism must predict that omission is acceptable. The prediction must arrive early enough to save execution, and it must be cheap enough not to consume the benefit. Contextual sparsity is therefore not just a question of discovering unused capacity. It is also a scheduling and prediction problem.

#### Importance is not identical to activation

A natural starting point is activation magnitude. If a head or neuron contributes a small value, perhaps omitting it will change little. DejaVu uses predictors trained around such magnitude information. The paper treats this as an important baseline instead of a settled definition of relevance.

The difficulty is that an intermediate value has meaning through the rest of the computation. The size of that value does not directly describe how much the final objective depends on it. Gradient information offers another view: it describes how changes in an internal quantity relate to changes in the loss. Combining an activation with its loss gradient can therefore approximate the consequence of removing that contribution.

The authors situate this idea within earlier pruning research. They discuss parameter-magnitude approaches, gradient-based criteria, and methods related to Optimal Brain Damage. They also borrow measures from neural architecture search, where a cheap proxy may be used to compare candidate architectures. These earlier measures supply a range of possible importance targets, but they were not all designed for contextual pruning of language systems.

This distinction matters throughout the paper. A criterion can be meaningful for comparing entire architectures, or for aggregating behavior across many examples, without yielding a useful score for one current input. Likewise, a criterion can provide strong static pruning results while being difficult to predict during inference. ShadowLLM’s target is narrower: importance information that supports useful input-dependent omission and can be approximated cheaply.

#### Why the predictor itself becomes a bottleneck

DejaVu supplies the immediate systems context. It predicts sparsity during execution and includes specialized techniques for making sparse operations efficient. ShadowLLM keeps that general execution setting but questions the repeated placement of predictors through the network.

A predictor may use only a small proportion of the total arithmetic while still being expensive in elapsed time. The paper attributes this mismatch to additional GPU kernel launches, memory-bandwidth demands, and the complexity of interleaved execution. The predictor must be scheduled around the main computation, and its outputs must become available when the next sparse operation needs them.

The authors consequently separate two opportunities. Better targets can improve the quality retained at a given sparsity level. A different predictor schedule can reduce the overhead of obtaining the masks. These are related but distinct contributions. Improving the criterion does not automatically simplify execution, and simplifying execution does not guarantee that the omitted components were well chosen.

### The method, step by step

#### Define the decision being approximated

The ideal pruning decision would examine the actual effect of every candidate removal. Let the unpruned system be M, the evaluation data be D, and a removable subset of components be C. The paper expresses the desired choice through the change in performance after removing C.

```
arg min over C ⊂ M [P_M(D) − P_(M∖C)(D)]
```

P_M(D) denotes performance when M processes D. M∖C is the system after the components in C have been omitted, and P_(M∖C)(D) is its resulting performance. The expression seeks a subset whose removal minimizes the performance loss. A practical pruning decision also needs a specified sparsity budget; without such a constraint, retaining everything would avoid the loss.

Directly solving this selection problem is impractical. The paper illustrates the combinatorial difficulty with a layer containing 64 heads, where pruning 56 leaves a choice among many possible retained subsets. That search would then need to be repeated across layers. The role of an importance criterion is to replace exhaustive evaluation with a tractable ranking.

The method first obtains such rankings during preparation, when activations and gradients can be measured. It then trains a predictor to estimate the rankings from information available near the start of inference. Finally, the deployment system converts predicted importance into masks and executes the retained structures.

From expensive importance measurements to sparse inference The steps in order.

#### Establish the magnitude baseline

For a particular input, A_l,k denotes the activation associated with component k in layer l. The component may be an attention head or a feed-forward neuron. The magnitude criterion used as the principal baseline is its L2 norm.

```
L2Norm_l,k = ‖A_l,k‖₂
```

The subscript l identifies the layer and k identifies the component within it. The notation ‖ · ‖₂ denotes the L2 norm, which summarizes the magnitude of the activation values. This score does not use the target output or the gradient of the loss.

The attraction of the criterion is straightforward. It supplies an input-dependent number for each structure, and that number can supervise a predictor. Its limitation is equally important: it measures activity rather than directly approximating the loss caused by removal. ShadowLLM’s comparisons ask whether a criterion more closely connected to consequences can improve the retained quality.

#### Add information from the loss gradient

The loss L measures how well the system predicts the target sequence for a calibration example. Gradients describe how that loss changes with internal quantities. For attention heads, the paper considers the gradient with respect to activation.

```
GradNorm_head(l,k) = ‖∂L/∂A_l,k‖₂
```

∂L/∂A_l,k is the derivative of the loss with respect to the activation of head k in layer l. Taking its L2 norm gives a gradient-magnitude score. It describes sensitivity to changes at that activation, rather than the activation’s own size.

For feed-forward neurons, the paper also defines the gradient score through the relevant up-projection parameters.

```
GradNorm_neuron(l,k) = ‖∂L/∂θ_l,k‖₂
```

θ_l,k denotes the parameters associated with neuron k in the feed-forward up-projection of layer l. The derivative describes how changes to those parameters affect L. The notation therefore differs between heads and neurons because the paper adapts its criteria to different kinds of structures.

Gradient magnitude alone is not the final choice. The authors find that combining the current value with its gradient produces a better practical target. This combination connects the quantity that would be removed with the loss sensitivity at that quantity.

#### Calculate plainact

For an attention head, plainact uses the product of activation and activation gradient, aggregated with an L1 norm.

```
plainact_head(l,k) = ‖A_l,k · (∂L/∂A_l,k)‖₁
```

A_l,k is the head activation, and ∂L/∂A_l,k is its loss gradient. The product combines the contribution’s value with local sensitivity to changing it. The L1 norm, written ‖ · ‖₁, aggregates absolute values.

For feed-forward neurons, the corresponding expression uses parameters and their gradients.

```
plainact_neuron(l,k) = ‖θ_l,k · (∂L/∂θ_l,k)‖₁
```

θ_l,k again denotes the neuron’s relevant up-projection parameters. The product pairs those parameter values with their derivatives, and the L1 norm produces the importance score. The head and neuron expressions share a principle while operating on different quantities.

The paper motivates these scores through approximations to the loss change associated with removal. They should not be read as exact measurements of the effect of jointly deleting an arbitrary collection. Components interact, and a ranking-based decision does not solve the full subset-selection problem. The empirical question is whether this approximation yields a better quality–sparsity relationship.

#### Compare related and more elaborate criteria

The fisher criterion also combines values with gradients, but squares and averages the resulting quantities.

```
fisher_head(l,k) = ⟨(A_l,k · (∂L/∂A_l,k))²⟩
```

The angle brackets denote averaging. The squared product emphasizes the distribution of the activation–gradient terms differently from plainact’s L1 aggregation. A similar construction is applied to feed-forward parameters.

```
fisher_neuron(l,k) = ⟨(θ_l,k · (∂L/∂θ_l,k))²⟩
```

Here θ_l,k and its gradient play the same roles as in the neuron version of plainact. The distinction lies in aggregation, not in introducing a completely unrelated source of evidence. This is why the authors retain both criteria despite their resemblance.

The paper also studies grasp, which uses second-order information.

```
grasp_l,k = ‖−(H_l,k · (∂L/∂A_l,k)) ⊙ A_l,k‖₁
```

H_l,k denotes the Hessian-related quantity used for the component. A Hessian represents second-order derivatives, describing how first-order sensitivity changes. The symbol ⊙ denotes elementwise multiplication, and the outer L1 norm aggregates the result. The criterion approximates the effect of removal on gradient behavior, but the experiments find that its values are harder to predict reliably.

Other criteria have a different relationship to context. jacov uses covariance among Jacobian matrices across examples. A Jacobian collects first-order derivatives. epenas also examines relationships among these derivatives, including within-class and between-class behavior; the authors adapt its classes to next-token identities. Because these criteria depend on relationships across examples, the paper does not treat them as straightforward per-input targets for contextual sparsity.

The appendix additionally presents snip as a limiting sensitivity expression.

```
snip = lim as ε → 0 [(L_θ − L_(θ+εδ_q)) / ε]
```

L_θ is the loss at parameters θ, and ε is a perturbation size approaching zero. δ_q denotes the perturbation direction appearing in the paper’s expression. The accompanying discussion connects it to the consequence of removing an individual neuron, but does not fully specify the direction’s construction. The safe interpretation is the stated sensitivity role, rather than an invented implementation detail.

For nwot, the appendix describes a criterion derived from binary activation patterns after ReLU, the rectified linear activation function. Its displayed expression uses sequence-position activations.

```
nwot_l,k = log(Σᵢ₌₁ˢᵉᑫˡᵉⁿ [½(1 − A_l,kⁱ)ˢᵉᑫˡᵉⁿ])
```

seqlen is the sequence length, i indexes a sequence position, and A_l,kⁱ denotes the activation at that position. The expression is presented alongside a description involving a Hamming-distance kernel and its determinant. That description and the compact displayed form do not fully explain the implementation’s connection. The authors themselves identify the broader concern: a criterion designed around ReLU behavior may not transfer directly to attention maps.

#### Create the predictor-training data

The expensive importance measurements happen before deployment. For each calibration example, the authors have an input prompt and a target output sequence. They run the system, calculate the loss, collect the necessary activations and gradients, and assign importance scores to heads and neurons.

The main predictor comparisons use 2720 input–output examples drawn across the downstream tasks in a five-shot setting. Here, five-shot means that task demonstrations are included in the input context. The predictor learns from the resulting importance targets; it is not asked to calculate gradients during ordinary inference.

The appendix specifies a shared training configuration for the ShadowLLM and DejaVu-style predictors. It lists 1 hidden layer with 2048 neurons and ReLU activation. Training uses 100 epochs, a batch size of 32, AdamW, and a learning rate of 0.001. CosineAnnealingLR supplies the learning-rate schedule, while MSELoss supplies the fitting objective.

The input dimension follows the embedding dimension of the underlying system. The output dimension corresponds to the neuron importance values being predicted. These details matter because the proposed predictor is a relatively small auxiliary network, not another complete language generator. Its task is to estimate which existing operations are worth executing.

#### Predict from the first attention output

During inference, ShadowLLM observes the first attention layer’s output and uses the final sequence position as the predictor input. The predictor then estimates importance for the later layers. This early placement means the first layer must remain available: it supplies the representation on which the selection decision depends.

The alternative DejaVu-style design uses local predictors through the network. The paper describes these as taking information at alternating layers to predict later sparsity. This gives access to more local representations, but it also introduces repeated execution and scheduling work.

The theoretical predictor-cost expressions make the structural difference explicit.

```
FLOPs_DejaVu = N(Ep₁ + p₁(H + F))
```

N is the number of transformer layers. E is the embedding dimension, p₁ is the predictor’s hidden dimension, H is the number of attention heads per layer, and F is the feed-forward neuron count per layer. The expression repeats the predictor’s input transformation and output computation across layers.

```
FLOPs_ShadowLLM = Ep₁ + p₁N(H + F)
```

The symbols retain the same meanings. The input transformation appears once, while the output covers importance values across the network. This accounting captures the arithmetic reduction from sharing the early predictor representation.

```
Predictor FLOPs saved = (N − 1)Ep₁
```

The saved work is the repeated input-to-hidden transformation. The paper reports predictor-FLOP reductions of 19.11% for OPT-1.3B, 19.55% for OPT-30B, and 19.76% for OPT-175B. These are predictor-cost calculations, not corresponding end-to-end speed measurements.

A Full Sequence ShadowLLM alternative instead applies a small transformer to the embedded input sequence. It can support pruning from the first transformer layer, because it does not depend on that layer’s completed output. Its additional arithmetic is given as follows.

```
Additional FLOPs_FullSequence = 2(2E² + EL²)
```

E denotes embedding dimension and L denotes input sequence length in this cost expression. This L should be distinguished from the loss symbol used earlier. The authors judge this alternative too costly because its extra work is comparable to a dense attention layer, despite ranking quality similar to the simpler design.

#### Convert predicted scores into executable masks

Once importance values are predicted, the system selects structures to retain under the desired sparsity level. Local pruning ranks components within each layer and imposes the target omission proportion there. Global pruning compares components across layers, allowing the retained allocation to become uneven.

The predictor study uses per-layer output normalization while investigating these alternatives. This detail helps explain why prediction and selection should be treated separately. Training supplies scores with a particular scaling procedure; the pruning policy then decides whether those scores compete within a layer or across the network.

The resulting masks identify attention heads and feed-forward neurons whose operations can be omitted. ShadowLLM is integrated with the efficient sparse execution techniques used by DejaVu. The predictor does not itself create a speedup merely by producing a mask: the retained operations must still be executed efficiently, with the cost of mask production included.

### Experiments and results

#### What is evaluated

The quality evaluation uses WikiText2 for language-model perplexity and a collection of downstream tasks for accuracy. Perplexity evaluates how well the system assigns likelihood to text; lower values indicate better performance under the stated calculation procedure. Accuracy measures successful answers on the downstream evaluations.

The task collection includes [PIQA](https://md.research.elamur.ai/free/en/papers/bisk-2019-piqa-reasoning-about-physical-commonsense/), OpenBookQA, and HellaSwag. It also includes [WinoGrande](https://md.research.elamur.ai/free/en/papers/sakaguchi-2019-winogrande-adversarial-winograd-schema-challenge/), [RTE](https://md.research.elamur.ai/free/en/papers/giampiccolo-2007-third-pascal-recognizing-textual-entailment/), [COPA](https://md.research.elamur.ai/free/en/papers/gordon-2012-semeval-2012-task-7-choice/), and ARC-Easy from [the AI2 Reasoning Challenge](https://md.research.elamur.ai/free/en/papers/clark-2018-think-have-solved-question-answering/). The authors run these evaluations through lm-eval-harness.

Different experiments have different scopes. OPT-1.3B is the main platform for studying criteria and predictor behavior. The authors also investigate both local and global pruning for OPT-13B and OPT-30B, while their investigation of Llama-2-7b covers global pruning. The downstream comparison across the task collection is reported on OPT-13B.

The distinction between preparation and evaluation is important. Predictor training uses importance information collected in a five-shot setting. The principal downstream accuracy comparison then evaluates in the zero-shot setting. The experiment therefore tests whether the learned importance predictor remains useful when the evaluation input contains no task demonstrations.

#### The explicit quality comparison

The paper’s tabulated OPT-13B comparison provides the clearest exact accuracy values. It compares fixed sparse execution, dense execution, a DejaVu-style predictor, and ShadowLLM. The sparse setting is described as 50% sparsity; the dense row supplies a reference without that omission policy.

OPT-13B average zero-shot accuracy across 7 downstream tasks ShadowLLM has the highest reported average accuracy in this comparison.

**The numbers**

| System or setting | accuracy % |
| --- | --- |
| Static | 55.34 |
| Dense | 58.32 |
| DejaVu | 59.28 |
| ShadowLLM (this paper) | 61.19 |

The result establishes the ordering for this experiment. It does not mean that pruning is universally more accurate than dense execution, or that a particular omitted component was harmful in every input. The reported average belongs to the specified tasks, system, and predictor-training procedure.

The authors describe the ShadowLLM result as having 1.91% higher accuracy than the DejaVu-style comparison. That statement should be read alongside the actual accuracy values rather than converted into a different improvement calculation. Elsewhere, the paper uses broader headline language about improvements exceeding 15%; those claims refer to other quality–sparsity comparisons rather than being interchangeable descriptions of this table.

The taskwise figure reports improvements across the downstream evaluations. It is useful because an aggregate alone can hide different behavior among tasks. However, exact task-specific values are not written out in the accompanying text, so the warranted account is the authors’ stated consistency, not reconstructed numerical scores.

#### The explicit latency comparison

The same OPT-13B table reports elapsed time. Static sparse execution is the fastest listed setting, while ShadowLLM improves on the dynamic DejaVu comparison. Dense execution falls between those dynamic values.

OPT-13B latency in the downstream comparison ShadowLLM reduces dynamic prediction overhead while static sparsity remains faster.

**The numbers**

| System or setting | latency ms |
| --- | --- |
| Static | 2014 |
| Dense | 2609 |
| DejaVu | 2981 |
| ShadowLLM (this paper) | 2562 |

This comparison exposes the central tradeoff. Fixed sparsity avoids prediction overhead but retains less downstream accuracy in the reported experiment. Contextual selection improves quality, yet the selector can consume time. ShadowLLM narrows that execution cost through early shared prediction.

The paper describes ShadowLLM’s latency as 14% lower than the DejaVu-style predictor in this table. The table itself does not specify every generation or batching condition, so its latency should not be silently equated with the separately described generation experiments. The evidence is strongest when each result retains its own experimental setting.

Another methodological distinction concerns the baseline implementation. For controlled criterion comparisons, the authors implement a DejaVu-style predictor within their framework. Their systems-performance discussion then describes integrating ShadowLLM with the sparse-execution improvements from DejaVu. These comparisons address related questions, but a quality comparison against a reimplemented predictor is not identical to a complete reproduction of every deployment choice in the earlier framework.

#### Perplexity and sparsity

WikiText2 supplies a complementary quality measure. The authors compare the DejaVu-style predictor trained on L2Norm with ShadowLLM trained on plainact, examining both local and global pruning. They report that the improved criterion preserves perplexity better and that global allocation generally provides a stronger tradeoff.

The same broad finding appears in the Llama-2-7b experiment: plainact improves the perplexity–sparsity relationship. The paper also includes an OPT-13B global-pruning comparison supporting the value of plainact with ShadowLLM. These results broaden the quality evidence beyond the main OPT-1.3B analysis, although they do not establish equal coverage for every architecture and size.

The authors’ perplexity procedure differs from the common concatenated-text calculation. Each document is evaluated with its own context. Text from another document is not allowed to supply additional history. The appendix explains that this makes the measurement better aligned with their document-conditioned sparsity setting, while raising the scores relative to the comparison values they cite.

For Llama2-7B, the paper reports 8.82 under its procedure and lists 5.47 from the cited comparison. The corresponding OPT-1.3B values are 16.4 and 14.6. For OPT-13B they are 11.5 and 10.1, while OPT-30B has 10.7 and 9.56.

These pairs are not controlled estimates of how much document boundaries alone change perplexity, because the cited values also belong to another report. Their purpose is to disclose the scale of the discrepancy and warn against direct comparison. The most persuasive sparsity comparisons are those conducted consistently within the authors’ own evaluation procedure.

#### End-to-end generation measurements

The performance experiments use up to 4 A100 GPUs. ShadowLLM is added to the sparse-execution machinery associated with DejaVu, retaining optimizations such as fused kernels and coalesced memory access. This matters because a selection method evaluated without effective sparse execution might show good masks but little practical speed benefit.

For the experiment with prompt length 128 and generation length 128, the authors describe sparsity around 50%. They report an average 16.2% improvement over DejaVu in end-to-end generation time. The generation-length study also finds a consistent advantage as the output becomes longer.

The decode-phase analysis reports ShadowLLM as 21.25% faster on average than DejaVu. Decoding is the repeated generation stage after the prompt has been processed. Its separate measurement helps locate where eliminating interleaved predictor execution matters, instead of attributing the entire speedup to arithmetic savings.

The performance section additionally reports profiling sizes from 1.3B to 66B, with improvements reaching 21.3% in time per inference. This scope is broader than the quality experiments emphasized elsewhere. It supports a performance observation across those profiled sizes, not a claim that all the corresponding quality studies were repeated at 66B.

The paper’s introduction also gives 20.6% as the improvement associated with early prediction. The abstract uses an “up to” claim around 20%, while the detailed performance section supplies the averages and maximum just described. These statements should remain attached to their respective comparisons. Combining them into one universal speedup would erase differences in workload, execution phase, and aggregation.

### What the ablations show

#### Importance changes with the input

The context-dependence analysis examines head-rank variation on OPT-1.3B. Importance is measured using GradNorm across 5000 inputs drawn from the downstream tasks in a five-shot setting. The authors find substantial variation, particularly in earlier and later layers.

This analysis supports the motivation for contextual selection. If the same heads always occupied the same positions in the importance ordering, a fixed policy would be easier to justify. Variation means that a single permanent ranking can discard a head that becomes useful under another input.

However, rank variation does not prove that every change matters equally to the final answer. A ranking can move among components with similar scores, and not every ranking difference necessarily produces a meaningful quality difference. The experiment establishes that the measured importance is input-dependent; the later pruning results provide the outcome evidence.

#### One early predictor can reproduce useful rankings

The predictor comparison evaluates how well predicted importance follows the criterion’s own ordering. The paper uses Spearman-ρ, a rank-correlation coefficient. It examines a global head-ranking task over 500 queries spanning the downstream evaluations.

The result supports the claim that an early representation can carry useful information about importance in later layers. ShadowLLM does not need to wait for every local layer representation before making all of its decisions. This is an empirical finding about the tested predictors, rather than a guarantee that the first attention output is sufficient for every architecture.

The Full Sequence variant performs similarly in ranking quality but requires substantially more computation. Its comparison helps justify the chosen observation point. Access to a different or more extensive representation is worthwhile only if it improves the final quality–cost balance.

The DejaVu-style local predictors face another limitation in this analysis: they are not trained for the same global ranking problem. Their weaker global behavior therefore should not be interpreted simply as proof that local representations contain less useful information. Predictor objective, normalization, and selection policy all affect the comparison.

#### Global allocation beats equal layer budgets

The global-versus-local study trains ShadowLLM on plainact targets and tests WikiText2 perplexity on OPT-1.3B as sparsity changes. Local pruning imposes the target omission proportion in every layer. Global pruning permits an uneven distribution.

The authors report that both strategies can preserve quality, but the global version generally performs better. Their explanation is that equal pruning proportions can retain too much in a less important layer while removing useful capacity from another. Global selection can move the retained budget toward the components that receive higher scores.

The lesson is conditional on score comparability. Global selection requires the ordering to make sense across layers, not just within them. A predictor that orders each layer correctly but assigns incompatible scales across layers could still allocate the overall budget badly. The paper’s predictor and normalization choices are therefore part of the result.

#### Demonstrations change the importance measurements

The few-shot analysis calculates fisher scores under 0-shot, 3-shot, and 5-shot conditions. It uses 2720 input–output examples, aggregates the importance for each structure, and then evaluates WikiText2 perplexity after pruning.

Providing more demonstrations during criterion collection improves the resulting quality under pruning. This finding concerns the context used to measure importance. It does not require that the final WikiText2 evaluation itself contain those demonstrations.

The experiment illustrates that an importance target is not independent of its measurement procedure. A score derived from a short, underspecified prompt may rank structures differently from a score obtained when the task is illustrated. The paper therefore studies both the formula and the input conditions under which that formula is evaluated.

#### Strong static criteria are not automatically strong contextual criteria

The criterion comparisons use aggregated importance to create fixed sparse systems. They then examine mean downstream accuracy and WikiText2 perplexity. This provides a way to inspect the targets without immediately confounding them with predictor error.

jacov preserves downstream performance relatively well in the static experiment. Yet it performs less well on the broader perplexity evaluation, and its cross-example covariance construction does not supply a straightforward contextual equivalent. The result distinguishes a useful aggregate task criterion from a practical per-input target.

fisher and plainact preserve quality more successfully in the perplexity comparison. grasp can perform well on downstream tasks but does not give comparably good perplexity behavior. The implication is not that a single metric is always superior; it is that candidate selection needs evidence from more than one relevant outcome.

The appendix extends these static comparisons. Its accuracy figure describes averaging criteria over 3500 training examples, while its perplexity figure describes 2720. Those counts belong to different reported comparisons and should not be merged into one presumed uniform calibration set.

#### Predictability changes the preferred criterion

The predictor-learning study measures importance on 2720 examples and evaluates average rank correlation on 680 examples. The authors compare how well the early predictor can reproduce different targets.

fisher gives the best perplexity behavior up to 50% sparsity in the cited analysis, but its Spearman-ρ is under 0.7. This makes it less attractive as a target for the deployed predictor than its oracle-style pruning quality alone would suggest.

grasp also proves difficult to learn. The authors identify its wide range and outliers as problems, and the figure caption reports approximately 4× as many outliers in its proxy scores. Such values can complicate fitting even when the criterion contains useful importance information.

plainact succeeds through the combination of favorable pruning quality and easier prediction. This is the paper’s most general methodological point. The operationally best criterion is the one whose useful decisions survive approximation, not necessarily the one that looks strongest when its exact values are freely available.

#### Arithmetic savings do not explain all the latency savings

The systems analysis reports that the DejaVu predictor contributes only 2% of total FLOPs on OPT-1.3B, yet the layerwise arrangement can add more than 25% execution overhead relative to fixed sparsity. That discrepancy motivates changing the schedule rather than merely shrinking the predictor.

ShadowLLM reduces repeated prediction and simplifies integration. Its measured benefit therefore includes avoided launch and coordination costs, not just the theoretical reduction in predictor arithmetic. The paper’s approximately 20% predictor-FLOP reduction should not be treated as a direct formula for the end-to-end speedup.

This comparison also explains why static sparse execution remains a useful baseline. It shows the cost of adaptation separately from the cost of the retained sparse computation. ShadowLLM improves the adaptive path while preserving the value of contextual choices.

### Limitations

#### Limits stated by the authors

The authors identify scale and architectural coverage as limitations. Their limitations section describes a study up to 30B parameters and emphasizes OPT-style systems. Other parts of the paper include a Llama-2-7b quality experiment and performance profiling through 66B. The careful interpretation is that coverage varies by experiment; the broader profiling range does not extend every quality conclusion to the same scale.

They also acknowledge that some borrowed criteria have assumptions that do not fit attention naturally. In particular, nwot originates in reasoning about ReLU activation patterns. Applying such a measure to attention maps is not automatically justified by its success in its original setting. Including the criterion broadens comparison, but does not resolve that methodological mismatch.

The predictor-training data is another stated limitation. The authors use fewer than 10,000 input–output examples and suggest that more examples could improve the learned sparsity pattern. This is an open possibility instead of a demonstrated scaling result. The paper does not establish how performance changes as predictor-training data grows.

#### Limits visible in the experimental design

A contextual predictor learns from a particular calibration distribution. The main training examples come from the downstream task collection, with importance measured in a five-shot setting. The zero-shot evaluations show useful transfer across that context change, but they do not establish robust behavior for every kind of unfamiliar input.

The target itself is an approximation. plainact uses local derivative information and an aggregation rule to rank components. It does not exhaustively measure all interactions among jointly removed structures. Good experimental behavior supports its usefulness, while leaving room for failures when several individually modest components become important together.

Rank correlation is also an intermediate diagnostic. A high correlation means that predicted scores follow a reference ordering reasonably well. It does not say exactly which mistakes occur near the pruning threshold, whether a crucial low-ranked component was removed, or how much the final answer changes. The downstream and perplexity experiments are necessary precisely because selector fidelity cannot replace outcome evaluation.

The first-layer observation imposes a dependency. ShadowLLM’s main design preserves that layer and predicts later importance from it. As a result, it does not offer arbitrary sparsification of the entire computation from no observation at all. The Full Sequence alternative explores a way around this dependency, but the authors reject its cost as unattractive.

Global pruning introduces its own assumption: scores must be meaningfully comparable across layers. The reported results show that the tested predictor and normalization procedure can support useful allocation. They do not prove that any locally trained importance predictor can be converted into a reliable global selector simply by sorting all outputs together.

The performance evidence depends on execution machinery. ShadowLLM benefits from the efficient sparse kernels and memory handling associated with DejaVu, and the experiments use A100 GPUs. The paper does not provide a universal latency guarantee across hardware, batching policies, context lengths, or software implementations. A predictor that is advantageous in this execution setting may face different costs elsewhere.

Power consumption motivates the work, but the reported results discussed here focus on quality, latency, and arithmetic cost. A faster execution measurement does not by itself establish an exactly corresponding energy reduction. The paper’s measured speedups should therefore remain speed claims.

#### Limits of comparison and reporting

The accuracy and speed headlines summarize several experiments. They should not be detached from the relevant sparsity, task setting, or execution phase. A claim about decode time, an average generation improvement, and a maximum across profiled sizes describe different quantities.

The perplexity procedure also limits external comparability. Evaluating each document independently removes context that concatenated evaluations may make available. The paper explicitly discloses this choice and gives comparison values, but those values should not be used to rank systems evaluated under incompatible context policies.

Some figure captions and text supply qualitative conclusions without exact numerical points. Those results support statements such as global pruning generally outperforming equal layer budgets, or plainact improving a plotted tradeoff. They do not support invented coordinates, interpolated thresholds, or additional task scores.

Finally, the study does not establish that neural sparsity criteria transfer directly to symbolic processing. A rule-based system has different failure modes, representations, and cost structures. The Mova proposals concern experimental design and allocation principles; any practical gain would require its own source-bound implementation and measurement.

### What came after

[Context-Conditioned Masked LoRA: Dynamic Rank Routing for Compute-Efficient Parameter-Efficient Fine-Tuning](https://md.research.elamur.ai/free/en/papers/rafiuddin-2026-context-conditioned-masked-lora-dynamic/) is a later citing work dated 2026. Its title places context-conditioned selection in parameter-efficient fine-tuning, with dynamic routing over LoRA rank. This creates a clear conceptual connection to ShadowLLM: the amount or arrangement of active computation can depend on context rather than remain fixed.

The available account does not specify how that work uses ShadowLLM’s particular mechanisms. It does not establish that the later system adopts plainact, predicts from the first attention output, uses global head rankings, or reproduces the same sparse-execution schedule. Citation and thematic similarity support identifying a continuation of the context-dependent allocation idea, but not attributing unreported implementation choices or results.

The distinction between the settings is useful. ShadowLLM studies omission of attention heads and feed-forward neurons during inference, with supervision derived from importance criteria. The later title concerns dynamic rank routing for a fine-tuning method. Both make selective computation a context-sensitive decision, yet the selected structures and the surrounding optimization problem need not be the same.

ShadowLLM’s contribution to that broader direction is the joint evaluation of importance, predictability, and execution cost. A selective-computation method needs a defensible account of what can be omitted, an affordable way to make that choice, and an outcome evaluation showing what the choice preserves. The later citation identifies continued interest in contextual allocation; its detailed relationship to ShadowLLM remains unspecified.

## Cite

Cite as Yash Akhauri, Ahmed F. AbouElhamayed, Jordan Dotzel, Zhiru Zhang, Alexander M. Rush, Safeen Huda and Mohamed S. Abdelfattah. 2024. ShadowLLM: Predictor-based Contextual Sparsity for Large Language Models. Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing.

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2024.emnlp-main.1068](https://doi.org/10.18653/v1/2024.emnlp-main.1068)

```bibtex
@inproceedings{akhauri2024shadowllm,
  title = {{ShadowLLM: Predictor-based Contextual Sparsity for Large Language Models}},
  author = {Yash Akhauri, Ahmed F. AbouElhamayed, Jordan Dotzel, Zhiru Zhang, Alexander M. Rush, Safeen Huda and Mohamed S. Abdelfattah},
  booktitle = {Proceedings of the 2024 Conference on Empirical Methods in Natural Language Processing},
  year = {2024},
  doi = {10.18653/v1/2024.emnlp-main.1068},
  url = {https://doi.org/10.18653/v1/2024.emnlp-main.1068}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
