Elamur Research

HiRED: Attention-Guided Token Dropping for Efficient Inference of High-Resolution Vision-Language Models

Paper · 2024 · Kazi Hasan Ibn Arif, JinYi Yoon, Dimitrios S. Nikolopoulos et al.

Summary

A high-resolution image can make the difference between reading a label and missing it. But a system that takes both images and text often works with smaller views of the image. It encodes a reduced copy of the whole scene alongside crops that preserve local detail. Each view adds visual tokens, the vectors that represent the image when the system answers a question. Processing all of them can slow the response and exhaust GPU memory. HiRED, short for High-Resolution Early Dropping, lets the system keep the detailed views while setting a ceiling on how many visual tokens reach the part of the system that generates the answer.

HiRED makes a decision about where to spend the budget before it decides which tokens to keep. It reserves a share for the whole-image view, then reads an early attention map from the vision encoder to distribute the remaining places among the crops. Inside each view, it ranks tokens using a deeper attention map from that view’s own encoding. This distinction matters because the shallow map tends to highlight where the subject is, while deeper layers can place useful information in patches elsewhere. Both signals come from the existing encoder. The procedure runs at inference time and requires no additional training.

The authors compare HiRED with full execution, spatial pooling, and pruning-and-merging methods across visual question answering, transcription, and other image-understanding tasks. A 20% visual-token budget often keeps general visual question answering close to full execution, while the 40% setting better preserves scores on tasks that require reading fine detail. For LLaVA-Next-7B on DocVQA, the scores are 60.8 at 20%, 68.7 at 40%, and 73.4 with the full input. HiRED also scores higher than the early-dropping baselines on several transcription comparisons, even when the stronger of those baselines uses more tokens on average. ChartQA shows a more persistent cost from reducing the visual input.

On an NVIDIA TESLA P40 with 24 GB of memory, LLaVA-Next-7B at a batch size of 1 and a 20% budget goes from 0.49 to 2.30 generated tokens per second. Time to the first generated token falls from 19.49 to 4.21 seconds, and GPU memory use falls from 16.04 to 13.76 GB. At batch size 4, full execution runs out of memory, while the same HiRED setting runs at 16.99 GB. These measurements establish a practical gain on the tested hardware. The benchmark results show where that gain comes with a meaningful loss of visual information.

Deep dive: HiRED: Attention-Guided Token Dropping for Efficient Inference of High-Resolution Vision-Language Models

HiRED uses attention from a vision encoder to keep high-resolution image details within a fixed token budget and speed up inference. · about 31 minutes to read

The problem and its context

Why a detailed image becomes a long input

A system that connects vision and language has to turn an image into a representation that its answer generator can use. In the architecture HiRED studies, the vision encoder works on patches, small regions of the image laid out on a grid. It produces a vector for each patch. A projection layer translates those vectors into the representation used by the language component, which receives them alongside the user’s text and the system’s own input tokens. A visual token is one of these image-derived entries in the sequence. Its role is to carry information about the image across the boundary between the encoder and the answer generator.

If the encoder expects a small image, shrinking a larger image to fit can erase details. A whole-page view may preserve the fact that it depicts a document while making some of its writing difficult to recover. Dynamic partitioning is the response the paper describes. The system makes a reduced view of the entire image and separately encodes crops from the original. The reduced view shows how the scene or page fits together. A crop gives a smaller area more room in the encoder’s input, preserving local features that would otherwise be compressed into fewer patches. In the paper’s LLaVA-Next example, a square image can give rise to four crops as well as the whole-image view.

Each view goes through the vision encoder as an image in its own right. The resulting token sequences are brought together after encoding. This is how the architecture can deliver a whole-scene representation and detailed local representations to the same generator. It also explains why its costs grow. The extra views each contribute a sequence of patch features, even if some views contain little useful detail. The paper cites high-resolution systems producing 3-10× as many visual tokens as their low-resolution counterparts. The point of partitioning is to preserve information before encoding. The question HiRED takes up is how much of what was preserved has to remain in the input afterward.

The two scales of view have different roles. A crop does a better job of representing a small mark in its area, but the full view places that area within the scene. Conversely, a full view spends some of its limited patch capacity on parts of the image that a question may scarcely require. There can also be considerable variation among the crops themselves. Giving each of them the same number of retained tokens would impose an even division of capacity on images whose details may be concentrated in one area. A dropping method therefore has to deal with the structure introduced by partitioning as well as the length of the resulting sequence.

Why the cost persists into generation

In a transformer, attention lets a token take information from other positions in the input. Attention over a long sequence is expensive because many positions can interact. As the paper notes, standard transformer attention has quadratic complexity in sequence length. The generator also maintains a key-value cache, or KV cache, which stores attention-related representations so that it can reuse them as it produces subsequent tokens. A longer visual input creates more entries to store. It can therefore affect both the cost of processing the prompt and the memory occupied during generation.

