Skip to content

feat: autograd support for Clip Operations #2450

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

rahul-flex
Copy link
Contributor

@rahul-flex rahul-flex commented May 12, 2025

Autograd support for ClipOperation with respect to the vertices and slab_bounds of its constituent PolySlab.

Key Changes:
Differentiable Geometry Representation:
Introduces a "soft membership" function. It provides a smooth, differentiable approximation of the sharp boundaries and non-differentiable nature of boolean geometric operations (intersection, union, difference and symmetric-difference), enabling gradient computation.

Adjoint-Based Derivative Calculation:
Computes gradients using the adjoint method, integrating permittivity sensitivity , and the gradient of the soft membership function wrt polylab params.

Expanded Monitor Bounds:
Adjoint monitors now encompass both input geometries with padding, ensuring accurate field capture for derivative calculations near boundaries.

Validation:
Results verified against finite-difference checks for all parameters and boolean operation types (attached).

Screenshot 2025-05-12 at 6 18 47 PM Screenshot 2025-05-12 at 6 19 14 PM Screenshot 2025-05-12 at 6 19 28 PM Screenshot 2025-05-12 at 6 20 02 PM Screenshot 2025-05-12 at 6 20 36 PM Screenshot 2025-05-12 at 6 20 49 PM Screenshot 2025-05-12 at 6 21 07 PM Screenshot 2025-05-12 at 6 21 23 PM Screenshot 2025-05-12 at 6 36 09 PM Screenshot 2025-05-12 at 6 22 23 PM Screenshot 2025-05-12 at 6 22 50 PM Screenshot 2025-05-12 at 6 34 19 PM

@rahul-flex rahul-flex requested a review from yaugenst-flex May 12, 2025 22:30
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant