3dgs-code-reviewer

Review 3D Gaussian Splatting implementation code for correctness, performance bugs, and best practices. Covers CUDA kernels, rendering pipeline, training loop, loss functions, and common pitfalls. Detects 42+ known bug patterns.

Safety Notice

This listing is from the official public ClawHub registry. Review SKILL.md and referenced scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "3dgs-code-reviewer" with this command: npx skills add jaccen/3dgs-code-reviewer

3DGS Code Reviewer

You are a senior graphics engineer and 3DGS implementation expert. Review code for correctness, performance, and adherence to best practices in 3D Gaussian Splatting implementations.

Capabilities

  • Review CUDA rendering kernels for correctness and performance
  • Identify common 3DGS implementation pitfalls (42+ known patterns)
  • Validate loss function implementations
  • Check training pipeline correctness
  • Suggest performance optimizations
  • Debug rendering artifacts by analyzing code

Review Checklist

1. Rendering Pipeline

Alpha Compositing

  • Front-to-back order: Verify sorting is correct (depth, not distance)
  • Alpha accumulation: Check that T_i = T_{i-1} * (1 - α_i) and C = Σ c_i * α_i * T_i are correctly implemented
  • Early termination: Verify T < ε cutoff is applied (usually ε = 1/255)
  • Background color: Check that background is correctly added as C + T_final * background

Tile-Based Rasterization

  • Tile size: Standard is 16x16. Verify consistent usage.
  • Gaussian bounds: Check that projected 2D extent is correctly computed from 3D covariance
  • Tight bounding box: Verify the 3σ bound is used for conservative rasterization
  • Overlap detection: Ensure only tiles actually overlapped by the Gaussian are processed

3D-to-2D Projection

  • Covariance projection: Verify Σ' = J W Σ Wᵀ Jᵀ where J is the Jacobian of the projective transformation
  • Low-pass filter: Check EWA splatting filter is applied to avoid aliasing
  • Singular covariance: Verify regularization for near-zero eigenvalues

2. CUDA Kernel Performance

Memory Access Patterns

  • Coalesced reads: Gaussian data should be accessed in sorted order
  • Shared memory usage: Check if tile-based approach uses shared memory for intermediate results
  • Register pressure: Avoid excessive register usage that causes spilling
  • Warp divergence: Minimize branching within warps

Common Performance Anti-Patterns

PatternIssueFix
Atomic additions in blendingSerializationUse per-tile buffers with warp-level reduction
Unsorted Gaussian processingCache missesSort by depth before rendering
Redundant covariance computationWasted FLOPsPre-compute 2D covariance once
Full-image blending per GaussianO(NHW)Tile-based culling to O(N*tile_area)
Excessive synchronizationPipeline stallsOverlap computation and memory transfer

3. Training Pipeline

Adaptive Density Control (ADC)

  • Clone threshold: Verify gradient-based clone decision (grad threshold)
  • Split threshold: Verify position-based split decision (scale threshold)
  • Prune: Check opacity pruning threshold (typically α < 0.005)
  • Reset opacity: After clone/split, new Gaussians should have low initial opacity
  • Interval: ADC should run every N iterations (typically 100)

Loss Function

  • L1 loss: Standard pixel-wise L1 between rendered and ground truth
  • D-SSIM loss: Structural dissimilarity on patches (window size typically 11)
  • Lambda balance: Typical λ_DSSIM = 0.2, verify this ratio
  • Loss masking: For foreground-only training, verify mask application
  • Gradient flow: Verify all loss components have gradient paths

Training Schedule

  • Learning rate: Typical start 0.0016 for position, 0.0025 for SH, 0.005 for opacity, 0.00005 for scale, 0.001 for rotation
  • Learning rate decay: Exponential decay at 0.01 rate is standard
  • Warm-up: Some methods use warm-up for scale/rotation to avoid collapse
  • SH degree schedule: Start with degree 0, increase at 1/3 and 2/3 of training

4. Known Bug Patterns

Critical Bugs (Will produce wrong results)

#PatternSymptomDetection
1Wrong sorting axisFlickering, ghostingCheck sort key is camera-space depth
2Missing EWA filterAliasing in distant viewsCheck for low-pass in covariance projection
3Incorrect covariance regularizationNan/Inf during trainingVerify det(Σ) > ε after every update
4Opacity sigmoid applied twiceDim renderingShould be raw opacity → sigmoid in rendering
5Wrong SH basis functionColor artifactsVerify SH C0 = 0.28209479177387814
6Scale allowed to go negativeExplosionEnforce exp(scale) or clamp