This gives rise to several practical problems. The user can wait longer for the first output. The rate at which the system produces tokens can fall. Memory consumption can also prevent the request from running or limit how many requests can be processed together. The authors frame the latter issue around GPUs with modest memory and compute capacity. For that setting, the ability to cap the visual input matters independently of average compression. A method that normally produces a short sequence may still produce a long one on an especially dense or awkwardly partitioned image.

The cost of carrying the extra tokens is paid even when the question draws on a narrow part of the image. At the same time, a question that requires reading fine print may need information that an ordinary scene description could omit. This is why the authors treat the budget as a setting that can vary with resource constraints and the task. The same number of visual tokens can be quite generous for a coarse description and restrictive for questions about specific document content. A usable method needs a way to impose the chosen limit and a way to spend it selectively.

Where earlier approaches intervened

The paper distinguishes reducing the size of the system from reducing the size of its visual input. Smaller architectures such as MobileVLM reduce the number of parameters. Quantization reduces the precision used to represent weights or perform parts of the computation, and weight pruning removes or masks some weights. These approaches address resource use at the level of the network. A network made smaller this way can still receive a long sequence of visual tokens. The authors also discuss learned token-reduction components, including the Q-Former associated with BLIP-2. They identify training and fine-tuning costs as barriers when the aim is to modify an existing inference pipeline easily.

Sparse attention offers a different intervention. FastV examines visual tokens in the opening layers of the language component and skips some of them in later layers. This gives the selection process information from a point where the visual and textual inputs have begun to interact. The first layers still process the longer input, however, and the HiRED paper describes FastV as designed outside the high-resolution setting it targets. FlexAttention supports high-resolution inputs, but in the authors’ comparison it lacks direct control over the number of tokens admitted under a resource constraint. The paper also discusses sparsification within the vision encoder. Its assessment is that encoder-side savings alone have limited reach when most of the work occurs in the language component. FastV

Early dropping changes what crosses from vision encoding into language generation. The paper describes TokenCorrCompressor as taking advantage of repetition in documents. It uses similarity between tokens to detect redundant patterns, including recurring blank areas. That is a way to remove visual input before the generator receives it, but the work is presented as specific to document understanding. PruMerge uses class-token attention to select visual tokens and merges information from pruned tokens into the selected ones. PruMerge+ adds spatially sampled tokens to retain more coverage. Both offer early reduction. Their original setting uses a single image view, and their retention levels are determined by the method for each input. HiRED instead takes a prescribed total and uses it to determine how much to retain from each view.

The authors want these properties to coexist in a single procedure. It should accept the partitioned input of an existing high-resolution system, limit the number of visual tokens explicitly, intervene before the language component processes them, and remain useful across tasks with different visual requirements. These goals explain both halves of HiRED’s design. An early token ranking alone would leave the distribution of retained detail across the image unspecified. A budget for every crop would control length but would still need a rule for deciding which encoded information survives.

The method, step by step

Read the image at two scales

HiRED starts from the ordinary division of the input into a reduced whole-image view and whichever local views the high-resolution system produces. The paper calls that reduced view the full-image. Here, “full” means it spans the entire scene. Its copy of any particular area is smaller than the copy in a crop. This difference in scale is central to the method. An area in the whole-image view supplies evidence about the relative content of a crop, while the crop’s own encoding supplies the candidates from which individual tokens are kept.

The paper illustrates patch encoding with CLIP. The encoder divides a view into non-overlapping patches and produces representations for the patch positions. It also uses a class token, written CLS. In the vision transformer, the class token attends to patch tokens, and its attention weights give a map of the patches emphasized by a particular layer and attention head. A head is one of the parallel attention operations within a layer. Because heads can emphasize different features, several maps can be available for the same view at the same depth. HiRED reads those weights from the encoder during inference. CLIP

The paper’s illustration of a bird explains why it matters which map is read. Early layers largely emphasize patches on the bird and give little weight to the background. In the late-layer maps, highlighted positions appear in both the subject and the background. The authors interpret the distinction using the way representations develop through the encoder. Early patch representations carry relatively local features. Deeper layers can combine features from several locations, and some of that combined information can end up in a token whose original patch lay in the background. A bright spot in a shallow map and a bright spot in a deep map therefore suggest different decisions.

For allocating places among crops, the authors want a map that still corresponds closely to the distribution of content in the original image. They use the shallow map of the whole-image view, where there is a shared coordinate system for every crop. Once a crop has been assigned a number of places, they want to keep the tokens that carry informative features after encoding. They switch to a deep map from that crop. The full-image view gets a fixed share of the budget, but the choice of tokens within that view follows the same deep-layer scoring rule as the crops.

How HiRED selects visual tokens before generation

The steps in order.

How HiRED selects visual tokens before generationStep 1: Encode the whole view and local crops1. Encode the whole view and local cropsStep 2: Reserve a share for the whole view2. Reserve a share for the whole viewStep 3: Measure crop regions using early whole-view attention3. Measure crop regions using early whole-view attentionStep 4: Divide the crop budget in proportion to scores4. Divide the crop budget in proportion to scoresStep 5: Rank each view’s tokens using late attention5. Rank each view’s tokens using late attentionStep 6: Keep the highest-ranked tokens within each allocation6. Keep the highest-ranked tokens within each allocationStep 7: Combine the retained visual tokens with text7. Combine the retained visual tokens with text

