Papers
Topics
Authors
Recent
Search
2000 character limit reached

Masked Sparse GRU for 3D Scene Completion

Updated 3 July 2026
  • MS-GRU is a recurrent neural module that employs binary masking and sparse convolutions to restrict computation to occupied voxels.
  • It integrates into the MonoMRN pipeline to achieve efficient 3D semantic scene completion, reducing MACs by approximately 3.3x while maintaining accuracy.
  • The module features a dynamic mask updating strategy and distance attention projection to enhance voxel-wise occupancy and semantic labeling.

The Masked Sparse Gated Recurrent Unit (MS-GRU) is a recurrent neural module designed for efficient 3D reasoning in the context of Monocular Semantic Scene Completion (MSSC). MS-GRU extends the conventional GRU by introducing binary masking to restrict computation to occupied voxels and by leveraging sparse convolutions, reducing resource requirements while maintaining state-of-the-art performance in voxel-wise occupancy and semantic estimation from single RGB images. Integrated within the MonoMRN pipeline, MS-GRU supports efficient and robust scene understanding in both indoor and outdoor environments (Wang et al., 23 Jul 2025).

1. Architectural Foundations and GRU Recap

The standard Gated Recurrent Unit (GRU) operates on input xtRdx_t \in \mathbb{R}^d and hidden state ht1Rkh_{t-1} \in \mathbb{R}^k by computing update and reset gates as:

  • zt=σ(Wzxt+Uzht1+bz)z_t = \sigma(W_z x_t + U_z h_{t-1} + b_z)
  • rt=σ(Wrxt+Urht1+br)r_t = \sigma(W_r x_t + U_r h_{t-1} + b_r)
  • h~t=tanh(Whxt+Uh(rtht1)+bh)\tilde{h}_t = \tanh(W_h x_t + U_h (r_t \odot h_{t-1}) + b_h)
  • ht=(1zt)ht1+zth~th_t = (1-z_t) \odot h_{t-1} + z_t \odot \tilde{h}_t

where σ\sigma is the sigmoid function and \odot denotes element-wise multiplication.

MS-GRU modifies this structure for sparse, masked operation suitable for volumetric scenes represented on a 3D voxel grid.

2. Masked Sparse GRU Mechanism

MS-GRU utilizes a binary mask mt1{0,1}X×Y×Zm_{t-1} \in \{0,1\}^{X \times Y \times Z} to restrict computation to predicted occupied voxels. The masking zeros out both the input tensor xtx_t and hidden state ht1Rkh_{t-1} \in \mathbb{R}^k0 for empty locations before applying a mixture of two types of sparse convolutions:

  • Submanifold sparse convolution (SubConv): Applied so that only active voxels are processed and the sparseness pattern is preserved.
  • Neighborhood-expanding sparse convolution (SConv): Operates on a sparse grid but can activate neighboring voxels, still maintaining computational efficiency over standard dense convolutions.

The MS-GRU recurrence at time ht1Rkh_{t-1} \in \mathbb{R}^k1 is:

  • ht1Rkh_{t-1} \in \mathbb{R}^k2
  • ht1Rkh_{t-1} \in \mathbb{R}^k3
  • ht1Rkh_{t-1} \in \mathbb{R}^k4
  • ht1Rkh_{t-1} \in \mathbb{R}^k5

The channel-wise concatenation ht1Rkh_{t-1} \in \mathbb{R}^k6 is used within convolutional gates. All convolutions use shared weights per iteration.

3. Mask Initialization and Update Strategy

A core aspect of MS-GRU is the management of the occupancy mask sequence ht1Rkh_{t-1} \in \mathbb{R}^k7.

  • Initialization: From the coarse-stage predicted emptiness probability ht1Rkh_{t-1} \in \mathbb{R}^k8, the initial mask is set as ht1Rkh_{t-1} \in \mathbb{R}^k9 if zt=σ(Wzxt+Uzht1+bz)z_t = \sigma(W_z x_t + U_z h_{t-1} + b_z)0, with zt=σ(Wzxt+Uzht1+bz)z_t = \sigma(W_z x_t + U_z h_{t-1} + b_z)1.
  • Sequential Mask Update: During each recurrent step zt=σ(Wzxt+Uzht1+bz)z_t = \sigma(W_z x_t + U_z h_{t-1} + b_z)2, a “mask-head” module (comprised of 3x3 convolutions, global average pooling, dropout, and softmax) computes new voxel-wise occupancy scores zt=σ(Wzxt+Uzht1+bz)z_t = \sigma(W_z x_t + U_z h_{t-1} + b_z)3 and emptiness scores zt=σ(Wzxt+Uzht1+bz)z_t = \sigma(W_z x_t + U_z h_{t-1} + b_z)4. The top-K voxels (K=5) by zt=σ(Wzxt+Uzht1+bz)z_t = \sigma(W_z x_t + U_z h_{t-1} + b_z)5 are added to the mask (set to zt=σ(Wzxt+Uzht1+bz)z_t = \sigma(W_z x_t + U_z h_{t-1} + b_z)6), and the top-K by zt=σ(Wzxt+Uzht1+bz)z_t = \sigma(W_z x_t + U_z h_{t-1} + b_z)7 are removed (set to zt=σ(Wzxt+Uzht1+bz)z_t = \sigma(W_z x_t + U_z h_{t-1} + b_z)8), yielding

