This study addresses a key limitation in physics-informed neural networks (PINNs), namely the reliance on manually selected or heuristically tuned loss weights governing the balance between data fidelity, physics residuals and boundary constraints. Improper weighting often leads to instability, poor reproducibility and sensitivity to user expertise, particularly in manufacturing-oriented thermal modelling and digital twin applications.
A genetic algorithm (GA)-based meta-optimization framework is proposed to automate the selection of normalized loss weights in PINNs. The GA operates as an offline optimization layer, while the inner PINN enforces the governing partial differential equations. A composite fitness function evaluates candidate weight configurations using physics consistency, data agreement and boundary-condition satisfaction. The framework is validated using a two-dimensional transient heat-conduction problem with a moving Gaussian heat source representative of laser-based manufacturing processes under noisy data conditions. Comparative analysis is performed against fixed-weight and adaptive-weight PINN strategies.
The proposed GA-optimized PINN achieves an approximately 39% reduction in governing-equation residual root-mean-square error (RMSE) compared with fixed-weight training while maintaining comparable prediction accuracy and stable convergence. The framework produces lower PDE residual distributions and improved robustness under noisy conditions. Compared with adaptive weighting approaches, the GA-based framework demonstrates improved global loss balancing and stronger physics consistency without degrading predictive performance.
This work introduces a global meta-optimization strategy for PINN loss balancing using a genetic algorithm, enabling systematic and interpretable selection of normalized loss weights for reliable physics-informed surrogate modelling in manufacturing digital twin applications
A diagram of a GA-Optimized Physics-Informed Neural Network for Manufacturing Digital Twin. Panel A: Physical Manufacturing Process. A laser beam heats a melt pool on a physical manufacturing asset. An infrared camera and thermocouple stream sensor data to a system for streaming data assimilation. Panel B: GA-Optimized PINN Framework. A genetic algorithm meta-optimization process involving initialization, selection, crossover, and mutation optimizes loss weights. These optimized loss weights are used in a Physics-Informed Neural Network surrogate model, which includes data loss, physics residual loss, and boundary loss components. Panel C: Digital Twin Outputs. The outputs include full-field temperature prediction, monitoring over time, anomaly detection, and control feedback.
A diagram of a GA-Optimized Physics-Informed Neural Network for Manufacturing Digital Twin. Panel A: Physical Manufacturing Process. A laser beam heats a melt pool on a physical manufacturing asset. An infrared camera and thermocouple stream sensor data to a system for streaming data assimilation. Panel B: GA-Optimized PINN Framework. A genetic algorithm meta-optimization process involving initialization, selection, crossover, and mutation optimizes loss weights. These optimized loss weights are used in a Physics-Informed Neural Network surrogate model, which includes data loss, physics residual loss, and boundary loss components. Panel C: Digital Twin Outputs. The outputs include full-field temperature prediction, monitoring over time, anomaly detection, and control feedback.1. Introduction
1.1 Background
Physics-informed neural networks (PINNs) have emerged as a powerful paradigm for modelling complex physical systems by embedding governing equations directly into neural network training. By constraining learning with known physical laws, PINNs provide a principled alternative to purely data-driven approaches, particularly in scenarios where experimental data are sparse, noisy, or costly to acquire. These characteristics make PINNs especially attractive for manufacturing applications, where processes are governed by well-established physical principles, yet comprehensive high-fidelity datasets are often limited. In recent years, PINNs have been applied across a range of manufacturing domains, including machining, additive manufacturing (AM), and thermal processing. Representative studies include heat transfer modelling in machining and AM (Zobeiry and Humfeld, 2021; Zhu et al., 2021; Tod et al., 2021; Zhao et al., 2023; Chen et al., 2024), melt pool dynamics and process parameter prediction in metal AM (Zhu et al., 2021; Zhao et al., 2023; Farrag et al., 2025; Scheel and Hosseini, 2025; Oddiraju et al., 2025), and surrogate modelling for composite and industrial manufacturing systems (Würth et al., 2023; Chen et al., 2023; Cooper et al., 2023; Ciampi et al., 2025). In many of these applications, transient heat conduction equations describe thermal evolution, while conservation laws and constitutive relations govern deformation, energy transport, and tool–workpiece interactions (Zobeiry and Humfeld, 2021; Zhu et al., 2021; Wang et al., 2020; Li et al., 2023a, b). By explicitly incorporating governing physics into the learning process, PINNs enhance physical consistency and reduce dependence on large datasets. Recent developments have increasingly connected physics-informed learning with digital twin technologies for industrial monitoring, process optimization, and intelligent manufacturing applications. Physics-informed digital twin frameworks have been explored for process parameter optimization, fault diagnosis, surrogate modelling, and predictive analysis in manufacturing and industrial systems (Garcia et al., 2025; Seppi et al., 2025; Lu et al., 2025). These developments highlight the growing importance of physics-constrained surrogate models capable of reconstructing full-field system behaviour from sparse measurements while maintaining physical consistency and interpretability. Within such contexts, PINNs can serve as robust surrogate models for thermal field reconstruction, process monitoring, anomaly detection, and predictive decision support. However, the reliability of such models depends strongly on stable and well-balanced training formulations, particularly when multiple competing loss components are simultaneously enforced.
1.2 Motivation
Despite their conceptual advantages, the practical performance of PINNs is highly sensitive to the formulation of the composite training loss function. A typical PINN loss comprises multiple competing components, including data mismatch loss, physics residual loss, and boundary or initial condition losses. The relative influence of these components is controlled by loss weighting factors, which strongly affect convergence behaviour, solution stability, and predictive accuracy. In many existing manufacturing-focused PINN studies, these loss weights are selected using fixed values or heuristic scaling rules derived through trial-and-error (Zobeiry and Humfeld, 2021; Zhu et al., 2021; Tod et al., 2021; Zhao et al., 2023; Würth et al., 2023). While such approaches may suffice for simplified benchmark problems, they exhibit significant limitations in realistic industrial environments. Fixed weights lack adaptability under changing operating conditions, and heuristic tuning is highly problem-dependent and difficult to reproduce. As a result, training outcomes can depend substantially on user expertise rather than systematic optimization, reducing robustness and limiting scalability (Cooper et al., 2023; Ciampi et al., 2025). Several adaptive and gradient-based loss balancing strategies have been proposed to mitigate manual tuning (Hua et al., 2023; Li and Feng, 2022; Liu et al., 2022; Gao et al., 2025; Li et al., 2025). Although these methods partially automate weight adjustment, they typically introduce additional hyperparameters, may become unstable in stiff or multi-scale problems, and often provide limited interpretability. In many cases, adaptive weighting mechanisms rely primarily on instantaneous gradient information or local training dynamics, which may limit their effectiveness in highly non-convex optimization landscapes characteristic of manufacturing-oriented PINNs. Moreover, dynamically varying loss weights can occasionally introduce oscillatory convergence behaviour or sensitivity to noisy measurements under complex operating conditions (Farea et al., 2025; Zhou et al., 2025; Barreau and Shen, 2025). Consequently, loss balancing remains a critical bottleneck restricting reproducibility, robustness, and reliable deployment of PINNs in practical engineering applications.
1.3 Research gap
While substantial progress has been made in applying PINNs to manufacturing process modelling, systematic strategies for globally optimizing loss weights remain underexplored. Most existing approaches rely on fixed heuristics, local gradient-based adaptation, or problem-specific tuning that do not explicitly address the global and non-convex nature of the loss balancing problem (Hua et al., 2023; Li and Feng, 2022; Liu et al., 2022; Gao et al., 2025; Li et al., 2025; Farea et al., 2025; Zhou et al., 2025; Barreau and Shen, 2025). As a result, optimized weight configurations may lack reproducibility and may not generalize across varying operating regimes or data conditions. Furthermore, existing approaches often optimize loss weights based on local training behaviour or internal objective scaling, which may introduce bias toward specific loss components and limit overall physical consistency. A structured framework that balances data fidelity, physics enforcement, and boundary constraints in a globally consistent manner is therefore required. Addressing this gap requires an optimization strategy capable of globally exploring the normalized loss-weight space, operating independently of gradient-based heuristics, and aligning weight selection with physically meaningful performance metrics. Such a framework is essential for improving the robustness and reliability of PINN-based surrogate models in manufacturing and related engineering applications, particularly in digital twin environments where predictive consistency and stability are critical.
1.4 Contributions
To address these limitations, this study proposes a genetic algorithm (GA)–assisted meta-optimization framework for automated loss balancing in physics-informed neural networks. The principal contributions are as follows:
Global meta-optimization of loss weights: A GA-based automated loss balancing strategy is introduced to systematically optimize normalized PINN loss weights without manual or heuristic tuning. By operating at an offline meta-optimization layer, the GA enables global exploration of the weight space and is well suited to the non-convex structure of PINN training.
Composite fitness-based optimization criterion: Candidate weight configurations are evaluated using a composite fitness function that accounts for physics residuals alongside data and boundary constraints. This formulation reduces bias toward any single loss component and ensures balanced and physically consistent optimization.
Manufacturing-relevant validation under noisy data conditions: The framework is demonstrated using a two-dimensional transient heat conduction problem with a moving heat source representative of laser-based manufacturing processes. A noisy, streaming-inspired data scenario is incorporated to assess robustness under realistic measurement conditions.
Quantitative robustness and comparative assessment: The proposed approach is systematically compared against fixed-weight and gradient-based adaptive PINNs. Residual root-mean-square error reduction, predictive accuracy, convergence behaviour, and variability across multiple random initializations are evaluated to assess robustness and reproducibility.
Through these contributions, this work advances automated, interpretable, and physics-consistent training strategies for PINNs, providing a systematic foundation for improving their reliability in manufacturing and related engineering modelling applications.
2. Methodology
2.1 Physics-informed neural network formulation
Physics-informed neural networks (PINNs) integrate governing physical laws directly into the training process by embedding differential equation constraints into the loss function. Unlike purely data-driven models, PINNs enforce physical consistency by penalizing violations of governing equations alongside mismatches with observed data and boundary conditions. This combined learning approach allows the model to remain grounded in first-principles physics while still leveraging available measurements, making PINNs particularly suitable for engineering and manufacturing applications.
In a standard formulation, the total training loss is expressed as a weighted combination of multiple components:
where:
measures the discrepancy between model predictions and available data,
penalizes violations of the governing partial differential equation (PDE),
enforces boundary or initial conditions, and
, , and are non-negative weighting factors controlling the relative contribution of each term.
The data loss is typically defined using mean squared error, while the physics loss is computed by evaluating the PDE residual at collocation points within the domain. Boundary conditions ensure that the predicted solution remains physically admissible. A key challenge in PINN training is the selection of appropriate loss weights. If these weights are not properly balanced, one component may dominate the training process, leading to poor convergence or loss of physical consistency. This issue becomes more pronounced in manufacturing scenarios, where data may be noisy or sparse while strict adherence to governing physics remains essential. These challenges motivate the need for a systematic and automated approach to loss balancing.
2.2 Governing equation and manufacturing proxy
To evaluate the proposed framework in a manufacturing-relevant setting, a two-dimensional transient heat conduction equation with a moving heat source is considered:
where represents the temperature field, is the thermal diffusivity, and denotes a localized, time-dependent heat source.
The heat source is modelled as a Gaussian distribution moving across the spatial domain:
where defines the scanning trajectory. This formulation captures the essential characteristics of laser-based manufacturing processes, where localized energy input generates strong transient thermal gradients.
Although simplified, this model provides a computationally efficient and physically meaningful proxy for thermal behaviour in manufacturing systems. It also offers a controlled environment for evaluating loss balancing strategies and can be extended to more complex multiphysics scenarios involving coupled thermal–mechanical effects.
2.3 GA-optimized loss balancing framework
The central contribution of this study is a genetic algorithm (GA)–based meta-optimization framework for automated loss balancing in PINNs. Instead of manually selecting loss weights, the GA operates as an offline outer optimization layer, identifying suitable weight configurations prior to final model training. The PINN takes spatial–temporal inputs and predicts the temperature field . The governing equation and boundary conditions define the individual loss components. The GA searches for optimal values of the loss weights that lead to improved training performance.
Each candidate solution (chromosome) is represented as:
For each candidate, the PINN is trained for a limited number of epochs, and its performance is evaluated using a fitness function. To avoid bias toward any single loss component, the fitness is defined using a composite normalized criterion that reflects overall physical consistency, predictive accuracy, and boundary-condition satisfaction:
where , , and denote the normalized physics residual loss, data mismatch loss, and boundary-condition loss, respectively, while , , and are scaling coefficients used to maintain comparable magnitudes across the different terms. This formulation ensures that improvements in governing-equation consistency do not occur at the expense of predictive fidelity or boundary-condition enforcement.
The GA evolves the population of candidate solutions through:
Initialization of normalized, non-negative weight vectors
Fitness evaluation based on composite model performance
Selection of high-performing candidates
Crossover and mutation to generate new solutions
Renormalization of offspring chromosomes after mutation and crossover operations
This process is repeated over multiple generations, progressively identifying improved weight configurations. A key advantage of this framework is the decoupling between loss-weight optimization and network training. While the PINN parameters are updated using gradient-based methods, the GA explores the loss-weight space independently. This allows broader exploration of candidate configurations, reducing reliance on manual tuning and improving robustness under varying operating conditions. Unlike locally adaptive weighting strategies that adjust weights based on instantaneous training dynamics, the proposed framework performs a global search over the normalized loss-weight space. This enables the identification of balanced configurations that simultaneously improve physics consistency, predictive stability, and convergence robustness. The optimization process is performed offline and does not involve recursive or real-time updating of model states. However, the framework provides a systematic foundation for determining reproducible and physically consistent training configurations that can support manufacturing-oriented digital twin environments and physics-informed surrogate modelling applications. As shown in Figure 1, the proposed framework employs a genetic algorithm as an offline meta-optimization layer to determine the optimal loss weights before the final PINN training stage.
2.4 Genetic algorithm design
2.4.1 Chromosome representation
In the proposed framework, each genetic algorithm (GA) chromosome represents a candidate set of loss-weighting parameters for the PINN:
where each gene corresponds to the weighting factor associated with the data loss, physics residual loss, and boundary-condition loss, respectively. To ensure numerical stability and physical interpretability, all weights are constrained to be non-negative. In addition, normalization is enforced such that:
This normalization prevents trivial scaling effects, where all weights increase or decrease uniformly without altering their relative influence. Consequently, the optimization focuses exclusively on the balance between competing loss components rather than their absolute magnitudes. The chromosome representation is intentionally maintained as a low-dimensional formulation. By restricting the search space to three physically meaningful parameters, the GA remains computationally efficient while directly targeting the most influential factors governing PINN training behaviour. This design enables systematic exploration of the trade-off between data fitting, physics enforcement, and boundary consistency without introducing unnecessary optimization complexity. To preserve feasibility throughout the evolutionary process, offspring chromosomes generated through crossover and mutation are renormalized after each operation. Negative values, if generated during mutation, are clipped prior to normalization. The normalized weights are subsequently updated as:
This procedure ensures consistent weight scaling and maintains valid candidate solutions during the optimization process.
2.4.2 Fitness function
The fitness of each chromosome is evaluated through a short PINN training cycle using the corresponding loss-weight configuration. Instead of training the network to full convergence for every candidate solution, the model is trained for a limited number of epochs during the GA evaluation stage. This truncated training strategy provides a practical balance between computational efficiency and reliable performance estimation.
To ensure balanced evaluation, the fitness function is formulated using a composite normalized metric that simultaneously considers governing-equation consistency, agreement with available data, and boundary-condition satisfaction:
where:
corresponds to the normalized PDE residual loss
represents the normalized prediction error with respect to observed data,
quantifies normalized boundary-condition violations, and
, , and are scaling coefficients introduced to maintain comparable contributions across different loss components.
This formulation avoids bias toward any individual objective and ensures that improvements in physics consistency do not occur at the expense of predictive accuracy or boundary-condition enforcement. In contrast to residual-only evaluation, the composite fitness formulation provides a more representative measure of overall model quality and training balance. During each evaluation cycle, all loss components remain active within the PINN training process, enabling the GA to assess how different weight configurations influence the coupled learning dynamics. Lower fitness values correspond to more balanced and physically consistent solutions.
The evolutionary optimization proceeds through the following stages:
Random initialization of normalized, non-negative chromosomes
Short PINN training for each candidate configuration
Composite fitness evaluation
Selection of high-performing candidates
Crossover and mutation operations
Renormalization of offspring chromosomes after genetic operations
Iterative population update across successive generations
Through this process, the GA performs a global and gradient-free exploration of the normalized loss-weight space, while the PINN parameters are updated independently using standard backpropagation. This separation enables systematic exploration of training configurations without interfering with the underlying neural-network optimization process. Unlike locally adaptive weighting approaches that rely on instantaneous gradient dynamics, the proposed framework performs broader exploration of candidate configurations, improving robustness and reducing dependence on manual tuning.
2.5 Implementation details
All neural network and genetic algorithm hyperparameters are summarized in Table 1 to ensure transparency and reproducibility.
The network architecture was selected to provide a balance between modelling capacity and computational efficiency. Similarly, the GA population size and number of generations were chosen to allow sufficient exploration of the loss-weight space while maintaining manageable computational cost. The use of a genetic algorithm introduces additional computational overhead because each candidate chromosome requires a short PINN training cycle during fitness evaluation. In the present implementation, the total computational effort can be approximated as the product of population size, number of generations, and training epochs per evaluation cycle. Relative to conventional fixed-weight PINN training, the proposed framework introduces an approximate – increase in total optimization time during the offline meta-optimization stage. However, the additional cost remains tractable because the search space is low-dimensional, the population size is modest, and truncated training is employed during candidate evaluation. Importantly, the GA optimization is performed only once prior to final model training. After the optimal loss-weight configuration is identified, the final PINN is trained using the optimized weights without requiring repeated evolutionary search. Consequently, the additional computational expense is primarily associated with the offline calibration stage rather than routine model deployment. This trade-off is considered acceptable given the observed improvements in physics consistency, convergence robustness, and reduction in manual hyperparameter tuning. Furthermore, the optimization process can be accelerated through parallel evaluation of candidate solutions or more efficient training schedules. The proposed methodology is not restricted to the specific hyperparameters adopted in this study and can be extended to higher-dimensional problems, deeper architectures, or multiphysics systems without requiring structural modifications.
2.6 Integration into a manufacturing digital twin context
The proposed GA-optimized PINN framework can be interpreted within a manufacturing digital twin context, where physical systems and their virtual representations interact through continuous data exchange, predictive modelling, and process-aware decision support. In laser-based manufacturing environments, localized energy input generates highly transient and spatially evolving thermal fields that strongly influence melt pool behaviour, residual stress formation, microstructural evolution, and overall process stability. Capturing such behaviour accurately in real time remains challenging because experimental measurements obtained from thermocouples, infrared imaging systems, or embedded sensors are often sparse, noisy, incomplete, or affected by operational uncertainties. Within this context, PINNs provide an attractive physics-constrained surrogate modelling framework by combining governing thermal equations with available measurement data. Instead of relying solely on data-driven interpolation, the PINN reconstructs physically consistent full-field temperature distributions while simultaneously enforcing governing partial differential equations and boundary conditions. This capability makes PINNs particularly suitable for digital twin environments that require predictive fidelity, interpretability, and robustness under limited sensing conditions. In the proposed framework, the genetic algorithm operates as an offline meta-optimization stage responsible for identifying balanced and physically meaningful loss-weight configurations prior to final model convergence. By systematically optimizing the relative influence of data, physics, and boundary losses, the framework improves training robustness and reduces sensitivity to manual hyperparameter selection. The resulting optimized PINN therefore maintains improved physics consistency while remaining resilient to noisy or partially observed measurement conditions. The proposed methodology is intended for offline surrogate-model calibration rather than recursive real-time state updating. In practical digital twin workflows, the GA-based optimization may be executed periodically during recalibration stages, such as after process drift, accumulation of new sensor measurements, material-property variation, or significant changes in operating conditions. Once optimized, the resulting loss-weight configuration can be deployed during routine PINN training or surrogate-model updating without requiring continuous evolutionary optimization during inference. The resulting framework can support several manufacturing-oriented digital twin tasks, including thermal field prediction, process monitoring, anomaly detection, parameter sensitivity analysis, and offline process optimization. Although the present study employs simulated data to provide a controlled evaluation environment, the methodology is compatible with future extensions involving real-time sensor integration, adaptive model updating, and coupled multiphysics digital twin architectures.
Figure 2 illustrates the structural role of the proposed GA-PINN framework within a manufacturing digital twin environment. The physical asset continuously generates sensor data that are assimilated by the PINN surrogate to reconstruct spatially resolved temperature fields beyond the limited measurement locations. By embedding governing equations directly into the learning process, the surrogate maintains physical consistency even under sparse or noisy observations. The genetic algorithm operates periodically at a meta-optimization level to recalibrate the normalized loss weights in response to evolving data characteristics or process conditions. This mechanism ensures that the balance between data assimilation and physics enforcement remains stable as operating regimes change. Unlike static heuristic weighting, the GA-based strategy enables adaptive yet reproducible loss balancing aligned with residual performance. The reconstructed thermal fields and associated model outputs can then support monitoring, anomaly detection, and feedback control decisions. Although the present study employs simulated streaming data for controlled validation, the architecture is directly compatible with real-time digital twin implementations in manufacturing systems.
3. Results and discussion
3.1 Solution accuracy
The predictive performance of the proposed GA-optimized PINN is evaluated by comparing its temperature field predictions against those obtained using a conventional fixed-weight PINN and a gradient-based adaptive weighting strategy. Figure 3 presents the temperature distribution along a representative spatial cross-section at . All three approaches successfully reproduce the expected thermal profile with high accuracy, demonstrating strong agreement with the reference solution across the spatial domain. The predicted temperature curves remain smooth and physically consistent, with no visible oscillations, instability, or degradation near the domain boundaries. The GA-optimized PINN preserves solution continuity and numerical stability while maintaining prediction accuracy comparable to both the fixed-weight and adaptive weighting approaches. Importantly, the introduction of GA-based loss balancing does not adversely affect predictive fidelity, despite the optimization process being partially driven by improvements in governing-equation consistency. Although the primary objective of the proposed framework is to improve balance between competing loss components, the resulting temperature predictions remain closely aligned with the reference solution. This behaviour indicates that enhanced physics consistency can be achieved without sacrificing prediction quality or boundary-condition enforcement. The simultaneous activation of data, physics, and boundary losses throughout training ensures that no individual objective dominates the optimization process. For comparison, a gradient-based adaptive weighting strategy was also implemented. The adaptive approach improves convergence behaviour relative to conventional fixed-weight training by dynamically adjusting the contribution of individual loss terms during optimization. However, the adaptation remains primarily local and dependent on instantaneous training dynamics. In contrast, the proposed GA-based framework performs broader exploration of the normalized loss-weight space, enabling identification of more balanced training configurations with improved overall physics consistency, as discussed further in Section 3.2. Quantitatively, the GA-optimized framework achieves approximately a 39% reduction in governing-equation residual RMSE relative to fixed-weight training while maintaining comparable prediction accuracy. Furthermore, the optimized configuration exhibits reduced variability across repeated training runs, indicating improved robustness and reproducibility under noisy data conditions. These observations suggest that the proposed framework improves training balance without introducing instability or degradation in solution quality. It is also important to note that, although the optimization process places strong emphasis on physics consistency, the data and boundary losses remain active throughout training. Consequently, improvements in physics enforcement do not occur at the expense of predictive accuracy or constraint satisfaction. Instead, the training dynamics maintain a balanced interaction between observational data and governing physical constraints. Overall, the results demonstrate that the GA functions as an effective meta-optimization layer capable of improving loss balancing, physics consistency, and convergence robustness while preserving the accuracy and stability of the learned solution. This behaviour is particularly valuable in practical manufacturing and digital twin environments, where predictive reliability and physical consistency must be maintained simultaneously under uncertain or noisy operating conditions.
3.2 Physics consistency
To evaluate the degree of governing-equation enforcement, the spatial distribution of the PDE residual is examined for the fixed-weight PINN, the gradient-based adaptive weighting model, and the proposed GA-optimized PINN. Figure 4 presents the residual distribution evaluated along a representative spatial cross-section at . In all cases, the residual values remain bounded throughout the computational domain, indicating that the governing heat-conduction equation is reasonably satisfied by each modelling approach. However, noticeable differences are observed in both the magnitude and spatial distribution of the residuals. The GA-optimized PINN consistently produces lower residual values across several regions of the domain, indicating improved alignment with the underlying governing physics. In comparison, the fixed-weight PINN exhibits larger localized residual fluctuations, particularly near regions associated with stronger thermal gradients. Although the adaptive weighting strategy improves residual behaviour relative to the fixed-weight configuration, residual oscillations remain more pronounced than those observed in the GA-optimized model. This improvement is further reflected quantitatively. Across multiple independent training runs, the GA-optimized framework achieves approximately a 39% reduction in governing-equation residual root-mean-square error (RMSE) relative to the fixed-weight PINN while maintaining comparable prediction accuracy. In addition, the variability of the residual distributions across repeated runs is reduced, suggesting improved convergence stability and reproducibility under noisy training conditions. The observed improvement can be attributed to the global exploration capability of the GA-based optimization framework. Conventional fixed-weight training relies on manually selected balancing factors, which may unintentionally bias the optimization process toward specific objectives. Similarly, gradient-based adaptive weighting approaches adjust loss contributions dynamically during training but remain primarily dependent on local gradient information and instantaneous optimization behaviour. In contrast, the proposed GA-based framework performs broader exploration of the normalized loss-weight space, enabling the identification of more balanced configurations that simultaneously improve data agreement, physics consistency, and boundary-condition enforcement. An important observation is that the improvement in PDE residual behaviour does not occur at the expense of predictive fidelity. Throughout the optimization process, data and boundary losses remain active alongside the governing-equation residual, ensuring balanced learning dynamics between observational consistency and physical constraints. Consequently, the framework achieves improved physics enforcement while preserving stable and accurate temperature-field reconstruction. These results demonstrate that GA-based meta-optimization provides an effective and systematic strategy for improving physics consistency in PINNs. By reducing reliance on manual tuning and enabling more balanced interaction between competing objectives, the framework leads to more stable, reproducible, and physically consistent solutions. Such characteristics are particularly important in manufacturing and digital twin applications, where accurate predictions must remain consistent with governing physical principles under noisy or uncertain operating conditions.
3.3 Prediction error characteristics
To further examine the influence of automated loss balancing on local solution behaviour, the spatial distribution of the pointwise absolute prediction error is analyzed for the fixed-weight PINN, the gradient-based adaptive weighting model, and the proposed GA-optimized PINN. Figure 5 presents the prediction error evaluated along a representative spatial cross-section at . s observed, all three approaches produce relatively small prediction errors across the computational domain, indicating accurate reconstruction of the transient temperature field. The overall shape of the error distributions remains similar among the different models, with localized peaks occurring primarily in regions characterized by stronger thermal gradients. Such regions are inherently more challenging to approximate because of the rapid spatial variation in the underlying temperature field. Importantly, the GA-optimized PINN does not exhibit any evidence of instability, systematic bias, or amplification of local prediction error. The resulting error distribution remains smooth and well bounded throughout the domain, demonstrating that the introduction of GA-based loss balancing does not compromise predictive reliability. Although the primary objective of the proposed optimization strategy is to improve physics consistency, the local prediction accuracy remains comparable to both the fixed-weight and adaptive weighting approaches. The adaptive weighting model shows moderate improvement in error smoothness relative to the fixed-weight PINN by dynamically adjusting the contribution of different loss components during training. However, the overall prediction-error characteristics remain comparable to those of the GA-optimized framework. The principal distinction lies in the ability of the proposed GA-based approach to simultaneously improve governing-equation consistency while preserving stable prediction behaviour across repeated training runs. These observations are further supported by the quantitative comparison summarized in Table 2. While the proposed GA-PINN achieves the lowest governing-equation residual RMSE, the prediction RMSE remains comparable to the adaptive weighting framework and slightly improved relative to the fixed-weight baseline. In addition, the coefficient of variation remains within a stable range, indicating that the enhanced physics consistency does not introduce convergence instability or excessive sensitivity to initialization.
The proposed GA-based framework achieves the lowest governing-equation residual RMSE while maintaining prediction accuracy comparable to the adaptive weighting approach. The adaptive-weight PINN baseline was implemented using a gradient-based dynamic weighting strategy in which loss weights are updated according to relative gradient magnitudes during training. Although the offline meta-optimization stage increases computational cost relative to conventional fixed-weight training, the resulting GA-based framework provides improved global loss balancing and enhanced physics consistency without introducing convergence instability. These observations are consistent with the findings presented in Sections 3.1 and 3.2. While the GA framework improves enforcement of the governing physics, it maintains a balanced interaction between data fitting, physics residual minimization, and boundary-condition satisfaction. Consequently, improved adherence to the governing equations is achieved without sacrificing the quality or stability of the reconstructed temperature field. Overall, the results confirm that the proposed loss-balancing framework supports accurate and stable field reconstruction while enhancing physical consistency during training. This behaviour is particularly beneficial for manufacturing and digital twin applications, where predictive reliability, numerical stability, and physics-consistent behaviour must be maintained simultaneously under noisy or partially observed operating conditions.
3.4 GA optimization behaviour
This section examines the convergence behaviour of the genetic algorithm during the loss-weight optimization process. Figure 6 illustrates the evolution of the best fitness value across successive GA generations. As observed, the optimization converges progressively within a relatively small number of generations, indicating that the proposed framework can efficiently identify suitable loss-weight configurations without requiring excessive evolutionary iterations. Although moderate fluctuations are observed between generations, such behaviour is characteristic of evolutionary optimization algorithms and reflects the balance between exploration and exploitation within the search process. These fluctuations indicate that the GA continues to explore alternative candidate configurations while gradually refining high-performing solutions. Despite local variations, the overall trend demonstrates a clear reduction in fitness value as the optimization progresses, confirming that increasingly balanced and physically consistent weight configurations are identified across generations. The observed convergence behaviour also suggests that the loss-balancing problem, while inherently non-convex and multi-objective in nature, can be effectively explored using the proposed low-dimensional chromosome representation. Because the optimization is restricted to three normalized weighting parameters, the search space remains compact and computationally tractable. This enables the GA to perform broader exploration of candidate configurations while avoiding excessive optimization complexity. Compared with locally adaptive weighting strategies that modify loss contributions dynamically during gradient-based training, the GA-based framework performs global exploration of the normalized loss-weight space. Consequently, the optimization is less sensitive to instantaneous gradient behaviour or local training instabilities. This broader search capability contributes to improved convergence robustness and more stable identification of balanced training configurations. In terms of computational efficiency, the additional overhead introduced by the GA remains manageable. The use of short training cycles during candidate evaluation substantially reduces optimization cost, while the relatively small population size and limited number of generations maintain practical computational requirements. Furthermore, because the optimization is conducted offline prior to final PINN training, the additional cost is incurred only during the calibration stage rather than during routine model deployment or inference. The results therefore demonstrate that GA-based meta-optimization provides a practical balance between optimization quality and computational tractability. The framework enables systematic exploration of the training landscape while maintaining stable convergence behaviour and manageable computational expense. Such characteristics are particularly important in manufacturing-oriented physics-informed modelling, where reliable and reproducible loss balancing is necessary for stable surrogate-model development under varying operating conditions.
3.5 Robustness analysis
To evaluate training robustness and reproducibility, the fixed-weight PINN, the gradient-based adaptive weighting model, and the proposed GA-optimized PINN were trained across multiple independent runs using different random initializations of network parameters. For each run, the root-mean-square error (RMSE) of the governing-equation residual was recorded after full convergence. The resulting statistical distributions are summarized in Figure 7.
Reproducibility is quantified using the coefficient of variation (CV), defined as:
where denotes the mean residual RMSE and represents the corresponding standard deviation across repeated runs. Lower CV values indicate reduced sensitivity to initialization and therefore more consistent model performance.
Across all repeated training runs, the three approaches exhibit stable convergence behaviour with bounded variability. However, noticeable differences are observed in the mean residual error distributions. The GA-optimized framework consistently achieves lower mean governing-equation residual RMSE values relative to the fixed-weight PINN, indicating improved physics consistency and more balanced training dynamics. The adaptive weighting model also improves residual behaviour compared to the fixed-weight baseline, although its performance remains slightly less consistent than that of the GA-optimized framework. Importantly, the improved physics consistency achieved by the GA-based optimization does not occur at the expense of convergence stability. The coefficient of variation remains within a comparable range across repeated runs, indicating that the framework maintains stable optimization behaviour despite the broader exploration of candidate weight configurations. In certain cases, the GA-based framework exhibits marginally higher variability than the fixed-weight model. This behaviour is expected because the evolutionary optimization process may converge to different but similarly effective weight configurations depending on the initialization and stochastic search trajectory. Nevertheless, the observed variability remains well controlled and does not lead to divergence, instability, or degradation in predictive performance. Instead, the results suggest that the GA-based framework preserves stable convergence while simultaneously improving overall physics enforcement. The reduced sensitivity to manual tuning further contributes to improved reproducibility across different training conditions. The robustness characteristics observed in the present study are particularly important for manufacturing-oriented PINN applications, where noisy measurements, sparse observations, and varying operating conditions can significantly influence training stability. By enabling systematic and globally balanced loss-weight selection, the proposed framework improves the reliability and consistency of physics-informed surrogate modelling under uncertain data environments. Overall, the results demonstrate that automated GA-based loss balancing provides a stable and reproducible optimization strategy capable of improving governing-equation consistency without introducing convergence instability. This balance between physics enforcement, predictive reliability, and training robustness is essential for practical deployment of PINN-based digital twin and manufacturing modelling frameworks.
3.6 Interpretation of optimized loss weights
The optimized loss weights obtained through the genetic algorithm provide insight into how the competing training objectives are balanced within the PINN framework. Figure 8 presents the final normalized weight distribution associated with the best-performing configuration identified during the optimization process. The resulting distribution is clearly non-uniform across the data, physics residual, and boundary-condition loss components, indicating that equal weighting does not represent the most effective training strategy for the present problem. Instead, the optimization process identifies a configuration that more appropriately reflects the relative influence required for each objective during training. Across multiple independent optimization runs with different random initializations, the physics residual weight consistently emerges as the dominant component, while the data and boundary-condition weights exhibit comparatively smaller but controlled variations. The recurrence of this pattern across repeated runs suggests that the optimization converges toward a stable and meaningful region of the normalized loss-weight space rather than producing arbitrary or inconsistent solutions. It is important to emphasize that these optimized weights are not physical material parameters or directly measurable process variables. Rather, they represent training hyperparameters that govern the relative contribution of different objectives during network optimization. In the present study, the larger weighting assigned to the governing-equation residual is directly associated with the observed reduction in PDE residual RMSE discussed in Section 3.2, while the prediction error characteristics remain stable and well controlled, as demonstrated in Section 3.3. This behaviour indicates that stronger emphasis on physics enforcement can improve governing-equation consistency without degrading predictive accuracy or numerical stability. At the same time, the data loss remains sufficiently influential to preserve agreement with the reference solution, even under noisy measurement conditions. Similarly, although the boundary-condition weight assumes a comparatively smaller value, it remains non-zero throughout the optimization process, confirming that boundary constraints continue to contribute meaningfully to training stability and physical admissibility. Compared with fixed-weight formulations, the optimized distribution provides a more balanced interaction between competing learning objectives. Furthermore, unlike locally adaptive weighting strategies that modify loss contributions dynamically based on instantaneous gradient behaviour, the proposed GA-based framework identifies globally balanced configurations through broader exploration of the normalized weight space. This enables improved reproducibility and reduces dependence on manual heuristic tuning. Overall, the optimized weight distributions reflect a practical compromise between global physics consistency, predictive fidelity, convergence stability, and boundary-condition enforcement. It should be noted, however, that the specific distribution identified in this study is problem dependent. Different governing equations, noise characteristics, boundary conditions, or multiphysics coupling scenarios may produce alternative optimal configurations. These findings highlight the broader value of automated loss balancing within physics-informed learning frameworks. By replacing manual heuristic selection with systematic optimization, the proposed approach provides more transparent, interpretable, and reproducible control over training behaviour. Such characteristics are particularly valuable for reliable deployment of PINN-based surrogate models in manufacturing, process monitoring, and digital twin applications where stable physics-consistent learning is essential.
4. Discussion
4.1 Rationale for genetic algorithm–based loss balancing
The effectiveness of genetic algorithms (GAs) for loss balancing in physics-informed neural networks can be understood by considering the nature of the underlying optimization problem. Loss balancing in PINNs is inherently non-convex because it involves coupled interactions among data fitting, governing-equation enforcement, and boundary-condition satisfaction. Small variations in loss weights can substantially influence gradient magnitudes, convergence dynamics, optimization stability, and the final learned solution. Consequently, identifying suitable loss-weight configurations represents a challenging global optimization problem rather than a simple hyperparameter tuning task. The proposed GA-based framework addresses this challenge through population-based evolutionary search over the normalized loss-weight space. By iteratively applying selection, crossover, and mutation operations, the algorithm evaluates multiple candidate configurations and progressively identifies more balanced solutions. This broader exploration capability is particularly valuable for PINNs, where locally optimal weight configurations may not necessarily produce the best overall balance between predictive fidelity and physical consistency. In contrast, gradient-based adaptive weighting strategies adjust loss contributions using local training information such as gradient magnitudes, residual evolution, or uncertainty estimates. Approaches such as uncertainty-based weighting (Hua et al., 2023), dynamic weighting strategies (Li and Feng, 2022), adaptive weighted loss formulations (Liu et al., 2022), and recent adaptive loss-balancing approaches for PDE-driven PINNs (Gao et al., 2025; Li et al., 2025) have demonstrated improved convergence relative to fixed-weight formulations. However, these methods remain fundamentally dependent on instantaneous training dynamics and local optimization behaviour. Recent studies have also highlighted the sensitivity and robustness limitations associated with certain weighting strategies in highly nonlinear or noisy settings (Barreau and Shen, 2025; Farea et al., 2025; Zhou et al., 2025). The proposed framework differs by decoupling loss-weight optimization from neural-network parameter learning. While the PINN parameters are updated through standard gradient-based backpropagation, the GA independently performs global exploration of the normalized weight space. This separation allows each optimization process to operate within its most appropriate domain: gradient-based learning for function approximation and evolutionary optimization for loss balancing. Consequently, the framework avoids excessive dependence on local gradient information while enabling systematic exploration of candidate configurations that may otherwise remain inaccessible to locally adaptive methods. The effectiveness of evolutionary and metaheuristic optimization for neural-network training and engineering optimization has been extensively discussed in previous studies (Abd et al., 2021; Chong et al., 2021; Kaveh and Mesgari, 2023). Similarly, GA-assisted optimization has demonstrated strong performance in engineering modelling applications requiring exploration of non-convex search spaces (Moiz et al., 2018; Peña-García et al., 2024). The present work extends these concepts to physics-informed learning by specifically targeting the coupled loss-balancing problem within PINNs. The results presented in this study demonstrate that the proposed meta-optimization strategy achieves approximately a 39% reduction in governing-equation residual RMSE relative to fixed-weight training while preserving stable prediction accuracy and convergence behaviour. Importantly, this improvement is obtained without modifying the underlying network architecture or introducing additional trainable neural-network parameters. The framework therefore improves training balance through optimization of existing loss interactions rather than increased model complexity. Overall, these findings support the use of evolutionary optimization as a practical and effective strategy for automated loss balancing in physics-informed learning. By enabling globally balanced optimization while maintaining stable convergence and predictive reliability, the proposed approach provides a systematic foundation for improving robustness and reproducibility in PINN-based engineering models.
4.2 Implications for manufacturing modelling and digital twin contexts
In manufacturing applications, reliable predictive modelling requires simultaneous enforcement of physical consistency, numerical stability, predictive accuracy, and robustness under varying operating conditions. Although PINNs provide a natural framework for embedding governing equations into neural-network training, their practical performance often depends strongly on the selection of appropriate loss-weight configurations. Manual tuning of these weights is frequently problem dependent, time consuming, and sensitive to user expertise, limiting reproducibility and scalability in industrial settings. The proposed GA-based framework addresses this limitation by automating the loss-balancing process through systematic global optimization. In the present study, applied to a transient heat-conduction problem representative of laser-based manufacturing, the optimized framework improves governing-equation consistency while maintaining accurate and stable thermal predictions. These results demonstrate that systematic loss balancing can improve model reliability without introducing instability or sacrificing predictive fidelity. The growing integration of physics-informed learning with digital twin technologies further highlights the importance of robust and interpretable training strategies. Recent studies have explored physics-informed digital twins for manufacturing optimization, industrial forecasting, anomaly detection, and fault diagnosis (Garcia et al., 2025; Seppi et al., 2025; Zhang and Zhao, 2023; Wang et al., 2024; Lu et al., 2025). Physics-informed machine learning has also been increasingly recognized as a key enabling technology for intelligent manufacturing systems and industrial digital twins (Leng et al., 2025; Farhat and Altarawneh, 2025). Within such environments, PINNs can serve as physics-constrained surrogate models capable of reconstructing full-field thermal behaviour from sparse sensor measurements while maintaining governing-equation consistency. The proposed GA-based optimization framework may therefore be integrated as an offline calibration stage during digital twin deployment or periodic recalibration cycles. For example, optimization may be repeated following process drift, accumulation of new sensor data, material-property variation, or changes in operating conditions. Once optimized, the resulting loss-weight configuration can subsequently be deployed during routine surrogate-model updating without requiring continuous evolutionary optimization during inference. Although the present study focuses on a simplified thermal modelling problem, the framework is general and extensible. Previous studies have demonstrated the applicability of physics-informed modelling in additive manufacturing, machining, composite manufacturing, and industrial process systems (Zobeiry and Humfeld, 2021; Zhu et al., 2021; Würth et al., 2023; Ciampi et al., 2025). In more complex multiphysics environments involving coupled thermal, mechanical, metallurgical, or fluid-flow phenomena, the number of competing loss components increases substantially, making manual tuning increasingly difficult. Under such conditions, automated optimization strategies become especially valuable for maintaining stable and physically consistent learning behaviour across multiple interacting objectives. The proposed framework therefore represents a scalable and reproducible approach for improving training robustness in physics-informed manufacturing models and digital twin applications. By enabling systematic optimization of competing learning objectives, the methodology provides a practical pathway toward more reliable deployment of PINN-based surrogate models in advanced engineering environments.
4.3 Limitations and future research directions
Despite the advantages demonstrated in the present study, several limitations should be acknowledged. First, the use of a genetic algorithm introduces additional computational overhead because each candidate solution requires a short PINN training cycle during fitness evaluation. Although the computational cost remains manageable in the present work due to the low-dimensional search space, modest population size, and truncated training strategy, the optimization expense may become more significant for large-scale, high-dimensional, or strongly coupled multiphysics problems. Future work may therefore explore strategies such as parallel evaluation, surrogate-assisted optimization, reduced-order approximations, or hybrid global–local optimization schemes to improve computational efficiency.
Second, the current framework is evaluated using a two-dimensional transient heat-conduction problem that serves as a controlled and physically interpretable manufacturing proxy. Real industrial processes often involve more complex phenomena, including nonlinear material behaviour, phase transformations, thermo-mechanical coupling, moving interfaces, and evolving boundary conditions. Extending the proposed methodology to experimentally validated manufacturing systems will therefore be important for assessing practical scalability and industrial applicability. In particular, future studies may investigate applications involving tool wear evolution, surface integrity prediction, contact-driven processes, and coupled thermal–mechanical manufacturing scenarios.
Another important direction involves the integration of real experimental and sensor-based data. Although the present work incorporates noisy training conditions to emulate practical measurement uncertainty, industrial datasets frequently include additional challenges such as sensor drift, irregular sampling, incomplete observations, and time-dependent operating variations. Evaluating the robustness of GA-assisted PINNs under these realistic conditions will be essential for practical deployment in manufacturing and digital twin environments. The optimization procedure is currently implemented as an offline meta-optimization stage that produces a fixed set of loss weights prior to final PINN training. While this improves interpretability, reproducibility, and convergence stability, it may reduce adaptability in situations where process conditions evolve continuously over time. Future research may therefore investigate hybrid strategies that combine offline GA-based initialization with adaptive in-training refinement or online recalibration mechanisms. Such approaches could provide a balance between global exploration capability and computational efficiency while improving flexibility under dynamic operating conditions. Finally, the present framework considers only three primary loss components. In more complex PINN formulations involving multiple governing equations, coupled physical fields, or additional interface constraints, the dimensionality of the loss-weight space may increase substantially. Although evolutionary optimization algorithms are generally well suited to such problems, further investigation will be required to assess scalability, optimization efficiency, and suitable chromosome representations for higher-dimensional applications. Overall, addressing these limitations will be important for extending the proposed methodology toward more realistic industrial and multiphysics environments. Nevertheless, the present study establishes a clear, interpretable, and reproducible framework for automated loss balancing in physics-informed neural networks. The results demonstrate that global meta-optimization can improve physics consistency, convergence robustness, and training stability while preserving predictive accuracy, thereby providing a practical foundation for future development of reliable PINN-based manufacturing and digital twin models.
5. Conclusions
This study presented a genetic algorithm (GA)–based meta-optimization framework for automated loss balancing in physics-informed neural networks (PINNs), addressing one of the key practical challenges in physics-informed learning: the reliance on manually selected or heuristically tuned loss-weight configurations. By introducing a population-based evolutionary optimization strategy at the meta-parameter level, the proposed framework systematically identifies normalized loss weights that improve the balance between data fitting, governing-equation enforcement, and boundary-condition satisfaction. The methodology was validated using a two-dimensional transient heat-conduction problem with a moving Gaussian heat source representative of laser-based manufacturing processes. The results demonstrated that the GA-optimized PINN achieved an approximate 39% reduction in governing-equation residual RMSE relative to conventional fixed-weight training while maintaining comparable prediction accuracy and stable convergence behaviour across repeated runs. In comparison with gradient-based adaptive weighting approaches, the proposed framework exhibited improved global loss balancing capability and more consistent physics enforcement without introducing instability or degradation in predictive performance. The optimized loss-weight distributions were found to be clearly non-uniform, indicating that equal weighting of competing objectives is generally suboptimal for physics-informed training. Instead, the results demonstrate that suitable weight configurations can be systematically identified through global optimization of the normalized loss-weight space. The recurring emergence of dominant physics-residual weighting across repeated optimization runs further supports the interpretability and reproducibility of the proposed framework. n important contribution of the present work lies in the decoupling between neural-network parameter learning and loss-weight optimization. While the PINN parameters are updated through conventional gradient-based training, the GA independently explores the loss-weight space using evolutionary search. This separation enables broader exploration of candidate configurations and reduces sensitivity to local optimization behaviour, thereby improving robustness under noisy or uncertain data conditions. From a broader perspective, the proposed framework provides a practical and scalable strategy for improving the reliability of physics-informed surrogate modelling in manufacturing and engineering applications. By reducing dependence on manual hyperparameter tuning and enabling more systematic enforcement of governing physics, the methodology supports the development of more stable, interpretable, and reproducible PINN-based models. The framework is also compatible with manufacturing digital twin environments, where physics-consistent surrogate models are required for predictive monitoring, thermal-field reconstruction, and process-aware decision support. Although further validation using experimental data, multiphysics systems, and large-scale industrial scenarios remains necessary, the present study establishes a clear foundation for future development of automated loss-balancing strategies in physics-informed learning. Overall, the results demonstrate that global meta-optimization provides an effective pathway toward more robust, physics-consistent, and reliable PINN training for advanced manufacturing and digital twin applications.
The complete mathematical formulation and step-by-step implementation of the proposed GA-optimized PINN framework are presented in Appendix A.
Author contributions
The author solely conceived and designed the study. The physics-informed modelling framework for transient thermal systems was developed by the author. All theoretical formulation, model implementation, numerical training, parametric analysis, and post-processing were carried out by the author. The author analyzed and interpreted the results, prepared all figures and tables, and wrote the original manuscript. The author also reviewed, revised, and approved the final version of the manuscript.
The supplementary material for this article can be found online.