Set the ceiling and reserve the whole-image share

The algorithm takes a total visual-token budget as an input. In the experiments, the authors express the principal settings as percentages of the visual input. The worked setup can produce at most 2880 visual tokens before dropping, with maximum budgets of 576 at 20% and 1152 at 40%. These limits are for the visual portion of the input. The user’s words and the system tokens have their own places in the sequence.

In the notation below, p₀ is the full-image partition and pᵢ is a crop. The index i runs from 1 through k for crops, where k is the number of crops. The paper writes the total number of candidate tokens before dropping as follows.

N_total = N_ViT · (k + 1)

N_total is the raw visual-token count in this description, and N_ViT is the number of patch tokens produced for each view. The paper gives 576 for CLIP. The term k + 1 counts the k crops plus the full-image view. The dot denotes multiplication and the parentheses group the view count. This is the count for complete encoded views in the algorithm’s setup. The evaluation also describes how differences in partitioning and the removal of padding affect the visual sequence observed for individual inputs.

The first split takes a fraction of the overall budget and sets it aside for the full image.

N[p₀] = ⌊α · N_budget⌋

N[p₀] is the number of places assigned to the full-image partition p₀. N_budget is the total number of visual-token places available. The coefficient α is the share reserved for the full image and lies between 0 and 1, inclusive. The multiplication dot applies that share to the total. The floor brackets ⌊ ⌋ round down to a whole number of tokens. In the main design the authors use α = 0.5, a choice they evaluate by varying how much capacity goes to the global and local views.

N_sub = N_budget − N[p₀]

N_sub is the total available to the crops. The subtraction sign removes the full-image allocation N[p₀] from the overall budget N_budget. The result is a common pool, with the share for each individual crop still to be determined. At one end of the allocation range, the crops can receive the entire pool of visual places. At the other, the full image receives the budget and the crops contribute no selected tokens. These extremes help distinguish what the two scales of view contribute in the authors’ allocation study.

Measure where the image has content

For each crop, HiRED identifies which patch positions in the reduced whole-image view lie in the corresponding region. A crop covering the lower part of an image, for instance, is scored from the relevant lower portion of the early whole-image attention map. Those positions are used as a measuring grid. The visual tokens later selected from that crop come from its separate, more detailed encoding.

The authors sum the attention into each corresponding patch across heads, then sum across the positions in the region. A larger sum means the corresponding crop receives a larger share of the pool. Because all crop scores are read from the same full-image view, they describe shares of attention distributed across a common image. The calculation in the paper is a sum over the region, instead of an average per patch.

s[pᵢ] = ∑(j ∈ T[pᵢ]) ∑(h = 1 to H) a[p₀, l_init, h, j]

s[pᵢ] is the visual content score for crop pᵢ, where i ranges from 1 to k. T[pᵢ] is the set of full-image patch indices corresponding to that crop. The outer ∑ adds over indices j belonging to that set, as indicated by ∈. The inner ∑ adds over all H attention heads, with h as the head index. The term a[p₀, l_init, h, j] is the attention from the class token to patch j in the full-image partition p₀, measured in head h at the early layer l_init. The authors set l_init to 0.

This calculation answers which regions deserve more places, using information available before answer generation. It deliberately separates crop location from the position of a particular useful feature in a crop’s encoding. A crop can receive a large budget because much of the whole-image map highlights its region. Its retained tokens can still be scattered inside that crop once the deeper feature scores are consulted. In the other direction, a region can receive few places when the broad view assigns it little attention. Its deepest feature scores only determine which of its candidates occupy those places.

The allocation uses each crop’s fraction of the total content score. The authors round each share down when they turn it into a token count.

N[pᵢ] = ⌊N_sub · s[pᵢ] / ∑(r = 1 to k) s[pᵣ]⌋

N[pᵢ] is the number of tokens budgeted for crop pᵢ. N_sub is the crop pool, and s[pᵢ] is this crop’s content score. The denominator adds the content scores s[pᵣ] over all k crops, with r serving as the crop index in the sum ∑. The slash divides the individual score by the sum, the dot multiplies this fraction by the available pool, and ⌊ ⌋ takes the floor. Since the individual crop shares are rounded down, the written rule provides an upper bound. It can leave places unused where the proportional allocations fall between whole tokens.

Rank the encoded tokens within each view

Once each view has an allocation, HiRED ranks the patch tokens that could fill it. For this decision the authors use class-token attention from a late layer. They take the map from the partition being ranked, including the full image when selecting its tokens. A crop’s allocation can thus depend on the shallow whole-image map even though no scores from that map enter the ranking inside the crop.

