Paper deep dive
Gen-Fab: A Variation-Aware Generative Model for Predicting Fabrication Variations in Nanophotonic Devices
Rambod Azimi, Yuri Grinberg, Dan-Xia Xu, Odile Liboiron-Ladouceur
Intelligence
Status: succeeded | Model: google/gemini-3.1-flash-lite-preview | Prompt: intel-v1 | Confidence: 96%
Last extracted: 3/22/2026, 6:24:25 AM
Summary
Gen-Fab is a conditional generative adversarial network (cGAN) based on the Pix2Pix architecture, designed to predict fabrication-induced variations in silicon photonic devices. By injecting a latent noise vector into the U-Net generator's bottleneck, Gen-Fab models the stochastic nature of fabrication processes (e.g., over-etching, corner rounding) to produce diverse, high-resolution SEM-like images from GDS design layouts, outperforming deterministic and ensemble-based U-Net baselines in accuracy and uncertainty modeling.
Entities (5)
Relation Signals (3)
Gen-Fab ā basedon ā Pix2Pix
confidence 100% Ā· Gen-Fab, a conditional generative adversarial network (cGAN) based on Pix2Pix
Gen-Fab ā outperforms ā U-Net
confidence 95% Ā· Gen-Fab outperforms all baselines in both accuracy and uncertainty modeling.
Gen-Fab ā trainedon ā ANT-NanoSOI
confidence 95% Ā· We utilize the ANT-NanoSOI dataset... to train our Gen-Fab model.
Cypher Suggestions (0)
No Cypher suggestions yet.
Abstract
Abstract:Silicon photonic devices often exhibit fabrication-induced variations such as over-etching, underetching, and corner rounding, which can significantly alter device performance. These variations are non-uniform and are influenced by feature size and shape. Accurate digital twins are therefore needed to predict the range of possible fabricated outcomes for a given design. In this paper, we introduce Gen-Fab, a conditional generative adversarial network (cGAN) based on Pix2Pix to predict and model uncertainty in photonic fabrication outcomes. The proposed method takes a design layout (in GDS format) as input and produces diverse high-resolution predictions similar to scanning electron microscope (SEM) images of fabricated devices, capturing the range of process variations at the nanometer scale. To enable one-to-many mapping, we inject a latent noise vector at the model bottleneck. We compare Gen-Fab against three baselines: (1) a deterministic U-Net predictor, (2) an inference-time Monte Carlo Dropout U-Net, and (3) an ensemble of varied U-Nets. Evaluations on an out-of-distribution dataset of fabricated photonic test structures demonstrate that Gen-Fab outperforms all baselines in both accuracy and uncertainty modeling. An additional distribution shift analysis further confirms its strong generalization to unseen fabrication geometries. Gen-Fab achieves the highest intersection-over-union (IoU) score of 89.8%, outperforming the deterministic U-Net (85.3%), the MC-Dropout U-Net (83.4%), and varying U-Nets (85.8%). It also better aligns with the distribution of real fabrication outcomes, achieving lower Kullback-Leibler divergence and Wasserstein distance.
Tags
Links
- Source: https://arxiv.org/abs/2603.11505v1
- Canonical: https://arxiv.org/abs/2603.11505v1
Trouble viewing inline? Open PDF directly ā
Full Text
63,448 characters extracted from source content.
Expand or collapse full text
Gen-Fab: A Variation-Aware Generative Model for Predicting Fabrication Variations in Nanophotonic Devices Rambod Azimi 1* , Yuri Grinberg 2 , Dan-Xia Xu 3 , Odile Liboiron-Ladouceur 1 1 Department of Electrical and Computer Engineering, McGill University, Montreal, QC, Canada. 2 Digital Technologies Research Center, National Research Council of Canada, Ottawa, ON, Canada. 3 Quantum and Nanotechnologies Research Center, National Research Council of Canada, Ottawa, ON, Canada. *Corresponding author(s). E-mail(s): rambod.azimi@mail.mcgill.ca; Abstract Silicon photonic devices often exhibit fabrication-induced variations such as over-etching, under- etching, and corner rounding, which can significantly alter device performance. These variations are nonuniform, influenced by feature size and shape. Accurate digital twins are needed to predict the range of possible fabricated outcomes for a given design. In this paper, we introduce Gen-Fab, a conditional generative adversarial network (cGAN) based on the Pix2Pix, to predict and model uncertainty in photonic fabrication outcomes. The proposed method takes a design layout (in GDS format) as input and produces diverse high-resolution predictions similar to scanning electron micro- scope (SEM) images of fabricated devices, capturing the range of process variations at the nanometer scale. To enable one-to-many mapping, we inject a latent noise vector at the modelās bottleneck. We compare Gen-Fab against three baselines: (1) a deterministic U-Net predictor, (2) an inference-time Monte Carlo Dropout U-Net, and (3) an ensemble of varied U-Nets. Evaluations on an out-of- distribution dataset of fabricated photonic test structures demonstrate that Gen-Fab outperforms all baselines in accuracy and uncertainty modeling, and an additional distribution-shift analysis confirms its strong generalization to unseen fabrication geometries. Gen-Fab achieves the highest intersection- over-union (IoU) score of 89.8%, outperforming the deterministic U-Net (85.3%), the MC-Dropout U-Net (83.4%), and Varying U-Nets (85.8%), and better aligns with the distribution of real fabrication outcomes, attaining lower KullbackāLeibler divergence and Wasserstein distance. Keywords: Silicon Photonics, Fabrication Process Variations, Generative Adversarial Networks (GANs), Scanning Electron Microscopy (SEM), Uncertainty Modeling in Digital Twins Note: This manuscript is a preprint of a paper accepted for publication in Structural and Mul- tidisciplinary Optimization. The final version of record is available at: https://doi.org/10.1007/ s00158-026-04272-3. 1 Introduction Silicon photonics is an emerging platform for integrating optical components on sili- con chips, enabling compact, energy-efficient, and high-speed photonic circuits. Applications 1 arXiv:2603.11505v1 [cs.CV] 12 Mar 2026 span data-center interconnects, LiDAR, quan- tum photonics, and biosensing. Devices are typ- ically fabricated using Complementary Metal- Oxide-Semiconductor (CMOS)-compatible pro- cesses involving lithography, etching, and material deposition (Sun et al. 2015; Dhote et al. 2022; Shekhar et al. 2024). Silicon photonic devices are sensitive to fabrication-induced deviations such as over-etching, under-etching, and corner rounding (Soref 2006; Gostimirovic et al. 2022, 2023; Azimi et al. 2025), which are caused by both systematic and stochastic effects during the involved processing steps (Han et al. 2019). These deviations are often spatially nonuniform and can degrade device performance while complicate design optimization. Traditional approaches such as statistical ācor- ner analysisā and conventional design rules are typically simplistic, lacking spatial resolution and failing to capture the complex, stochastic nature of real-world process variability (Piggott et al. 2017; Xing et al. 2023; James et al. 2023). Repeated fabrication of identical GDS layouts reveals some degree of variation in the resulting scanning elec- tron microscope (SEM) images (see Fig. 1), and quantitative measures such as Intersection-over- Union (IoU) heatmaps (Fig. 2) confirm that these differences are not negligible, thereby playing a key role in determining device-level variability. As a result, there is growing interest in develop- ing fabrication-aware digital twins that simulate a distribution of fabrication outcomes from a given layout, capturing both deterministic and stochastic aspects. Fromadigital-twinperspective,such fabrication-aware modeling aims to construct a virtual, data-driven replica of the physical man- ufacturing process that can predict and sample realistic fabrication outcomes under uncertainty. In this context, an effective fabrication digi- tal twin must be able to map an ideal design layout to a distribution of physically plausible manufactured realizations rather than a single deterministic prediction. This motivates the use of probabilistic, data-driven surrogate models capable of capturing both deterministic structure and stochastic process variability, marking an important stepping stone towards a full-fledged digital twin solution. Given the structured, image-based nature of both photonic GDS layouts and their fabricated counterparts (SEM), image-to-image translation using deep learning has emerged as a compelling approach. Prior work has used convolutional neu- ral networks (CNNs), particularly U-Net architec- tures (Ronneberger et al. 2015), to reconstruct SEM images from layout masks (Gostimirovic et al. 2022; Azimi et al. 2025). These determin- istic encoder-decoder models have demonstrated high pixel-level accuracy in capturing fabrication deviations such as missing features. However, they yield a single prediction for a given input, failing to reflect the distributional spread observed in actual fabrication processes (Akbari Asanjan et al. 2023). Among the methods proposed to address this limitation, ensemble learning has been shown to be one of the most robust and effective approaches for modeling uncertainty (Ovadia et al. 2019), and we adopt it as a strong baseline in our experi- ments. To further explore uncertainty modeling without retraining multiple networks, we addition- ally examine an inference-time Monte Carlo (MC) Dropout U-Net baseline (Gal and Ghahramani 2016), which applies dropout layers during both training and inference to produce stochastic pre- dictions from a single trained model. While this approach provides a Bayesian approximation of model uncertainty rather than data variability, its implementation is straightforward; therefore, it is included as another na Ģıve alternative. Our results show that its variability does not accurately reflect the physical diversity of real fabrication out- comes. Alternative approaches such as heuristic threshold-based variability estimation, which we also experimented with, similarly fail to capture the full range of fabrication-induced variations. Inthemeantime,probabilisticgenera- tive models such as variational autoencoders (VAEs) (Kingma and Welling 2022) and gener- ative adversarial networks (GANs) (Goodfellow et al. 2020) have gained popularity as tools that can be used to sample high-dimensional data points from some complex unknown distribution. Among those, conditional GANs (cGANs) (Mirza and Osindero 2014), particularly the Pix2Pix con- ditional GAN framework (Isola et al. 2017), offer a principled way to model fabrication deviations in an image-to-image translation setup. While the original Pix2Pix framework was deterministic, later extensions introduced stochastic condition- ing via injected latent noise vectors z (Naderi et al. 2 2022), making it well-suited for capturing the one-to-many mapping in fabrication outcomes. We chose a GAN-based conditional framework for this study. Our application involves paired high-resolution data (GDS layouts aligned to SEM images), a setting where conditional GANs such as Pix2Pix remain highly competitive due to their direct image-to-image mapping and relatively low training cost, which allows scaling of predic- tions to large layouts during inference. Moreover, leveraging a well-established Pix2Pix backbone enables clear comparison to prior photonic work and provides a transparent benchmark for future diffusion-based extensions. Although GANs can suffer from mode collapse or unstable training, our experiments show that careful noise injection, data augmentation, and hyperparameter tuning yield stable convergence and high-fidelity predic- tions in this domain. We therefore view cGAN as a practical and computationally efficient first step toward stochastic fabrication-aware modeling. In this work, we present Gen-Fab, a variation- aware cGAN trained to predict silicon photonic fabrication outcomes. Gen-Fab builds on the Pix2Pix architecture, which in its original formu- lation is a deterministic pixel-to-pixel translation model with no latent noise input. In contrast, while all GANs conceptually rely on a latent variable z for sampling diversity, the standard Pix2Pix omits this and produces a single out- put per input. We explicitly reintroduce a latent noise vector z at the generatorās bottleneck to enable stochastic generation of multiple SEM-like images from a single GDS input (we will refer to these outputs as āgenerated SEMsā or simply as āSEMsā). This placement improves structural fidelity while maintaining diversity in the outputs. From a digital-twin standpoint, Gen-Fab can serve as a core functionality of a generative digital twin of the nanophotonic fabrication process. We benchmark Gen-Fab against three base- lines: (1) a deterministic U-Net model, (2) an inference-time MC-Dropout U-Net, and (3) an ensemble of varied U-Nets (Varying U-Nets) intended to approximate fabrication variation. Our evaluation considers several distribution-level metrics, our own pixel-based metric as well as standard ones such as Kullback-Leibler divergence (KL-D) and Wasserstein distance (W-D), to assess model fidelity and uncertainty modeling (Bai et al. Fig. 1 Overlay of SEM images from repeated fabri- cations of the same photonic cross design. Although each fabricated structure used the same GDS file layout, visible differences emerge in edge sharpness and arm geom- etry, indicated in red. 2019; Li and Farnia 2023). We conducted experi- ments on a curated dataset comprising GDS-SEM pairs across six types of nominal nanophotonic structures fabricated under identical conditions. To further validate model robustness, we also ana- lyzed the feature-space distribution shift between the training and out-of-distribution (OOD) test sets, confirming that our evaluation reflects gen- uine generalization rather than dataset overlap. Our proposed model attained noticeably improved scores on all metrics across all presented structures and better models the observed fabrication vari- ability based on further qualitative assessment. These results establish Gen-Fab as a practical tool for variation-aware prediction, with imme- diate applications in robust photonic design and digital twin development. 2 Methodology 2.1 Conditional Generative Modeling Approach We formulate fabrication variation prediction as a conditional generative modeling task. Instead of a deterministic one-to-one mapping from layout to fabricated outcome, we seek to learn a distribu- tion of possible outcomes P (Y|X) given a design X. To achieve this, we build upon the Pix2Pix conditional GAN framework (Mirza and Osindero 3 Fig. 2 IoU similarity heatmap of SEM images from four fabricated crosses. Each cell shows the IoU score between pairs of SEM images from four devices fabricated from the same layout. 2014; Isola et al. 2017), which couples a generator G and discriminator D in an adversarial training process. The generator G learns to translate an input GDS layout into an output predicted SEM that is aimed to be indistinguishable from a real fabricated result, while D learns to differentiate real vs. generated SEM images. Unlike the original Pix2Pix framework, which omits a latent variable for deterministic image translation, Gen-Fab reintroduces a stochastic latent code z at the bottleneck layer of the U-Net generator, enabling multiple plausible fabrication outcomes to be sampled for a given input layout. 2.2 Gen-Fab Architecture with Noise Injection The proposed Gen-Fab model extends the Pix2Pix architecture to enable variation-aware prediction. Fig. 3 provides an overview of this architec- ture. The generator G follows a U-Net style encoderādecoder with skip connections, mapping an input layout image X to an output SEM image Ė Y . The encoder first processes the input design X through a series of convolutional downsampling layers, yielding a coarse feature representation at the bottleneck. At this point, the d-dimensional noise z is spatially expanded to match the bot- tleneck feature map dimensions by tiling it across height and width. This forms an augmented bot- tleneck feature that carries both deterministic layout-conditioned features and stochastic latent information. The decoder then processes this com- bined feature map, mapping it back up through a series of convolutional upsampling layers to produce an image output. As a result, Gen-Fab generates a distribution of outputs Ė Y for a sin- gle input X by sampling different z, effectively capturing real-world fabrication variations. The discriminator D uses the PatchGAN architecture from Pix2Pix (Demir and Unal 2018). Instead of evaluating the entire image, it processes small 70Ć 70 pixel patches from the inputāoutput pair and judges whether each patch resembles a realistic fabrication result. The overall Gen-Fab architecture thus consists of: (1) a U-Net generator G(X,z) producing diverse SEM-like predictions, and (2) a conditional PatchGAN discriminator D distinguishing real from fake outcomes. 2.3 Training Objectives Training Gen-Fab combines of adversarial and reconstruction objectives to balance realism and fidelity. Let X be the input layout, Y the corre- sponding true SEM image from fabrication, and z the latent noise vector. The discriminator max- imizes the log-likelihood of correctly classifying real versus fake pairs, following the conditional GAN objective (Isola et al. 2017): L D =āE X,Y [logD(X,Y )] āE X,z [log(1ā D(X,G(X,z)))] , (1) where D(X,Y ) is the discriminatorās estimated probability that (X,Y ) is a real layout-SEM pair. Meanwhile, the generatorās adversarial loss L GAN can be written as L GAN (G) =āE X,z [logD(X,G(X,z))] ,(2) which encourages G to generate outputs that D will judge as real. In addition, we include an L 1 reconstruction loss written as L L1 (G) =E X,Y,z [ ā„Y ā G(X,z)ā„ 1 ] (3) 4 Fig. 3 Overview of the Gen-Fab architecture with a noise-injected generator. Top: Generator. The model receives a GDS layout and a latent noise vector injected into the bottleneck, enabling it to produce diverse SEM outputs from the same input. Bottom: Discriminator. The PatchGAN discriminator takes the input GDS and corresponding SEM (real or generated) and evaluates 70Ć 70 pixel patches to ensure outputs are locally indistinguishable from real SEMs. that penalizes pixel-level errors between the gen- erated image and the ground truth. We weight this term with a hyperparameter Ī» to balance sharp- ness vs. fidelity. Following the original Pix2Pix implementation (Isola et al. 2017), we set the weighting parameter Ī» = 100 to emphasize recon- struction fidelity while still allowing the adver- sarial loss to sharpen details. This value has been widely adopted in image-to-image transla- tion tasks because it balances the adversarial and pixel-level losses, producing outputs that are both structurally accurate and visually realistic. In our preliminary experiments, smaller Ī» values (10 or 50) led to blurrier reconstructions, while larger values suppressed stochastic diversity. The total objective for the generator is thus a weighted sum of adversarial and reconstruction terms: L G =L GAN (G) + Ī»L L1 (G)(4) which G attempts to minimize. This two-player minimax game is solved via alternating optimiza- tion of G and D. The adversarial component L GAN guides G to match the distribution of real SEM images, while the L 1 term ensures that the main device features in Ė Y = G(X,z) align with those in the true SEM Y . By injecting random z during training, the generator learns that it must pro- duce an output that not only fools D and matches Y (for the current z) but also that it has the flexibility to yield different valid Y for different z. 2.4 Training Procedure We train Gen-Fab using the Adam opti- mizer (Kingma and Ba 2015), a stochastic gradi- entābased method with mini-batch updates. Algo- rithm 1 outlines the training procedure. At each iteration, a batch of paired samples (X i ,Y i ) is fetched from the training set, and a random latent vector z i is sampled for each. The generator pro- duces Ė Y i = G(X i ,z i ), a fake SEM image for each input layout. The discriminator is then updated by comparing real pairs (X i ,Y i ) with fake pairs (X i , Ė Y i ). We compute the discriminator loss L D and take a gradient step on Dās parameters Īø D to improve realāfake discrimination. Next, the gener- ator is updated: we compute the generatorās loss 5 Fig. 4 Overview of Gen-Fabās generation and evaluation pipeline. Top: Generation Process. The Gen-Fab generator takes a GDS input and multiple noise vectors to produce a diverse SEM predictions, while the discriminator is discarded after training. Bottom: Evaluation Process. Generated SEMs are compared with real SEMs using pixel-level metrics (IoU, variance map) and distribution-level metrics (KL-D and W-D). L G , which includes the adversarial term and the L 1 term. After sufficient training steps, this proce- dure yields a generator that can produce a range of realistic outputs for each input layout. During training, the noise vector z is resam- pled on every iteration for every training example. This means the generator is trained across many different z values over the course of training, preventing it from simply learning a fixed deter- ministic mapping. This training process allows the generator to utilize the noise input to produce sub- tly different outcomes, reflecting the fabrication- induced variability, while the overall device shape remains consistent with the input layout. 2.5 Implementation and Training Details We implemented Gen-Fab using the PyTorch deep learning framework (Paszke et al. 2019). The U-Net generator architecture has eight downsam- pling/upsampling layers with skip connections at corresponding resolutions. Instance normaliza- tion (Ulyanov et al. 2017) is applied to convo- lutional layers in both G and D, which helped training converge on our relatively small dataset. The PatchGAN discriminator has five convolu- tional layers with increasing feature counts (64, 128, 256, 512, 512) and a final 1Ć 1 convolution to produce the output map; it uses leaky ReLU activations (Xu et al. 2015) and no normalization 6 Algorithm 1 Gen-Fab Training Procedure Require: Paired data(X i ,Y i ) N i=1 , noise dim d, weights Ī» GAN =1, Ī» L1 =100, iterations T Initialize generator parameters Īø G , discrimina- tor parameters Īø D for t = 1 to T do Sample m pairs(X j ,Y j ) from training set Sample z j ā¼N (0,I) for j = 1,...,m Generate Ė Y j = G(X j ,z j ) Compute L D =āE[logD(X,Y )]āE[log(1ā D(X,G(X,z)))] Update Īø D using Adam optimizer: Īø D ā Īø D ā Ī· D ā Īø D L D Compute L GAN =āE[logD(X,G(X,z))] Compute L L1 =E[ā„Y ā G(X,z)ā„ 1 ] Compute L G =L GAN + Ī» L1 L L1 Update Īø G using Adam optimizer: Īø G ā Īø G ā Ī· G ā Īø G L G end for Note: Parameter updates are written in simpli- fied gradient-descent form for clarity; in prac- tice, Adam (Kingma and Ba 2015) with default moment estimates and bias correction is used. in order to preserve signal diversity. For opti- mization, we used the Adam optimizer (Kingma and Ba 2015) for both G and D with learning rate ,Ī· G = Ī· D = 2 Ć 10 ā4 . Following common GAN practice, we set momentum terms β 1 = 0.5, β 2 = 0.999 to stabilize training. The latent noise dimension d is a tunable hyperparameter. We set d = 16 based on preliminary experiments, balanc- ing diversity and stability. Larger d led to unstable training, while smaller d limited stochastic expres- siveness. All models were trained on 2048Ć 2048 pixel patches with a mini-batch size of 4. This batch size was selected to balance GPU memory constraints with stable gradient estimates; pre- liminary tests with smaller batches showed no measurable improvement in convergence or gen- eralization. All models were trained on a single NVIDIA RTX 4090 GPU (24 GB VRAM), with an average end-to-end training time of approximately 50 minutes per configuration. Fig. 5 Paired examples of GDS layouts and their fabricated SEM used for training. (a) Input GDS design (ground-truth). (b) SEM of the fabricated struc- tures, showing deviations due to the fabrication process. 2.6 Inference (Generation) Process Once trained, the Gen-Fab generator is used to produce multiple outputs for each new input lay- out. The discriminator is discarded at inference. To generate a set of M possible fabricated out- comes for a given design X, we simply sample M independent noise vectors z (1) ,z (2) ,...,z (M ) from the latent distribution and feed them through the generator: Ė Y (m) = G(X,z (m) ) for m = 1,...,M . This yields M SEM-like predictions for the sin- gle input layout. The multiple outputs can be analyzed to quantify uncertainty and compared against actual fabricated samples. The full gener- ation pipeline is illustrated in Fig. 4. 3 Experimental Results and Analysis 3.1 Experiment Setup 3.1.1 Train Dataset We utilize the ANT-NanoSOI dataset, devel- oped in collaboration with Applied Nanotools 7 Inc. (ANT) 1 , to train our Gen-Fab model. The patterns were fabricated on a 220 nm-thick silicon- on-insulator (SOI) platform using electron-beam lithography through a multi-project wafer service. The dataset consists of non-functional patterns designed to mimic the structural characteristics of real photonic devices, in particular includ- ing free-form inverse designed structures (Molesky et al. 2018). Building on the approach of Gos- timirovic et al. (Gostimirovic et al. 2022), we generate these random patterns using a Fourier- based procedural approach, where the underlying spatial frequency components are sampled from uniform and Gaussian distributions to emulate diverse geometric textures and spatial variations. By controlling parameters such as feature width, bend radius, and spatial frequency in the fre- quency domain, we can synthesize a wide range of randomized yet physically plausible patterns. Additional spatial-domain operations, including low-pass and band-pass filtering, are applied to vary feature sizes and curvatures, while ran- dom perturbations such as edge roughness, corner rounding, and placement jitter further introduce process-like variability. This method enables the generation of complex, non-repetitive geometries resembling the stochastic variability seen in fabri- cated nanophotonic structures, without being tied to specific device types such as Y-branches or photonic crystals. The resulting dataset provides diverse geometric motifs that allow the model to learn how fabrication imperfections manifested across varying spatial frequencies and structural complexities. Following fabrication, scanning elec- tron microscopy (SEM) images were captured at a resolution of 1 nm/pixel. Each GDS design lay- out was aligned with its corresponding SEM image to form high-quality training pairs. Each image is 2048Ć 2048 pixels in size. The original dataset consists of 31 paired GDSāSEM images. To improve model per- formance and training stability, several pre- processing steps were applied. First, data augmen- tation was performed by rotating each image by 90 ⦠, 180 ⦠, and 270 ⦠, increasing the dataset size to 124 pairs. Unlike conventional patch-based meth- ods, no downsampling or cropping was applied. Hence, each image was used at its full resolution of 2048Ć 2048 pixels to preserve fine structural 1 https://w.appliednt.com/nanosoi-fabrication-service/ Fig. 6 Evaluation Structures Used for Model Test- ing. We evaluate our model on six nominal GDS layouts, unseen during training. These include three cross-shaped designs, a square, and two target-like structures. The numeric suffix (25, 50, 100) indicates the arms width in nanometers. Each layout occupies a 200nmĆ200nm region. and edge-level details critical for photonic device analysis. Gen-Fab was trained directly on these full-resolution image pairs using a small batch size and mixed-precision training to efficiently manage GPU memory while maintaining spatial fidelity. The discriminator followed the standard 70Ć 70 PatchGAN configuration (Isola et al. 2017) to evaluate the realism of local image patches across the entire image. This patch-level discrimination enforces high-frequency consistency without con- straining the global image size, allowing the gen- erator to model both local fabrication variations and global structural integrity. Prior to train- ing, the dataset was randomly shuffled to prevent any ordering bias introduced during image collec- tion or augmentation. Representative examples of the aligned GDS layouts and their corresponding fabricated SEM images are shown in Fig. 5. 8 3.1.2 Evaluation Dataset To evaluate our model, we use a distinct set of six nominal test structures that were nei- ther included during training nor drawn from the training distribution. These structures consist of Cross-25, Cross-50, Cross-100, Square, Target-50, and Target-100. Each test structure is a 200 nmĆ 200 nm design composed of geometric primitives that vary in size and layout complexity. The choice of these structures serves two purposes simultane- ously, first is demonstrating generalization beyond the training distribution, and second to allow easier qualitative model assessment. The Cross structures vary by arm width: Cross-25 has arms 25 nm wide, Cross-50 has 50 nm wide arms, and Cross-100 has 100 nm wide arms. The Target structures are similarly defined by cross arm width of 50 nm and 100 nm, respec- tively. Each test structure includes 35 repeated fabricated SEM images. All six structures used for evaluation are shown in Fig. 6. 3.1.3 Baseline Models To benchmark our proposed approach, we com- pare Gen-Fab against three baseline models: a standard U-Net (Ronneberger et al. 2015), an inference-time Monte Carlo (MC) Dropout U- Net (Gal and Ghahramani 2016), and an ensemble of varied U-Nets (Khoong 2020). U-Net. The conventional U-Net serves as a deterministic baseline model, trained on the same augmented dataset using paired GDSāSEM images (Gostimirovic et al. 2022; Azimi et al. 2025). It follows the standard encoderādecoder architecture with skip connections. Once trained, the U-Net produces a single output per input, without accounting for fabrication variability. MC-Dropout U-Net. To incorporate uncer- tainty without retraining multiple networks, we extend the deterministic U-Net by enabling dropout layers during both training and infer- ence following the Monte Carlo (MC) Dropout approach (Gal and Ghahramani 2016). During testing, the model is evaluated with dropout active, introducing stochastic feature masking that yields a different prediction at each for- ward pass. For each input layout, we perform 35 stochastic forward passes, resulting in 35 dis- tinct predictions per sample. This technique is used to approximate Bayesian model uncertainty while keeping the overall architecture and train- ing procedure identical to the deterministic U-Net. The number of stochastic forward passes was chosen to match the number of available fabri- cated SEM instances per test structure, enabling a fair distribution-level comparison. The optimal dropout rate was determined through a grid search over multiple values, with 0.1 yielding the best balance between output diversity and prediction stability. Varying U-Nets. To mimic model variability, we also evaluate an ensemble of varied U-Net mod- els trained independently with different random initializations and data shuffling. Each indepen- dent model is used to produce an independent prediction, representing a different fabrication instance. In our experiments, the ensemble con- sists of 35 independently trained U-Net models. This number was chosen to match the dataset structure: for each GDS layout in the evaluation set we have 35 fabricated SEM images. Train- ing 35 separate U-Nets with identical architecture but different random seeds allows us to gener- ate 35 distinct predictions per layout, enabling a direct one-to-one comparison with the 35 real SEMs for each structure. This setup provides a realistic upper bound for the diversity achievable with deterministic models. 3.2 Evaluation Metrics We evaluate our model using different metrics that compare distributions. First, we design our own pixel-level based metric, which captures how well individual predictions match ground-truth outcomes across two sets of images. Second, we compare sets of images using proper metrics that measure distance between distributions. For deter- ministic baselines like a single U-Net, which pro- duce only one output per input, we aggregate predictions across a test set to form an empir- ical distribution, allowing for a fair comparison. All metrics reflect the modelās ability to reproduce the fabrication variability observed across multiple fabricated instances of different structures. Intersection over Union (IoU). IoU, expressed as a percentage (%), quantifies the pixel-wise overlap between the predicted SEM output and the ground-truth SEM image. It is computed as shown in Eq. (5) with each pixel 9 treated as a binary variable; hence higher IoU val- ues indicate that the model closely reconstructs the true geometry of the fabricated structure. IoU = |Aā© B| |AāŖ B| = |Aā© B| |A| +|B|ā|Aā© B| (5) While the IoU metric is applied to two indi- vidual images, we extend it to comparing two sets of images using pair-wise comparisons, each image taken from a respective set. For that pur- pose, two matching strategies are proposed and evaluated. Random matching computes the IoU between a randomly selected prediction (first set) and the ground-truth SEM (second set), simulat- ing a na Ģıve sample from the modelās distribution. In contrast, Greedy matching selects the best match among multiple predictions by choosing the one with the highest IoU to the ground-truth. KullbackāLeibler Divergence (KL-D). KL-D measures how one probability distribution diverges from a reference distribution. In our case, we compute D KL (real ā„ model), evaluating how well the distribution of SEM-like images generated by the model approximates the true distribution of real SEM images of fabricated devices. Formally, given two discrete probability distributions P and Q, the KL-D is computed as: KL(Pā„Q) = X i P (i) log P (i) Q(i) ,(6) where the sum runs over all pixel intensity bins. To compute KL-D, we treat each set of images as a probability distribution by first aver- aging them pixel-wise across the set, which results in a grayscale image where each pixel reflects the probability of being active rather than a binary value. This averaged image is then converted into a normalized histogram of pixel intensities, forming a discrete probability distribution over grayscale values. The KL-D is then computed between these histograms. Wasserstein Distance (W-D). Also known as Earth Moverās Distance (EMD), W-D quanti- fies dissimilarity between two probability distribu- tions by measuring the minimum work needed to transform one distribution into the other. Formally, for two discrete probability distribu- tions P and Q over a metric space with distance function d(x,y), the first-order W-D is defined as: W (P,Q) =inf γāĪ (P,Q) E (x,y)ā¼Ī³ [d(x,y)],(7) where Ī (P,Q) is the set of all joint distri- butions γ(x,y) whose marginals are P and Q. Similarly to the KL-D, we first convert each set of SEM images (real or generated) into a normal- ized histogram of pixel intensities, treating each histogram as a discrete probability distribution. Then, for each nominal structure, we calculate the pairwise W-D between every generated and real histogram, and report the average as the final met- ric. As with KL-D, lower values indicate better distributional alignment. 3.3 Quantitative Results 3.3.1 IoU-Based Distribution Comparison Table 1 summarizes the IoU scores (%) of models across the evaluation set, along with their aver- ages. It can be observed that the IoU values are correlated with the structure size and complex- ity. Smaller features (e.g. Cross-25, Target-50) are reproduced with lower fidelity as compared to the larger or simpler features (Cross-100, Square), as expected in fabrication. For all these cases, the Gen-Fab model consistently achieves the high- est IoU across all structure types. In particu- lar, the Gen-Fab model with Greedy matching attains the best performance, achieving an over- all IoU of 89.8%, outperforming the next best method, Varying U-Nets with Greedy matching (85.8%). This advantage is consistently reflected across individual categories. The MC-Dropout U- Net baseline shows lower overall IoU values of 80.7% (Random) and 83.4% (Greedy), below both the deterministic U-Net (85.3%) and Varying U- Nets (85.2% Random, 85.8% Greedy), suggesting that dropout-based stochasticity fails to capture structural variability effectively. Notably, even under the Random matching, Gen-Fab achieves an IoU of 88.7%, outperforming the deterministic U-Net (85.3%), the MC-Dropout U-Net (80.7% Random, 83.4% Greedy), and the Varying U-Nets (85.2% Random, 85.8% Greedy). 10 Table 1 IoU-based distribution scores (%) for different model types and matching strategies across test structures Model TypeMatching TypeC25C50C100SquareT50T100Average IoU U-Net-75.681.393.392.783.485.585.3 MC-Dropout U-NetRandom72.881.084.687.383.075.380.7 Varying U-NetsRandom75.982.992.092.485.083.185.2 Gen-FabRandom78.287.394.394.490.487.688.7 MC-Dropout U-NetGreedy76.384.485.990.085.178.783.4 Varying U-NetsGreedy77.183.292.392.785.584.085.8 Gen-FabGreedy80.287.794.896.290.689.189.8 3.3.2 Distributional Fidelity (KL-D and W-D) We evaluate the alignment between predicted out- puts and real SEM image distributions using two statistical metrics, KL-D and W-D, as shown in Table 2. Lower values indicate better alignment with the true distribution of fabricated outcomes. The results reveal a similar trend to the IoU- based metric: the Gen-Fab model consistently achieves the lowest KL-D and W-D across all structure types, often by a large margin. For example, in the Cross-25, Gen-Fab achieves a KL-D of 0.2657 compared to 0.9471 for the Vary- ing U-Nets. Similar reductions are observed for Cross-50 (0.6949 vs. 0.8150) and Target-50 (0.2335 vs. 0.5339). In contrast, the MC-Dropout U-Net exhibits substantially higher divergence values across all structures (e.g., KL-D of 2.5754 on Cross-25 and 2.9397 on Target-100), indicating that dropout-induced stochasticity does not align with the true fabrication distribution, which is expected since dropout models epistemic (model) uncertainty rather than aleatoric (data) uncer- tainty (Gal and Ghahramani 2016). The same trend holds for W-D: Gen-Fab achieves the lowest W-D in every case (0.1693 on Cross-25 vs. 0.1831 for Varying U-Nets). 3.3.3 Hyperparameter Study of Gen-Fab Configurations We train Gen-Fab using multiple configurations that differ in three main aspects: data augmen- tation, latent space dimensionality (16ā128), and number of training steps (5kā20k). Notably, 9 out of the 10 best models employed data augmentation, demonstrating that exposing the model to augmented structures enhances its robustness. The highest-performing model (88.7% IoU) used augmentation, a latent dimension of 16, and 10k training steps. Overall, moderate latent dimensions (16ā64) with augmentation yield consistently high IoUs, especially with sufficient training. Larger latent dimensions do not outperform smaller ones, sug- gesting diminishing returns beyond a certain size. These results indicate that controlled stochas- ticity, introduced through data augmentation and a well-sized latent space, is a key factor in Gen-Fabās success. Additionally, sufficient train- ing duration remains essential for convergence and performance stability. 3.4 Qualitative Results To complement our quantitative evaluations, we qualitatively compare the outputs of each model against real SEM images to assess visual realism and structural fidelity. This analysis is particularly important given that our test geometries were intentionally chosen to differ significantly from the training dataset, both to evaluate generaliza- tion and to enable meaningful visual comparisons beyond familiar patterns. Fig. 8 presents side-by- side examples for each of the six test structures. For each design, we show the input GDS, the real SEM, and the predicted outputs from both the Varying U-Nets and Gen-Fab, annotated with their IoU scores based on Greedy matching. The U-Net predictions appear overly smooth, lacking the subtle edge roughness, asymmetry, and pattern deformations visible in the real SEM images. This is expected from a deterministic model trained to minimize pixel-wise losses, which tend to average out stochastic variations, resulting in overly symmetric predictions. By contrast, the Gen-Fab model produces out- puts that more closely resemble real SEMs. Its 11 Table 2 Comparison of KL-D and W-D between predicted and real SEM distributions across different model types Structure KL-Divergence āWasserstein Distance ā MC U-NetVarying U-NetsGen-FabMC U-NetVarying U-NetsGen-Fab Cross-252.57540.94710.26570.30100.18310.1693 Cross-501.69900.81500.69490.18030.14980.0980 Cross-1001.45700.19390.18590.15010.06920.0536 Square1.21880.27110.12770.12520.06730.0542 Target-501.45430.53390.23350.16330.12810.1249 Target-1002.93970.42300.29820.28720.13220.1172 Fig. 7 Variance maps of fabricated and predicted SEM outputs for the Cross-50. Variance maps for Cross-50 show how Gen-Fab, MC-Dropout U-Net, and Varying U-Nets capture edge variations, calculated over 35 real and 35 generated samples per model. Gen-Fab most closely reflects real SEM variability, whereas the MC- Dropout U-Net exhibits weaker variance and and Varying U-Nets exhibit overestimated variability. predictions exhibit minor geometric irregularities, such as asymmetrical arm thickness and edge per- turbations that mimic fabrication imperfections observed in every structure. Fig. 7 further highlights these distinctions by visualizing pixel-wise variance across multi- ple outputs from each model for the Cross-50 structure. The real SEM variance map shows vari- ation concentrated along structure edges. The U-Net exhibits no variance across outputs, as it is deterministic by design. The MC-Dropout U-Net shows degraded generalization performance, as the smaller cross features are not well captured com- pared to Gen-Fab. The Varying U-Nets introduces exaggerated variations, while Gen-Fabās variance pattern closely matches the real SEM data. These visualizations show that while MC- Dropout U-Net and Varying U-Nets reproduce the nominal shape, they struggle to reflect fabrication- induced randomness accurately. Gen-Fab, on the other hand, generates both structurally accurate and visually realistic SEM predictions. 3.5 Distribution Shift Analysis To quantify the domain gap between the training and OOD test sets, we conducted a feature-space distribution analysis based on pretrained convolu- tional embeddings. Specifically, images from both domains were passed through a VGG16 feature extractor pretrained on ImageNet, and the result- ing embeddings were used to characterize each distribution. We employed two complementary metrics: (1) the Fr Ģechet Distance (FD), which measures the divergence between the mean and covariance of the two feature distributions (Heusel et al. 2017), and (2) a two-dimensional t-SNE projection for qualitative visualization (van der Maaten and Hinton 2008). As shown in Fig. 9, the t-SNE embedding reveals a clear separation between the training and test domains. Quantitatively, the computed FD between the training and test distri- butions is 7265.92. For reference, the FD between two random splits of the training set is 1912.6, and between two random splits of the test set is 1265.61, confirming that the inter-domain shift 12 Fig. 8 Qualitative comparison of Varying U-Nets and Gen-Fab predictions across six evaluation structures. Each sub-panel shows the input GDS, corresponding real SEM, and predicted outputs from Varying U-Nets and Gen-Fab. IoU scores (%) for each model are reported. Gen-Fab consistently achieves higher IoU than Varying U-Nets, indicating closer alignment with actual fabricated outcomes. is significantly larger than intra-domain variabil- ity. Hence, the chosen test structures represent a meaningful yet realistic shift in the underlying fab- rication space, suitable for evaluating the modelās generalization capability to unseen geometries. 3.6 Epistemic vs. Aleatoric Uncertainty in Gen-Fab The variability observed across repeated SEM images, as shown in Fig. 7 (top-left), reflects aleatoric (data) uncertainty, which represents the inherent randomness of the fabrication process itself arising from stochastic lithography, etching, and imaging effects. Gen-Fab models this form of uncertainty by sampling different latent noise vec- tors z, each representing one realization of the fabrication outcome Y for a given layout X. In contrast, epistemic (model) uncertainty originates from the imperfectly estimated model parameters Īø due to limited training data. To quantify this component, we extended our uncertainty estima- tion using an ensemble-based approach following the law of total variance: Var Īø,z (Y|X) =E Īø [ Var z (Y|X,Īø) ] +Var Īø ( E z [Y|X,Īø] ) , where the first term represents the expected data-dependent (aleatoric) variance across latent realizations, and the second term captures model- dependent (epistemic) variance across indepen- dently trained Gen-Fab networks. In practice, five separate Gen-Fab instances G Īø k 5 k=1 were trained with different random initializations and data shuffling, each evaluated using 35 latent noise vectors z i ā¼N (0,I). For each model, the per-pixel mean prediction μ k (X) and intra-model variance Ļ 2 k (X) were computed, and ensemble statistics were aggregated as: 13 Fig. 9 Feature-space distribution shift between the train- ing and OOD test sets, visualized via t-SNE projection. The OOD test samples were intentionally selected to differ from the training distribution to evaluate the modelās gen- eralization ability. Ģ Ī¼(X) = 1 K X k μ k (X), Ļ 2 aleatoric (X) = 1 K X k Ļ 2 k (X), Ļ 2 epistemic (X) = 1 K X k μ k (X)ā Ģ Ī¼(X) 2 . (8) As shown in Fig. 10, the aleatoric variance is concentrated along feature boundaries, con- sistent with real fabrication-induced edge devia- tions, while the epistemic variance is noticeably smaller, suggesting high inter-model consistency. This result indicates that the primary source of predictive uncertainty arises from the stochastic fabrication process itself rather than model insta- bility, confirming that Gen-Fab provides reliable predictions. 3.7 Discussion and Implications 3.7.1 Effectiveness of Conditional Generative Modeling Gen-Fabās advantage stems from its cGAN frame- work, which contrasts with deterministic models like U-Net. While U-Nets minimize pixel-wise loss to a fixed ground-truth, Gen-Fab learns a conditional distribution by introducing a latent noise vector z and training against a discrimi- nator that enforces realism. This yields sharper and more realistic SEM predictions with diversity reflective of true fabrication variability. From a digital-twin standpoint, this distinction is critical: deterministic predictors correspond to single-state approximations of the physical process, whereas Gen-Fab enables a stochastic digital twin capa- ble of mimicking a real fabrication process by producing multiple plausible realizations of it. Empirically, Gen-Fab outperforms U-Net, MC- Dropout U-Net, and Varying U-Nets across all established pixel-wise and distributional metrics. Unlike MC-Dropout U-Net and Varying U-Nets that approximate variation, Gen-Fab directly learns and samples from the fabrication processās underlying stochasticity. 3.7.2 Accuracy vs. Variation Trade-offs A key concern in generative modeling is balancing fidelity and diversity, avoiding the so-called mode collapse while producing accurate samples (Sri- vastava et al. 2017; Bau et al. 2019). Our results show Gen-Fab achieves this trade-off effectively. Notably, even under random matching, the Gen- Fab model outperforms the U-Net baseline under greedy matching (88.7% vs. 85.3%), indicating that both fidelity and diversity are improved. If output diversity were excessive, the random- match IoU would degrade. Model hyperparameter tuning helps achieve the best balance. Moderate latent sizes (16ā64) perform best, likely due to better diversity control and discriminator stabil- ity. Top models also leverage data augmentation and sufficient training duration (10kā20k steps). 3.7.3 Implications for Robust Photonic Design Modeling fabrication variability has immediate applications in design-for-manufacturability and optimization. Designers can sample multiple out- puts from Gen-Fab for a given GDS input, analyze critical dimension statistics, or simulate perfor- mance yield. This supports robust design strate- gies based on expected value, variance reduction, or percentile-based constraints. Within a digital-twin framework, such capabil- ities support virtual experimentation and Monte Carloāstyle analysis prior to fabrication, allowing design robustness to be assessed directly on the twin rather than through repeated physical runs. The low KL-D and W-D (Table 2) affirm that 14 Fig. 10 Aleatoric, epistemic, and total variance decomposition for Gen-Fab. Variance maps for a Cross-50 structure illustrate the uncertainty decomposition using five independently trained Gen-Fab models and 35 latent noise samples per model. The aleatoric variance (left) dominates along the structural edges, whereas the epistemic variance (center) remains comparatively low. The total variance (right) is therefore largely determined by aleatoric effects, confirming that Gen-Fab effectively captures fabrication-induced variability while maintaining low model uncertainty. Gen-Fabās outputs are statistically aligned with true SEM distributions, a prerequisite for reliable digital-twin deployment. This fidelity is critical for identifying edge-case failures such as waveguide narrowing or hole collapse (Gostimirovic et al. 2023; Xu et al. 2023). Integrating such genera- tive models into photonic CAD tools could enable automated digital-twin-driven optimization loops, where robustness is evaluated over Monte-Carlo sampled geometries rather than idealized layouts or corner cases (Xu et al. 2024; Ma et al. 2025). 4 Conclusion and Future Work In this work, we presented Gen-Fab, a condi- tional generative model for predicting and analyz- ing fabrication-induced variations in nanophotonic devices. By introducing a latent noise vector into the Pix2Pix framework, our model captures the one-to-many nature of the fabrication process, generating diverse and realistic SEM predictions from a single layout design. From a digital-twin perspective, Gen-Fab enables a true fabrication- level digital twin that bridges photonic design layouts and manufactured outcomes through a fast, data-driven surrogate model. Future work will focus on close integration of GenFab with the fabrication facility to enable continuous model updates offering both up-to-date model for design purposes as well as tracking and identification of process drifts. We demonstrated that Gen- Fab significantly outperforms deterministic, MC- Dropout, and ensemble-based baselines in both accuracy and uncertainty modeling, achieving higher IoU scores and lower distributional diver- gence from real fabrication data. Furthermore, a distribution-shift analysis between the training and out-of-distribution (OOD) test sets confirmed that Gen-Fab maintains its predictive fidelity under realistic domain shifts, validating its gen- eralization capability across unseen fabrication geometries. Future work will focus on applying Gen-Fab to robust inverse design pipelines, where the model can be used to simulate a distribution of fabrica- tion outcomes and guide the design of layouts that are not only performant in ideal conditions but also resilient to process variability. The outputs from Gen-Fab can also be directly integrated into photonic simulation tools for quantitative analy- sis. Because Gen-Fab produces binary SEM-like predictions aligned to the original layout, these outputs can be readily converted into polygonal geometries compatible with standard electronic design automation formatting such as GDSII, as well as electromagnetic and circuit-level simula- tors (e.g., Ansys Lumerical), enabling subsequent statistical geometric and optical performance eval- uation under realistic process variations. In future work, Gen-Fab could be embed- ded within automated inverse-design or optimiza- tion pipelines to provide fabrication-aware feed- back during layout generation, closing the loop between design, simulation, and manufacturabil- ity. Extending the model to handle more com- plex photonic components, multilayer fabrication 15 stacks, and broader design spaces will enhance its generalizability. Future research will focus on investigation of alternative generative frameworks such as diffusion models (Ho et al. 2020; Rom- bach et al. 2022), normalizing flows (Rezende and Mohamed 2016; Papamakarios et al. 2021), and style-based GANs (Karras et al. 2021), which may offer improved controllability, stability, and diversity for fabrication-aware design. A further direction for future work is to inte- grate the interpretability into the Gen-Fabās latent space, allowing to control distinct aspects of fab- rication variability such as corner rounding or gap-filling independently. Acknowledgements. We gratefully acknowledge Applied Nanotools Inc. for their support in providing high quality SEM data used in this study. AuthorsContributions. Conceptualization: RA, YG; methodology: RA, YG, implementation: RA; experiments: RA, original draft: RA; manuscript review and editing: all authors. Funding. This work is supported by the National Research Council Canada Challenge Programs AI for Design (Grant AI4D-144). Data Availability. The data that support the findings of this study are available from the corre- sponding author upon reasonable request. Declarations Conflict of Interest. The authors declare that they have no conflict of interest. Replication of Results. The methodology described in this paper can be replicated by read- ers using publicly available tools. Our Gen-Fab model builds upon the standard Pix2Pix architecture, with a key modification of injecting a stochastic latent vector at the generator bottleneck described in text in detail. All architectural details, loss functions, and training protocols are described in detail throughout the paper. We also provide full descriptions of our experimental setup, evaluation metrics (IoU, KL divergence, and Wasserstein distance), and hyperparameter choices. Ethics approval. Not applicable. Consent to participate. Not applicable. Appendix A Convergence Analysis This appendix presents the training curves of the proposed Gen-Fab conditional generative model in order to illustrate its convergence behavior and optimization stability. Figure A1 shows the evolution of the generator total loss and the discriminator loss over training steps. The generator loss decreases from a high value and gradually stabilizes, indicating consis- tent improvement in synthesis quality. The dis- criminator loss converges to a stable range without collapsing, suggesting a balanced adversarial game in which neither network dominates the training process. This behavior is characteristic of stable conditional GAN training and indicates that the model reaches a dynamic equilibrium. Figure A2 decomposes the generator objective into its adversarial (GAN) loss and reconstruc- tion (L1) loss components. The L1 loss rapidly decreases during early training. In contrast, the adversarial loss stabilizes at a higher value with mild oscillations, which is expected in adversar- ial training and indicates continued refinement of fine-scale texture realism without sacrificing structural fidelity. 02500500075001000012500150001750020000 Training Steps 1 2 3 4 5 6 7 8 Loss Generator Total Discriminator Fig. A1 Generator total loss and discriminator loss dur- ing training, illustrating stable adversarial convergence of the Gen-Fab model. 16 02500500075001000012500150001750020000 Training Steps 0.0 0.2 0.4 0.6 0.8 1.0 Loss GAN Loss L1 Loss Fig. A2 Evolution of the generator loss components, showing early convergence of the L1 reconstruction loss and stabilization of the adversarial (GAN) loss. References Akbari Asanjan, A., Memarzadeh, M., Lott, P.A., Rieffel, E., Grabbe, S.: Probabilistic wild- fire segmentation using supervised deep gen- erative model from satellite imagery. Remote Sensing 15(11) (2023) https://doi.org/10.3390/ rs15112718 Azimi, R., Kong, Y., Gostimirovic, D., Clark, J.J., Liboiron-Ladouceur, O.: Semu-net: A segmentation-based corrector for fabrication process variations of nanophotonics with micro- scopic images. In: 2025 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV), p. 1528ā1536 (2025). https://doi. org/10.1109/WACV61041.2025.00156 Bai, Y., Ma, T., Risteski, A.: Approximability of Discriminators Implies Diversity in GANs (2019). https://arxiv.org/abs/1806.10586 Bau, D., Zhu, J.-Y., Wulff, J., Peebles, W., Strobelt, H., Zhou, B., Torralba, A.: Seeing what a gan cannot generate. In: Proceedings of the International Conference Computer Vision (ICCV) (2019) Dhote, C., Singh, A., Kumar, S.: Silicon pho- tonics sensors for biophotonic applicationsāa review. IEEE Sensors Journal 22(19), 18228ā 18239 (2022) https://doi.org/10.1109/JSEN. 2022.3199663 Demir, U., Unal, G.: Patch-Based Image Inpaint- ing with Generative Adversarial Networks (2018). https://arxiv.org/abs/1803.07422 Gal, Y., Ghahramani, Z.: Dropout as a bayesian approximation: Representing model uncertainty in deep learning. In: Balcan, M.F., Weinberger, K.Q. (eds.) Proceedings of The 33rd Interna- tional Conference on Machine Learning. Pro- ceedings of Machine Learning Research, vol. 48, p. 1050ā1059. PMLR, New York, New York, USA (2016) Gostimirovic,D.,Grinberg,Y.,Xu,D.- X.,Liboiron-Ladouceur,O.:Improving fabrication fidelity of integrated nanopho- tonic devices using deep learning. ACS Photonics10(6),1953ā1961(2023) https://doi.org/10.1021/acsphotonics.3c00389 Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., Bengio, Y.: Generative adversarial networks. Commun. ACM 63(11), 139ā144 (2020) https: //doi.org/10.1145/3422622 Gostimirovic, D., Xu, D.-X., Liboiron-Ladouceur, O., Grinberg, Y.: Deep learning-based predic- tion of fabrication-process-induced structural variations in nanophotonic devices. ACS Pho- tonics 9(8), 2623ā2633 (2022) https://doi.org/ 10.1021/acsphotonics.1c01973 Ho, J., Jain, A., Abbeel, P.: Denoising Diffusion Probabilistic Models (2020). https://arxiv.org/ abs/2006.11239 Han, D., Park, C., Oh, S., Jung, H., Hahn, J.W.: Quantitative analysis and modeling of line edge roughness in near-field lithography: toward high pattern quality in nanofabrication. Nanopho- tonics 8(5), 879ā888 (2019) https://doi.org/10. 1515/nanoph-2019-0031 Heusel, M., Ramsauer, H., Unterthiner, T., Nessler, B., Hochreiter, S.: Gans trained by a two time-scale update rule converge to a local nash equilibrium. In: Proceedings of the 31st International Conference on Neural Information Processing Systems. NIPSā17, p. 6629ā6640. Curran Associates Inc., Red Hook, NY, USA (2017) 17 Isola, P., Zhu, J.-Y., Zhou, T., Efros, A.A.: Image- to-image translation with conditional adversar- ial networks. In: 2017 IEEE Conference on Com- puter Vision and Pattern Recognition (CVPR), p. 5967ā5976 (2017). https://doi.org/10.1109/ CVPR.2017.632 James, A., Rizzo, A., Wang, Y., Novick, A., Wang, S., Parsons, R., Jang, K., Hattink, M., Bergman, K.: Process variation-aware compact model of strip waveguides for photonic cir- cuit simulation. Journal of Lightwave Technol- ogy 41(9), 2801ā2814 (2023) https://doi.org/ 10.1109/JLT.2023.3238847 Kingma, D.P., Ba, J.: Adam: A method for stochasticoptimization.In:Bengio,Y., LeCun, Y. (eds.) 3rd International Confer- ence on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings (2015). https://arxiv.org/abs/1412.6980 Khoong, W.H.: BUSU-Net: An Ensemble U-Net Framework for Medical Image Segmentation (2020). https://arxiv.org/abs/2003.01581 Karras, T., Laine, S., Aila, T.: A style-based gen- erator architecture for generative adversarial networks. IEEE Transactions on Pattern Anal- ysis and Machine Intelligence 43(12), 4217ā 4228 (2021) https://doi.org/10.1109/TPAMI. 2020.2970919 Kingma, D.P., Welling, M.: Auto-Encoding Vari- ational Bayes (2022). https://arxiv.org/abs/ 1312.6114 Li, C.T., Farnia, F.: Mode-seeking divergences: Theory and applications to gans. In: Ruiz, F., Dy, J., Meent, J.-W. (eds.) Proceed- ings of The 26th International Conference on Artificial Intelligence and Statistics. Pro- ceedings of Machine Learning Research, vol. 206, p. 8321ā8350. PMLR, Valencia, Spain (2023). https://proceedings.mlr.press/v206/ting- li23a.html Ma, P., Gao, Z., Begovic, A., Zhang, M., Yang, H., Ren, H., Huang, R., Boning, D., Gu, J.: BOSON -1: Understanding and enabling physically-robust photonic inverse design with adaptive variation-aware subspace optimiza- tion. In: Proceedings of the Design, Automation and Test in Europe Conference (DATE), p. 1ā7 (2025). https://doi.org/10.23919/DATE64628. 2025.10993227 Molesky, S., Lin, Z., Piggott, A.Y., Jin, W., Vuckovi Ģc,J.,Rodriguez,A.W.:Inverse designinnanophotonics.NaturePho- tonics12(11),659ā670(2018)https: //doi.org/10.1038/s41566-018-0246-9 Mirza, M., Osindero, S.: Conditional Generative Adversarial Nets (2014). https://arxiv.org/abs/ 1411.1784 Naderi, M., Karimi, N., Emami, A., Shirani, S., Samavi, S.: Dynamic-Pix2Pix: Noise Injected cGAN for Modeling Input and Target Domain Joint Distributions with Limited Training Data (2022). https://arxiv.org/abs/2211.08570 Ovadia, Y., Fertig, E., Ren, J., Nado, Z., Sculley, D., Nowozin, S., Dillon, J., Lakshminarayanan, B., Snoek, J.: Can you trust your model's uncer- tainty? evaluating predictive uncertainty under dataset shift. In: Wallach, H., Larochelle, H., Beygelzimer, A., Alch Ģe-Buc, F., Fox, E., Gar- nett, R. (eds.) Advances in Neural Information Processing Systems, vol. 32. Curran Associates, Inc., Vancouver, BC, Canada (2019) Paszke, A., Gross, S., Massa, F., Lerer, A., Brad- bury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., Desmaison, A., Kopf, A., Yang, E., DeVito, Z., Raison, M., Tejani, A., Chilamkurthy, S., Steiner, B., Fang, L., Bai, J., Chintala, S.: Pytorch: An imperative style, high-performance deep learning library. In: Wallach, H., Larochelle, H., Beygelzimer, A., Alch Ģe-Buc, F., Fox, E., Garnett, R. (eds.) Advances in Neural Information Processing Sys- tems, vol. 32. Curran Associates, Inc., Vancou- ver, BC, Canada (2019) Papamakarios, G., Nalisnick, E., Rezende, D.J., Mohamed, S., Lakshminarayanan, B.: Normal- izing Flows for Probabilistic Modeling and Inference (2021). https://arxiv.org/abs/1912. 02762 Piggott,A.Y.,Petykiewicz,J.,Su,L., 18 VuĖckovi Ģc, J.: Fabrication-constrained nanopho- tonicinversedesign.ScientificReports 7(1), 1786 (2017) https://doi.org/10.1038/ s41598-017-01939-2 Rombach, R., Blattmann, A., Lorenz, D., Esser, P., Ommer, B.: High-Resolution Image Synthe- sis with Latent Diffusion Models (2022). https: //arxiv.org/abs/2112.10752 Ronneberger, O., Fischer, P., Brox, T.: U-net: Convolutional networks for biomedical image segmentation. In: Navab, N., Hornegger, J., Wells, W.M., Frangi, A.F. (eds.) Medical Image Computing and Computer-Assisted Interven- tion ā MICCAI 2015, p. 234ā241. Springer, Munich, Germany (2015) Rezende, D.J., Mohamed, S.: Variational Inference with Normalizing Flows (2016). https://arxiv. org/abs/1505.05770 Shekhar, S., Bogaerts, W., Chrostowski, L., Bowers, J.E., Hochberg, M., Soref, R., Shas- tri, B.J.: Roadmapping the next generation of silicon photonics. Nature Communications 15(1), 751 (2024) https://doi.org/10.1038/ s41467-024-44750-0 Soref, R.: The past, present, and future of silicon photonics. IEEE Journal of Selected Topics in Quantum Electronics 12(6), 1678ā1687 (2006) https://doi.org/10.1109/JSTQE.2006.883151 Srivastava, A., Valkov, L., Russell, C., Gutmann, M.U., Sutton, C.: Veegan: Reducing mode col- lapse in gans using implicit variational learning. In: Guyon, I., Luxburg, U.V., Bengio, S., Wal- lach, H., Fergus, R., Vishwanathan, S., Garnett, R. (eds.) Advances in Neural Information Pro- cessing Systems, vol. 30. Curran Associates, Inc., Long Beach, CA, USA (2017) Sun, C., Wade, M.T., Lee, Y., Orcutt, J.S., Alloatti, L., Georgas, M.S., Waterman, A.S., Shainline, J.M., Avizienis, R.R., Lin, S., Moss, B.R., Kumar, R., Pavanello, F., Atabaki, A.H., Cook, H.M., Ou, A.J., Leu, J.C., Chen, Y.- H., Asanovi Ģc, K., Ram, R.J., Popovi Ģc, M.A., Stojanovi Ģc, V.M.: Single-chip microprocessor that communicates directly using light. Nature 528(7583), 534ā538 (2015) https://doi.org/10. 1038/nature16454 Ulyanov, D., Vedaldi, A., Lempitsky, V.: Instance Normalization: The Missing Ingredient for Fast Stylization (2017). https://arxiv.org/abs/1607. 08022 Maaten, L., Hinton, G.: Visualizing data using t-sne. Journal of Machine Learning Research 9(86), 2579ā2605 (2008) Xing, Y., Dong, J., Khan, U., Bogaerts, W.: Capturing the effects of spatial process varia- tions in silicon photonic circuits. ACS Photonics 10(4), 928ā944 (2023) https://doi.org/10.1021/ acsphotonics.2c01194 Xu, D.-X., Gostimirovic, D., Grinberg, Y., Liboiron-Ladouceur, O.: Advancing silicon pho- tonics through machine learning: From device design to fabrication. In: 2024 IEEE 24th International Conference on Nanotechnology (NANO), p. 460ā463 (2024). https://doi.org/ 10.1109/NANO61778.2024.10628655 Xu, B., Wang, N., Chen, T., Li, M.: Empirical evaluation of rectified activations in convolu- tional network. CoRR abs/1505.00853 (2015) 1505.00853 Xu, D.-X., Zhang, J.H., Melati, D., Al-Digeil, M., Zheng, Y., Janz, S., Schmid, J.H., Cheben, P., Grinberg, Y., Gostimirovic, D., Zhang, G., Masnad, M.M., Liboiron-Ladouceur, O.: Using machine learning pattern recognition to enhance silicon photonic design and fabrication. In: Advanced Photonics Congress 2023, p. 3ā4. Optica Publishing Group, Busan, South Korea (2023). https://doi.org/10.1364/IPRSN. 2023.IM3C.4 19