Table of Contents
Fetching ...

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.

Differential Shape Optimization with Image Representation for Photonic Design

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.

Paper Structure

This paper contains 28 sections, 45 equations, 8 figures.

Figures (8)

  • Figure 1: Overview of the differential shape optimization pipeline. Our algorithmic framework enables the generation of photonic structures in image representations and supports gradient computation for all shape parameters, provided the simulation is differentiable.
  • Figure 2: Illustration of shape differentiation: (a) Leibniz integral rule for 1D shapes and (b) Raynold’s transport theorem for 2D shapes. See the text for a detailed description.
  • Figure 3: Workflow of differential shape optimization with explicit representation. (a) Forward structure generation: Given a geometry parameter $p$, the algorithm first generates its discretized representation using segments. With an image of a specific resolution, the algorithm rasterizes the discretized shape with subpixel smoothing. (b) Backward gradient calculation: Using the gradient map from a differentiable solver, we resample integration points on all segments of the discretized shape representation and interpolate the gradient values at these sample points. Raynold’s transport theorem is applied to determine the perturbation of each segment endpoint, and automatic differentiation is used to compute the gradient of the geometric parameter.
  • Figure 4: Validation of gradients for a disk. (a) The area of the forward rasterized disk with different radii, compared with analytical results for $\Delta x = 0.1$. (b) The gradient of the area with different radii, compared with analytical results for $\Delta x = 0.1$. (c) For a radius of $r=1.0$, the gradient is calculated with different $\Delta x$ values, compared with the analytical prediction.
  • Figure 5: Design of a splitter with FDFD. (a) and (b) Design shapes before and after optimization. (c) Evolution of the relative figure of merit (FOM) improvement. (d) Evolution of all $y$-coordinates of the vertices of the design.
  • ...and 3 more figures