Differential Shape Optimization with Image Representation for Photonic Design
Zhaocheng Liu, Jim Bonar
TL;DR
This work addresses the challenge of computing gradients for photonic device shapes encoded as binary images within density-based simulations. It introduces a general differential shape optimization framework that renders shapes into density maps and computes gradients via Raynold's transport theorem, enabling backpropagation through differentiable solvers. The framework provides a complete forward–backward pipeline with subpixel-smoothed rendering, resampling-based backward propagation, and support for both explicit and implicit representations, including a 3D extension. Through three design examples using FDFD, FDTD, and RCWA, the authors demonstrate gradient correctness, convergence speed improvements over black-box methods, and broad applicability to complex photonic geometries, highlighting practical potential for rapid, parameter-rich optimization.
Abstract
We propose a general framework for differentiating shapes represented in binary images with respect to their parameters. This framework functions as an automatic differentiation tool for shape parameters, generating both binary density maps for optical simulations and computing gradients when the simulation provides a gradient of the density map. Our algorithm enables robust gradient computation that is insensitive to the image's pixel resolution and is compatible with all density-based simulation methods. We demonstrate the accuracy, effectiveness, and generalizability of our differential shape algorithm using photonic designs with different shape parametrizations across several differentiable optical solvers. We also demonstrate a substantial reduction in optimization time using our gradient-based shape optimization framework compared to traditional black-box optimization methods.
