# Physics-Informed Surrogate Modelling in Fire Safety Engineering: A Systematic Review
## 3 Implementing Physics-Informed Surrogate Model
### Integrating Physics with Surrogate Models  
According to [PERSON] et al. [42], physics can be integrated into surrogate models at different levels. These five layers of physics integration (Figure 6) define where and how physics can be embedded in ML models:  
1. **Understanding physics** Before developing a model, a thorough understanding of the physical system is crucial. This involves identifying (i) sub-models and their interaction (series, parallel, coupled), (ii) the relevant physical and engineering constraints (conservation laws, domain-specific rules), as well as (iii) known solution types. Aspect (iii) relates, for example, to situations where analytical results are known for specific cases. This then provides information for consideration in the development of the more general surrogate model. This step establishes the foundation for integrating physics into the model.
2. **Database development (Feature Engineering technique--FET)** Physical principles can be embedded into the training dataset by selecting and refining input features. This can be done based on the problem understanding of Level 1, and can also involve leveraging numerical simulations and sensitivity analysis to identify key parameters that capture physical correlations. This step ensures that only (combinations of) parameters that are known to be physically relevant are taken into account for the model training. Feature engineering furthermore allows to constrain the model output to physically relevant ranges, e.g., by scaling the training data so that all physically relevant results are known to fall within a certain range (such as the range from 0 to 1).  
Figure 6: Layers of injecting physics adopted from [42].  
Model selection (Architecture-Constrained technique--ACT)  
This level relates to selecting and designing a model architecture that inherently reflects physical considerations. This includes choosing appropriate model types (regression, neural networks) and potentially using multiple networks for different sub-models identified in the problem-understanding stage. This level also includes selecting activation functions that are compatible with the physical constraints (i.e., derivatives).  
**4. Objective level (Loss-Constrained technique--LCT)**  
This level includes designing physics-informed loss functions that incorporate conservation laws and domain-specific constraints. This can involve adding penalty terms to the loss function to enforce adherence to governing equations, ensuring the model's predictions align with physical principles. The case-specific loss function can also be defined in such a way that bias is purposefully introduced in the surrogate model, pushing the trained model away from errors which are deemed especially unwanted.  
**5. Optimiser level**  
Special attention is required to employ optimisation techniques that can handle the complex loss landscapes introduced by physics-based constraints. This can include using adaptive weighting strategies to balance loss terms and support convergence, preventing any single loss component from dominating the training process.  
**6. Inference level (Offline-Constrained technique--OCT)**  
Post-processing constraints can be applied to maintain physical consistency in predictions (e.g., ensuring non-negative mass loss rates and bounded temperature values). Inference can also leverage precomputed numerical or experimental constraints, refining outputs to align with validated physical models. A different OCT approach is to divide the model architecture into a machine-learning-inspired sub-model that provides input to a physical model. The total model architecture then results in a surrogate model output that is constrained by the physical model.