TL;DR
DiffRayve introduces a fully differentiable Shooting and Bouncing Ray (SBR) algorithm that bridges the gap between geometric and physical optics to simulate both polarized and unpolarized light. This approach enables fast, gradient-based optimization of complex, wide field-of-view optical systems containing multiple diffractive and refractive elements without the prohibitive computational cost of full-wave simulations.
What Problem Does This Paper Address?
Modern optical design ("deep optics") increasingly relies on end-to-end optimization using gradients to co-design physical lenses alongside machine learning algorithms. However, existing simulation tools force a harsh trade-off between speed and physical accuracy.
Geometric Optics (GO) is fast and handles wide fields of view (FoV) but completely ignores wave effects like diffraction. Fourier Optics (FO) captures wave behavior but is restricted to small FoVs due to paraxial approximations. Full-wave methods like Finite-Difference Time-Domain (FDTD) are highly accurate but computationally crushing, often taking hours or days to simulate a single setup. Furthermore, existing hybrid methods cannot simulate polarized light or handle multiple Diffractive Optical Elements (DOEs) placed arbitrarily within a lens system.
Methods
The authors introduce DiffRayve, adapting the Shooting and Bouncing Ray (SBR) method—originally developed for radio frequency (RF) engineering—to optical design.
Key methodological innovations include:
- Ray-Wave Hybridization: The algorithm traces GO field rays through the lens system. At every surface intersection, it calculates equivalent electric and magnetic surface currents based on the local geometric field. These currents are then propagated to the sensor using a Physical Optics (PO) near-field integral to compute a full 3D complex vector point spread function (PSF).
- Monte Carlo Acceleration: To prevent an exponential explosion of ray paths in multi-element systems, the authors use Monte Carlo integration to sample reflected and refracted paths, rendering the computational complexity linear relative to the number of optical elements.
- Differentiability: Built on top of the Mitsuba 3 renderer and the Dr. Jit compiler, the entire pipeline supports automatic differentiation. This allows first-order optimizers to directly update lens parameters, such as the height maps of DOEs.
- Polarization Tracking: Unlike previous hybrid models, DiffRayve explicitly tracks polarization and phase information influenced by changing indices of refraction and Fresnel coefficients.
Datasets
Not discussed in the traditional machine learning sense, as this paper focuses on physics-based simulation. Instead of training datasets, the method is validated against analytical ground truths:
- An analytical Fraunhofer diffraction pattern for a circular plano-convex lens (both polarized and unpolarized).
- An analytical solution for a square sinusoidal phase grating.
Key Insights and Ideas
- Breaking Placement Constraints: Previous hybrid methods could only apply diffractive phase masks at the very final element of an optical path. Because DiffRayve computes equivalent currents along all boundaries, multiple DOEs can be placed anywhere in the system.
- The Importance of the Near-Field: Standard SBR implementations use far-field approximations. DiffRayve implements a radiative near-field form of the Electric Field Integral Equation (EFIE). This is essential for capturing real-world lens physics, such as the $\cos^4(\theta)$ field drop-off and corner smearing on flat sensor planes.
- RF to Optics Cross-Pollination: Bringing SBR from the radar and RF community into deep optics provides an elegant, highly efficient middle ground between pure rays and pure waves.
Key Results
- High Fidelity: DiffRayve achieved 10 to 30 dB higher peak signal-to-noise ratios (PSNR) than state-of-the-art baselines (Chromatix and DeepLens) when compared against analytical solutions for scalar and vector wave scattering.
- Speed: Simulations completed in seconds (e.g., 2.5 seconds for a sinusoidal grating), whereas some baselines took around a minute, and full-wave FDTD would take hours.
- Multi-DOE Optimization: The authors successfully optimized a wide-FoV compound lens system containing a binary DOE, a refractive lens, and a pixel mask DOE. The optimization halved chromatic aberration at an $8^\circ$ incident angle, dropping the overall system error from 0.4 to 0.25 in just 10 minutes.
Limitations and Future Work
- Computational Overhead for Unpolarized Light: To simulate unpolarized systems, DiffRayve must run two separate ray traces (one for each orthogonal polarization). The authors note these could be optimized into a single pass since both polarizations follow identical geometric paths.
- Wavelength-Scale Discontinuities: SBR's approximations on surface currents mean it cannot accurately characterize structural discontinuities that are on the order of a single wavelength. Consequently, ultra-fine meta-lens designs still require higher-fidelity full-wave solvers.
Summary updated