July 08, 2026
Deep generative models offer a promising paradigm for topology optimization, enabling rapid design exploration. However, these approaches lack intrinsic physics guidance, often leading to poor generalizability across unseen boundary conditions and the formation of floating material artifacts. To address these limitations, we propose Hierarchical Physics-Guided Diffusion (HPG-Diff), a novel diffusion framework that enforces physics consistency through two synergistic mechanisms. First, we introduce a hierarchical physics-guided strategy that aligns different precomputed physics features with the denoising process, guiding material distribution toward optimal load paths to enhance generalizability. Second, we propose a floating material suppression loss as a differentiable connectivity constraint inspired by thermal conduction to improve topological connectivity. By simulating a virtual heat propagation process from load positions, this mechanism explicitly penalizes floating material during training. Quantitative evaluations demonstrate that HPG-Diff achieves average compliance errors of 0.87% (in-distribution) and 5.29% (out-of-distribution), while reducing floating material ratios to 2.90% and 2.44%, respectively. Furthermore, case studies on a 3:1 rectangular domain, including cantilever and bridge benchmarks, provide preliminary evidence that lightweight LoRA fine-tuning with a small dataset can support the adaptation of HPG-Diff to rectangular non-square domains.
Topology optimization ,Diffusion models ,Physics-guided generation ,Connectivity constraints ,Generative design
Topology optimization (TO) has been widely used in various engineering design scenarios due to its capacity to generate lightweight structures with high mechanical performance. To date, numerous TO designed structures have been successfully applied in the aerospace [1]–[3], mechanical [4]–[6], civil [7], [8], and biomedical [9]–[11] fields. This iterative optimization approach typically relies on Finite Element Analysis (FEA). A common example is the Solid Isotropic Material with Penalization (SIMP) [12]. However, it is computationally demanding, especially in large‑scale optimization problems.
Data-driven design methods have also been widely explored in broader engineering domains [13]–[17]. In topology optimization, deep learning has significantly reduced computational costs using surrogate models [18]–[22]. However, they often suffer from a lack of physics consistency: the mechanical performance and manufacturability may violate the physics principles. Since surrogate models approximate complex behavior by fitting input–output relationships, they may not effectively capture the physics representation of optimization objectives and constraints, potentially resulting in generated structures with anomalous stress concentrations or connectivity defects. For example, density-field surrogate predictions may require additional physics-based correction or post-processing when the learned mapping does not fully preserve equilibrium, volume, or connectivity-related constraints [23], [24]. At the same time, practical engineering design demands a diverse set of high-performing alternatives. As illustrated in Fig. 1, this requires generating new designs, either by changing strict inputs for a fixed problem or by adjusting relaxable inputs to explore the design space. Strict inputs denote problem-defining conditions such as boundary conditions and loads, while relaxable inputs denote design-control variables such as volume fraction. The comparison in Fig. 1 is qualitative and used to illustrate typical design methods. However, mainstream TO methods face clear limitations when acquiring new designs. Traditional SIMP is deterministic, offering no diversity under same inputs, and requires a complete rerun for modified arguments. For methods like PINN[25], [26] and solver-guided learning [23], [27], both generating diversity for a fixed problem by changing random seeds and adapting to input changes require same time-consuming retraining process. Consequently, designers have to choose between efficiency and quality, highlighting the need for a TO framework that enables fast, diverse, and high-performing design generation.
This trade-off is not only computational but also reflects different ways of enforcing physics constraints. PINN and solver-guided methods can impose relatively better physics consistency by embedding governing-equation residuals, energy terms, or online FEA feedback into optimization. However, this constraint hardness often reduces generative flexibility, because new boundary conditions, loads, or design requirements may require per-case optimization, retraining, or iterative solver interaction. Generative models provide a complementary route: after pretraining, they can efficiently sample diverse candidate designs, but their physics consistency depends on the design of conditioning signals and training objectives.
Recently, advances in Generative Adversarial Network (GAN) [28] and diffusion models [29] have improved generation quality through more precise modeling of data distributions. Meanwhile, these generative methods inherently have the capacity for fast and diverse generation. For TO, some physics-guided variants [30] further integrate physics knowledge to improve performance.
While physics knowledge has been incorporated into these methods [31]–[33], several challenges remain in practical applications. The reasons are twofold: (1) These methods treat physics knowledge as either global inputs or external steering signals, overlooking the intrinsic correlation between hierarchical nature of the denoising process and distinct physical knowledge. Consequently, mechanical fidelity is limited due to the lack of generalizability, especially in out-of-distribution scenarios (2) Standard pixel-wise objectives are inherently topology-agnostic. Despite improvements, generative models still produce a higher proportion of floating material than traditional SIMP-like methods.
This paper aims to address these challenges to develop an innovative method that improves mechanical fidelity and manufacturability in TO, while retaining the efficiency and diversity of generative methods. In order to replicate both the optimal material distribution goal and the connectivity constraint of classical topology optimization (e.g., SIMP) within a generative paradigm, we propose Hierarchical Physics-Guided Diffusion (HPG-Diff), a diffusion framework that rapidly generates diverse high-performing designs (Fig. 2) through the synergistic integration of hierarchical feature guidance and differentiable connectivity constraints.
Specifically, we introduce a hierarchical physics-guided strategy to guide the denoising process. By incorporating three key mechanical responses Displacement (U), Principal Stress Line (PSL), and Strain Energy Density (SED), we capture deformation magnitude, critical load paths, and stiffness-contributing regions, respectively. Building upon approaches that rely primarily on high-level features (e.g., SED) [31], we introduce low-level U and mid-level PSL as novel contexts hierarchically injected across network layers. This aligns the model’s receptive fields with distinct physics features, ensuring the optimal material distribution. Moreover, we impose a floating material suppression loss as a differentiable connectivity constraint to regularize the output topology. This thermal-conduction-inspired mechanism ensures the material forms a continuous structure by explicitly penalizing disconnected regions during training, which effectively reduces floating material artifacts in the generated structures. Our main contributions are:
A hierarchical physics-guidance strategy is proposed for topology optimization, which organizes distinct key physics features as layer-specific conditioning signals aligned with different stages of the denoising process. This strategy enhances mechanical fidelity and generalizability to unseen boundary conditions.
The discrete topological connectivity problem is reformulated as a differentiable propagation process to derive a floating material suppression loss. This allows the connectivity constraint to be explicitly integrated into the gradient-based training loop in generative TO.
Our diffusion framework HPG-Diff balances high mechanical performance with the generation efficiency. Notably, case studies demonstrate that the learned physics priors enable rapid adaptation to different design domains via lightweight LoRA fine-tuning.
Learning-based computational methods have been increasingly explored across constrained engineering domains, such as infrastructure assessment and energy-system operation [34]–[37]. Topology optimization (TO) aims to compute optimal material distribution under given loads and boundary conditions, and it is widely used in industrial design. In real-world scenarios, designers require not only high-performing structures but also multiple alternative solutions to trade off manufacturability, cost, and aesthetics.
Classical numerical methods such as SIMP [12] provide physically consistent results but are computationally expensive for diverse design explorations. To address this challenge, deep learning frameworks have emerged as promising alternatives [38]–[41].
Recent work has emphasized integrating physics knowledge into learning pipelines. We roughly categorize existing approaches into three paradigms. PINN methods (e.g., PINNTO [25] and CPINNTO [26]) embed governing equations or physics terms in the loss. Solver-guided learning methods (e.g., SOLO [23] and TOuNN [27]) incorporate online FEA feedback during training. These two paradigms improve mechanical performance, but typically require per-case retraining or iterative FEA updates when the problem setting changes, which limits scalability in design-exploration workflows.
In contrast, generative methods (GANs, diffusion models) [31]–[33], [42] emphasize rapid, diverse sample generation: after pretraining they can produce multiple candidate designs at inference without per-case retraining. Table 1 summarizes a comparison of these physics-aware deep learning paradigms (per-case training, support for diverse outputs, and relative inference cost). The inference-time multipliers are approximate ranges. They are summarized from the typical behavior of mainstream implementations, and may vary with detailed implementations or settings.
| Method | PINN Methods | Solver-Guided Learning | Generative Methods |
|---|---|---|---|
| Per-Case Training Required | Yes | Yes | No |
| Supports Diverse Outputs | No | No | Yes |
| Inference Time | \(\sim\)100X | \(\sim\)3X | X |
The effectiveness of generative models for TO hinges on how physics guidance is integrated—a process known as conditioning. Current strategies for diffusion models fall into two main categories:
Architectural Modification approaches offer fine-grained control by altering the model’s structure, such as modifying the network backbone [43]–[45], adding new trainable modules [46], or using internal attention mechanisms [47]. Sampling-Phase methods steer the generation process without changing the model, typically by using external classifiers [48] or adapting the sampling algorithm [49], [50].
In TO, diffusion model-based methods [31]–[33] belong to the second. This often involves using physics features like Strain Energy Density (SED) and von Mises stress to represent input settings. While this strategy avoids issues with sparse data, such high-level features cannot fully capture the complex internal mechanics of a structure. Therefore, they often require complex multi-stage framework or auxiliary models, which actually lower the generation efficiency.
From the perspective of physics features integration, existing diffusion-based TO methods mainly introduce physics information as an overall condition or steering signal for the generation process [31]–[33]. Such designs provide useful physical context, but they do not explicitly organize different physics features according to their distinct structural roles in TO. In this work, we implement an architecture-level, multi-level conditioning strategy that hierarchically aligns multi-level physics features with the denoising process, thereby providing richer mechanical context during generation while keeping an efficient pipeline.
For practical application, two issues remain challenging in generative TO. First, generated structures often contain disconnected or floating material that requires additional processing. Prior works typically rely on post-processing filters [51]–[53], auxiliary classifiers [31], [54], or extra loss terms [24], [55] to mitigate these defects.
Second, generative TO studies train and validate on square domains, whereas industrial components often design under non-square domains. This domain mismatch often requires retraining or substantial fine-tuning on target-specific datasets [33]. To address domain adaptation with limited data, parameter-efficient fine-tuning methods (e.g. LoRA [56]) can adapt a pretrained generative prior to new domain sizes or aspect ratios with small datasets. However, LoRA’s success depends on the generalizability of pretrained diffusion model and the similarity between pretraining and target data distributions.
In our work, we target these two problems in generative TO. For connectivity, existing differentiable connectivity losses in shape generation typically act on the generated occupancy, mask, or implicit field to reduce broken or separate components and improve object-level connectivity [57]–[59]. This objective is largely geometry-level: it measures whether the generated shape is connected as an object. In contrast, our FMS addresses a topology-optimization-specific connectivity issue. It evaluates whether high-density material is reachable through the predicted material layout. Thus, the penalty is a load-seeded reachability penalty for TO. For domain adaptation, we evaluate LoRA-based adaptation in representative non-square cases in Section 4.6. Evaluation focuses on compliance error, connectivity, and design diversity to quantify applicability.
In this section, we demonstrate the structure of HPG-Diff, which enables a single diffusion model to generate topological structures with high physics consistency. The section is organized as follows: Section 3.1 illustrates how we select physics information as features. Section 3.2 introduces the details of HPG-Diff and the hierarchical physics-guided strategy. Section 3.3 depicts the loss function designed to control floating material artifacts.
The minimum-compliance problem in TO can be written as: \[\begin{align} & \min_{x} & & c(x) = F^TU=U^T K U \\ & \text{subject to:} & & \frac{V(x)}{V_0} = v_f \\ & & & 0 < x_{\min} \le x \le 1 \end{align}\]
where \(U\) and \(F\) are the global displacement and force vectors, respectively, \(K\) is the global stiffness matrix, \(x\) is the design variables, \(x_{\min}\) is the minimum relative density, \(V({x})\) and \(V_0\) are the material volume and design domain volume, respectively. \(v_f\) is the prescribed volume fraction.
The total potential energy of the structure is the difference between strain energy \(E_{strain}\) and potential energy of the external loads \(E_{loads}\). In discrete form, this is: \[\Pi = E_{strain} - E_{loads} = \frac{1}{2}{U}^T{K}{U} - {U}^T{F}\]
According to the Principle of Minimum Potential Energy, the equilibrium state is found when \(\frac{\partial \Pi}{\partial {U}} = 0\), which yields the system equation: \[\label{eq:three} {K}{U} = {F}\tag{1}\]
Solving Eq. 1 via FEA yields the displacement field U. While U is the most fundamental low-level feature representing displacement of all elements, we derive two higher-level features from it to provide more direct insight into the optimized structure.
The first, Strain Energy Density (SED), directly relates to the optimization objective. As compliance is twice the total strain energy (\(c({x})={U}^T{K}{U}=2E_{strain}\)), SED pinpoints regions most critical to the structure’s stiffness.
The second, Principal Stress Line (PSL) explains the structural morphology. Derived from the stress field, PSL visualizes the internal load paths, thereby revealing why the topology forms its specific shape.
Fig. 3 provides an illustrative example of the impact of physics features on conditioning the denoising process. The red-circled regions highlight how these features enhance the UNet’s feature maps, improving the preservation of both details and overall structural integrity.
Specifically, the corresponding conditioning physics features are: (1) Displacement (U): Low-level feature that quantifies the element displacements within the design domain. Yellow and dark blue denote maximum and minimum displacements at the load and support points. The circled region shows the preserved thin rod structure, which is a critical load path. (2) Principal Stress Line (PSL): Mid-level feature that visualizes internal load paths via tensile (red) and compressive (blue) stresses. The circles highlight the encoder preserves a thin rod structure and the decoder improves overall structural connectivity. (3) Strain Energy Density (SED): High-level feature that indicates critical regions (yellow areas) related to stiffness. The circled region shows the encoder removes a redundant feature, thus enhancing structural integrity.
Diffusion models with standard UNet architectures inherently process information hierarchically. Through successive downsampling operations in the encoder path, the effective receptive field of convolutional kernels progressively increases. As a result, deeper layers capture more abstract, global structural context from the input. Shallower layers work differently: they use smaller receptive fields and operate closer to the original input resolution. This allows them to primarily focus on preserving and refining fine-grained local details.
Crucially, this hierarchical nature is mirrored in the decoder path. As the network upsamples the latent features back to the pixel space, the denoising process progressively reconstructs the topology. In the context of topology optimization, this implies a functional separation: transitioning from determining the global material layout (deep layers), through developing intermediate structural components (mid layers), to finish the details of structural boundaries (shallow layers).
We leverage this inherent architectural hierarchy by drawing a parallel to the distinct physics characteristics represented by our chosen physics features (Section 3.1). Specifically, Displacement (U), which describes point-wise deformation and local geometric changes, aligns naturally with the fine-grained and local feature processing capabilities of the shallower layers in the UNet. Conversely, Principal Stress Line (PSL), depicting the global pathways of load transmission, and the Strain Energy Density (SED), highlighting structurally significant regions of energy concentration, represent more global mechanical characteristics. These align conceptually with the global structural context captured effectively by the deeper layers of the UNet.
Based on this correspondence, we propose a hierarchical physics-guided strategy. The core principle is to condition the diffusion model’s denoising process by injecting these distinct physics features at specific, corresponding stages or layers within the UNet architecture, rather than providing all conditioning information uniformly. This means guiding the generation process with the type of physics features that best matches the abstraction level and receptive field size of the UNet features at that particular stage. As Fig. 4 shows, we employ a layer-specific cross-attention mechanism within the UNet’s encoder and decoder. At designated layers (e.g., shallow, mid, deep layers), cross-attention modules are introduced to dynamically attend to the feature representations of the corresponding injected physics features. The denoising process is illustrated as:
\[\label{eqn:denoise} p_\theta(x_{t-1} \mid x_t, c) = \mathcal{N}\left(x_{t-1} \mid \mu_\theta(x_t, t, c), \Sigma_\theta(t)\right)\tag{2}\] where \(c\) represents the physics guidance condition.
This hierarchical injection combined with the cross-attention mechanism facilitates a dynamic coupling between the generated topology and the mechanical principles represented by the physics features. Physics consistency is better maintained during the sampling process by aligning the physics guidance with the appropriate layers of the UNet, leading to generated topologies that are more physically plausible.
Our proposed framework aims to replicate the rigorous physical consistency of classical topology optimization (e.g., SIMP) within a generative paradigm. In SIMP, FEA-driven sensitivity analysis serves dual purposes: it simultaneously guides material distribution to minimize compliance and inherently enforces connectivity, since disconnected elements carry no load and are eliminated by the optimization process.
In contrast, standard diffusion models lack this intrinsic physical feedback. While the hierarchical physics-guided strategy (Section 3.2) effectively directs material allocation by conditioning on physics fields, it functions primarily as a soft guidance mechanism rather than a strict constraint. Meanwhile, the generative process is driven by pixel-wise denoising objectives (e.g., \(L_2\) MSE). These losses treat pixels as statistically independent variables and are inherently topology-agnostic, making the model prone to generating floating material, such as isolated islands that degrade mechanical performance and manufacturability.
To mitigate this issue, we propose a loss function inspired by the physical mechanism of thermal conduction [60], based on the intuition that heat-flow propagation from a prescribed source provides a continuous way to measure reachability through connected material paths. Unlike standard discrete connectivity checks (e.g., Connected Component Labeling) which are non-differentiable, we formulate connectivity as a differentiable heat propagation process.
The core logic operates by placing a virtual heat source at the load position and simulating its propagation through the predicted material. Effectively, any material that remains "cold" implies it is structurally disconnected. This mechanism is implemented through three coupled stages:
Seeding: Initialize the propagation source with the binary seed mask \(\mathbf{S}_{\mathrm{load}}\in\{0,1\}^{N\times N}\) at the load position. Since the load position serves as the functional origin of the stress transmission path, only material connected to this source is recognized as part of the effective structure.
Differentiable Propagation: Allow a signal to iteratively propagate over the predicted material distribution \(\hat{\mathbf{x}}_{\mathrm{pred}}\) to obtain the connectivity strength map \(\mathbf{D}_{\mathrm{final}}\).
Penalty: After propagation converges, penalize regions that exhibit high material density (approaching 1) but low connectivity signal (approaching 0). This penalty encourages the model to suppress these isolated components that fail to receive the propagated signal.
\(\mathbf{D}_{\mathrm{final}}\) is computed via the differentiable propagation. Let \(\mathbf{S}_{\mathrm{load}}\in\{0,1\}^{N\times N}\) be a binary seed mask indicating load location. Define the local maximum operator (equivalent to a \(3\times3\) dilation)
\[\big(\mathrm{Max}_{3\times3}(\mathbf{D})\big)_{ij}=\max_{(u,v)\in\mathcal{N}_1(i,j)}D_{uv}\] and initialize \(\mathbf{D}^{(0)}=\mathbf{S}_{\mathrm{load}}\). We update \[D_{ij}^{(k+1)} = \max\big( D_{ij}^{(k)}, (\mathrm{Max}_{3\times3}(\mathbf{D}^{(k)}))_{ij} \, (\hat{\mathbf{x}}_{\text{pred}})_{ij} \big)\] and we iterate this process for \(k\) steps (where \(k\) covers the domain dimension) \(\mathbf{D}_{\mathrm{final}}=\mathbf{D}^{(k)}\).
This propagation provides a justification for FMS in topology optimization. In the binary-density limit, the predicted density field defines a solid mask \(\Omega_s\), and the load mask \(S_{\mathrm{load}}\) defines the source set. The max-propagation step can be interpreted as a masked reachability dilation: the connectivity signal is allowed to expand only through elements belonging to \(\Omega_s\). Equivalently, the discrete reachable set follows \(\mathcal{R}^{(0)} = S_{\mathrm{load}}\), \(\mathcal{R}^{(k+1)} = \mathcal{R}^{(k)} \cup \{i\in\Omega_s \mid i \text{ is adjacent to some } j\in\mathcal{R}^{(k)}\}\). By induction, \(\mathcal{R}^{(k)}\) contains the solid elements that can be reached from the load seed through a continuous solid path of at most \(k\) steps. Therefore, when \(k\) covers the domain scale, the propagation converges to the reachable solid component. For continuous density predictions, the final connectivity map \(\mathbf{D}_{\mathrm{final}}\) can be viewed as a continuous approximation of this binary reachable component, where larger values indicate stronger reachability from the load seed through the predicted material field. Thus, high-density regions with low propagation values correspond to floating material that is not incorporated into the load-seeded material component. This is consistent with topology optimization, where disconnected solid regions consume the prescribed volume budget but do not effectively contribute to the main load-transfer structure.
Thus we introduce the Floating Material Suppression Loss (FMS loss), denoted as \(\mathcal{L}_{\mathrm{fm}}\), which penalizes floating material:
\[\label{eq:lfm} \mathcal{L}_{\mathrm{fm}} = \mathbb{E}_{\mathbf{x}_0,\epsilon,t}\!\left[ w(t)\;\frac{1}{|\Omega|}\sum_{(i,j)\in\Omega}(\hat{\mathbf{x}}_{\text{pred}})_{ij}\big(1-({\mathbf{D}_{\text{final}})_{ij}}\big) \right]\tag{3}\] where \(\hat{\mathbf{x}}_{\mathrm{pred}}\) is the predicted material distribution, \(\mathbf{D}_{\mathrm{final}}\in[0,1]^{N\times N}\) is the connectivity strength map obtained from the differentiable propagation, \(t\) is the diffusion timestep, \(T\) the maximal timestep, and \(c>0\) a scalar controlling the time weighting.
We use an exponential time-weighting \(w(t)=\exp(-c\,t/T)\) so the connectivity prior acts mainly at late denoising steps \((t \to 0)\), avoiding gradient conflict with \(\mathcal{L}_{\mathrm{noise}}\). This weighting improves the stability of FMS during early denoising stages. When \(t\) is large, the predicted density field is still highly noisy and may not provide a coherent propagation medium; the small value of \(w(t)\) prevents the FMS term from producing dominant gradients at this stage. As \(t\) approaches 0, the predicted density field becomes more structured, and FMS becomes active on high-density regions that remain unreachable from the load seed. Because the penalty is multiplied by \(\hat{\mathbf{x}}_{\mathrm{pred}}\), near-void regions contribute little to the loss, while disconnected high-density regions receive stronger gradients. Therefore, the scalar \(c\) is defined relative to \(T\). We further provide sensitivity analysis in Appendix C. The final training objective combines \(\mathcal{L}_{\mathrm{fm}}\), with \(\lambda_{\mathrm{fm}}\) balancing denoising loss and topology regularization: \[\mathcal{L} \;=\; \mathcal{L}_{\mathrm{noise}} \;+\; \lambda_{\mathrm{fm}} \,\mathcal{L}_{\mathrm{fm}}\]
We utilize the dataset from Mazé et al. [31], which was collected using the SIMP method and contains 30,000 training samples and two test sets. Test 1 includes 1,800 samples with in-distribution boundary conditions, while Test 2 contains 1,000 samples with out-of-distribution boundary conditions. The dataset was generated under varied conditions: the volume fraction ranges from 0.3 to 0.5 in 0.02 increments; loads are applied at random unconstrained boundary nodes with directions from \([0, \pi]\) in \(\pi/6\) intervals; and 42 boundary conditions were used for training versus 5 new boundary conditions for testing. Each sample in the dataset provides the optimal topology, minimum compliance, and details on loads, boundary conditions, and volume fraction. The original data also includes preprocessed von Mises stress and strain energy density. Moreover, we have supplemented this dataset with displacement and principal stress line as additional physics features.
Distinct from common metrics used for generative models which typically assess the quality, realism, and diversity of generated images, we use physics-based metrics adapted from [31]. Given the primary objective of topology optimization (TO) is to achieve minimum compliance, the following three metrics are employed. For all metrics, evaluations are performed on binarized results (threshold \(\tau=0.5\)) using a standard FEA solver to ensure fair comparisons:
Compliance Error (CE) is the relative error in compliance compared to ground truth;
Volume Fraction Error (VFE) is the relative error in volume fraction compared to ground truth;
Floating Material (FM) is the proportion of samples containing floating materials.
These evaluation metrics are applied to both the Test 1 and Test 2. The evaluation on the Test 2 specifically aims to assess the model’s generalizability on unseen data distributions, thereby indicating whether the model has effectively learned the optimization physics mechanisms.
We implement our HPG-Diff based on PyTorch using a single NVIDIA A100 for both training and inference. For training, we initiate the training process with diffusion steps 1000 for around 200 epochs. The AdamW [61] optimizer was utilized along with a batch size set to 64. We implemented the cosine noise schedule with an initial learning rate of 0.0001.
To better evaluate HPG-Diff, we compare HPG-Diff with three SOTA generative methods (TopologyGAN [42], TopoDiff [31], and DOM [32]). Using the datasets and evaluation metrics mentioned in Section 4.1 and 4.2.
| Method | Avg CE \(\downarrow\) | Med CE \(\downarrow\) | Avg VFE \(\downarrow\) | FM \(\downarrow\) |
|---|---|---|---|---|
| TopologyGAN [42] | 48.51 | 2.06 | 11.87 | 46.78 |
| TopoDiff-Guided [31] | 4.39 | 0.83 | 1.85 | 5.54 |
| DOM w/ TA [32] | 4.44 | 0.74 | 1.52 | 6.72 |
| (Ours) | 0.87 | 0.16 | 1.38 | 2.90 |
As Table 2 shows, compared to three baseline methods, HPG-Diff reduces the CE, achieving values of 0.87% in average and 0.16% in median. Furthermore, HPG-Diff effectively suppresses the existence of FM to 2.90%. average VFE is reduced to 1.38%.
When compared to the other generative methods, HPG-Diff reduces the Average CE by 80.18% relative to TopoDiff-Guided and by 80.41% relative to DOM w/ TA. The FM is also reduced by 47.65% and 56.85% compared to TopoDiff-Guided and DOM w/ TA, respectively. Compared with TopologyGAN, our method improves Average CE, Median CE, and FM by approximately 98.21%, 92.23%, and 93.80%.
| Method | Avg CE \(\downarrow\) | Med CE \(\downarrow\) | Avg VFE \(\downarrow\) | FM \(\downarrow\) |
|---|---|---|---|---|
| TopologyGAN [42] | 143.08 | 6.82 | 14.31 | 67.90 |
| TopoDiff-Guided [31] | 18.40 | 1.82 | 1.80 | 6.21 |
| DOM w/ TA [32] | 32.19 | 3.69 | 1.78 | 14.20 |
| (Ours) | 5.29 | 0.61 | 1.45 | 2.44 |
Table 3 shows that HPG-Diff outperformed in Average CE, Median CE, and FM, achieving values of 5.29%, 0.61% and 2.44%, respectively. average VFE is reduced to 1.45%.
Statistically, HPG-Diff substantially outperforms all baselines in the out-of-distribution tests. It reduces the key Average CE metric by 71.25% and 83.57% compared to TopoDiff-Guided and DOM w/ TA, respectively, while also improves Median CE and FM by 66.48%\(\sim\)83.47% and 60.71%\(\sim\)82.82% against these two methods. When compared to TopologyGAN, all major errors in CE and FM are reduced by over 91%. These results show the potential of generalizability of HPG-Diff for unseen design problems.
Multi-stage methods often trade higher computational cost for performance gains. We investigate this by comparing our HPG-Diff with DOM followed by SIMP post-processing on out-of-distribution tests (Table 4). While increasing the number of SIMP steps from 5 to 10 improves the baseline’s scores, it does not surpass our method’s median CE and FM. Furthermore, this improvement comes at the direct cost of increased inference time, as each SIMP step requires an extra FEA calculation. HPG-Diff achieves competitive performance without this iterative overhead, demonstrating the effectiveness of our framework.
| Method | Mdn CE (%) \(\downarrow\) | Avg VFE (%) \(\downarrow\) | FM (%) \(\downarrow\) |
|---|---|---|---|
| DOM w/ TA | 3.69 | 1.78 | 14.20 |
| DOM w/ TA + SIMP\(_5\) | 1.89 | 1.77 | 10.19 |
| DOM w/ TA + SIMP\(_{10}\) | 1.15 | 1.10 | 2.61 |
| 0.61 | 1.45 | 2.44 |
Table 5 and Table 6 show the ablations on Hierarchical Physics-Guided (HPG) strategy, Floating Material Suppression (FMS) loss and key physics features U, PSL, SED for the Test 1 (in-distribution) and the Test 2 (out-of-distribution) dataset.
| Metrics (%) | - HPG | - FMS | - U | - PSL | - SED | |
|---|---|---|---|---|---|---|
| Average CE \(\downarrow\) | 0.87 | 4.34 | 1.82 | 4.21 | 2.79 | 3.89 |
| Median CE \(\downarrow\) | 0.16 | 0.48 | 0.13 | 0.41 | 0.24 | 0.33 |
| Average VFE \(\downarrow\) | 1.38 | 1.92 | 1.51 | 1.66 | 1.56 | 1.68 |
| FM \(\downarrow\) | 2.90 | 4.22 | 6.47 | 4.67 | 4.12 | 5.11 |
| Metrics (%) | - HPG | - FMS | - U | - PSL | - SED | |
|---|---|---|---|---|---|---|
| Average CE \(\downarrow\) | 5.29 | 36.62 | 7.74 | 18.14 | 11.92 | 15.31 |
| Median CE \(\downarrow\) | 0.61 | 1.26 | 0.88 | 1.05 | 0.68 | 0.74 |
| Average VFE \(\downarrow\) | 1.45 | 1.88 | 1.53 | 1.75 | 1.68 | 1.72 |
| FM \(\downarrow\) | 2.44 | 4.40 | 5.30 | 5.00 | 4.19 | 5.28 |
The "-HPG" variant in Table 5 and Table 6 keeps all three physics features, but removes the proposed hierarchical guidance. The three features are concatenated as a single non-hierarchical conditioning input and fed into the UNet without layer-specific cross-attention guidance. For in-distribution tests, the HPG strategy presents impressive enhancements across all metrics. Removing this strategy causes the Average CE and Median CE to increase from 0.87% and 0.16% to 4.34% and 0.48%, respectively. VFE and FM also increase. This performance degradation is even more pronounced in out-of-distribution tests, where the Average CE dramatically raises from 5.29% to 36.62%. This result demonstrates that the HPG is the keypoint of our method’s generalizability to unseen conditions. Notably, the median CE is also less than 1%, which means majority of generated structures are close to optimal.
For in-distribution tests, incorporating FMS loss reduces FM from 6.47% to 2.90%. However, Average CE drops from 1.82% to 0.87% while the Median CE rises from 0.13% to 0.16%, which means adding FMS loss reduces the high value errors. We believe that this happens because the FMS loss explicitly guides the diffusion process towards generating designs with better structural connectivity. In TO, abnormally high compliance errors typically arise from disconnectivity. By penalizing invalid artifacts, the FMS loss effectively mitigates the instances causing these outlier errors, thus lowering the mean, while having less impact on the typical, well-connected cases reflected by the median.
For out-of-distribution tests, FMS loss improves all metrics, where Average CE decreases from 7.74% to 5.29%, Median CE drops from 0.88% to 0.61% and FM drops from 5.30% to 2.44%. This shows FMS loss can efficiently encourage the generation towards connected designs. Fig. 5 presents examples for the comparison of generated results between HPG-Diff and HPG-Diff w/o FMS loss.
Furthermore, we investigate the individual contributions of the key physics features used in our guidance strategy: U, PSL, and SED. Removing any of these three features leads to a noticeable degradation in performance across all metrics compared to full model.
Interestingly, the analysis reveals different contributions among these features, especially in the more challenging out-of-distribution tests. In Test 2, removing U and SED results in a larger performance drop than removing PSL. For instance, the Average CE increases to 18.14% without U and 15.31% without SED, both of which are considerably higher than the 11.92% when removing PSL. A similar trend is observed in the other metrics. This suggests that while all three physics features are beneficial, U and SED appear to be more critical than PSL for the model’s generalizability.
Most existing generative approaches for TO are image-based and thus inherently constrained to square design domains, while in practical engineering non-square domains are very common. For adapting to non-square domains, we employ parameter-efficient fine-tuning with LoRA [56]. The success of this strategy is highly dependent on the generalizability of the pre-trained model. The pre-trained model must act as a strong generative prior, having learned the fundamental and transferable features of valid topologies from the initial square-domain data, which LoRA then specializes for problems with different size of design domains. To better validate the applicability of HPG-Diff in more common scenarios, we conduct three case studies.
Square Domain Study: A shelf bracket is considered within a standard square design domain. Shelf brackets are common load-bearing components in furniture and mechanical assemblies. This case serves as an illustrative baseline to demonstrate the performance of HPG-Diff in generating diverse, high-performing solutions under a regular design domain. As shown in Fig. 6, the ground truth solution obtained by SIMP achieves a compliance of 5.0506. Our method produces three alternative layouts with compliance values of 4.9962, 5.0398, and 5.0772, which are all comparable to or better than the ground truth. Notably, these alternatives differ in structural characteristics—one with fewer voids, one with more distributed voids, and one with an intermediate configuration (featuring one, three, or two internal struts respectively).
Non-Square Domain Study: To evaluate the adaptation potential of HPG-Diff on non-square rectangular domains, we construct a small dataset of 1,000 samples with domain size 60\(\times\)20 for fine-tuning the pretrained HPG-Diff using LoRA. Two representative structures are investigated as case studies: the cantilever beam, which is widely used in mechanical and civil applications such as overhanging platforms, and the classic bridge, a typical TO benchmark relevant to civil engineering. In both cases, structural diversity enables engineers to compare alternatives for secondary performance criteria, such as fatigue life and vibration modes.
For cantilever beam (Fig. 7), the ground truth compliance is 182.8988. Our method generates two designs with compliance values of 179.1958 and 185.5106. The first alternative, with lower compliance, introduces more voids and supporting struts, which may enhance stiffness distribution but increase manufacturing complexity. The second design closely matches the ground truth in both compliance and geometry, providing a reliable baseline solution. Together, these alternatives allow engineers to balance lightweighting with ease of fabrication.
For classic bridge (Fig. 8), the ground truth compliance is 13.0730, while our two designs achieve 12.9581 and 12.9663. Both alternatives slightly outperform the ground truth in compliance, but introduce more voids and internal struts. From an engineering perspective, these variants offer potential advantages in load distribution and redundancy, though they may require more intricate manufacturing processes.
To provide a quantitative evaluation in addition to the case studies, we additionally construct an independent 200-sample evaluation set with the same 60\(\times\)20 rectangular-domain and boundary conditions. These samples are not used during previous LoRA fine-tuning. We evaluate the LoRA-adapted HPG-Diff model on this independent set using CE, VFE, and FM.
| Avg CE (%) \(\downarrow\) | Med CE (%) \(\downarrow\) | Avg VFE (%) \(\downarrow\) | FM (%) \(\downarrow\) |
|---|---|---|---|
| 2.86 | 0.58 | 1.54 | 3.17 |
6pt
As shown in Table 7, the LoRA-adapted HPG-Diff achieves an Avg CE of 2.86%, a Med CE of 0.58%, an Avg VFE of 1.54%, and an FM ratio of 3.17% on the independent evaluation set. These results quantitatively support the potential of lightweight LoRA fine-tuning for the 60\(\times\)20 rectangular-domain adaptation. The cantilever and bridge cases above further illustrate representative generated layouts under this adapted domain.
Findings: Notably, several designs produced by HPG-Diff outperform the SIMP baseline in compliance. We attribute this to two complementary factors: (1) stochastic sampling enables escape from local optima and thus broader exploration of the design space; (2) hierarchical physics guidance enforces basic topological correctness, keeping sampled solutions physically plausible and relatively accurate. As a result, the generated solutions form a variety of structural layouts (different void patterns and strut counts) that achieve comparable or better stiffness while providing designers with actionable alternatives across performance, manufacturability, and aesthetics. LoRA-based adaptation further verifies this when transferring to new domains.
To explore the rationality of chosen physics features, we analyze the orthogonality of these features to judge the redundancy. The primary metric for this analysis is the orthogonality score, calculated as \(1 - |\cos(\theta)|\), where \(\theta\) is the angle between the feature vectors. A score approaching 1 signifies high orthogonality, which represents strong independence.
The orthogonality analysis was conducted on the training dataset. The results reveal varying degrees of orthogonality among the feature pairs. The highest degree of orthogonality was observed between SED and PSL (with a score of 0.8960±0.0527), followed by U and SED (0.7464±0.1048). In contrast, the U and PSL pair exhibited a significantly lower orthogonality score of 0.2065±0.1013. We also compute the orthogonality scores on Test 2 set. The same trend is observed: SED and PSL (\(0.899 \pm 0.051\)), U and SED (\(0.741 \pm 0.107\)), U and PSL (\(0.202 \pm 0.100\)). This suggests that the redundancy pattern among the physics features is stable under the evaluated unseen boundary conditions. Statistically, this high correlation implies that PSL contains information largely overlapping with U.
However, this statistical view does not fully explain the asymmetrical importance revealed in the ablation study. Although U and PSL are correlated, they serve different roles in the hierarchical guidance process. U provides a dense, boundary- and load-conditioned deformation response for low-level structural refinement, whereas PSL explicitly represents internal load-transmission paths and provides a localized mid-level structural-skeleton guidance. This explains why removing U causes the largest degradation, while removing PSL still leads to a consistent but smaller performance drop.
We further support this interpretation with feature-map visualizations in Appendix B. The PSL-conditioned branch shows better relative concentration on the predicted X-shaped structural skeleton than the U-conditioned branch, suggesting that PSL does not merely duplicate U but provides a more explicit mid-level skeleton cue.
| Method | Preprocess | Sampling | Postprocess | Inference | \(\Delta{T}_{inf}\) |
|---|---|---|---|---|---|
| SIMP | - | - | 23.93 | 23.93 | 0.00 |
| TopoDiff | 3.83 | 3.12 | - | 6.95 | - 70.96 |
| TopoDiff-Guided | 3.83 | 22.65 | - | 26.48 | + 10.66 |
| DOM w/ TA | 0.12 | 3.03 | - | 3.15 | - 86.84 |
| 5.92 | 4.82 | - | 10.74 | - 55.12 |
A key distinction of our work lies in the simplicity during the inference phase and effectiveness of the guidance mechanism during training phase. Deep learning methods try to avoid costly simulations within the inference phase. Specifically, guided-diffusion approaches like TopoDiff employ auxiliary models trained with FEA generated physics features to guide the inference phase. DOM refines this paradigm by substituting the expensive FEA preprocessing features with a fast kernel relaxation, and employing trajectory alignment that uses intermediate optimization results to guide the model’s training process.
While this approach eliminates guidance in the inference phase and reduces inference time, it results in a notable trade-off in performance. This strategy for reducing inference cost is instructive. However, the large degradation in performance highlights the critical importance of effective physics guidance in constrained generation tasks.
In contrast, our approach computes initial key physics features via FEA. All finite elements are assigned the same initial density, and a single FEA is solved under the prescribed boundary conditions and loads. Therefore, the physics features are computed from a uniform density field rather than from the optimized target topology. For HPG-Diff, the preprocessing time denotes one FEA solve together with the subsequent feature calculation. While TopoDiff and TopoDiff-Guided also involve FEA-based preprocessing to obtain the physics fields used for conditioning, DOM w/ TA replaces such FEA-based preparation with a lightweight kernel relaxation step. Therefore, the preprocessing column in Table 8 denotes the method-specific preparation required before diffusion sampling: FEA-based physics-feature preparation for TopoDiff/TopoDiff-Guided, kernel relaxation for DOM w/ TA, and one FEA solve plus feature calculation for HPG-Diff. This clarification ensures that the reported inference time reflects the full pipeline cost of each method rather than only the diffusion sampling time. As detailed in Table 8, our method HPG-Diff clocks in at 10.74 seconds. While not as fast as DOM, our method is approximately twice as fast as the classical SIMP method and outperforms methods like TopoDiff-Guided and DOM. This demonstrates that our "preprocess and hierarchically guide" paradigm strikes a more effective balance. It achieves better accuracy and generalizability with a practical inference time, avoiding both the performance trade-offs of overly simplified models and the computational cost of inference phase guidance.
The out-of-distribution results support the generalization potential of HPG-Diff within the evaluated benchmark, particularly for unseen boundary conditions. Nevertheless, this claim remains limited under constraints of our experimental setup, and broader generalizability requires further validation across more diverse settings. However, we believe that the core approach of our hierarchical physics-guided diffusion is broadly applicable to other physics-based design problems. Indeed, diffusion-based generative frameworks have recently been successfully applied to complex challenges in other fields, such as fluid dynamics [62], [63] and aerodynamic optimization [64], suggesting the potential for adapting our specific guidance strategy to these domains as well.
While we currently ignore certain advanced physics properties (such as non-linear material responses, fatigue behavior, or dynamic loading conditions) or manufacturing constraints for 3D printing (such as minimum and maximum length scales, overhang limitations, or surface roughness), our method takes a step towards precisely incorporating physics features that have implications for performance and manufacturability into data-driven methods. Aiming for enhanced physics consistency and more readily deployable designs in real-world scenarios, we seek to include a broader and more specific set of physics properties and manufacturing constraints with minimal additional costs in the future. This could involve designing novel loss functions that directly penalize violations of these specific constraints like our FMS loss, or exploring architectural modifications to better capture multi-scale physics principles.
Besides efficiency and performance, design diversity and engineering applicability are equally critical criteria. As shown in Section 4.6, HPG-Diff successfully generates diverse, high-performing solutions in both square and \(3{:}1\) rectangular domains. Design diversity is particularly important in practice, as multiple alternatives allow engineers to balance performance with other factors such as manufacturability, cost, or even aesthetic considerations.
Nevertheless, the current engineering validation remains bounded in two aspects. First, the domain-adaptation study is limited to relatively simple aspect-ratio changes. The quantitative benchmark follows the fixed \(64\times 64\) resolution of the TopoDiff [31] dataset. A multi-resolution study would require rebuilding the dataset rather than simply resizing the outputs, since \(128\times 128\) and \(256\times 256\) domains contain 4 and 16 times more finite elements per sample, respectively. More complex scenarios, such as L-shaped connectors, circular domains (e.g., bearing housings or pressure vessels), and fully irregular shapes (common in biomedical implants or customized mechanical parts), have not yet been addressed. While LoRA-based fine-tuning shows adaptability for rectangular domains, its success relies heavily on task similarity. LoRA adaptation also still relies on target-domain samples generated by conventional TO solvers. Therefore, this case study is intended to examine the convenience of lightweight adaptation from existing SIMP-generated data to AI-based rapid generation, rather than to remove the cost of obtaining data. Future work should investigate more robust and data-efficient adaptation strategies, such as incorporating multi-shape domains in the training dataset, proposing stronger geometry-aware conditioning, or reducing the cost of acquiring reliable training data.
Second, the current benchmark contains single-load cases, and the FMS loss is therefore instantiated with heat propagation initialized from the prescribed load region. This design follows the role of FMS in our framework: the main load-bearing material distribution is guided by the boundary-conditioned physics features in HPG, which encourage the formation of a load-transfer structure between the applied load and the constrained supports. However, the generated density field may still contain noisy floating material artifacts, such as disconnected islands or weakly connected fragments detached from the main load-transfer body. FMS mitigates this by propagating from the load region through the generated material layout to support regions and penalizing material that is not effectively incorporated into this load-transfer body. For problems with multiple prescribed loads, the seed mask can be extended as the union of all load regions. Future work should evaluate such multi-load settings.
Besides these limitations, uncertainty quantification is also an important future direction for stochastic generative TO. Although the repeated-sampling analysis in Appendix D provides an empirical view of output variability across inference seeds, it does not constitute formal uncertainty quantification. Future work could combine generative TO with Bayesian uncertainty modeling [65], [66].
In this paper, we propose HPG-Diff, a novel diffusion framework for topology optimization. By synergizing a hierarchical physics-guided strategy with a differentiable connectivity constraint, HPG-Diff improves generation quality under unseen boundary conditions and reduces floating material artifacts in generated density fields. Numerical results demonstrate that aligning key physics features with the denoising process helps capture structural mechanics, reducing the average compliance error to 5.29% in out-of-distribution tests and reducing the floating material ratio to 2.44%. Consequently, HPG-Diff achieves the best performance compared with representative generative TO baselines, without requiring external models or post-processing. The case studies further indicate the potential of lightweight LoRA fine-tuning for the adaptation of HPG-Diff to rectangular non-square domains. Overall, HPG-Diff provides an effective framework for integrating physics guidance into generative topology optimization.
Data will be made available on request.
This research was supported by the National Key R&D Program of China (No. 2023YFB4604800).
To further clarify the contribution of the hierarchical physics-guided strategy, we conduct two additional ablation studies. First, "Bottleneck" concatenates U, PSL, and SED and injects them only at the bottleneck layer as a single conditioning signal. This variant tests whether a single global injection of all physics features is sufficient without layer-specific assignment. Second, U-SED Swap variant keeps the same physics features and the same layer-specific cross-attention structure, but swaps the shallow-layer U guidance and the deep-layer SED guidance. This variant tests whether the feature-level matching is important while keeping other settings unchanged.
As shown in Table 9, HPG-Diff reduces Average CE from 3.70% and 2.43% to 0.87%, and reduces FM from 3.79% and 4.10% to 2.90%, compared with Bottleneck and U-SED Swap in Test 1, respectively. On the more challenging Test 2, the improvement is more pronounced: HPG-Diff reduces Average CE from 16.42% and 13.18% to 5.29%, and reduces FM from 4.18% and 4.61% to 2.44%. The results suggest that the performance gain is not merely due to providing additional physics features, but also to organizing these features according to the proposed hierarchical physics-guidance strategy.
| Dataset | Variant | Average CE\(\downarrow\) | Median CE\(\downarrow\) | Average VFE\(\downarrow\) | FM\(\downarrow\) |
|---|---|---|---|---|---|
| Test 1 | 0.87 | 0.16 | 1.38 | 2.90 | |
| Bottleneck | 3.70 | 0.35 | 1.68 | 3.79 | |
| U-SED Swap | 2.43 | 0.27 | 1.58 | 4.10 | |
| Test 2 | 5.29 | 0.61 | 1.45 | 2.44 | |
| Bottleneck | 16.42 | 0.97 | 1.73 | 4.18 | |
| U-SED Swap | 13.18 | 0.82 | 1.65 | 4.61 |
To address the concern that PSL may be redundant with U due to their high correlation, we further examine whether PSL contributes a distinct representational role in the denoising process. Specifically, we visualize the cross-attention output feature maps conditioned on U and PSL during late denoising. Let \(O_U\) and \(O_{PSL}\) denote the output tensors of the corresponding cross-attention modules. For each timestep, we aggregate the output tensor over channels using the mean absolute value, and visualize the resulting feature map at the native resolution.
We use the same example as in Fig. 4 for consistency with the previous sections, enabling a direct visual comparison among the conditioning signals, the cross-attention output feature maps, and the predicted topology. We focus on late denoising timesteps (\(t=50\) to \(t=0\), with \(T=1000\)), since early-stage predictions are dominated by noise and do not yet provide a stable structural layout for visual comparison.
As shown in Fig. 9, the PSL-conditioned output feature maps exhibit more concentrated responses along the X-shaped structural skeleton and the central load-transfer region. In contrast, the U-conditioned feature maps are more spatially diffuse. We further quantify this observation in Table 10 by using the predicted X-shaped topology region as a mask. The PSL-conditioned result consistently achieves an \(M_X/M_{\mathrm{bg}}\) ratio larger than 1.0 across late denoising timesteps, while the U-conditioned result remains below 1.0. These results suggest that PSL does not merely duplicate the U-conditioned response; instead, it provides a more explicit mid-level structural-skeleton cue for the denoising process.
This observation is also consistent with the different physical roles of the two features in topology optimization. The displacement field U provides a dense, boundary- and load-conditioned deformation response, indicating how the domain tends to deform under the prescribed problem setting. Such information is useful for low-level structural refinement, but it does not directly define the final load-bearing skeleton. In contrast, PSL explicitly represents internal load-transmission paths, which are more closely aligned with the structural skeleton formed by the optimized topology.
| Timestep | Mean response \(M_X\) | Relative contrast \(M_X/M_{\mathrm{bg}}\) | ||
|---|---|---|---|---|
| 2-3 (lr)4-5 | U-conditioned | PSL-conditioned | U-conditioned | PSL-conditioned |
| 50 | 0.215 | 0.396 | 0.777 | 1.065 |
| 40 | 0.214 | 0.395 | 0.785 | 1.063 |
| 30 | 0.213 | 0.394 | 0.776 | 1.060 |
| 20 | 0.213 | 0.392 | 0.783 | 1.057 |
| 10 | 0.211 | 0.390 | 0.770 | 1.049 |
| 0 | 0.207 | 0.380 | 0.739 | 1.032 |
5pt
To further examine the proposed Floating Material Suppression (FMS) loss, we conduct sensitivity analyses on three parameters: the propagation step \(k\), the time-weighting scalar \(c\), and the FMS loss weight \(\lambda_{\mathrm{fm}}\). These parameters play different roles in FMS. The propagation step \(k\) controls the spatial coverage of the differentiable propagation process. The scalar \(c\) controls when the FMS regularization becomes effective during DDPM denoising process through \(w(t)=\exp(-ct/T)\), where \(T\) is the number of diffusion timesteps. The weight \(\lambda_{\mathrm{fm}}\) balances the standard denoising objective and the connectivity regularization. Therefore, we vary one parameter at a time while keeping the others default in our experiments (\(k=64\), \(T=1000\), \(c=5\), \(\lambda_{\mathrm{fm}}=0.1\)).
The parameter \(k\) is selected according to the coverage requirement of the propagation process. Since the local propagation in Eq. (6) expands the reachable region step by step, \(k\) should be large enough to cover the design domain; otherwise, connected material far from the load seed may be incorrectly treated as unreachable. As shown in Table 11, a smaller \(k\) weakens floating-material suppression, while increasing \(k\) beyond the domain-covering range brings limited additional benefit. We therefore set \(k=64\) for the \(64\times 64\) design domain.
| \(k\) | Avg CE (%) \(\downarrow\) | Med CE (%) \(\downarrow\) | Avg VFE (%) \(\downarrow\) | FM (%) \(\downarrow\) |
|---|---|---|---|---|
| 32 | 6.46 | 0.75 | 1.52 | 3.12 |
| 64 | 5.29 | 0.61 | 1.45 | 2.44 |
| 96 | 5.33 | 0.62 | 1.46 | 2.39 |
5pt
The scalar \(c\) controls the temporal schedule of the FMS loss. In the reverse DDPM process, larger \(t\) corresponds to noisier states, while late reverse denoising corresponds to smaller, low-noise timesteps near zero. With \(T=1000\) and the default \(c=5\), the weight \(w(t)=\exp(-5t/1000)\) is suppressed at high-noise timesteps, e.g., \(w(1000)=0.0067\) and \(w(500)=0.082\), and becomes much stronger at low-noise timesteps, e.g., \(w(100)=0.607\) and \(w(0)=1\). This is consistent with the role of FMS: penalizing disconnected components is more meaningful after the predicted material distribution has formed a relatively clear structure. As shown in Table 12, the default setting achieves the best CE–FM balance. Removing the temporal decay (\(c=0\)) applies the connectivity penalty too broadly across noisy denoising steps, while a larger value (\(c=10\)) delays the regularization excessively and weakens floating-material suppression.
| \(c\) | Avg CE (%) \(\downarrow\) | Med CE (%) \(\downarrow\) | Avg VFE (%) \(\downarrow\) | FM (%) \(\downarrow\) |
|---|---|---|---|---|
| 0 | 6.38 | 0.79 | 1.69 | 5.03 |
| 2.5 | 5.71 | 0.67 | 1.52 | 2.82 |
| 5 | 5.29 | 0.61 | 1.45 | 2.44 |
| 10 | 5.62 | 0.66 | 1.49 | 3.11 |
6pt
The weight \(\lambda_{\mathrm{fm}}\) controls the relative strength of the connectivity regularization. Its role is not to override the main denoising objective, but to suppress disconnected high-density regions while preserving low compliance. As shown in Table 13, setting \(\lambda_{\mathrm{fm}}=0\) removes the FMS regularization and leads to a higher FM ratio. Increasing \(\lambda_{\mathrm{fm}}\) reduces floating material, but an overly large weight starts to degrade compliance and volume-fraction accuracy, indicating the expected trade-off between connectivity regularization and structural optimality. The default value \(\lambda_{\mathrm{fm}}=0.1\) lies near the knee of this CE–FM trade-off: it reduces FM while achieving the lowest Avg CE among the tested settings.
| \(\lambda_{\mathrm{fm}}\) | Avg CE (%) \(\downarrow\) | Med CE (%) \(\downarrow\) | Avg VFE (%) \(\downarrow\) | FM (%) \(\downarrow\) |
|---|---|---|---|---|
| 0 | 7.74 | 0.88 | 1.53 | 5.30 |
| 0.05 | 6.12 | 0.71 | 1.49 | 3.36 |
| 0.10 | 5.29 | 0.61 | 1.45 | 2.44 |
| 0.20 | 5.97 | 0.69 | 1.61 | 2.41 |
| 0.40 | 7.08 | 0.93 | 1.80 | 2.18 |
6pt
Overall, these results show that the FMS loss remains stable under moderate parameter changes around the default setting, while extreme settings exhibit the expected trade-off between connectivity regularization and compliance accuracy.
Since generative models are stochastic, we further evaluate HPG-Diff with repeated inference runs across multiple random seeds. We use the same trained checkpoint and inputs, and only vary the inference-time random seed.
| Set | Metrics | Repeated results | Mean \(\pm\) Std |
|---|---|---|---|
| Test 1 | Avg CE (%) \(\downarrow\) | 0.87, 0.93, 0.97, 1.01, 0.81 | 0.92\(\pm\)0.08 |
| Med CE (%) \(\downarrow\) | 0.16, 0.17, 0.18, 0.16, 0.17 | 0.17\(\pm\)0.01 | |
| Avg VFE (%) \(\downarrow\) | 1.38, 1.42, 1.47, 1.48, 1.47 | 1.44\(\pm\)0.04 | |
| FM (%) \(\downarrow\) | 2.90, 3.50, 3.12, 2.70, 3.33 | 3.11\(\pm\)0.32 | |
| Test 2 | Avg CE (%) \(\downarrow\) | 5.29, 5.58, 5.51, 8.32, 7.24 | 6.39\(\pm\)1.33 |
| Med CE (%) \(\downarrow\) | 0.61, 0.58, 0.63, 0.58, 0.58 | 0.60\(\pm\)0.02 | |
| Avg VFE (%) \(\downarrow\) | 1.45, 1.45, 1.48, 1.42, 1.38 | 1.44\(\pm\)0.04 | |
| FM (%) \(\downarrow\) | 2.44, 3.40, 3.50, 2.32, 3.13 | 2.96\(\pm\)0.55 |
5pt
As shown in Table 14, HPG-Diff shows low variance on Test 1. On the more challenging Test 2, Med CE and Avg VFE remain stable across seeds while the standard deviation of Avg CE is 1.33%. This result indicates that most samples remain stable across inference seeds, but the average compliance error can be affected by difficult long-tail cases.
We analyze the tail distribution of compliance error (CE) and inspect representative failure cases. Following the high-error threshold used in TopoDiff [31], we define failure cases as samples with CE larger than 30%. Table 15 reports the distributional statistics of per-sample CE on Test 2 for the reference inference run reported in the main benchmark tables.
| Method | Avg CE (%) \(\downarrow\) | Mdn CE (%) \(\downarrow\) | Std CE (%) \(\downarrow\) | Max CE (%) \(\downarrow\) | CE \(>\) 30% (%) \(\downarrow\) |
|---|---|---|---|---|---|
| HPG-Diff | 5.29 | 0.61 | 31.76 | 791.07 | 2.70% |
4pt
As shown in Table 15, the error distribution is long-tailed. The median CE is 0.61%, and only 2.70% of samples exceed the 30% high-error threshold. However, the maximum CE reaches 791.07%, indicating that Avg CE is affected by some severe failure cases. This explains the variance of Avg CE.
Fig. 10 shows representative high-error cases with the corresponding boundary conditions overlaid. In these examples, high CE is associated with weak or incomplete load-transfer paths between the applied load and the constrained boundaries. Some generated topologies contain overly thin members or disconnected material, leading to insufficient stiffness.
The principal stress line (PSL) maps are constructed from the finite-element stress field following the standard principal-stress-line tracing procedure used in structural topology design [67]. For each element or grid point in the design domain, the in-plane stress tensor is written as \[\boldsymbol{\sigma} = \begin{bmatrix} \sigma_x & \tau_{xy} \\ \tau_{xy} & \sigma_y \end{bmatrix}.\] The two principal stresses and their corresponding directions are obtained by eigenvalue decomposition: \[\boldsymbol{\sigma}\mathbf{v}_i = \sigma_i \mathbf{v}_i, \quad i=1,2,\] where \(\sigma_1\) and \(\sigma_2\) denote the maximum and minimum principal stresses, respectively, and \(\mathbf{v}_1\) and \(\mathbf{v}_2\) are the corresponding principal directions.
Starting from uniformly sampled seed points in the solid design domain, PSLs are traced by integrating along the local principal stress directions. Tensile PSLs are traced along the maximum principal-stress direction \(\mathbf{v}_1\), while compressive PSLs are traced along the minimum principal-stress direction \(\mathbf{v}_2\). Line tracing is terminated when the trajectory reaches the domain boundary, enters a void region, or reaches a region with negligible principal stress magnitude.
The traced PSLs are then rasterized onto the same spatial resolution as the model input. In this work, tensile and compressive PSLs are represented as two separate feature channels to avoid ambiguity between line type and line intensity. The rasterized maps are normalized before being used as physics-guided input features.
We further compare HPG-Diff with NITO [68] and OAT [69]. NITO is a neural implicit field-based topology optimization model that represents boundary conditions with sparse point-based inputs. OAT is positioned as a foundation model for structural topology optimization and is trained on OpenTO, a large-scale dataset containing 2.2 million optimized structures and 2 million unique boundary-condition configurations.
Since OAT is positioned as a foundation model trained on OpenTO, we report this comparison on the in-distribution Test 1 set. Retraining OAT only on our training data would not reflect its intended foundation-model setting, while directly comparing it on our Test 2 set would mix differences in training-data scope with the out-of-distribution evaluation. Therefore, Test 1 provides a more suitable reference for comparing generation quality under the same benchmark distribution.
| Method | Avg CE (%) \(\downarrow\) | Med CE (%) \(\downarrow\) | Avg VFE (%) \(\downarrow\) |
|---|---|---|---|
| NITO [68] | 8.13 | 0.47 | 1.40 |
| OAT [69] | 1.74 | 0.32 | 0.25 |
| HPG-Diff (Ours) | 0.87 | 0.16 | 1.38 |
8pt
As shown in Table 16, HPG-Diff achieves the lowest compliance errors on the in-distribution Test 1, with an Avg CE of 0.87% and a Med CE of 0.16%, compared with 8.13%/0.47% for NITO and 1.74%/0.32% for OAT. This suggests that the hierarchical physics-guided conditioning and FMS help the model generate layouts that better match the load-transfer structure required for low compliance. In contrast, NITO uses a neural implicit representation with sparse boundary-condition inputs, which provides flexibility but may be less specialized for this benchmark. OAT, as a foundation model trained on a much broader OpenTO distribution, achieves the lowest Avg VFE of 0.25%, indicating better volume fraction preservation. However, its broader training objective and cross-domain generalization setting may make it less specialized for minimizing compliance error on this specific dataset than HPG-Diff.