zt=σ(Wzxt+Uzht1+bz)z_t = \sigma(W_z x_t + U_z h_{t-1} + b_z)9

This mechanism dynamically adjusts the spatial support of MS-GRU to refine predictions while constraining computation.

4. Sparse Operations and Computational Efficiency

MS-GRU’s computational advantage derives from restricting all recurrent operations to the nonzero mask region, with complexity further controlled by employing SubConv and SConv:

  • The sparse convolutions process only nonzero voxels and their local neighborhoods.
  • In empirical evaluation, a standard dense GRU over the full 3D grid incurs approximately 171.99 G multiply–accumulate operations (MACs), whereas MS-GRU reduces this to 52.44 G MACs, achieving a rt=σ(Wrxt+Urht1+br)r_t = \sigma(W_r x_t + U_r h_{t-1} + b_r)03.3x reduction in computational cost without parameter count increase (1.33 M parameters) (Wang et al., 23 Jul 2025).

A pseudo-code trace for a gate variable, e.g., rt=σ(Wrxt+Urht1+br)r_t = \sigma(W_r x_t + U_r h_{t-1} + b_r)1, highlights selection of indices where rt=σ(Wrxt+Urht1+br)r_t = \sigma(W_r x_t + U_r h_{t-1} + b_r)2, computation of convolutional outputs, and application of rt=σ(Wrxt+Urht1+br)r_t = \sigma(W_r x_t + U_r h_{t-1} + b_r)3 at those locations only.

5. Distance Attention Projection

To generate high-fidelity 3D context features from monocular input, the Distance Attention Projection (DAP) assigns attention weights along the viewing ray of each pixel based on its observed or estimated depth rt=σ(Wrxt+Urht1+br)r_t = \sigma(W_r x_t + U_r h_{t-1} + b_r)4:

  • For voxel at distance rt=σ(Wrxt+Urht1+br)r_t = \sigma(W_r x_t + U_r h_{t-1} + b_r)5 on the same ray,
    • rt=σ(Wrxt+Urht1+br)r_t = \sigma(W_r x_t + U_r h_{t-1} + b_r)6 for rt=σ(Wrxt+Urht1+br)r_t = \sigma(W_r x_t + U_r h_{t-1} + b_r)7
    • rt=σ(Wrxt+Urht1+br)r_t = \sigma(W_r x_t + U_r h_{t-1} + b_r)8 for rt=σ(Wrxt+Urht1+br)r_t = \sigma(W_r x_t + U_r h_{t-1} + b_r)9
    • h~t=tanh(Whxt+Uh(rtht1)+bh)\tilde{h}_t = \tanh(W_h x_t + U_h (r_t \odot h_{t-1}) + b_h)0 for h~t=tanh(Whxt+Uh(rtht1)+bh)\tilde{h}_t = \tanh(W_h x_t + U_h (r_t \odot h_{t-1}) + b_h)1
    • where h~t=tanh(Whxt+Uh(rtht1)+bh)\tilde{h}_t = \tanh(W_h x_t + U_h (r_t \odot h_{t-1}) + b_h)2 is the depth estimation RMS error (0.364 m indoors).
  • Projected features h~t=tanh(Whxt+Uh(rtht1)+bh)\tilde{h}_t = \tanh(W_h x_t + U_h (r_t \odot h_{t-1}) + b_h)3 are fused into a 3D tensor via an attention-integrated context (AIC) block, providing spatially-aware input h~t=tanh(Whxt+Uh(rtht1)+bh)\tilde{h}_t = \tanh(W_h x_t + U_h (r_t \odot h_{t-1}) + b_h)4 for MS-GRU.

6. Integration within the Two-Stage Scene Completion Framework