The motivation is that deep tokens have already had a chance to accumulate information from other positions. A patch with little interesting content in its original pixels may contain a useful feature after the encoder mixes information across the view. Restricting selection to visually prominent positions at the surface of the image would miss some of those candidates. Conversely, reading deep attention to decide how much budget to assign to a crop would take the spatial positions of those aggregated features as evidence about where the image’s content originally lay. The authors test each of those layer choices separately.

f[pᵢ, j] = ∑(h = 1 to H) a[pᵢ, l_final, h, j]

f[pᵢ, j] is the feature importance score for patch token j within partition pᵢ. Here i runs from 0 through k, including the full image, and j runs from 1 through N_ViT, the number of patch tokens in the view. The symbol ∑ adds the contributions of all H heads, indexed by h. The quantity a[pᵢ, l_final, h, j] is the class token’s attention to that patch, from head h in the late layer l_final of the specified view. The design uses layer 22 for l_final.

The algorithm takes the N[pᵢ] tokens with the highest feature scores in each view and drops the rest. The separate rankings matter because a large feature score in one view does not let a token use a slot reserved for another. The full-image share has already been protected, and the local shares have already been adjusted to the content map. Combining heads by addition gives a single ranking for each view and allows evidence from several heads to affect the same decision.

The retained visual representations enter the language component alongside the text and system tokens. Early dropping here means selection occurs before that component processes the visual sequence. The vision encoder still produces the features and attention used to make the selection. HiRED uses those internal attention values with the existing encoder and generator. The authors did not train a new selector or change the network architecture for this procedure. They fixed the layer and allocation settings through experiments and released the implementation under the name HiRED.

A single-view input uses a simpler form of the same procedure. There are no crop regions to score and no crop pool to distribute. The experiment on such inputs therefore uses the late-attention selection rule without the cross-view allocation mechanism. This is both a way to apply the method to systems that take a single view and a way to see how much of the result can be obtained through ranking alone.

Experiments and results

Benchmarks, comparisons, and metrics

The high-resolution evaluation uses LLaVA-Next-7B and LLaVA-Next-13B. Each is tested with its full visual input and with several reduction methods. Full execution supplies the reference point for what the underlying system does when every available visual token goes forward. Spatial pooling provides a simpler reduction baseline at 40%. The two principal early-dropping comparisons are PruMerge and PruMerge+. Since those methods were designed for a single view, the authors apply them to each partition when running them on LLaVA-Next.

PruMerge and PruMerge+ choose how many tokens to keep on the input they see. Their reported budgets, 10% for PruMerge and 55% for PruMerge+, are average usage figures. HiRED’s 20% and 40% are prescribed budget settings. These values serve different purposes in the comparison. They show how answer scores change with the amount of visual input various methods consume, but they do not make every row a comparison at the same number of tokens. Against spatial pooling at 40%, the experiment does offer the same nominal budget. The authors leave TokenCorrCompressor out of the direct evaluation because its scope is document understanding and its code was unavailable to them at the time.

The evaluation takes eight benchmarks from LMMs-Eval and groups them by what the questions demand from the image. VQA-v2 and ScienceQA form the broad visual question answering group. The former represents general questions about visual content, while the latter applies visual input to science questions. This group offers a test of whether the retained views still supply enough information for an answer when finely printed text is not the defining requirement of the benchmark. VQA-v2 · ScienceQA

TextVQA, DocVQA, and OCRBench form the transcription group. They stress access to written material in images, including document images. The grouping matters because a correct answer may depend on the exact text in a small area. A reduced visual representation can preserve surrounding context while losing part of the writing that decides the answer. In this group, retaining the broad subject and preserving the necessary local detail are different standards of success. DocVQA · OCRBench

The remaining benchmarks broaden the evaluation. MME is used to assess perception and cognition. POPE tests object hallucination, where a system can report an object that is absent from the image. ChartQA tests understanding of charts, including visual and spatial relationships. Together these settings give the authors a way to observe when shortening the input still leaves enough evidence for a task and when the relationships among image regions may be difficult to recover. MME · POPE · ChartQA

The paper reports each benchmark’s default metric and treats higher values as better in every quality comparison. Values belong to their respective benchmarks. An OCRBench score and a DocVQA score, for instance, have different scales and cannot be read as one common measure. The authors give benchmark-level results and do not identify named splits for the figures in the comparison. The inference measurements form a separate set of results. They report visual-token counts, token generation throughput in tokens per second, time to first token in seconds, and GPU memory in GB. LMMs-Eval

General questions and fine-grained text respond differently

On LLaVA-Next-7B, full execution scores 80.3 on VQA-v2. HiRED scores 77.5 with a 20% budget and 78.8 with a 40% budget. On ScienceQA, the corresponding scores are 73.2 for full execution, 73.4 for HiRED at 20%, and 73.8 for HiRED at 40%. On these two evaluations, much less visual input still leaves the system close to its unrestricted performance. The ScienceQA scores also show why the authors describe improvement from dropping as possible in some settings. They are comparisons of observed benchmark scores for that particular system.

