Spatially Adaptive Computation in Neural Networks

19 concepts15 papers1 proposal

Standard deep learning architectures treat inputs uniformly. Whether an image patch contains a highly detailed object or a flat background, or whether a time-series segment is volatile or stable, standard models allocate the exact same amount of computation across the entire input space. This uniform processing is computationally wasteful because information is rarely distributed evenly.

Spatially adaptive computation solves this inefficiency by dynamically shifting computational resources to where they matter most. By evaluating local complexity on the fly, models can allocate high-resolution features, dense tokens, or specialized sub-networks to intricate regions while processing simple areas with lightweight, coarse representations.

Measuring Local Complexity

To allocate resources non-uniformly, a model must first decide where complexity lies. This is achieved via lightweight routing or gating mechanisms that run ahead of or alongside the main network layers to map out regional significance.

Input Data ───► [ Lightweight Router ] ───► Complexity Map (Saliency / Gradients)
                       │
                       ▼
         ┌───────────────────────────┐
         │ Dynamic Resource Routing  │
         └─────┬───────────────┬─────┘
               ▼               ▼
       [ Coarse Scale ]  [ Fine Scale ]
       (Simple Regions)  (Complex Regions)

Several strategies exist for building these complexity maps:

  • Granular Routing: Lin Song et al. introduce a routing mechanism that partitions inputs into regions and adaptively assigns different patch granularities based on local complexity, ensuring detailed foreground objects receive more processing power than redundant backgrounds.
  • Significance Mapping: Sucheng Ren et al. utilize a "significance map" within Vision Transformers to identify salient image regions, allowing the model to concentrate its token budget on critical features.
  • Hierarchical Partitioning: Instead of operating on a fixed grid, Fei Xie et al. employ a learnable quadtree-based strategy. A lightweight module predicts locality scores to recursively subdivide high-information regions into smaller quadrants while maintaining coarse representations for simpler areas.
  • Task-Specific Priors: In targeted domains like image restoration, the selection mechanism can be guided by the degradation itself. For example, Yuxin Zhang et al. use a lightweight "moiré prior" to identify distorted patches, ensuring heavy computational sub-networks are only activated where visual artifacts are actually present.

Modulating the Computational Budget

Once a model has mapped out local complexity, it must alter its execution path to exploit this information. Current architectures modulate their compute budget through three primary levers: token density, resolution scaling, and expert gating.

Token Density

In transformer-based architectures, computational cost scales quadratically with sequence length. By varying token density according to local complexity, models can dramatically shorten sequence lengths. Sucheng Ren et al. reallocate tokens to keep a high density over salient objects and a sparse density over backgrounds. This concept is also vital in physical simulations; Yanshun Zhao et al. vary token density based on local field complexity (such as shocks or sharp gradients) in partial differential equation (PDE) solvers, mimicking classical numerical adaptive mesh refinement.

Resolution Scaling

For convolutional networks, processing high-resolution feature maps is the primary driver of latency. Adaptive models downscale feature maps in homogeneous regions where high-fidelity detail is unnecessary. Thomas Verelst et al. partition images into a grid of blocks and use a lightweight policy network to determine which blocks require high-resolution processing and which can be downscaled. Similarly, the authors of Multi-Dimensional Dynamic Model Compression for Efficient Image Super-Resolution implement a learned router that dynamically downscales feature maps before convolution based on the input's spatial information content.

Mixture of Experts and Gating

Instead of changing the data representation (tokens or resolution), models can dynamically change the network path itself. Yongzhen Wang et al. utilize dynamic, edge-aware gating mechanisms to route degradation-sensitive image regions to specialized restoration modules within a Mixture-of-Experts (MoE) framework, leaving clean regions to bypass heavy computation.

Generalization Beyond Vision

While spatial adaptivity is highly intuitive for 2D images, the underlying principle—allocating compute based on local variance—applies broadly to continuous physical systems and sequential data.

In the domain of fluid dynamics and continuous neural PDE operators, standard generative models often waste resources on uniform simulation grids. Armand Kassaï Koupaï et al. demonstrate that introducing adaptive generation strategies to dynamically increase token density in high-variance regions optimizes the balance between accuracy and compute.

Similarly, for time-series foundation models, treating every time step uniformly fails to capture multi-scale dynamics efficiently. Kun Feng et al. introduce a dynamic routing mechanism that adjusts tokenization resolution based on local data complexity. This allows the model to allocate dense resources to volatile spikes while using "null experts" to completely bypass computation for simple, stable trends.

Why It Works: The Efficiency-Accuracy Frontier

Spatially adaptive computation consistently slashes computational costs (often by 40% to 60% FLOPs) without sacrificing accuracy. This works because information distribution in real-world data is highly redundant.

A uniform model wastes parameters and floating-point operations over-processing low-frequency information, such as a clear blue sky or a flat line in a time series. By compressing these redundant regions into coarse representations, the model frees up its capacity. It can then focus its expressive power entirely on high-frequency boundaries, sharp gradients, and semantic foregrounds.

Furthermore, this decoupling of the computational budget from the raw input dimensions enables a highly flexible quality-to-latency trade-off at inference time:

  • Anytime Inference: By framing resource allocation as an adaptive policy, models can be tuned to halt refinement early when operating under strict latency constraints, achieving the majority of peak accuracy with a fraction of the compute (Buyu Liu et al.).
  • Elastic Interfaces: Anil Kag demonstrates that a single model can decouple its computational cost from input resolution, allowing users to dynamically adjust the compute budget at inference time based on available hardware resources.
  • Global-Local Separation: Schemes that restore data globally at a coarse scale and refine locally only where needed (Xiaotao Hu et al.; Yu Zhang et al.) ensure that hardware resources are spent scaling up performance on complex edge cases rather than processing trivial background data.

Key Foundational Work

Dynamic Grained Encoder for Vision Transformers (2021) — contributed 2 concept elements to this direction.
Learning Dynamic Hierarchical Models for Anytime Scene Labeling (2016) — contributed 1 concept elements to this direction.
History & citationVersion 1 · 2026-10-04

Current · Permanent link

View frozen version 1

Cite this direction

Latest version (a living page):

@misc{lacuna_adaptive_spatial_granularity_28dae669,
  title = {adaptive spatial granularity},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/adaptive-spatial-granularity/rdr_28dae66936294484886c1f4641ddc5f6},
  note = {Latest version of a living research direction; cite a version for a fixed text. Accessed 2026-11-23},
}

This exact version (version 1, frozen text):

@misc{lacuna_adaptive_spatial_granularity_28dae669_v1,
  title = {adaptive spatial granularity},
  author = {{Lacuna}},
  howpublished = {Lacuna research direction},
  year = {2026},
  url = {https://lacuna.tiptreesystems.com/direction/adaptive-spatial-granularity/rdr_28dae66936294484886c1f4641ddc5f6/v/1},
  note = {Version 1, frozen 2026-10-04. Accessed 2026-11-23},
}
About

These directions overlap with this one through shared papers.

See something wrong? Report a mistake