Differentiating through binarized topology changes: Second-order subpixel-smoothed projection
Giuseppe Romano, Rodrigo Arrieta, Steven G. Johnson
TL;DR
This work addresses the non-differentiability issue in density-based topology optimization during topology changes by introducing SSP2, a second-order, Hessian-regularized extension of the existing SSP1 method. SSP2 defines a distance $d_2(\boldsymbol{x}) = \frac{\eta - \tilde{\rho}(\boldsymbol{x})}{\sqrt{\|\nabla \tilde{\rho}(\boldsymbol{x})\|^2 + \hat{R}^2 \lVert\mathbf{H}(\boldsymbol{x})\rVert_F^2}}$ and a Hessian-augmented update for projection, yielding a twice-differentiable projected density during topology changes while remaining quasi-binary elsewhere. Across thermal and photonic problems, SSP2 demonstrates faster convergence in connectivity-dominant scenarios and comparable performance otherwise, enabling the use of optimization algorithms with stronger theoretical guarantees (e.g., interior-point methods). Importantly, SSP2 adds minimal computational overhead and can serve as a drop-in replacement for SSP1 in existing TopOpt workflows, broadening the practical toolkit for topology optimization.
Abstract
A key challenge in topology optimization (TopOpt) is that manufacturable structures, being inherently binary, are non-differentiable, creating a fundamental tension with gradient-based optimization. The subpixel-smoothed projection (SSP) method addresses this issue by smoothing sharp interfaces at the subpixel level through a first-order expansion of the filtered field. However, SSP does not guarantee differentiability under topology changes, such as the merging of two interfaces, and therefore violates the convergence guarantees of many popular gradient-based optimization algorithms. We overcome this limitation by regularizing SSP with the Hessian of the filtered field, resulting in a twice-differentiable projected density during such transitions, while still guaranteeing an almost-everywhere binary structure. We demonstrate the effectiveness of our second-order SSP (SSP2) methodology on both thermal and photonic problems, showing that SSP2 has faster convergence than SSP for connectivity-dominant cases -- where frequent topology changes occur -- while exhibiting comparable performance otherwise. Beyond improving convergence guarantees for CCSA optimizers, SSP2 enables the use of a broader class of optimization algorithms with stronger theoretical guarantees, such as interior-point methods. Since SSP2 adds minimal complexity relative to SSP or traditional projection schemes, it can be used as a drop-in replacement in existing TopOpt codes.