On LLaVA-Next-13B, VQA-v2 scores are 80.9 with the full input, 77.9 with HiRED at 20%, and 79.3 with HiRED at 40%. ScienceQA scores are 73.6, 71.9, and 73.2, respectively. The more generous HiRED setting is closer to full execution for both of these benchmarks on the larger variant. The improvement over full execution seen on ScienceQA with LLaVA-Next-7B does not recur here. Across the two variants, the evidence for general visual questions is that a substantial reduction can preserve much of the measured capability, with the exact direction and size of the change depending on the setting.

Transcription gives a clearer view of what the extra budget buys. For TextVQA on LLaVA-Next-7B, HiRED at 20% scores 61.4, compared with 64.8 for the full visual sequence. At 40% it reaches 63.6. The spatial pooling baseline scores 57.0 at 40%. PruMerge+ scores 54.4 at an average visual usage of 55%. On LLaVA-Next-13B, TextVQA scores are 66.9 for full execution and 65.2 for HiRED at 40%, while spatial pooling at 40% scores 58.8. The comparisons with pooling hold the nominal budget steady and show that the way the representation is reduced matters for reading text.

DocVQA scores by visual-token reduction method on LLaVA-Next-7B

HiRED leads the reduction methods, with full execution still ahead on document questions.

DocVQA scores by visual-token reduction method on LLaVA-Next-7BFull execution: 73.4Full execution73.4Spatial pooling, 40%: 58.9Spatial pooling, 40%58.9PruMerge, 10% average: 37.8PruMerge, 10% average37.8PruMerge+, 55% average: 44.6PruMerge+, 55% average44.6HiRED, 20%: 60.8HiRED, 20%60.8HiRED, 40% (this paper): 68.7HiRED, 40% (this paper)68.7
The numbers
System or settingDocVQA score
Full execution73.4
Spatial pooling, 40%58.9
PruMerge, 10% average37.8
PruMerge+, 55% average44.6
HiRED, 20%60.8
HiRED, 40% (this paper)68.7

DocVQA exposes a stronger cost from limiting visual input than the general question-answering benchmarks. The 20% setting is ahead of the other reduction methods shown for LLaVA-Next-7B, but the score is still well below the full-input result. Raising the HiRED budget improves it. The comparison with PruMerge+ is especially informative about average usage. PruMerge+ can send a larger visual sequence on average and still deliver a lower benchmark score. Token count describes capacity. The choice of what occupies that capacity affects which questions the system can answer.

The LLaVA-Next-13B DocVQA scores show the same ordering among the full input and the two HiRED budgets. Full execution scores 77.5, HiRED at 20% scores 64.3, and HiRED at 40% scores 72.5. Spatial pooling gives 61.3 at 40%, and PruMerge and PruMerge+ both give 45.9 at their respective average usages. For OCRBench, LLaVA-Next-13B scores 508 with all visual tokens and 491 with HiRED at 40%, compared with 390 for pooling at 40%. With LLaVA-Next-7B, the OCRBench scores are 501 for the full input, 475 for HiRED at 20%, and 488 for HiRED at 40%. This adds a separate transcription benchmark on which the larger visual budget recovers some of the performance lost through dropping.

Perception, hallucination, and charts

The benchmarks outside the transcription and broad question-answering groups give a less uniform picture. On MME, LLaVA-Next-7B scores 1519 at full execution and 1483 with HiRED at 20%. The 40% setting scores 1474, so the larger allocation has a lower observed score there. On LLaVA-Next-13B, the full MME score is 1572 and the HiRED score is 1570 at 40%. Taken together, these observations show both that the reduction can leave MME close to the full reference and that raising the budget does not necessarily improve every measured outcome.

On POPE, LLaVA-Next-7B scores 87.6 with full execution and 88.2 with HiRED at 40%. LLaVA-Next-13B scores 87.1 at full execution and 87.7 at 40%. At 20%, the corresponding HiRED scores are 87.0 and 86.7. The paper draws attention to scores that rise under some reduction settings. Here the result concerns POPE’s object-hallucination evaluation. It does not measure all forms of hallucination or show that reducing the visual budget to its lowest tested level would improve the score.

ChartQA is where the price of reduction remains especially apparent. With LLaVA-Next-7B, the score is 54.8 at full execution, 42.0 at 20%, and 46.5 at 40%. The 40% spatial pooling comparison is 39.0. With LLaVA-Next-13B, the scores are 66.2 at full execution, 48.9 at 20%, and 53.7 at 40%, with 42.6 for pooling at 40%. HiRED’s selection compares favorably with the tested spatial baseline on both variants. There is still a substantial gap from full execution in each case. The authors relate this vulnerability to the need to preserve spatial relations, which a chart question can depend on even when the tokens for particular visual elements remain available.

First-token latency, throughput, and memory

The system measurements use LLaVA-Next-7B on a 24 GB NVIDIA TESLA P40. At a batch size of 1, the full-input configuration produces 0.49 tokens per second. HiRED reaches 1.40 at 40% and 2.30 at 20%. The authors report a 4.7× throughput increase for the 20% setting relative to full execution. The metric concerns generated response tokens per second, while the budget concerns visual tokens in the input. The result connects a shorter visual prompt with a faster output under the tested setup.