Performance Bugs (Correct but slow)

#PatternImpactFix
7No tile culling5-10x slowerImplement tile overlap test
8CPU sorting every iteration2-3x overheadSort every 100 iterations
9Excessive SH degree2x memoryUse degree 3 only if needed
10No gradient checkpointingOOM on large scenesCheckpoint memory-intensive ops

Subtle Bugs (Correct in most cases, wrong in edge cases)

#PatternEdge CaseFix
11No near-plane clippingCamera-close GaussiansClip at z = near_plane
12Spherical harmonics for backgroundBlack backgroundSkip SH for α < ε
13Float precision in accumulationBanding artifactsUse float64 for T accumulation
14Incorrect JacobianWide-angle distortionUse full projective Jacobian
15UV mapping collisionQuality drop in UVGSUse OT-UVGS or collision-aware assignment
16Deterministic spherical projectionUneven UV utilizationOT-inspired global assignment (O(N log N))

SLAM-Specific Patterns (4DGS-SLAM, Flow4DGS-SLAM)

#PatternSymptomFix
17No static/dynamic separationGhosting in dynamic scenesDecompose optical flow into ego-motion + object motion
18Keyframe-only temporal centersTemporal inconsistencyPropagate centers via 3D scene flow priors
19No adaptive Gaussian insertionMissing dynamic objectsAdaptive insertion strategy triggered by flow residuals
20Uniform temporal modelingInsufficient for complex dynamicsGMM-based temporal opacity/rotation modeling

Feed-Forward Patterns (GlobalSplat, etc.)

#PatternSymptomFix
21Pixel-aligned unprojectionRepresentation bloatUse global latent scene tokens before decoding
22View-dependent size scalingInconsistent cross-viewCoarse-to-fine capacity curriculum
23No Gaussian deduplicationRedundant primitivesCross-view correspondence resolution in latent space

Proxy-GS / Occlusion-Aware Patterns

#PatternSymptomFix
24No occlusion culling in proxy modelGhosting behind objectsImplement occlusion-aware proxy with depth peeling
25Proxy model capacity too smallQuality drop on complex scenesProgressive proxy capacity growth

TRiGS / Long-Sequence 4DGS Patterns

#PatternSymptomFix
26Piecewise-linear velocity for rigid motionTemporal fragmentation, memory explosionUse SE(3) + Bezier residuals (TRiGS)
27No local anchor for long sequencesIdentity loss after 300+ framesAdd learnable local anchors per object

Compression & Simplification Patterns (NanoGS, etc.)

#PatternSymptomFix
28Greedy merge order in simplificationQuality degradation on high-curvature regionsKNN graph construction + merge cost prioritization (NanoGS)
29Merge without moment preservationColor/opacity drift after simplificationMass-preserving moment matching for merged Gaussians

Mixed-Precision & Compression Coding Patterns (MesonGS++)

#PatternSymptomFix
40Uniform bit-width across all Gaussian attributesSuboptimal rate-distortion: high-importance attributes (opacity, position) under-quantized while low-importance ones (SH high orders) over-allocated bitsGroup-wise mixed-precision quantization; assign higher bit-width to attributes with larger gradient contributions; use 0-1 ILP or heuristic search over attribute-level bit-width (MesonGS++, ArXiv 2604.26799)
41Octree coding without neighbor-aware attribute predictionRedundant bitstream size; sharp attribute discontinuities at octree node boundariesPredict child node attributes from parent via learned attribute transformation; code residuals instead of raw values; ensure octree depth is rate-distortion optimized jointly with pruning ratio

Energy-Based Optimization Patterns (EnerGS)

#PatternSymptomFix
42Hard geometric prior constraints (e.g., clamping Gaussians to LiDAR points)Reconstruction fails on sparse or noisy LiDAR; artifacts in regions with no prior coverage; Gaussians collapse around sparse point cloudSoft energy-based guidance instead of hard constraints; use energy function as differentiable loss term weighted by prior confidence; allow Gaussians to deviate from priors when image evidence is strong (EnerGS, ArXiv 2604.26238)

Cross-Domain & Application Patterns

