Skip to main content
BVDNET
Arnhem · websites & automationBVDNET
Models & Architecture

DeepStack injection

DeepStack injection feeds an image into an AI model at several layers instead of only at the start, so even a small model can read details such as tables in documents.

Also known as: DeepStack, DeepStack Injection, deep stack injection, LayerDeepstack, SpatialDeepstack

DeepStack injection is a technique for AI models that read images, such as invoices or charts. Instead of handing the whole image to the model at the start, it feeds parts of it in at several points inside the model. That helps with fine details, such as small text in a table. IBM uses it in Granite 4.0 3B Vision, a small model that extracts data from business documents.

How does a model normally take in an image?

A vision-language model has a vision encoder that turns an image into visual tokens, and a language model that reads them. Usually the visual tokens are placed in front of the text as one long sequence and go into the first layer of the language model. A sharper image means more tokens, a longer input, and more compute and memory.

How does DeepStack work?

DeepStack comes from a paper by researchers at Fudan University and Microsoft (Meng et al., June 2024). It stacks the visual tokens into groups and adds each group to the hidden state of a different transformer layer, from the bottom up, through a residual connection. The input stays as long as before, so the model can take in several times more visual tokens. In the paper, 7B and 13B models with DeepStack scored 2.7 and 2.9 points higher on average over nine benchmarks than comparable models without it. The largest gains came on high-resolution tasks, such as 11.0 points on DocVQA, a benchmark of questions about document images.

Alibaba's Qwen3-VL (November 2025) uses DeepStack to send features from several layers of its vision encoder to matching layers of the language model. In a comparison with and without DeepStack on an internal model, the average score rose from 74.7 to 76.0, with gains on document benchmarks such as InfoVQA and DocVQA.

How does IBM's variant work?

IBM released Granite 4.0 3B Vision on 27 March 2026 and calls its version DeepStack Injection. According to the model card, it has eight injection points of two kinds:

  • LayerDeepstack: features from four depths of the vision encoder each go into a different layer of the language model, in reverse order. The deepest, most abstract features feed the earliest layers.
  • SpatialDeepstack: the deepest features at full resolution are split into four spatial groups, each injected at a separate later layer, for fine spatial detail.

The language model is Granite 4.0 Micro, with the vision part as a LoRA adapter, so the same deployment can also serve text-only requests. IBM kept this design in Granite Vision 4.1 (April 2026).

What does it achieve?

In its announcement of 31 March 2026, IBM reports 86.4% on Chart2Summary, the highest of all models it evaluated, including larger ones, and 62.1% on Chart2CSV, second behind Qwen3.5-9B at 63.4%. Both were measured on IBM's own ChartNet benchmark, with an AI model as judge. On VAREX, a set of 1,777 US government forms, it extracted 85.5% of the key-value pairs exactly, without examples.

These are IBM's own figures for the whole model. IBM credits three things together: its ChartNet chart dataset, the DeepStack variant and the modular design. So the figures don't show how much the injection alone adds; the comparisons with and without DeepStack in the two papers do. IBM also warns that the model is built for structured extraction and may not generalize well to open-ended image tasks.

Example

Suppose a wholesaler receives hundreds of supplier invoices as PDFs every week and wants the line items in its bookkeeping. A document tool such as IBM's Docling splits each PDF and crops out the tables, and a small vision model like Granite 4.0 3B Vision turns each crop into structured data. According to IBM, the injection at several layers helps the model understand both what is on the page and where, which matters for tables.