Time to first token on LLaVA-Next-7B at batch size 1 on the TESLA P40

A smaller visual input gives the fastest first response in this setup.

Time to first token on LLaVA-Next-7B at batch size 1 on the TESLA P40Full execution: 19.49Full execution19.49HiRED, 40%: 6.91HiRED, 40%6.91HiRED, 20% (this paper): 4.21HiRED, 20% (this paper)4.21
The numbers
System or settingseconds
Full execution19.49
HiRED, 40%6.91
HiRED, 20% (this paper)4.21

Time to first token records the wait before any answer token becomes available. The authors report a reduction of 78% for HiRED at 20% in this comparison. This measure is especially relevant to the point at which HiRED intervenes. Visual tokens are taken out before the language component processes the input prompt. The observed wait therefore includes the effects of a shorter prompt and the overhead of selecting those tokens in the tested implementation. It is distinct from the time required to finish the entire response.

The corresponding GPU memory figures at batch size 1 are 16.04 GB for full execution, 14.33 GB at 40%, and 13.76 GB at 20%. The authors report a 14% saving for the 20% setting. Token-related storage is only part of the GPU allocation, so the measurements give a more useful account of the memory effect than the visual budget on its own. A budget of 20% states how much visual input can be admitted. The reported memory number measures the whole experiment as it ran on the GPU.

At batch size 4, the unrestricted configuration runs out of memory. HiRED uses 20.36 GB at 40% and 16.99 GB at 20%. The measured generation throughputs at those settings are 2.22 and 4.28 tokens per second, and times to first token are 26.38 and 13.60 seconds, respectively. Since full execution does not complete with this batch size, there is no full-input throughput or first-token time for a direct comparison. The authors describe the 20% setting’s memory saving as 30%. The recorded outcome at that batch size is that each reduced configuration runs on the card and full execution fails to fit.

The authors also inspect the number of visual tokens across 100 TextVQA samples. Full execution varies with the input dimensions, because the system may choose different partitions and remove different amounts of padding. PruMerge and PruMerge+ add another source of variation by retaining different amounts of information from different inputs. HiRED stays within the chosen budget across those samples. This test of the ceiling concerns the length of the visual input. The batch experiments test a separate proposition, whether such a ceiling yields a workable memory and latency profile on the selected hardware.

What the ablations show

Whole-image context and local detail both matter

The authors vary the share of the total budget assigned to the full image. At α = 0, the whole-image encoding contributes no selected visual tokens to the answer generator. The reserve is available to the crops. At α = 1, all available places go to the whole-image view. Changing this setting alters which scale of information the generator receives even if the total allowed number of tokens stays fixed. A comparison between these extremes and intermediate settings therefore addresses how the budget should be divided, apart from the question of how large it should be.

The allocation study covers ScienceQA and VQA-v2 alongside TextVQA and DocVQA. The reported pattern generally favors α = 0.5, the value the authors use by default. The finding is that, in the conditions tested, using the full-image view for overall context and keeping room for detailed crops is more effective than putting the entire visual allowance into either source. It also demonstrates that the global view can remain valuable after the system has retained local crops. The coarse representation contributes information at a different scale and can be used alongside the fine detail.

There are two allocation decisions here. The value of α determines the balance between scales. The early attention map determines the balance among crops once their collective share has been set. An experiment on α says how useful a mixture of scales is under HiRED’s allocation policy. The layer and even-allocation comparisons then ask whether a content-based split among the crop regions improves that policy.

A shallow map spends the budget better

For budget distribution, the authors compare an even split with allocation based on layer 22 and on layer 0. On VQA-v2, the respective ablation scores are 73.3, 68.6, and 77.7. On TextVQA, they are 52.2, 37.3, and 54.8. The layer 0 allocation also gives the strongest shown scores on ScienceQA and DocVQA, at 68.4 and 59.2. The even split yields 67.6 on ScienceQA and 48.8 on DocVQA. Allocation using layer 22 gives 65.2 and 54.0 on those tasks.

The equal-allocation comparison shows that it can help to vary the allowance with the input. The comparison with a deep map shows that the choice of signal matters once allocation has been made adaptive. For TextVQA and VQA-v2, allocating through the late map gives a lower score than simply splitting the budget evenly. On DocVQA the late map does improve on the even split, while the shallow map is stronger still. This pattern fits the authors’ explanation that the early map gives a better guide to where visual content is concentrated. The table tests a downstream consequence of that interpretation by measuring answers after different regions have received different numbers of tokens.

DocVQA scores for alternative token-budget allocation rules in the HiRED ablation

Early attention gives the strongest document score among the tested allocation rules.

