A multi-resolution hash grid is a compact, learnable data structure that stores feature vectors at the vertices of multiple, progressively finer 3D grids, using spatial hashing to map coordinates to a fixed-size table for efficient, collision-tolerant storage and O(1) lookup. This architecture replaces the computationally expensive, high-dimensional positional encoding in a standard NeRF, allowing the subsequent multi-layer perceptron (MLP) to be extremely small and fast while still capturing high-frequency scene details.
Glossary
Multi-Resolution Hash Grid

What is a Multi-Resolution Hash Grid?
A core data structure introduced in the Instant Neural Graphics Primitives (InstantNGP) framework for dramatically accelerating neural scene representations like NeRF.
During training, the feature vectors at the hashed grid vertices are optimized via gradient descent alongside the tiny MLP. The multi-resolution design, where coarse grids capture broad geometry and fine grids encode detail, coupled with interpolated lookups, provides a powerful implicit neural representation. This is the key innovation enabling real-time neural rendering and interactive training of neural radiance fields.
Key Features of Multi-Resolution Hash Encoding
The multi-resolution hash encoding, introduced in Instant Neural Graphics Primitives (InstantNGP), is a core innovation that enables real-time training and rendering of neural radiance fields. Its design focuses on memory efficiency, fast feature lookup, and adaptive detail capture.
Spatial Hashing for Compact Storage
The structure uses a spatial hash function to map 3D grid vertex coordinates to indices in a fixed-size hash table. This allows the representation of a very large, fine-grained virtual grid using a small, bounded amount of memory. Collisions (multiple vertices mapping to the same hash entry) are handled gracefully by the subsequent neural network, which learns to disambiguate them during training.
- Key Benefit: Enables the use of extremely high-resolution grids (e.g., levels up to 2^19) without a memory explosion.
- Contrast: A traditional dense grid at equivalent resolution would be computationally infeasible.
Multi-Resolution Level Composition
The encoding is not a single grid but a composition of multiple grids at different resolutions (e.g., 16 levels from coarse to fine). Each level independently hashes its vertices and stores its own set of learnable feature vectors. The features from all levels are retrieved for a 3D point and concatenated before being passed to the tiny MLP.
- Purpose: Coarse levels capture broad scene geometry, while fine levels capture high-frequency texture and detail.
- Result: This mimics the behavior of Fourier features or positional encoding but in a learned, more parameter-efficient manner.
Trilinear Interpolation for Continuity
To query the encoding for a continuous 3D coordinate, the system performs trilinear interpolation within the voxel at each resolution level. It finds the eight surrounding grid vertices, looks up their feature vectors via the hash table, and interpolates between them.
- Effect: This provides spatial continuity (C^0 continuity), ensuring the input to the MLP changes smoothly as the query point moves, which is critical for stable gradient-based optimization.
- Efficiency: The interpolation is computationally cheap and fully differentiable.
Tiny Multi-Layer Perceptron (MLP)
The primary neural network in InstantNGP is a remarkably small MLP (often just 1-2 layers). Its role is to decode the concatenated, interpolated feature vectors from the hash tables into final density and color values.
- Design Rationale: The hash tables store the vast majority of the scene's learned information. The MLP acts as a lightweight decoder and collision resolver, learning a simple mapping from the high-dimensional feature space to output radiance.
- Impact: This drastically reduces the computational burden compared to the large MLPs used in original NeRF, enabling real-time performance.
Adaptive Detail Based on Grid Level
Different resolution levels naturally adapt to the frequency content of the scene region. Smooth, uniform areas are sufficiently represented by coarser grid levels. Complex, textured surfaces activate the finer grid levels, which allocate hash entries to capture those details.
- Analogy: Similar to a mipmap or image pyramid, but the features are learned end-to-end.
- Practical Outcome: The model allocates its finite hash table capacity (parameters) adaptively to where detail is needed in the 3D space, improving parameter efficiency.
CUDA Kernel Optimization
InstantNGP implements the entire pipeline—hashing, interpolation, and MLP evaluation—as fully-fused CUDA kernels. This means the computation for a batch of sampled points avoids costly memory transfers between CPU/GPU and intermediate buffers.
- Critical Optimization: The hash table lookups and small MLP operations are executed in parallel on the GPU with minimal overhead.
- Result: This kernel fusion is a primary reason InstantNGP achieves training times of seconds to minutes and rendering at interactive frame rates, whereas original NeRF took hours to train.
Multi-Resolution Hash Grid vs. Other NeRF Encodings
A technical comparison of feature encoding strategies used to map spatial coordinates to neural network inputs in Neural Radiance Fields, focusing on memory, speed, and quality trade-offs.
| Encoding Feature / Metric | Multi-Resolution Hash Grid (InstantNGP) | Dense Voxel Grid (Plenoxels, DVGO) | Fourier / Positional Encoding (Original NeRF) | Low-Rank Tensor (TensorRF) |
|---|---|---|---|---|
Core Data Structure | Hash table with collision resolution | Dense, explicit voxel array | Sinusoidal function projection | Factorized (CP/VM) tensor decomposition |
Memory Complexity | O(L * T) (L levels, T hash table size) | O(N³) (cubic in grid resolution) | O(1) (parameter-free function) | O(N * R) (linear in rank R) |
Training Speed (Relative) | Fastest (< 5 minutes) | Fast (10-30 minutes) | Slow (hours to days) | Fast (10-20 minutes) |
Rendering Speed (FPS) | Real-time (30-60+ FPS) | Interactive (10-30 FPS) | Offline (< 1 FPS) | Interactive (5-15 FPS) |
View-Dependent Effects | Requires small MLP for view direction | Explicit spherical harmonics storage | MLP learns full 5D plenoptic function | Separate color field factorization |
Handles High Frequencies | Excellent (multi-resolution caching) | Good (resolution-limited) | Excellent (theoretically infinite) | Good (rank-limited) |
Parameter Count | Compact (~10-100 MB) | Large (~1-10 GB for high-res) | Moderate (~5-10 MB MLP) | Compact (~10-100 MB) |
Aliasing Resistance | Good (coarse levels smooth artifacts) | Poor (fixed grid causes voxel artifacts) | Poor (requires Mip-NeRF extension) | Moderate (depends on factorization) |
Gradient Optimization | Direct via hash table entries | Direct via voxel parameters | Through MLP weights only | Direct via tensor components |
Generalization to New Scenes | Per-scene optimization required | Per-scene optimization required | Per-scene optimization required | Per-scene optimization required |
Frameworks and Implementations
The Multi-Resolution Hash Grid is a core data structure introduced in the Instant Neural Graphics Primitives (InstantNGP) framework. It enables the real-time training and rendering of Neural Radiance Fields by providing an efficient, learnable encoding for spatial coordinates.
Core Data Structure
A multi-resolution hash grid is a learnable feature encoding that stores vectors at the vertices of multiple, independent grids at different resolutions. It uses spatial hashing to map 3D coordinates to a fixed-size hash table, enabling compact storage and O(1) lookup time.
- Key Innovation: Replaces the large, dense MLP in a standard NeRF with a small MLP that operates on features retrieved from this efficient grid.
- Function: For a given 3D coordinate, the feature vectors from the eight surrounding vertices at each resolution level are trilinearly interpolated and concatenated. This multi-scale representation is then passed to a tiny MLP to predict density and color.
Spatial Hashing & Collision Resolution
Spatial hashing is the technique that makes the grid memory-efficient. A hash function maps 3D grid vertex indices to an entry in a fixed-size table.
- Collisions: Multiple vertices can hash to the same table entry. This is a deliberate design choice, not a bug. The model learns to handle these collisions through gradient descent.
- Trade-off: Controlled collisions act as a form of lossy compression, trading a minimal, often imperceptible, quality loss for a massive reduction in memory from gigabytes to megabytes.
Multi-Resolution Design
The grid is not a single 3D lattice but a set of L levels (e.g., 16), each with a different resolution. Coarse levels capture broad scene geometry, while fine levels encode high-frequency texture details.
- Feature Concatenation: Features from all L levels are retrieved and concatenated, giving the MLP both local and contextual information.
- Progressive Detail: During training, the model effectively focuses on coarse-to-fine details as optimization progresses, similar to a positional encoding but with learned features.
Implementation in PyTorch & CUDA
Efficient implementation requires custom CUDA kernels. The fully-fused MLP and hash table lookups are optimized for parallel execution on GPUs.
- Core Operations: Parallel trilinear interpolation and hash table lookup across millions of sampled points per batch.
- Frameworks: The original InstantNGP uses a custom CUDA/C++ framework. Open-source re-implementations exist in PyTorch (e.g.,
torch-ngp) and JAX, providing more accessible APIs for researchers.
Related Accelerated Encodings
The hash grid is part of a family of techniques designed to speed up coordinate-based networks.
- TensorRF: Factorizes the 4D radiance field into compact vector-matrix tensors. More parameter-efficient but can be less performant than hashing for very high resolutions.
- Plenoxels: An explicit, non-neural voxel grid storing spherical harmonics. Renders quickly but requires significant memory and lacks the compactness of a learned hash table.
- Frequency (POSENC) vs. Grid Encodings: The hash grid provides a learnable alternative to fixed sinusoidal positional encoding, offering better performance with fewer MLP parameters.
Frequently Asked Questions
A multi-resolution hash grid is a core data structure introduced in Instant Neural Graphics Primitives (InstantNGP) that enables real-time training and rendering of Neural Radiance Fields (NeRF). This FAQ addresses its technical mechanisms, advantages, and applications.
A multi-resolution hash grid is a data structure that stores learnable feature vectors at the vertices of multiple, overlapping 3D grids of increasing coarseness, using spatial hashing to map grid coordinates to a compact, shared hash table for efficient storage and O(1) lookup.
How it works:
- Multi-Resolution Construction: The scene volume is discretized into
Ldistinct grid levels, each with a resolutionN_l. Coarse levels capture broad geometry, while fine levels encode high-frequency details. - Spatial Hashing: At each level, a 3D grid coordinate is hashed into an index for a fixed-size hash table
T_l. Collisions (multiple vertices mapping to the same hash entry) are permitted and handled via gradient averaging during training. - Feature Lookup & Interpolation: For a continuous 3D coordinate
x, the feature vectors at the eight surrounding vertices of its enclosing cube are retrieved from the hash table at each level via the hash function. These vectors are trilinearly interpolated to produce a level-specific feature. - Feature Concatenation: The interpolated features from all
Llevels are concatenated into a single, high-dimensional feature vector. - Decoding: This concatenated feature vector is fed into a very small Multi-Layer Perceptron (MLP)—often just 1-2 layers—which decodes it into final outputs like volumetric density and view-dependent color. This replaces the large, computationally expensive MLP used in the original NeRF.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
The multi-resolution hash grid is a core component of modern, accelerated NeRF frameworks. These related terms define the foundational concepts, data structures, and optimization techniques that enable its function.
Instant Neural Graphics Primitives (InstantNGP)
InstantNGP is the framework that introduced the multi-resolution hash grid. It combines this data structure with a tiny Multi-Layer Perceptron (MLP) to achieve training times of seconds to minutes, a dramatic acceleration over original NeRF. The key innovation is using spatial hashing to store learnable feature vectors, enabling high-fidelity scene reconstruction with compact memory usage and fast, cache-coherent lookups.
Hash Table Encoding
Hash table encoding is the mechanism at the heart of the multi-resolution grid. Instead of storing a feature vector at every possible grid vertex (which would be memory-prohibitive), it uses a hash function to map spatial coordinates to a fixed-size table. This allows for:
- O(1) lookup time for feature retrieval.
- Collision handling where multiple vertices share a table entry, with gradients averaged during training.
- Compact storage independent of the grid's apparent resolution, enabling the use of many high-resolution levels.
Positional Encoding
Positional encoding is a precursor technique that maps low-dimensional input coordinates (like 3D position (x,y,z)) to a higher-dimensional space using a set of sinusoidal functions. This helps a standard MLP learn high-frequency details in color and geometry. The multi-resolution hash grid replaces explicit positional encoding; the learnable feature vectors retrieved from the hash tables provide a more flexible and parameter-efficient way for the MLP to represent high-frequency scene content.
Trilinear Interpolation
Trilinear interpolation is the method used to query the multi-resolution hash grid at continuous 3D coordinates. For a given query point, the system:
- Identifies the eight vertices of the axis-aligned grid cell containing the point.
- Retrieves the feature vector for each vertex from the hash table.
- Blends these eight vectors based on the point's relative position within the cell. This provides a continuous and differentiable signal from the otherwise discrete grid, allowing gradient-based optimization via backpropagation.
Feature Vector
A feature vector is a small, dense array of floating-point numbers (e.g., 2-16 dimensions) stored at each entry in the multi-resolution hash table. These vectors are learnable parameters optimized during training. For a given 3D point, the retrieved and interpolated feature vectors from multiple grid resolutions are concatenated and fed into the tiny MLP. The MLP's role is simplified to decoding this rich, multi-scale feature representation into final color and density values.
Explicit vs. Implicit Representation
This distinction clarifies the role of the hash grid. NeRFs traditionally use a purely implicit neural representation, where scene knowledge is stored in the weights of a large MLP. The multi-resolution hash grid introduces an explicit, structured component—a set of feature grids. This hybrid approach combines the benefits of explicit methods (fast lookup, local generalization) with the flexibility of implicit methods (continuous representation), leading to the speed and quality breakthroughs seen in InstantNGP.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us