AXIPrune: Index-Preserving Pruning Method
- The paper presents AXIPrune, which prunes redundant instructions while ensuring the original access indices remain unchanged.
- It employs compiler strategies and vision-language techniques to remove non-critical math operations and synchronization barriers, thereby enhancing processing efficiency.
- Quantitative results demonstrate significant improvements in throughput (up to 183× speedup) and maintains over 97% downstream model accuracy.
Access-Index Preserving Pruning (AXIPrune) is a formal methodology for pruning instructions, computation branches, or tokens from a computational program or data representation while maintaining an exact preservation of the indices or addressing information that determines where accesses occur in memory or semantic space. The central technical principle is to identify and excise operations that do not contribute transitively to the computation of access indices—those expressions or tokens that govern the actual points of access or semantic relevance in subsequent processing stages. AXIPrune is featured in compiler optimization for CUDA kernel translation (Singh et al., 3 Jan 2026) and vision-LLM token filtering (Son et al., 8 Sep 2025), where it has achieved significant improvements in both compute efficiency and downstream utility by strictly upholding access-index invariants in the pruned output.
1. Formalism and Index-Preserving Guarantee
AXIPrune operates by enforcing that, for any pruned version of the computation or representation, the indices governing accesses remain identical in both syntax and semantics to their original form. In compiler settings, let be a CUDA kernel with memory-access instructions, each using an index expression described by the vector:
where and . AXIPrune produces such that
In vision-language token selection, the access-index is the spatial index of image patches in raster order. AXIPrune learns a binary mask that selects a set , and mandates the preservation of the index in the downstream model input. Empirical ablations have demonstrated that deviation from original index preservation (e.g. constant, randomized, or renumbered indices) yields severe performance collapse, (ANLS or F1 scores fall by >40 percentage points), establishing index preservation as critical (Son et al., 8 Sep 2025).
2. Algorithmic Realizations and Computational Properties
AXIPrune is implemented in compiler toolchains (CuFuzz (Singh et al., 3 Jan 2026)) and vision-language preprocessing (Qwen2.5-VL (Son et al., 8 Sep 2025)). In the CuFuzz translation pipeline, AXIPrune comprises two LLVM-IR passes:
- BarrierElimination: Removes __syncthreads() calls and merges basic blocks, unless shared memory variables protected by barriers flow into branch conditions or memory-access indices.
- MathElimination: Deletes expensive math-like operations (e.g., sqrt, exp) whose results do not feed into branch conditions or access-index computations.
Both passes operate in linear time and space ( for the instruction count ). At runtime, AXIPrune imposes zero overhead, as only superfluous instructions are pruned.
For image token pruning, AXIPrune consists of:
- Patch-level binary classification: Each patch is evaluated via a trained classifier , generating binary mask .
- Index-preserving selection: Masking preserves original indices for downstream processing.
- Max-pooling refinement: A window (commonly ) restores spatial continuity for fragmented text regions.
- FLOP reduction: Computational complexity drops from to , where the pruning ratio is typically around 0.4.
3. Practical Implementation in Compiler and Vision Pipelines
In the compiler domain, CuFuzz’s cuf-cc driver applies AXIPrune immediately after NVVM-to-LLVM translation (Singh et al., 3 Jan 2026). The tool tags relevant memory loads/stores and barriers, builds use-def webs for SSA values, and rewrites IR by removing/barrier-melding or collapsing dataflow for math instructions. This occurs entirely at compile time; the runtime receives streamlined CPU code for memory safety fuzzing, with no functional dependence on deleted operations.
In vision-language pipelines, AXIPrune is positioned ahead of the vision encoder. After partitioning document images into patches ( typically 28 pixels), the classifier produces a binary mask. Max-pooling re-incorporates border fragments, and patch indices are delivered exactly as raster order to the VLM. Compatible models must support explicit positional indices and variable-length visual tokens.
4. Quantitative Performance and Evaluation
Empirical results demonstrate substantial throughput and efficiency improvements:
| Setting | Throughput/Speedup | Downstream Accuracy Loss | Token/Compute Savings |
|---|---|---|---|
| PREX only | 32× average speedup (up to 183×) | — | — |
| PREX + AXIPrune | Additional 33% uplift (1.33× PREX) | — | — |
| Prune only | — | ~13–30 %p drop | 65.7% tokens, 60–80% FLOPs |
| Prune + pool | — | <3 %p drop (OCR/F1) | 41.6% tokens, 40–60% FLOPs |
In compiler context, kernels such as ‘ep’ and ‘hist’ see isolated speedups of 27% (exp() removal) and 35% (barrier elimination), respectively. In vision-language evaluation (3B Qwen2.5-VL model), pruned+pooled pipelines retain >97% of F1/ANLS for extraction and parsing tasks (Son et al., 8 Sep 2025).
Comparison with prior token pruning art (ToMe, DocKylin) establishes AXIPrune as uniquely effective in both efficiency and semantic retention.
5. Concrete Before/After Examples
In CUDA kernel translation, AXIPrune’s impact is illustrated via simplification:
Before AXIPrune:
1 2 3 4 5 6 7 8 |
for (int tid=0; tid<blockSize; ++tid) { t[tid] = bid*blockSize + tid; float r = sqrt(a[t[tid]]); __syncthreads(); float cond = exp(r); if (cond > threshold) out[t[tid]] = …; } |
1 2 3 4 5 |
for (int tid=0; tid<blockSize; ++tid) { int idx = bid*blockSize + tid; if (/* always true: pruning exp() and barrier */) out[idx] = …; } |
In document image pruning:
- Input: 900–1,600 raster-indexed patches
- Output: 35–60% as many patches, indices exactly retained, >97% semantic accuracy after max-pool refinement.
6. Hyperparameter Ablations and Deployment Guidelines
Ablation studies for index handling reveal collapse in accuracy when indices are randomized, renormalized, or fixed, underscoring the necessity of strict index preservation (Son et al., 8 Sep 2025). Patch size yields optimal classifier parameters for typical 12-pt text at 300 DPI. Max-pooling at window size is sufficient. Threshold balances recall and compute; higher thresholds allow more aggressive pruning in background-rich domains.
Deployment recommendations include:
- Training a compact MLP patch classifier on ∼1,000 labeled images.
- Inserting the classifier and pooling step immediately before the vision encoder.
- Preserving raster-based token indexing without reshuffling.
- Enabling explicit positional indices and variable input lengths in the downstream model.
7. Scope and Significance
AXIPrune represents a principled, low-overhead approach to computation pruning under access-index invariance constraints. Its application in both compiler IR and high-dimensional vision-language input streams illustrates a broad methodological utility. By enabling the removal of semantically irrelevant operations while strictly preserving access/disambiguation information, AXIPrune advances both throughput and compute efficiency in memory safety fuzzing and vision-LLM inference. The index-preserving guarantee is central to its theoretical soundness and empirical superiority over competing strategies. Its deployment is recommended in any context where efficiency and semantic mapping are jointly required (Singh et al., 3 Jan 2026, Son et al., 8 Sep 2025).