DocVQA scores for alternative token-budget allocation rules in the HiRED ablationEven allocation: 48.8Even allocation48.8Allocation using layer 22: 54.0Allocation using layer 2254.0HiRED allocation using layer 0 (this paper): 59.2HiRED allocation using layer 0 (thispaper)59.2
The numbers
System or settingDocVQA score
Even allocation48.8
Allocation using layer 2254.0
HiRED allocation using layer 0 (this paper)59.2

A deep map chooses better tokens within the allowance

The ranking ablation holds allocation as a separate decision and changes which layer supplies the feature importance scores. Ranking with layer 0, layer 11, and layer 22 gives ScienceQA scores of 65.2, 68.0, and 68.4, respectively. On VQA-v2 the scores are 68.6, 76.1, and 77.7. On TextVQA they are 37.3, 51.9, and 54.8. DocVQA gives 54.0, 52.0, and 59.2, so the middle-layer ranking scores below the early-layer ranking in that comparison even though the final-layer choice comes out ahead of both.

The two layer experiments favor different depths for different decisions. That is stronger evidence for the design than showing that one layer happens to give a good attention map. An early map performs best when scores determine how many tokens a region can contribute. A late map performs best when scores decide which tokens convey the information from a particular view. The bird illustration makes this distinction visible, while the ablation tests whether it helps preserve downstream answers. The benchmark scores establish that the chosen signals work better than the tested replacements. They do not identify which feature in each retained token proved decisive for a particular answer.

The head aggregation comparison asks whether adding scores across heads helps selection. The configuration without aggregation scores 67.2 on ScienceQA and 76.6 on VQA-v2. Addition gives 68.4 and 77.7. The transcription comparisons also favor addition in this experiment. On TextVQA the scores are 50.5 without aggregation and 54.8 with it. On DocVQA they are 52.4 and 59.2. The test supports using evidence from several heads in these tasks. Its scope is the choice between the two reported configurations, so it does not establish that every head contributes equally or that summation would outperform other aggregation rules.

What ranking does on a single view

LLaVA-1.5-7B and ShareGPT4V-7B let the authors evaluate dropping while leaving crop allocation out of the pipeline. Both use a single image view in this test. On LLaVA-1.5-7B, full execution scores 76.6 on VQA-v2, and HiRED scores 79.0 at 40% and 74.7 at 20%. On DocVQA, the scores are 28.1, 29.4, and 24.6, respectively. This comparison shows that the ranking rule can have value even without a choice about which crops to favor. It also shows the cost of tightening the visual allowance beyond the more permissive setting on these tasks.

On ShareGPT4V-7B, the same VQA-v2 comparison gives 80.6 for full execution, 79.0 at 40%, and 74.7 at 20%. TextVQA gives 50.7, 50.0, and 49.3. DocVQA gives 26.76, 25.97, and 24.76. The full input has the highest scores in those ShareGPT4V-7B examples, while the reduced inputs retain much of the measured performance. These tests extend the evidence for feature ranking beyond the high-resolution LLaVA-Next pipeline. Because the test removes crop allocation entirely, it cannot show whether the same allocation policy would transfer to other ways of partitioning an image.

The attention analysis behind the design

Before choosing an early signal for the algorithm, the authors inspect what happens downstream during LLaVA-Next-7B generation. Visual tokens make up 80-90% of the overall token sequence in that analysis and receive less attention than the system and text tokens. Attention among the visual tokens is also unevenly distributed. The top 20% of visual tokens account for 60% of the visual attention in the reported cumulative distribution, and the top 40% account for 80%. These figures make a case for looking for a selective reduction, since attention is concentrated even within the visual part of the sequence.

The authors also count where the most attended visual tokens come from in a partitioned example. The cutoffs are 10% and 20%, corresponding to 288 and 576 tokens in that example. The top tokens are distributed unevenly across the full view and the corner crops. This provides a reason to vary budgets by region, alongside the separate observation that much of the visual attention is concentrated in a subset of tokens. Both analyses use attention seen during generation. HiRED itself makes selection decisions earlier, from the vision encoder. The benchmark comparisons and ablations test whether that practical substitute preserves useful information when the downstream attention is unavailable at the point of selection.

Limitations

The limitation the authors identify

The authors identify loss of spatial information as a limitation, especially for ChartQA. The remaining tokens can carry information about parts of an image while conveying less about how those parts fit together. The language component’s positional encodings, which indicate where tokens occur in its input sequence, are designed for language. The authors argue that this makes them less suited to representing spatial relations among the visual tokens that remain after dropping. Their proposed future direction is to add 2D positional encodings after selection so that the retained tokens carry a clearer indication of their image positions.

The ChartQA results show that the loss is relevant under the tested setup. Both LLaVA-Next variants score below their respective full-input baselines at both HiRED budgets. The experiment does not isolate positional encoding as the cause of each wrong answer. Dropping could also remove a label, a mark, or some other visual evidence that a particular question requires. The positional proposal remains a hypothesis in the paper. Its effect on chart understanding and any change it would make to the costs of inference are unevaluated.

What follows from the scope of the evaluation