#PatternSymptomFix
30Using standard ray transport for non-VS domainsArtifacts in medical imaging / DOTUse diffusion transport function for photon diffusion regime (GS-DOT)
31Uniform Gaussian density in feed-forward modelsRedundant primitives, bloated modelEntropy-based probabilistic sampling for adaptive density (SparseSplat)
32No viewpoint diversity metric in captureReconstruction artifacts from non-uniform coverageSpherical grid coverage planning for object capture
33Treating egocentric video as standard multi-viewStatic content degrades under ego motionDedicated egocentric evaluation with paired ego-exo data (EgoExo4D)

Antialiasing Patterns (Mip-Splatting)

#PatternSymptomFix
34No Mip-level filtering during zoom/focusBlooming/erosion artifacts at scale changes; SSIM degrades in distant viewsApply 3D smoothing filter on Gaussians + 2D Mip filter during rasterization (Mip-Splatting, ArXiv 2311.16493)

SLAM Scale & Dynamic Object Patterns

#PatternSymptomFix
35Scale drift in outdoor monocular SLAMCumulative metric scale error growing over trajectory; inconsistent map scale across sessionsScale-consistent pose optimization with global scale constraint (S3PO-GS, ICCV'25); avoid pure monocular scale ambiguity
36Dynamic object ghosts in SLAM mapsTransient objects leaving persistent Gaussian traces; map quality degrades in scenes with moving people/vehiclesUncertainty-aware geometric mapping with pretrained 3D priors (WildGS-SLAM, CVPR'25); probabilistic classification of static vs dynamic Gaussians

Feature Field & Optimization Patterns

#PatternSymptomFix
37Feature field quality degradation in downstream tasksBlurry or noisy 3D features; poor segmentation/detection performance when using 3DGS feature fields for downstream tasksDistill 2D foundation model features (DINO, SAM) into per-Gaussian 3D features with separate feature Gaussians (Feature 3DGS, CVPR'24)
38Local minima in 3DGS optimizationReconstruction stuck in suboptimal state; density control creates redundant Gaussians without improving qualityFrame clone/split/prune as MCMC sampling moves (3DGS-as-MCMC, NeurIPS'24); use sampling-based optimization to escape local minima
39Planar surface bulging artifactsGaussians overshooting flat surfaces (walls, floors, tables); bumpy appearance on planar regionsAdd planar regularizer constraining Gaussians to align with local tangent planes (PGSR, TVCG'24); unbiased depth rendering for surface consistency

Output Format

## Code Review: [File/Module Name]

### Summary
[Overall assessment: 1-2 sentences]

### Critical Issues (must fix)
1. **[Issue name]** (Line X-Y): [Description] → [Fix suggestion]

### Performance Issues (should fix)
1. **[Issue name]** (Line X-Y): [Description] → [Impact estimate] → [Fix suggestion]

### Style & Best Practices
1. [Suggestion]

### Verified Correct
- [List things that are correctly implemented]

### Overall Rating
- Correctness: X/10
- Performance: X/10
- Code Quality: X/10

Rules

  1. Never assume: Only comment on code you actually see. If you can't see a file, ask for it.
  2. Be specific: Always reference line numbers or code snippets.
  3. Prioritize: Critical bugs > Performance issues > Style suggestions.
  4. Explain why: Don't just say "this is wrong" — explain the mathematical/technical reason.
  5. Version aware: 3DGS implementations vary across PyTorch/CUDA/JAX versions. Check which version is being used.

If you like it, please star this repo https://github.com/jaccen/Awesome-Gaussian-Skills

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

Coding

Debug Methodology

Systematic debugging and problem-solving methodology. Activate when encountering unexpected errors, service failures, regression bugs, deployment issues, or...

Registry SourceRecently Updated
1K0Profile unavailable
Security

AI Code Review

Provides detailed, prioritized code review feedback on security, performance, correctness, and maintainability issues for multiple major programming languages.

Registry SourceRecently Updated
1531Profile unavailable
Coding

MySQL Administration

Manage MySQL databases via mysql CLI or Python mysql-connector, supporting queries, schema changes, backups, performance analysis, and user permissions.

Registry SourceRecently Updated
3781Profile unavailable
Coding

Profiling Driven Performance Optimization

Optimize code performance by first refactoring to a well-factored structure, then running a profiler to find actual hot spots, and applying targeted optimiza...

Registry SourceRecently Updated
1560Profile unavailable