Source-linked AI summary
Diffusion Models Beat GANs on Topology Optimization
François Mazé, Faez Ahmed
TL;DR
Topology optimization requires structures that satisfy physical objectives and manufacturing constraints, while existing GAN-based approaches do not explicitly control both. TopoDiff uses conditional diffusion with surrogate-model guidance for low compliance and manufacturability. It achieves eight-times lower average compliance error and eleven-times fewer non-manufacturable designs than a state-of-the-art conditional GAN.
Problem
Existing topology-optimization generative models do not explicitly ensure low compliance and manufacturability, while traditional methods are iterative and computationally expensive.
Method
TopoDiff is a conditional diffusion model guided by surrogate models that estimate performance and steer generation toward low-compliance, manufacturable structures.
Results
Eight-times lower average compliance error and eleven-times fewer non-manufacturable designs are achieved compared with a state-of-the-art conditional GAN.
Takeaways & Limitations
Conditional diffusion models can outperform GANs for topology optimization when external guidance targets physical performance and manufacturability.
Takeaways & Limitations
TopoDiff generates one topology in 21.59 seconds versus 0.06 seconds for TopologyGAN, making computation time its most significant limitation.
Abstract
from arXiv · showhide
Structural topology optimization, which aims to find the optimal physical structure that maximizes mechanical performance, is vital in engineering design applications in aerospace, mechanical, and civil engineering. Generative adversarial networks (GANs) have recently emerged as a popular alternative to traditional iterative topology optimization methods. However, these models are often difficult to train, have limited generalizability, and due to their goal of mimicking optimal structures, neglect manufacturability and performance objectives like mechanical compliance. We propose TopoDiff - a conditional diffusion-model-based architecture to perform performance-aware and manufacturability-aware topology optimization that overcomes these issues. Our model introduces a surrogate model-based guidance strategy that actively favors structures with low compliance and good manufacturability. Our method significantly outperforms a state-of-art conditional GAN by reducing the average error on physical performance by a factor of eight and by producing eleven times fewer infeasible samples. By introducing diffusion models to topology optimization, we show that conditional diffusion models have the ability to outperform GANs in engineering design synthesis applications too. Our work also suggests a general framework for engineering optimization problems using diffusion models and external performance with constraint-aware guidance. We publicly share the data, code, and trained models here: https://decode.mit.edu/projects/topodiff/.
1 Introduction
TopoDiff addresses limitations of iterative topology optimization and conditional GANs by using diffusion-model generation with explicit guidance for physical performance and manufacturability. The framework reports substantially lower physical-performance error and infeasibility than a state-of-the-art conditional GAN.
- Topology optimization seeks material shapes that minimize objectives such as mechanical compliance under volume, boundary-condition, and load constraints.This engineering objective provides the target that the proposed model explicitly guides toward.
- Traditional topology optimization is computationally expensive because it is iterative and can produce non-optimal designs with penalization and filtering.These limitations motivate faster learned approaches and explicit performance-aware generation.
- Conditional GANs generate structures from boundary conditions but commonly optimize a loss that can encourage pixel-wise imitation rather than explicit physical objectives.Comparable pixel-wise similarity does not necessarily imply comparable mechanical performance.
- TopoDiff is a conditional diffusion-model-based framework for end-to-end topology optimization.The method introduces diffusion models to topology optimization rather than relying on GAN-based synthesis.
- Surrogate models provide external guidance that minimizes mechanical compliance and improves manufacturability during diffusion-based generation.The guidance strategy is designed to favor structures meeting performance and feasibility objectives.
- Eight-times lower average physical performance errors and eleven-times lower infeasibility are achieved versus a state-of-the-art conditional GAN.These are reported as core contributions of the TopoDiff framework.
2 Background and Related Work
Topology optimization formulates constrained material-shape design, while traditional and learned approaches face computational, non-convexity, and objective-control challenges. Diffusion models generate samples through iterative denoising, and guidance extends this process toward feasible, low-compliance topologies.
- 2.1 Topology Optimization: Topology optimization finds material layouts that minimize objectives such as compliance subject to loads, displacement boundary conditions, and volume-fraction constraints.The optimization selects an optimal subset of material within a full design domain.
- 2.1 Topology Optimization: SIMP encourages binary material densities through penalization, but penalization and filtering introduce non-convexity that can lead to local optima.Intermediate densities are physically meaningless, motivating the binary-density treatment.
- 2.1 Topology Optimization: Traditional topology optimization is slow because it repeatedly performs finite-element analysis, motivating end-to-end deep-learning approaches for faster topology generation.Deep learning methods also target issues such as non-convexity.
- 2.2 Deep Learning for Topology Optimization: Existing deep-learning topology-optimization methods do not explicitly minimize compliance, relying instead on GAN training to achieve the physical objective indirectly.The paper therefore proposes explicit guidance for low-compliance and feasible structures.
- 2.3 Diffusion Models: Diffusion models reverse a fixed noising process by progressively denoising samples, with neural networks predicting the reverse process mean and variance.New samples are generated by starting from Gaussian noise and repeatedly applying the denoising transition.
- Classifier guidance: Classifier guidance perturbs the reverse-process mean using gradients of a classifier's predicted conditional probability, with a tunable scale factor.The approach uses an external classifier trained on noisy data, while classifier-free guidance avoids that separate classifier.
- Classifier guidance: The proposed guidance strategy combines continuous performance guidance with discrete feasibility guidance to penalize low-compliance and infeasible structures at every denoising step.This combination targets both physical performance and manufacturability-related constraints.
3 Method
TopoDiff conditions a diffusion denoiser on topology-optimization constraints and adds surrogate-guided sampling to favor low compliance and manufacturable structures. Regressor and classifier guidance shift denoising transitions toward lower compliance and away from floating material while preserving constraints the conditional model already satisfies.
- Conditional diffusion architecture: TopoDiff uses a conditional UNet diffusion model that denoises topology images while conditioning on volume, physical fields, loads, and boundary conditions.Constraint and boundary-condition information is supplied as additional input channels.
- Minimizing compliance: Regressor guidance uses a surrogate compliance predictor to shift each diffusion transition toward structures with lower mechanical compliance.The surrogate is trained to predict compliance on noisy topology images, and the shift is proportional to the compliance gradient.
- Manufacturability guidance: Classifier guidance uses a floating-material classifier to favor topologies without disconnected material and thereby improve manufacturability.The classifier returns the probability that a topology contains no floating material, producing a mean shift based on the gradient of its log probability.
- Combining guidance strategies: The final sampler combines compliance and floating-material guidance with separate gradient scales and noise-level thresholds.The method addresses sequential gradient application and allows each guidance strategy to act at selected denoising levels.
- Constraint handling: Additional guidance for volume and load position is unnecessary because the conditional diffusion model already sufficiently respects those constraints.The combined guidance algorithm is summarized as the final topology-optimization sampler.
- Mathematical motivation: Under a low-curvature assumption, regressor guidance is approximated by shifting the diffusion mean by −Σ∇_x_t c_φ.This approximation follows from neglecting second-order and higher terms in the compliance regressor’s Taylor expansion.
4 Empirical Evaluation
The evaluation uses datasets and metrics designed to assess physical performance and manufacturability rather than pixel-wise similarity. Compliance error, volume-fraction error, and floating material are used to judge whether generated structures meet topology-optimization objectives and constraints.
- Datasets: The dataset splits include 30,000 training combinations, 200 validation combinations, 1,800 level-1 test combinations, and 1,000 level-2 test combinations.The splits evaluate generated structures under combinations of boundary conditions and other topology-optimization inputs.
- Evaluation metrics: The evaluation avoids pixel-wise error as a final metric because it does not guarantee low compliance, the physical objective of topology optimization.A small pixel-wise discrepancy can still correspond to large compliance error when material is missing at critical locations.
- Evaluation metrics: The evaluation measures compliance error relative to the SIMP topology, volume-fraction error relative to the input, and the presence of floating material.Floating material is recorded as a boolean indicating whether disconnected material occurs.
- Evaluation metrics: High scores on the defined metrics are intended to indicate high-performance, manufacturable designs.The metrics jointly reflect compliance minimization and satisfaction of structural constraints.
- Hyperparameter tuning: Guidance gradient scales are tuned on a 200-structure validation dataset using compliance error and floating-material presence.Grid search selects the relative weighting of compliance minimization and floating-material avoidance.
5 Results and Discussions
TopoDiff is evaluated against TopologyGAN across two difficulty levels, with full-model results, surrogate-model reliability, and guidance ablations. It generally improves compliance, manufacturability, and volume-fraction performance, especially under out-of-distribution conditions, but is substantially slower to generate.
- Full diffusion model: TopoDiff outperforms TopologyGAN on all reported metrics across both test sets, with randomly sampled structures showing lower compliance error and better manufacturability.The evaluation compares nine-run averages against the state-of-the-art TopologyGAN baseline; Table 1 summarizes the full metric comparison.
- Full diffusion model: On level 1 data, non-manufacturable designs drop from 46.8% with cGAN to 5.5% with TopoDiff, while average volume-fraction error decreases from 11.9% to 1.9%.Average compliance error is also reduced by a factor of eleven, while floating-material proportion decreases by more than a factor of eight.
- Full diffusion model: On level 2 data, average compliance error falls from 143.1% to 18.4%, non-manufacturability from 67.9% to 6.2%, and volume-fraction error from 14% to below 2%.The average compliance-error and volume-fraction-error reductions are statistically supported with p-values of 9 · 10^-12 and 5 · 10^-160, respectively.
- Surrogate models: Surrogate regressors and classifiers are reliable on low-noise structures but become less accurate as noise increases, limiting guidance quality in noisier diffusion states.Table 2 reports surrogate performance using R2-score and accuracy across noise levels.
- Ablation study: Guidance has little effect on level 1 compliance error but reduces floating material from 6.6% to 5.5%, whereas level 2 guidance reduces average compliance error by 17% and floating material by 18%.For level 2, guidance does not significantly affect load respect, volume-fraction error, or median compliance error, suggesting its compliance benefit primarily targets very high-error structures.
- Limitations and future work: TopoDiff requires 21.59 seconds per topology versus 0.06 seconds for TopologyGAN, making computation time its most significant stated limitation.The paper identifies extending the method to 3D, higher resolutions, more boundary conditions, and reduced mesh-size and dataset dependence as future directions.
6 Conclusion
TopoDiff applies conditional diffusion models to end-to-end topology optimization with explicit guidance for performance and manufacturability. It reduces errors and non-manufacturable outputs relative to a state-of-the-art conditional GAN while generalizing to out-of-distribution boundary conditions.
- 8× lower average compliance error and 11× fewer non-manufacturable designs than a state-of-the-art conditional GAN.
- TopoDiff also reduces volume fraction error eightfold and generalizes well to out-of-distribution boundary conditions.
- The framework combines conditional diffusion with explicit guidance to maximize performance and avoid non-manufacturable designs.
A1 Additional datasets used for surrogate models
The surrogate models were trained and validated on separate labeled datasets covering compliance prediction and floating-material classification. The final TopoDiff system was tested only on data unused by all component models.
- The compliance regressor used 72,000 labeled eight-channel topology samples, including optimal and non-optimal structures.The non-optimal samples came from fake-load generation and unguided conditional diffusion outputs.
- The floating-material classifier used 70,000 labeled single-channel topology samples, balanced across structures with and without added floating material.Its data combined the main dataset, diverse-volume-fraction topologies, and fake-load-generated non-optimal topologies.
- All models were validated on unseen data, and the final TopoDiff system was tested on data unused by every component model.