HiRED’s scores are derived from image attention, before the question and the retained image tokens are processed together by the language component. An image region can have a low allocation score even though a user asks about a small detail within it. A deep-layer score can also reflect broadly informative features while leaving out a token needed for a specific question. The evaluation shows the aggregate performance of this strategy across several benchmarks. It does not establish how often questions turn on low-scoring regions, or whether an answer-aware selection procedure would retain those details more reliably under the same ceiling.

The budget study favors a balanced split for the evaluated tasks. The underlying architectures and image processing here give that finding its scope. The high-resolution accuracy comparisons use variants of LLaVA-Next, while the additional systems are tested with single-view inputs. The latter results support portability of the ranking rule. They leave the cross-view allocation rule untested on other high-resolution partitioning schemes and on encoders whose attention behaves differently. The paper selects layers 0 and 22 for the studied setup. The ablations justify those settings there and do not provide a general rule for locating equivalent layers in other encoders.

The efficiency measurements have a narrower hardware scope than the accuracy comparisons. They show that lowering the visual budget can change both latency and whether a batch fits on the TESLA P40. The absolute numbers depend on that GPU, the implementation, and the evaluated configuration. HiRED caps the visual input to the language component. It still pays for encoding the partitions and collecting the attention signals, and it cannot directly cap the text prompt, the length of the response, or the memory occupied by the network’s weights. The stable count in the TextVQA sample analysis is evidence about the controlled part of the workload. It does not establish an absolute bound on every resource used by an inference request.

The quality measurements are also aggregate benchmark results. Some small differences favor reduced input, including scores on ScienceQA and POPE, while other comparisons favor the full input. The paper does not report uncertainty estimates for these differences or break down errors by such factors as how small the target text is or where it falls relative to a crop. The most defensible reading is that HiRED preserves performance to different degrees depending on the benchmark and setting. In particular, the gains from retaining fewer tokens on individual benchmark comparisons should not be generalized to a claim that dropping improves answer quality overall.

Finally, the PruMerge baselines combine different selection rules with different ways of deciding how much to retain. Their varying usage is part of the practical comparison, since managing a ceiling is a research goal in its own right. It means that results against them do not isolate selection quality at equal counts for individual images. The 40% spatial pooling comparison gives a matched nominal budget with a simple alternative. The controlled layer and head comparisons address specific elements of HiRED more directly. Together these experiments show how the chosen system performs and why several design choices are useful under the tested conditions, while leaving room for other early selectors under the same resource limit.

What came after

Stop Looking for “Important Tokens” (2025) shifts the focus from assigning an importance score to each token toward identifying duplicated information. HiRED already starts from the premise that some visual tokens can be dropped, but its operative rule is to rank tokens by class-token attention within each allocated budget. The later work’s emphasis on duplication raises a different question about the set of tokens kept. Even an individually useful token may contribute little extra information if a retained token already supplies similar evidence. That framing addresses the contents of the retained set as well as the scores of its members.

From Inheritance to Saturation (2026) treats visual redundancy as something that evolves through the architecture and relates that evolution to inference acceleration. HiRED differentiates layers of the vision encoder because they support different decisions. The later work takes the location and evolution of redundancy as the subject of the analysis. Its architecture-aware focus extends the question of where to reduce visual information beyond the particular boundary at which HiRED applies its budget.

MM-ShiftKV (2026) moves the selection question to the key-value cache. It concerns decisions made during prefill, the processing of the initial prompt, with subsequent decoding in view. HiRED reduces the sequence before the language component processes that prompt, using attention signals from the vision encoder. Cache selection concerns the representations available during generation after the prompt has started to be processed. The two approaches touch related costs at different points, and the later work’s decode-aware framing asks what the generation phase will need from the cached prompt.

Reducing Token Redundancy in LVLMs (2026) takes a survey perspective by reviewing methods for token pruning. In that broader subject, HiRED illustrates a particular combination of choices. It imposes an input budget, allocates it across global and local views, and uses signals already computed by the vision encoder to select tokens before generation. The review spans the wider family of methods directed at reducing redundant visual input. Its connection to HiRED is through that comparison of pruning approaches, while the other citing works pursue different criteria or stages for making the selection.

Cite

Cite as Kazi Hasan Ibn Arif, JinYi Yoon, Dimitrios S. Nikolopoulos, Hans Vandierendonck, Deepu John and Bo Ji. 2024. HiRED: Attention-Guided Token Dropping for Efficient Inference of High-Resolution Vision-Language Models. arXiv:2408.10945.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.48550/arxiv.2408.10945 · arXiv 2408.10945

@misc{arif2024hired,
  title = {{HiRED: Attention-Guided Token Dropping for Efficient Inference of High-Resolution Vision-Language Models}},
  author = {Kazi Hasan {Ibn Arif}, JinYi Yoon, Dimitrios S. Nikolopoulos, Hans Vandierendonck, Deepu John and Bo Ji},
  year = {2024},
  doi = {10.48550/arxiv.2408.10945},
  eprint = {2408.10945},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.48550/arxiv.2408.10945}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/arif-2024-hired-attention-guided-token-dropping/