A fabrication-aware vectorized generative representation for topology optimization of path-defined MEMS microstructures Authors: Gong-Zeng Liu, Lin-Feng Zhao, Jie Zhang, Xiang Liu, Yi-Meng Lv, Tian-Yu Geng, Zai-Fa Zhou Published: 2026 ABSTRACT AbstractThis work proposes a vectorized generative representation for fabrication-aware heuristic topology optimization of path-defined MEMS microstructures, addressing the trade-off between topological freedom and fabrication feasibility in MEMS inverse design. Pixel-level topology descriptions provide high design freedom and often require additional constraints to suppress disconnected or fabrication-incompatible layouts. Meanwhile, heuristic algorithms are attractive for non-gradient MEMS optimization, yet their efficiency depends critically on the compactness and validity of the design representation. The proposed representation addresses this limitation by mapping low-dimensional continuous design variables into connected, fabrication-compatible physical layouts, with topology evolution, boundary compatibility, linewidth modulation, spacing constraints, and geometric smoothing embedded directly into the generation process. This formulation provides a compact continuous search space in which path topology, spatial deployment, and local linewidth can be jointly explored while the prescribed fabrication constraints are maintained during decoding. Each generated layout is exported as a vector geometry for finite-element electrothermal labeling and rasterized as a morphology image for surrogate-model training, enabling rapid performance prediction during optimization. In a resistive thermal MEMS microheater used as the primary experimental validation case, infrared thermography showed that the measured temperature coefficient of variation decreased from 4.04% to 1.22%, while the ±2 °C effective isothermal area ratio increased from 34.7% to 95.6%. Finite-element results from a compliant micro-spring case demonstrated transferability: in-plane displacement increased by 30.6%, while peak von Mises stress decreased by 16.3% under matched footprint and loading. These results demonstrate the applicability of the proposed representation as a fabrication-compatible optimization interface for path-defined MEMS microstructures under distinct physical objectives. Subject terms: Electrical and electronic engineering, Computational nanotechnology Introduction In microelectromechanical systems (MEMS), functional performance is typically governed by the geometric organization of localized microstructures, such as serpentine resistive heaters in thermal sensors, suspension springs in RF switches, and compliant beams in inertial actuators1–6. Despite their diverse physical operating principles, these elements share a fundamental geometric characteristic: their macroscopic response is defined by the topological continuity, spatial distribution, and localized cross-sectional modulation of a connected path, as illustrated in Fig. 1. Establishing a robust methodology for synthesizing such structures requires a holistic approach that can simultaneously balance complex multiphysics responses—including non-uniform heat redistribution in electro-thermal systems and complex stress-field diffusion in compliant mechanisms—with strict microfabrication constraints. In these miniaturized systems, the reliability of the device is often as critical as its performance; localized hot spots or excessive stress concentrations can lead to premature material fatigue or catastrophic structural failure7,8, necessitating a design approach that treats physical response and geometric integrity as an inseparable pair. Abstraction of path-defined MEMS microstructures. Representative suspension springs, support springs, and heating resistors are abstracted as continuous paths between prescribed terminals, characterized by routing, turning, and local width. Arrows indicate path direction; green and red markers denote the start and end terminals Conventional design strategies for MEMS have historically relied upon predefined geometric templates governed by a limited number of tunable parameters9. While such methods are straightforward and naturally compatible with fabrication, the predefined topology also fixes much of the path’s spatial organization, leaving optimization mainly to a limited set of dimensional parameters. Even when serpentine or fractal space-filling layouts provide regular geometric coverage and guaranteed continuity, their regional path density, turning pattern, and boundary deployment are prescribed a priori, and geometric regularity does not necessarily translate into a desired physical-field distribution. Template-based optimization can therefore efficiently refine a known design family, but offers limited access to alternative path organizations when the physical response depends on spatially nonuniform heat loss, stress transfer, or other boundary effects. To enlarge this structural freedom, freeform and non-parameterized design strategies have been investigated10–13. For instance, researchers have successfully combined genetic algorithms with freeform geometries to enhance structural flexibility, while pixelated binary image representations have been employed in conjunction with deep convolutional neural networks (CNNs) to accelerate the evaluation of geometrically diverse candidates. The emergence of “AI for Science” has further propelled the use of deep reinforcement learning and generative adversarial networks to discover high-performance MEMS topologies14,15. These data-driven approaches offer a glimpse into a new design paradigm where the computer autonomously identifies optimal forms. However, moving from abstract pixel patterns to physical MEMS hardware introduces a “manufacturability gap”15–18. In the micro-regime, photolithographic processes are extremely sensitive to geometric irregularities. Small artifacts, such as sharp vertices or sub-lithographic gaps, can cause significant deviations during etching and deposition, leading to a total loss of the intended physical functionality. Despite recent advancements in generative modeling, applying these strategies to path-defined microstructures still faces two fundamental challenges. Recent work by Jia et al. preserved path connectivity through a compact binary encoding of fixed-width MEMS beam paths19. At the optimization stage, the path is constructed from a prescribed number of upward and rightward segments, resulting in a compact but fixed-step and monotonic routing space. This formulation efficiently reduces the search dimension, but does not support local return routing or independent linewidth modulation. A more expressive representation should therefore allow routing topology, path length, spatial deployment, and local linewidth to vary jointly while terminal compatibility, global connectivity, non-intersection, linewidth bounds, minimum spacing, and boundary validity remain enforced. Second, the response space of path-governed devices is highly topology-sensitive: small structural perturbations can induce discrete routing bifurcations, causing abrupt, non-smooth variations in the physical response. Under such conditions, standard low-dimensional surrogate models, which rely on smooth parameter-to-performance mappings, become unreliable. This representational bottleneck—the difficulty of mapping a compact searchable space to diverse, fabrication-compatible physical layouts—remains a key challenge in automated inverse design of path-defined MEMS microstructures. To address these bottlenecks, we propose a vectorized generative representation for fabrication-aware heuristic topology optimization of path-defined MEMS microstructures. The core idea is to reconfigure the inverse design process from a high-dimensional discrete layout search into a compact continuous design-space exploration. Specifically, the proposed representation establishes a formal mapping between a continuous latent control vector and a discrete fabrication-compatible physical layout. Manufacturing rules, including minimum linewidth, spacing, boundary compatibility, and global connectivity, are embedded directly into the generative logic rather than imposed as post-processing constraints. Accordingly, each decoded candidate satisfies the prescribed connectivity and geometric fabrication constraints before physical evaluation. This representation enables heuristic algorithms, implemented here using a Genetic Algorithm (GA), to operate on continuous latent variables instead of directly manipulating the discrete routing grid20,21. To efficiently evaluate the topology-sensitive electrothermal response, we further integrate an image-based CNN as a morphology-aware surrogate model. The generated layouts are processed through a dual-channel workflow, where vectorized geometries are used for finite-element electrothermal labeling and corresponding morphology images are used for surrogate learning. The resistive thermal MEMS microheater serves as the primary experimental validation case, combining finite-element verification with comparative infrared thermography. A compliant micro-spring is further introduced as a mechanical validation case to examine the transferability of the same representation under a distinct physical objective. The claimed generality is therefore restricted to the class of path-defined MEMS microstructures rather than arbitrary MEMS geometries. Results Vectorized generative representation for fabrication-aware MEMS topology optimization To address the representational bottleneck in connected MEMS microstructure design, we establish a vectorized fabrication-aware framework that organizes inverse design as a closed-loop process of latent encoding, constrained geometry generation, morphology-aware evaluation, and heuristic search. Rather than optimizing directly on a discrete routing grid or within a rigid predefined template family, the framework constructs a continuous control space whose perturbations are translated into fabrication-compliant connected layouts. In this way, the inverse-design problem is reformulated from direct manipulation of discrete geometry into structured search over a low-dimensional generative representation. The framework is built around a unified control vector, where B specifies the boundary and terminal conditions of the connected structure, Z governs the routing topology and spatial deployment of the path during topology synthesis, and W controls the local linewidth distribution after the path skeleton has been generated. In this formulation, Θ serves as the continuous genotype, while the resulting physical layout acts as the discrete phenotype. The role of the control vector is therefore not to directly prescribe a fixed geometric template, but to drive the generation of a connected microstructure through coordinated topological and local geometric variation. Building on this unified control formulation, the framework proceeds through three coupled methodological stages, followed by a representative design-space demonstration, as summarized in Fig. 2. The first stage is fabrication-aware geometry generation, in which rule-based topology synthesis constructs a globally connected routing skeleton on a constrained discrete grid, followed by continuous width modulation to transform the skeleton into a physical layout with locally varying line width. The second stage is surrogate-accelerated evaluation. Each generated layout is processed through two parallel channels: the vectorized geometry is exported as a DXF file for finite-element labeling, and the same layout is rasterized into a morphology image for convolutional neural-network surrogate learning. Representative examples of the synchronized vector-layout and raster-image representations are provided in Supplementary Fig. S4. Once trained, the surrogate provides rapid performance prediction and replaces repeated finite-element evaluations during optimization. The third stage is heuristic search in the latent space Θ, enabling efficient candidate exploration through coordinated structural variation. Depending on the design requirement, either multi-objective or hierarchical optimization is used, followed by high-fidelity finite-element or experimental verification. Representative samples from the resulting design space further illustrate the structural diversity and embedded rule compliance of the proposed representation. Vectorized generative representation for fabrication-aware MEMS topology optimization. a A unified control representation composed of topology vector Z and width vector W is decoded into connected layouts through topology synthesis and width modulation. b Generated layouts are exported for finite-element labeling and rasterized for CNN surrogate learning. c The trained surrogate supports directed latent-space search through multi-objective or hierarchical optimization. d Representative samples demonstrate topology diversity and compliance with linewidth and spacing constraints The established framework is first examined comprehensively through an electrothermal resistive micro-heater, which serves as the primary validation case. In this case, the framework is evaluated progressively from fabrication-aware geometry generation and morphology-aware performance prediction to latent-space GA optimization, high-fidelity finite-element verification, and comparative infrared characterization. A compliant micro-spring is subsequently introduced as a mechanical validation case to examine the transferability of the same vectorized topology–width representation and fabrication-aware generation principle to displacement–stress optimization under different physical objectives. Thermal micro-heater design task and evaluation metrics Path-defined MEMS microstructures refer to functional elements whose geometry is organized as one or multiple continuous micro-scale paths. Typical examples include resistive heaters, serpentine sensing resistors, thermal isolation beams, compliant suspensions, and routing-like conductive or mechanical microstructures. Unlike compact solid domains, their physical response is governed by the continuity, spatial distribution, local linewidth, and boundary connection of the path. For electrothermal MEMS devices, these geometric factors jointly determine current distribution, Joule-heating density, heat spreading, and heat loss to the surrounding anchors or substrate. Therefore, a path-defined resistive micro-heater provides a representative validation platform for evaluating whether the proposed representation can regulate topology-sensitive MEMS performance while preserving fabrication compatibility. The target design task is temperature-field homogenization within the prescribed active heating region. Temperature uniformity is an established design objective in thermal MEMS, and recent experimental studies have shown that the thermal profile of microheaters is strongly influenced by heater geometry, linewidth, spacing, and peripheral heat loss22. For gas-sensing micro-hotplates, the local operating temperature directly affects the sensitivity and cross-sensitivity of semiconductor sensing materials; consequently, temperature gradients over the active sensing region should be minimized to maintain consistent thermal operating conditions23. Recent MEMS gas-sensor studies continue to explicitly employ spatially uniform microheater temperature distributions at the sensing site24, while highly integrated gas-sensing systems further emphasize thermal-source design and thermal-coupling control as important device-level considerations25. In MEMS Pirani gauges, heat distribution over the heated structure directly influences pressure-dependent thermal loss and sensor response26,27. Similarly, in thermal-flow sensors, the heater-established temperature field forms the basis of the flow-induced thermal response28. Therefore, temperature uniformity is not merely a geometric characteristic of the heater layout, but a device-level physical quantity relevant to the effective sensing region and thermal response. Importantly, regular or space-filling geometric coverage does not necessarily produce a uniform temperature field, because heat loss is spatially nonuniform across the suspended structure. Achieving a near-isothermal field may therefore require a deliberately nonuniform distribution of path density and local Joule heating to compensate for the different thermal losses in the central, boundary, and supporting regions. The design objective is not only to reduce the global temperature variation, but also to enlarge the near-isothermal area within the functional region. Therefore, two complementary metrics are used to evaluate thermal-field uniformity. The first metric is the temperature coefficient of variation, TCV=σT/Tmean, where σT and Tmean denote the standard deviation and mean temperature within the active heating region, respectively. The second metric is the effective isothermal area ratio, η±2K, defined as the fraction of the heating region whose temperature lies within ±2 K of the regional mean temperature. Fabrication-aware geometry generation in latent space For the primary micro-heater case, we first evaluated whether the vectorized representation could stably map continuous control variables into discrete, fabrication-compatible layouts. Because the boundary and terminal conditions B are fixed for this design task, the searchable variables are [Z,W]. The 32-dimensional topology-control vector Z controls the routing sequence, turning locations, path length, regional path density, and spatial deployment, whereas the 12-dimensional width-control vector W controls the local linewidth distribution. Together, these variables define a 44-dimensional latent space that drives the entire geometry generation process, with the corresponding control variables, fabrication constraints, and implementation settings summarized in Table 1. Table 1Case-specific control variables and fabrication constraints for the resistive micro-heater demonstrationCategoryParameter SymbolDimensionValue/RangeDesign variablesTopology-control vectorZ32[−1,1]Width controlW12[Wmin,Wmax]Fabrication Constraints and SettingsDesign regionL×W-400×400μm2Grid resolutionG-80×80Minimum linewidthWmin-5μmMinimum spacinggmin-5μmMaximum linewidthWmax-15μmWidth synthesisdegree-3(CubicB−spline) Case-specific control variables and fabrication constraints for the resistive micro-heater demonstration The structural skeleton is synthesized on a discretized orthogonal grid whose pitch is consistent with the prescribed minimum feature size. The orthogonal grid constrains the available centerline primitives but does not fix the resulting path topology or spatial distribution. It is adopted here as an implementation choice that enables deterministic checking of connectivity, non-intersection, minimum spacing, and boundary clearance during path generation. Starting from the source terminal, the path evolves sequentially toward the target. At each routing step t, the generator identifies an admissible candidate set Γ(ct), dynamically filtered for boundary validity, connectivity preservation, and local geometric feasibility. For each candidate move c∈Γ(ct), the routing preference is evaluated through a deterministic scoring function, where f denotes the local feature descriptor of the candidate move and Φ(⋅) is the deterministic scoring map. The next node is then selected by maximizing this preference, A key property of this process is that admissibility is enforced before scoring rather than corrected afterward. Candidate moves that violate geometric feasibility or interrupt path continuity are excluded in advance. As a result, the topology-control vector Z does not explicitly prescribe fixed coordinates; instead, it biases the evolution of a valid connected path within a fabrication-aware discrete routing space, thereby preserving global connectivity by construction. The stage-wise generation process is illustrated in Supplementary Fig. S1, while the complete latent-to-layout decoding procedure is summarized in Algorithm S1. Once the topological skeleton has been established, local geometric refinement is introduced through continuous width modulation, as illustrated in Fig. 2a. The width envelope w(s) along the normalized path coordinate s is expressed as where wi are width-control coefficients determined by W, and Ni(s) are cubic B-spline basis functions. This formulation converts the discrete skeleton into a physical layout with smoothly varying local linewidth, enabling adaptive widening at critical junctions to suppress localized current crowding and narrowing along selected segments to preserve geometric flexibility. Because fabrication limits are embedded directly into both the routing and width-control stages, the resulting geometry remains within the prescribed manufacturing window throughout the mapping process. The geometric effect of this latent-space generation strategy is shown in Fig. 2d. Systematic perturbation of the latent vector produces a diverse family of connected layouts with clearly differentiated routing organizations, ranging from relatively center-dense configurations to more perimeter-distributed patterns. Importantly, this diversity is achieved without sacrificing geometric validity: all generated paths remain continuous between the designated terminals and stay fully confined within the fabrication-aware design region. This indicates that the latent space serves not merely as a compact parameterization, but as a stable generator of discrete connected geometries. Representative layouts decoded from different combinations of Z and W are provided in Supplementary Fig. S2. The distinct role of the width-control vector W in modulating local linewidth distributions is further illustrated in Supplementary Fig. S3. The geometric diversity of the generated design space is quantitatively characterized in Supplementary Figs. S5–S8 through the distributions of metal-area ratio, spatial coverage, perimeter deployment, centerline length, and mean linewidth. In addition, no violations of the embedded 5μm minimum linewidth or 5μm minimum spacing constraints were observed. Together with the 80×80 grid resolution and the 15μm maximum linewidth used in the present implementation, these results confirm that the latent-to-geometry mapping acts as a fabrication-aware geometric filter: continuous perturbations in the control vector are mapped into a discrete geometry domain satisfying the prescribed connectivity, linewidth, and spacing constraints. This by-construction compliance provides the geometric foundation for the subsequent surrogate modeling and optimization stages. Morphology-aware surrogate modeling Although the established latent representation stabilizes geometry generation, efficient inverse design still requires a predictive model that can reliably evaluate the physical response of the generated layouts29–32. This is particularly important for path-defined MEMS microstructures because their responses are strongly topology-sensitive: small structural perturbations can trigger discrete routing changes or local morphology variations that substantially alter current density, Joule heating, or temperature redistribution. As a result, even when geometry generation remains fabrication-aware, the mapping from the latent variables to the physical response may still be highly non-smooth and difficult to approximate directly. In the primary electrothermal case, the target task is to predict the thermal performance of the generated micro-heater from its geometry. Let I(Θ), denote the generated layout and let t^ denote the corresponding performance vector. The predictive problem can then be written in compact form as A direct approach would be to learn this mapping from the latent vector Θ itself. In principle, Θ contains the complete generative information. In practice, however, nearby latent vectors may correspond to layouts with distinctly different routing structures, path bottlenecks, or heat-dissipation patterns. For each generated design, the MLP baseline takes the latent vector Θ as input, whereas the CNN surrogate operates on the corresponding rasterized morphology image33. The supervision labels are obtained by exporting the generated planar layout as a DXF file, instantiating it in the finite-element model with the prescribed extrusion and physical conditions, and solving for the high-fidelity electrothermal response. The resulting finite-element labels are then paired with the layout images for surrogate training. The CNN used here is a supervised data-driven surrogate trained on FEM-derived labels; no governing-equation residuals or physics-informed loss terms are included in the training objective. To examine this issue, we benchmarked a multilayer perceptron (MLP) operating directly on the latent variables against a convolutional neural network (CNN) surrogate operating on rasterized morphology images of the generated layouts, as shown in Fig. 3. The direct vector-space MLP exhibited severe parity dispersion and poor predictive fidelity, indicating that the topology-sensitive thermal response could not be stably captured from the latent variables alone. In contrast, the morphology-aware CNN, trained on the rasterized layout images paired with finite-element labels, successfully recovered the spatial features governing the electrothermal response and achieved substantially improved prediction accuracy. This improvement is also reflected in the normalized error comparison in Fig. 3e, where the CNN consistently shows lower mean NRMSE than the latent-vector MLP on the training, validation, and test subsets. Specifically, evaluation on the test set yielded R2 values of 0.9691 for mean temperature, 0.9728 for TCV, and 0.9715 for power consumption. At the same time, the surrogate reduced the performance evaluation time from approximately 120s per finite-element simulation to less than 10 ms per prediction, thereby making large-scale iterative search computationally tractable. Surrogate-model benchmarking for morphology-aware performance prediction. a Training and validation loss histories of the CNN surrogate and the direct vector-space MLP. The CNN, trained on rasterized morphology images, shows stable convergence, whereas the MLP trained directly on the latent variables exhibits limited convergence and persistent validation error. b–d Parity plots comparing finite-element ground truth and surrogate predictions for Tmean, TCV, and P, respectively. e Mean normalized RMSE comparison between the CNN surrogate and the latent-vector MLP on the training, validation, and test sets The morphology image preserves spatial features such as path density, bottlenecks, and heat-dissipating gaps, explaining its superior predictive fidelity over direct latent-vector regression. Latent-space heuristic optimization The established geometry generator and morphology-aware surrogate were then coupled with a Genetic Algorithm (GA) to optimize the resistive micro-heater directly in the latent design space. In this formulation, crossover and mutation operate on the unified control variables rather than on the physical geometry itself. Each offspring is first mapped to a connected and fabrication-compatible layout through the established latent-to-geometry generator, and is then evaluated by the trained CNN surrogate before selection. The optimization therefore proceeds on a surrogate-evaluable and fabrication-aware design space defined by the latent variables. For the electrothermal case, the primary objective is to improve temperature uniformity, quantified by the temperature coefficient of variation, where σT and Tmean denote the standard deviation and mean temperature within the active region, respectively. A hierarchical GA was employed with a population size of 100 and a maximum of 120 generations. Under constant applied voltage, candidates were ranked first by TCV; among candidates within an adaptive ε-neighborhood of the best TCV, power consumption and mean-temperature deviation were used as secondary criteria. The ranked population was updated through elitism, binary tournament selection, crossover, and mutation. Unlike conventional independent Monte Carlo sampling, the GA reuses the performance information of previously evaluated candidates through selection, crossover, and mutation to guide subsequent search. The population-update and constraint-handling procedures follow established evolutionary-optimization formulations20,21. As shown in Fig. 4a, TCV decreases rapidly in the early generations and then stabilizes, indicating a clear improvement in temperature uniformity. The hierarchically selected best solution remained unchanged from Generation 72 to Generation 120, indicating that no further improvement in the selected best candidate was obtained during the remaining search. The preset maximum of 120 generations was retained as a conservative upper limit to provide an extended post-stabilization search interval. The evolutions of Tmean and P in Fig. 4b,c show that average temperature and power consumption are strongly positively correlated; therefore, increasing Tmean while simultaneously reducing P is intrinsically constrained. Consequently, the optimization yields limited improvement in Tmean, but achieves a partial reduction in power consumption together with a clear improvement in temperature uniformity. Figure 4d maps the generation-wise mean power consumption and mean TCV of the feasible population onto the objective space, showing an overall shift toward the lower-P, lower-TCV region. The highlighted markers indicate the representative evolutionary stages visualized in Fig. 4e, whereas the star marks the final selected design. The representative candidate layouts in Fig. 4e indicate that the evolutionary search proceeds through a coherent reorganization of path density and local routing features, eventually producing a maze-like layout with improved electrothermal uniformity under constrained power consumption. To further quantify the thermal-field evolution associated with these morphological changes, representative candidates from the selected evolutionary stages were re-evaluated using the high-fidelity finite-element model. Their corresponding steady-state temperature fields and thermal-uniformity metrics are provided in Supplementary Fig. S12, with the common-power evaluation protocol described in Supplementary Note 5. These results confirm that the latent representation and trained surrogate support stable and directional evolutionary search in the heater design space. Evolutionary search dynamics in the latent design space. a Generation-wise evolution of the optimization objective TCV, showing the best, median and mean candidates together with the population spread. b Evolution of Tmean during optimization. c Evolution of power consumption P during optimization. d Distribution of the generation-wise feasible-population means in the P−TCV objective space. Each circular marker represents the mean power consumption and mean TCV of the feasible candidates in one generation and is colored according to generation number. Selected generations are highlighted using distinct markers, while the star denotes the final selected best individual. e Representative candidate layouts from selected evolutionary stages, together with the final selected design Finite-element validation of thermal-field uniformity The optimized layout obtained from latent-space search was re-evaluated using high-fidelity finite-element simulation and compared with the serpentine baseline. The two heaters were designed using the same device footprint, materials, layer thicknesses, fabrication constraints, and nominal electrical resistance of 190 Ω. Both layouts were restricted to the same linewidth range. Because their path topologies are different, the resulting path length, metal area, and local linewidth distribution are not identical and were not independently constrained, as these quantities are intrinsic consequences of the layout geometry. Two complementary comparison conditions were used. The matched-average-temperature condition evaluates thermal uniformity at an equivalent operating temperature, whereas the matched-power condition tests whether the improved spatial profile persists under the same total electrical input. At the matched average temperature, the optimized heater requires slightly higher power because a larger fraction of the active region is maintained near the target temperature; the comparison therefore concerns thermal-field uniformity rather than power reduction. The physical consequence of the optimization can be interpreted from the structural and thermal-field comparisons in Fig. 5. As shown in Fig. 5a, the optimized layout is not a simple perturbation of the serpentine baseline, but a reorganized path-defined topology with redistributed routing density and locally varying linewidth. This reorganization changes the heat-generation pattern across the active region. The baseline retains a center-dominated temperature field under both matched heating-region average temperature and matched power conditions, as shown in Fig. 5b,c, whereas the optimized layout suppresses the central hot region and expands the near-isothermal plateau. Finite-element comparison of thermal-field uniformity between optimized and serpentine micro-heaters. a Steady-state temperature field of the optimized generative design. b Temperature field of the serpentine baseline at the same heating-region average temperature. c Temperature field of the serpentine baseline at the same total power consumption. d Cumulative area fraction within a given absolute temperature deviation from the mean, ∣T−Tmean∣, where the dashed line denotes the ±2K criterion. e Temperature profiles along y=0 and y=x, with shaded bands denoting the corresponding Tmean±2K uniformity ranges The cumulative area-fraction curves in Fig. 5d show that the optimized layout retains a substantially larger fraction of the heating region within a small absolute temperature deviation from the regional mean. In particular, the dashed vertical line denotes the ±2 K criterion used to evaluate the effective isothermal area ratio. The line profiles in Fig. 5e further show that increasing the power of the original serpentine heater mainly shifts the temperature curve upward without significantly flattening its spatial profile. In contrast, the optimized topology changes the profile shape itself, confirming that the improvement arises from topology-induced heat redistribution rather than from a simple increase in input power. Quantitative evaluation further supports this interpretation. The optimized design reduces TCV from approximately 0.85% to 0.19%. At the same time, η±2K increases from 41.47% in the baseline to 99.79% in the optimized layout. The latter result indicates that the optimized design does not merely reduce a global variation coefficient, but substantially enlarges the near-isothermal region within the heating area. Together, these results confirm that the optimized topology improves both scalar uniformity metrics and the spatial smoothness of the thermal field. Experimental infrared comparison of the original and optimized micro-heaters Both the serpentine baseline and the optimized heater were designed with a nominal resistance of 190 Ω and fabricated using the same silicon-in-glass process. Their measured resistances after fabrication were 185 Ω and 190 Ω, respectively; this small difference is attributed to fabrication variation. The laser confocal micrographs in Fig. 6a confirm that both resistor layouts were successfully transferred to the fabricated devices with good structural fidelity. The infrared thermography measurement setup used for the comparative characterization is shown in Fig. 6b. Before the coating treatment, the infrared measurements exhibit pronounced apparent temperature contrast among the Pt/Au resistor traces, silicon, and glass regions because of their different surface emissivities. To minimize these material-dependent emissivity errors, surface-emissivity homogenization was performed by applying a high-emissivity black coating to the measurement region. Figure 6c compares the steady-state infrared thermal images acquired before and after the coating treatment for the optimized heater (top) and the original heater (bottom). The measurements obtained after surface-emissivity homogenization were used for the subsequent quantitative temperature-profile and regional-uniformity analyses. Experimental infrared characterization of the original and optimized micro-heaters. a Laser confocal micrographs of the fabricated original (left) and optimized (right) micro-heaters. b Infrared thermography measurement setup. c Steady-state infrared thermal images of the optimized (top) and original (bottom) micro-heaters under electrical excitation. The left and right columns show the before and after the high-emissivity black-coating treatment, respectively. The color bars indicate temperature in °C. d Horizontal temperature profiles extracted across the heating regions. Markers denote the measured temperatures, solid curves represent the smoothed profiles, and the shaded area indicates the mean temperature of the optimized heater ±2 °C. e Temperature distributions within the heating regions. Dashed lines indicate the corresponding mean temperatures. Compared with the original heater, the optimized heater exhibits a narrower temperature distribution, with the temperature coefficient of variation decreasing from 4.04% to 1.22% and the proportion of the heating region within ±2 °C of the mean temperature increasing from 34.7% to 95.6% The horizontal temperature profiles extracted from the emissivity-homogenized measurements are compared in Fig. 6d. The original serpentine heater exhibits a pronounced center-peaked temperature profile and substantial spatial temperature variation, whereas the optimized heater maintains a considerably flatter temperature distribution across the heating region. Consistently, the pixel-level temperature distribution of the optimized heater in Fig. 6e is substantially narrower than that of the original heater. Because the two devices exhibit different regional mean temperatures, the uniformity metrics were evaluated relative to the respective mean temperature of each heating region. Quantitatively, the measured TCV decreases from 4.04% for the original heater to 1.22% for the optimized heater, while the proportion of the heating region within ±2 °C of its respective mean temperature increases from 34.7% to 95.6%. These experimental results confirm that the optimized resistor routing suppresses center-dominated heat accumulation and substantially enlarges the near-uniform-temperature region, consistent with the thermal-field redistribution predicted by the finite-element analysis. The observed difference remains substantially larger than the approximately ±0.7% infrared-camera measurement uncertainty. Mechanical optimization of a compliant micro-spring To examine the transferability of the proposed representation beyond electrothermal design, a compliant micro-spring was considered as an additional path-defined MEMS optimization problem. The spring consists of a continuous slender beam connecting two prescribed terminals, and its mechanical response is governed jointly by the global path organization, turning distribution and local beam width. The awl-shaped serpentine microspring reported by Chou et al.34 was adopted as the reference configuration because it was developed to provide large in-plane displacement within a restricted footprint. Candidate micro-spring layouts were evaluated during optimization using the same surrogate-modeling framework described above, retrained on finite-element-derived mechanical responses for the spring case. A constrained NSGA-Ⅱ search was performed in the 44-dimensional design space to maximize the target-direction displacement while minimizing the peak von Mises stress, subject to a peak-stress limit of 2000 MPa. A final candidate was selected from the feasible non-dominated solutions and subsequently re-evaluated using the high-fidelity three-dimensional solid-mechanics model. Detailed optimization settings and selection criteria are provided in Supplementary Note 6. The optimization history is summarized in Fig. 7a, where the feasible candidates define a clear displacement–stress trade-off and the selected design is identified from the historical non-dominated set. High-fidelity finite-element verification showed that the optimized design increased the target-direction displacement from 389.56 to 508.91 μm (+30.6%) while reducing the peak von Mises stress from 1841.9 to 1541.3 MPa (−16.3%) (Fig. 7b–e). These results demonstrate that the same fabrication-aware representation and decoding procedure can support optimization under a distinct physical objective without changing the underlying geometry-generation framework. The surrogate-model performance, optimization parameters, objective and constraint definitions, selection criterion, convergence history and finite-element settings are provided in Supplementary Note 6 and Supplementary Fig. S13. Surrogate-assisted mechanical optimization and finite-element validation of the compliant micro-spring. a Feasible candidates over 120 generations in the displacement–stress objective space. Colors indicate generation, enlarged purple markers denote the historical non-dominated set, and the red star marks the selected design. b, c High-fidelity finite-element von Mises stress distributions of the baseline and optimized designs. d, e In-plane displacement fields. The left and right columns correspond to the reference and optimized designs, respectively Discussion The central contribution of this work lies in the geometric representation of connected MEMS microstructures, rather than in the isolated use of a neural surrogate or an evolutionary optimizer. The proposed framework reformulates connected MEMS design as a fabrication-aware inverse-design problem, where the search is performed in a compact continuous control space while the decoded layouts remain connected and manufacturable by construction. This continuous-to-discrete mapping is essential for path-defined MEMS structures, whose validity depends simultaneously on routing connectivity, lithographic feasibility, boundary compatibility, and local geometric regularity. By embedding these requirements into the generator, the framework avoids ad hoc geometric repair and enables structured search within a constrained yet expressive design space. An important implication is that geometry generation and performance prediction require different representations. The low-dimensional control vector provides an effective genotype for generating valid structures and supporting latent-space optimization, but it does not directly preserve all spatial information needed for field prediction. This is evidenced by the gap between direct latent-space regression and morphology-aware surrogate prediction. The rasterized morphology image restores the instantiated geometric context, including local bottlenecks, path-density variations, turning features, and heat-dissipating gaps, which are critical for electrothermal response prediction. The framework therefore adopts a dual-representation architecture: latent variables ensure generative validity and searchability, whereas morphology images support stable geometry-to-performance mapping. The optimized thermal micro-heater further demonstrates that the benefit of the representation is not limited to numerical search efficiency. The improvement in temperature uniformity is not merely caused by a change in total path length, resistance, or input power, but by a redistribution of heat-generation capacity across the active region. Coordinated topology synthesis and linewidth modulation allow the optimizer to compensate for boundary heat loss while suppressing center-dominated thermal accumulation. As a result, the optimized layout changes the shape of the thermal profile itself, leading to both a lower temperature coefficient of variation and a substantially enlarged near-isothermal area. These results illustrate the distinction between geometric regularity and physical-field uniformity: compensating for spatially nonuniform heat loss requires redistribution of both path deployment and local Joule heating rather than uniform geometric coverage alone. The microheater should therefore be interpreted as an experimentally validated application of the proposed representation, rather than as the sole scope or source of its methodological generality. The framework is also extensible beyond the present implementation. The orthogonal routing grammar used here is well-matched to lithography-driven planar MEMS layouts, while future versions may incorporate curved, oblique, or hybrid routing primitives for device classes requiring non-Manhattan geometries. The surrogate layer can likewise be expanded through uncertainty-aware prediction, active sampling, or physics-informed learning to address more nonlinear, transient, or strongly coupled multiphysics problems. Although the primary experimental validation focuses on the resistive thermal microheater, the compliant micro-spring case demonstrates that the same representation can be coupled to a distinct mechanical objective by changing the boundary conditions and physical evaluator. Accordingly, the demonstrated generality is restricted to path-defined MEMS microstructures; extension to unrestricted freeform, disconnected, or fully three-dimensional MEMS geometries remains outside the scope of the present implementation. Conclusion Overall, this work demonstrates a representation-level strategy for fabrication-aware optimization of path-defined MEMS microstructures. By embedding connectivity and prescribed geometric fabrication constraints into the latent-to-layout mapping, the proposed representation enables heuristic search over variations in routing topology, spatial deployment, and local linewidth without post-hoc geometric repair. Comparative finite-element and infrared measurements of the resistive microheater verify the experimentally realizable improvement in thermal-field uniformity, while the compliant micro-spring case demonstrates transferability to a distinct mechanical objective. These results support the proposed representation as a fabrication-compatible optimization interface for path-defined MEMS microstructures. Materials and methods Layout export and finite-element electrothermal simulation Generated heater layouts were exported as DXF files and imported into COMSOL Multiphysics 6.3 as planar geometries. After import, the DXF contours were used to construct the resistive heating domain in the finite-element model. The steady-state electrothermal response was solved by coupling electric-current conduction, Joule heating, and heat transfer. The same modeling procedure and boundary conditions were used for all generated candidates, the optimized design, and the serpentine baseline. For each simulated design, the steady-state temperature field over the active heating region was exported on a 400×400 sampling grid. Tmean, TCV and η±2K were calculated from the exported temperature field. The total power consumption was calculated as P=UI, where U and I are the terminal voltage and terminal current extracted from the finite-element solution. For finite-element validation, the optimized layout was compared with the serpentine baseline under the same heating-region average temperature and the same total power consumption. The material properties, thermal boundary conditions, meshing strategy, and solver settings are provided in Supplementary Note 2. Surrogate-model training A total of 1000 generated micro-heater layouts were used to construct the surrogate-model dataset. Each sample consisted of a rasterized morphology image and three finite-element labels: Tmean, TCV and P. The dataset was divided into training, validation, and test subsets with a ratio of 7:1:2, corresponding to 700, 100, and 200 samples. A randomly initialized ResNet-18 was used as the image-based regression surrogate. The final fully connected layer was replaced by a three-output regression head. The model was trained using AdamW with SmoothL1 loss, an initial learning rate of 3 × 10−4, a weight decay of 1 × 10−4, and a batch size of 64. Training was performed for up to 300 epochs with early stopping based on validation loss. A multilayer perceptron baseline was trained using vectorized design variables as input. The input vector consisted of 32 topology-control variables and 12 width-control variables, resulting in a 44-dimensional input. The MLP contained three hidden layers with 128, 128, and 64 neurons. Each hidden layer used layer normalization, ReLU activation, and dropout with a rate of 0.15. The MLP was trained using AdamW, SmoothL1 loss, a learning rate of 3 × 10−4, a weight decay of 1 × 10−4, a batch size of 256, and training was performed for up to 300 epochs with early stopping based on validation loss. The detailed architectures, data preprocessing procedures, and training settings of the image-based and vector-based surrogate models are provided in Supplementary Fig. S9 and Supplementary Note 3. Latent-space genetic optimization The trained ResNet-18 surrogate was coupled with a genetic algorithm for latent-space optimization. Crossover and mutation were applied to the latent variables, and each offspring was decoded into a physical layout before surrogate evaluation. The population size was 100, and the maximum number of generations was 120. The elite preservation ratio was 12%, the crossover rate was 0.90, and the mutation rate was 0.30. Binary tournament selection was used for parent selection. The optimization was performed using a hierarchical ranking strategy. Candidates were first ranked by TCV. Among candidates within the ε-neighborhood of the best TCV in each generation, secondary ranking was performed using power consumption and mean-temperature deviation. The final design was selected from the global archive of best-so-far candidates accumulated throughout the search, rather than being defined simply as a representative individual from Generation 120, and was subsequently re-evaluated using finite-element simulation. The complete population-update and adaptive candidate-ranking procedure is illustrated in Supplementary Fig. S10 and detailed in Supplementary Note 3. Device fabrication The optimized heater and serpentine baseline were fabricated using a silicon-in-glass process. The main process included silicon hard-mask patterning, two-step DRIE, anodic bonding to a BF33 glass substrate, glass reflow and planarization, front-side functional-film patterning, backside metallization, thermal annealing, and backside DRIE release. The complete device-fabrication sequence is illustrated in Supplementary Fig. S11 and described in Supplementary Note 4. Infrared thermal characterization Steady-state thermal fields of the original serpentine heater and the optimized heater were characterized using a microscope infrared thermal imaging system. Each device was mounted on a custom printed circuit board and electrically driven using a constant-temperature-difference circuit. Thermal images were acquired after the heater reached steady-state operation. To minimize material-dependent emissivity errors in infrared thermography, a high-emissivity black coating was applied to the measurement region to homogenize the effective surface emissivity across the Pt/Au resistor, silicon, and glass surfaces. Infrared thermal images were acquired both before and after the coating treatment, and the black-coated measurements were used for the subsequent quantitative analysis. Horizontal temperature profiles were extracted along the corresponding lines across the active heating regions. The temperature coefficient of variation TCV and the proportion of the heating region within ±2 °C of its regional mean temperature were calculated using consistently defined heating-region masks for both devices. The infrared system used a focal-plane-array detector operating over the 8−14μm wavelength range. The detector resolution was 640×480 pixels with a 17μm pixel size. A 2 × microscopic lens was used at a working distance of approximately 18mm, giving an effective spatial resolution of approximately 7.5μm. The infrared-camera measurement uncertainty was approximately ±0.7%. Supplementary information Supporting Information Acknowledgements This work was financially supported by the National Natural Science Foundation of China under Grant No. 62474040. Author contributions G.-Z.L. conceived the study, developed the methodology, implemented the code, designed the experimental scheme, performed simulations and experiments, analyzed the data, and wrote the manuscript. L.-F.Z. contributed throughout the study by assisting with methodological development, code revision, optimization scheme refinement, experimental planning, result analysis, and manuscript revision. J.Z. and X.L. fabricated the devices and supported process implementation. Y.-M.L. and T.-Y.G. assisted with manuscript editing and figure preparation. Z.-F.Z. supervised the project, guided the experiments, and reviewed the final manuscript. All authors discussed the results and approved the submitted version. Data availability Any additional information required to reanalyze the data reported in this paper is available from the corresponding author upon reasonable request. Codes used in this study are available from the corresponding author upon reasonable request. Competing interests The authors declare no competing interests. Supplementary information The online version contains supplementary material available at https://doi.org/10.1038/s41378-026-01470-3. References Associated Data Supplementary Materials Supporting Information Data Availability Statement Any additional information required to reanalyze the data reported in this paper is available from the corresponding author upon reasonable request. Codes used in this study are available from the corresponding author upon reasonable request.