Joint Sampling and Optimisation for Inverse Rendering

Martin Balint, Karol Myszkowski, Hans-Peter Seidel, Gurprit Singh · DOI

TL;DR

Researchers from the Max Planck Institute for Informatics have developed a "meta-estimator" that significantly speeds up inverse rendering by reusing gradient information across optimization steps. By combining current noisy samples with past estimates updated via low-variance finite differences, their method achieves convergence up to 20x faster than standard Adam optimizers in high-noise regimes.

What Problem Does This Paper Address?

Inverse rendering is the process of estimating scene parameters—like textures, material properties, or lighting—from a target image. It is typically solved using gradient descent, where a differentiable renderer calculates how changing a parameter affects the final image.

The challenge lies in the "Monte Carlo" nature of rendering. Estimating these gradients requires tracing thousands of light paths, which is incredibly noisy. To get a clean gradient, you need many samples per pixel (spp), which is computationally expensive. If you use too few samples, the noise overpowers the signal, causing the optimizer to stall or diverge. While standard tools like Adam use "momentum" to average out noise, they often suffer from "lag"—the optimizer is reacting to where the parameters were, not where they are now.

Methods

The authors introduce a theoretical framework for Joint Sampling and Optimisation. Instead of treating each iteration as a fresh start, they interleave the sampling process with the optimization history.

  1. The Meta-Estimator: They combine a standard "proportional" gradient estimator (the current noisy sample) with a "finite-difference" estimator. The finite-difference estimator calculates the change in the gradient between the previous step and the current one.
  2. Recursive Updating: By adding this estimated change to the previous iteration's meta-estimate, they bring the old (and less noisy) information into the present without the typical lag associated with moving averages.
  3. Inverse Variance Weighting: The two sources (new noisy sample vs. updated old estimate) are combined using weights ($\alpha$) derived from their respective variances. This ensures that the most reliable information dominates the update.
  4. Adam Integration: They derive a stable way to plug this meta-estimator into the Adam optimizer, replacing Adam's standard second-moment (variance) estimate with their more accurate meta-variance.
Figure 1: We simultaneously optimise the spiral’s base colour, metalness and roughness. Our gradient meta-estimator quickly recovers the gradient with just one finite-difference and two proportional samples per pixel. Adam’s default first moment estimator (𝛽1 = 0.9) cannot adapt as quickly and often overshoots. After tuning Adam’s hyperparameters for this specific problem, it approaches out method at 32 spp and matches it only at 64 spp. Banner 2 © 2023 Wenzel Jakob

Datasets

The method was evaluated on several challenging inverse rendering benchmarks:

  • Synthetic Material Optimization: A "spiral" scene used to simultaneously optimize base color, metalness, and roughness.
  • 1D Toy Problem: Optimizing the rate parameter of an exponential distribution to test theoretical convergence.
  • Veach Ajar: A classic, difficult-to-render scene used here for diffuse texture optimization under complex global illumination.
  • Volumetric Scenes: Optimizing emission and absorption volumes (Astronaut and Smoke scenes), similar to NeRF-style tasks.
  • Roughness Textures: Optimizing high-resolution (2K) roughness maps on a complex Chalice model.

Key Insights and Ideas

  • Information Reuse: The core "aha" moment is that gradients from previous iterations aren't useless just because the parameters changed; they just need a "correction" (the finite difference) to become relevant again.
  • Decoupling Variance: The authors found that finite-difference variance is heavily tied to the optimizer's step size. By decoupling these, they created a much more stable variance estimator that doesn't explode when the optimizer takes a large leap.
  • Alpha Clipping: To prevent the system from becoming "overconfident" in its history during the volatile early stages of optimization, they implemented a clipping mechanism that constrains the influence of past samples.
Figure 2: We optimise the rate parameter of an exponential distribution such that the mean of the distribution matches our target value of 2.0. We take 32 samples of the distribution in each iteration and compute an L2 loss between their mean and the target value. The bottom row shows insets of the graphs in the top row, indicated by grey regions. On the left, we show how Adam and our method reach the ground truth rate parameter 0.5. Error bars show the run-to-run variation of the optimised parameter. Our method converges significantly faster and is more stable than Adam. On the right, we show the estimators we use for our method; the proportional estimator has a large variance, while the finite-difference estimator is much less noisy. Our meta-estimator combines both, with its variance reducing over time.

Key Results

  • Efficiency Gains: In the spiral material task, the meta-estimator using only 3 spp (1 finite-difference + 2 proportional samples) outperformed a tuned Adam optimizer using 32 spp and matched the quality of Adam at 64 spp.
  • Robustness to Noise: In the Veach Ajar texture task, standard Adam at low sample counts devolved into a "random walk" because it couldn't distinguish gradient signal from noise. The meta-estimator maintained steady convergence.
  • Accuracy: As shown in Figure 4, the meta-estimator provides much tighter standard deviation estimates than Adam, leading to more stable and predictable updates.
Figure 4: Following the same setup as Figure 3, we show the estimated gradients and standard deviations of our meta- estimator and Adam. Our meta-estimators achieve signif- icantly lower actual variance in each case, while also pro- viding much more accurate approximations. Dashed lines represent actual or optimal values, solid lines a randomly sampled run, while error bars show run-to-run variation. In addition, we show violin plots for alpha, demonstrating how our method is more likely to be conservative and not to be swayed by outliers.

Limitations and Future Work

  • Estimator Availability: The method relies on having a good finite-difference estimator (like shift mapping). While these exist for many rendering tasks, they aren't yet universal for all types of parameters (e.g., complex geometry changes).
  • Sparsity Issues: In volumetric optimization, if the volume is very sparse, the finite-difference samples might not overlap enough to provide a useful signal, reducing the method's effectiveness.
  • Future Directions: The authors suggest that this framework could be extended to training deep neural networks, provided that low-variance finite-difference estimators for weight updates can be developed.

Summary updated

BibTeX
@inproceedings{balint2023joint,
  author = {Martin Balint and Karol Myszkowski and Hans-Peter Seidel and Gurprit Singh},
  title = {{Joint Sampling and Optimisation for Inverse Rendering}},
  booktitle = {SIGGRAPH Asia},
  year = {2023},
  doi = {10.1145/3610548.3618244},
}
Figure