MS-GRU is positioned within MonoMRN’s two-stage MSSC architecture:

  • Stage 1: ResNet-50 backbone with AdaBins depth estimation and surface projection produces initial coarse features h~t=tanh(Whxt+Uh(rtht1)+bh)\tilde{h}_t = \tanh(W_h x_t + U_h (r_t \odot h_{t-1}) + b_h)5 and occupancy mask h~t=tanh(Whxt+Uh(rtht1)+bh)\tilde{h}_t = \tanh(W_h x_t + U_h (r_t \odot h_{t-1}) + b_h)6 via a 3D AIC network.
  • Stage 2: For h~t=tanh(Whxt+Uh(rtht1)+bh)\tilde{h}_t = \tanh(W_h x_t + U_h (r_t \odot h_{t-1}) + b_h)7 (T=2 in practice), inputs h~t=tanh(Whxt+Uh(rtht1)+bh)\tilde{h}_t = \tanh(W_h x_t + U_h (r_t \odot h_{t-1}) + b_h)8 are obtained from the RGB/depth via DAP and AIC; MS-GRU updates the hidden state and mask h~t=tanh(Whxt+Uh(rtht1)+bh)\tilde{h}_t = \tanh(W_h x_t + U_h (r_t \odot h_{t-1}) + b_h)9 accompanied by the mask-head logic. The final semantic prediction is obtained from ht=(1zt)ht1+zth~th_t = (1-z_t) \odot h_{t-1} + z_t \odot \tilde{h}_t0 via a softmax layer.

This design enables iterative refinement focused on dynamically-selected occupied voxels, with propagation of context informed by learned mask updates.

7. Quantitative Results and Implementation Details

MonoMRN and MS-GRU are validated on NYUv2 (60%%%%51rt=σ(Wrxt+Urht1+br)r_t = \sigma(W_r x_t + U_r h_{t-1} + b_r)652%%%%60 voxel grid) and SemanticKITTI (128ht=(1zt)ht1+zth~th_t = (1-z_t) \odot h_{t-1} + z_t \odot \tilde{h}_t3128ht=(1zt)ht1+zth~th_t = (1-z_t) \odot h_{t-1} + z_t \odot \tilde{h}_t416, upsampled to 256ht=(1zt)ht1+zth~th_t = (1-z_t) \odot h_{t-1} + z_t \odot \tilde{h}_t5256ht=(1zt)ht1+zth~th_t = (1-z_t) \odot h_{t-1} + z_t \odot \tilde{h}_t632). Key measurements:

  • NYUv2: Scene Completion IoU (SC-IoU) = 53.16% (an increase of 8.99% over prior best); Semantic Scene Completion mIoU = 30.73% (+1.60%). Framerate ht=(1zt)ht1+zth~th_t = (1-z_t) \odot h_{t-1} + z_t \odot \tilde{h}_t72.56 FPS.
  • SemanticKITTI: SC-IoU = 42.0% (+3.35%), SSC-mIoU = 13.8% (+1.07%).
  • Ablation on NYUv2: Baseline (coarse only): SC-IoU 48.23%, SSC-mIoU 27.47%; +MS-GRU: 50.61%, 29.16%; +DAP: 51.86%, 30.11%; +mask updating: 53.16%, 30.73%.
  • Robustness: The Masked Recurrent Network (incl. MS-GRU) maintains superior SC-IoU under visual disturbances (dark, bright, motion blur, or fog).

Implementation parameters include hidden state matching coarse features (32–64 dimensions), SGD optimizer (initial lr=0.1, poly schedule, 200 epochs for NYUv2, 30 for KITTI), mask threshold ht=(1zt)ht1+zth~th_t = (1-z_t) \odot h_{t-1} + z_t \odot \tilde{h}_t8, top-K=5 for mask-head, and sequential loss decays of ht=(1zt)ht1+zth~th_t = (1-z_t) \odot h_{t-1} + z_t \odot \tilde{h}_t9 (MSSC) / σ\sigma0 (mask).

8. Context, Significance, and Applicability

MS-GRU directly addresses the inefficiency of dense 3D recurrent units by focusing learning and computation on meaningful regions within large voxel spaces, enabled by dynamic masking and sparse convolutions. Its role in MonoMRN exemplifies advanced strategies in monocular scene understanding, specifically for tasks requiring simultaneous semantic labeling and completion of partially-observed scenes (Wang et al., 23 Jul 2025).

This framework—comprising formal recurrent equations, a mask-driven sparse strategy, depth-aware attention projection, and an efficient recurrent training loop—provides a direct blueprint for reimplementing or extending MS-GRU in high-dimensional, sparsity-dominated 3D reasoning tasks.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Masked Sparse Gated Recurrent Unit (MS-GRU).