Source-linked AI summary
Domain-informed Adaptive Sampling for Generalizable PINNs in Metal Additive Manufacturing via Conditional Flow Matching
Hyeonsu Lee, Jihoon Jeong
TL;DR
Static spatial proposals do not adapt to process parameters, motivating adaptive sampling for generalization across unseen conditions. The paper uses condition-aware Flow Matching to guide collocation sampling and reports lower relative L2 error than AP-PINN across five materials.
Problem
Conventional static spatial proposals remain independent of process parameters, while the adaptive proposal is designed to support generalization across unseen conditions.
Source: §2.2 · p. 4Method
A conditional Flow Matching model approximates process condition-dependent high-residual distributions to generate adaptive collocation points, alongside a domain-informed proposal.
Source: §1 · p. 3, §4 · p. 14Results
62.1% average and up to 70.1% reduction in relative L2 error versus AP-PINN across all five materials.
Source: §4 · pp. 11, 18Takeaways & Limitations
Material-dependent adaptive sampling yields accurate subsurface and far-field thermal predictions where AP-PINN’s static sampling fails.
Source: §4 · p. 18Ground-truth data come from FEM simulations, and validation against actual experiments would further strengthen the findings.
Source: §4 · p. 18
Abstract
from arXiv · showhide
Accurate thermal modeling is essential in metal additive manufacturing (AM) for understanding the process-structure-property chain. Physics-informed neural networks (PINNs) offer effective surrogate thermal modeling by minimizing physics-based residual losses at collocation points. However, prior works typically rely on manually-crafted, static collocation sampling strategies, which are neither principled nor scalable across process conditions, hindering their generalization capability. In this work, we provide theoretical analysis through empirical risk minimization, showing that process condition-aware adaptive sampling is strictly more favorable than conventional static sampling for generalization. Building on this insight, we propose an adaptive sampling strategy within a two-stage framework: (1) a conditional Flow Matching model that learns approximate high-residual distributions across different process conditions, and (2) a mixed sampling strategy combining this distribution with a domain-informed base distribution to generate adaptive collocation points for refining the PINN predictor. Experiments on metal AM numerical benchmarks demonstrate that our method consistently outperforms state-of-the-art PINN baselines, achieving an average 62.1\% reduction in relative $L_2$ error under an identical collocation budget, by capturing process-dependent heat dissipation regions often overlooked in the literature. To the authors' knowledge, this is the first adaptive sampling strategy for PINNs in metal AM, contributing to the enhanced generalization and broader applicability.
1 Introduction
Static collocation sampling does not account for process-dependent shifts in high-residual regions, limiting its suitability for parametric PINNs. The paper develops a theoretically motivated adaptive sampling framework that combines conditional generative modeling with metal AM domain knowledge.
1 Introduction
- Prior strategies use static, manually crafted sampling independent of process conditions, although high-residual regions shift with material thermophysical properties.Lower-conductivity materials concentrate high-residual zones near the laser path, while higher conductivity shifts or expands them toward heat dissipation regions.Source: §1 · p. 2
- The theoretical analysis decomposes PINN generalization error into optimization and statistical errors and proves static sampling is less effective than adaptive sampling for generalization.The statistical error is heavily governed by the variance of the loss estimator.Source: §1 · pp. 2–3
- Conditional Flow Matching conditions on time steps and PDE parameters to approximate process-dependent high-residual distributions and generate collocation points in a single pass.The authors identify this as the first adaptive sampling framework for PINNs in metal AM.Source: §1 · p. 3
- The framework uses domain-informed physical priors to warm-start the residual landscape and to form a base distribution mixed with the learned proposal.The paper reports that this integration stabilizes and accelerates training for both the generator and predictor.Source: §1 · p. 3
- Under an identical collocation budget, the method reduces the state-of-the-art parametric PINN baseline’s relative L2 error by up to 70.1%.Experiments cover five representative metal alloys spanning in-distribution and out-of-distribution regimes.Source: §1 · p. 3
- High-residual regions also arise in heat dissipation zones that evolve with material properties, so sampling only near the laser track can miss them.The authors report that capturing these shifts is essential for accurate subsurface and far-field thermal predictions.Source: §1 · p. 3
2 Proposed Method
This section frames PINN generalization as minimizing population residual loss across space, time, and process conditions, motivating condition-aware adaptive sampling. It presents a domain-informed conditional flow-matching procedure and a two-stage training approach that combines learned high-residual regions with a base distribution to generate collocation points.
2.2 Problem Setup
- The setup defines a parametric PINN over the spatiotemporal domain and PDE parameter space; time and parameters are sampled uniformly, while the spatial proposal adapts to both.Process conditions may include process settings or material properties, though experiments focus on varying material properties.Source: §2.2 · pp. 3–4
2.3 Theoretical analysis of collocation sampling and generalization
- Statistical error depends on the proposal and collocation count, so reducing empirical-loss variance targets its bound more directly than merely increasing sample size.Optimization error is controlled by training choices and does not depend on the proposal.Source: §2.3 · pp. 4–5
- The µ-conditional proposal strictly lowers minimum variance versus µ-independent sampling, except when squared residuals separate into spatial and parameter factors; its optimum is proportional to squared residual.This provides a theoretical basis for adapting spatial samples to each process condition and instant.Source: §2.3 · pp. 5–6
2.4 Domain-Informed Adaptive Sampling via Amortized CFM
- The method warm-starts a predictor from physical priors, trains CFM conditioned on time and process conditions to model high-residual regions, then mixes that proposal with a domain-informed base.The mixture balances exploration and exploitation, while amortized generation produces samples for a condition in one forward pass.Source: §2.4 · p. 6
2.4.1 Flow matching background
- Flow Matching learns a vector field that transports source samples toward a target distribution through MSE regression, enabling stable, rapid conditional sampling in high-dimensional parameter spaces.The flow follows a probability path from a tractable source to the desired target.Source: §2.4.1 · pp. 6–7
2.4.2 Training procedure
- Stage 1 warm-starts the predictor and trains CFM on residual-weighted targets for sampled process conditions; Stage 2 trains a fresh predictor using the frozen generator and mixture proposal.Per-condition normalization assigns the same number of targets to each stored condition, preserving a uniform parameter marginal.Source: §2.4.2 · pp. 7–8
- The trained velocity field defines a generator by integrating its learned dynamics from x(0) sampled from p0 to τ = 1, approximated with forward Euler using NODE = 10.The resulting law approximates the target residual-conditioned distribution.Source: §2.4.2 · p. 8
- The final predictor is initialized from scratch after freezing the trained generator, then updated using residual loss at mixture-sampled collocation points.Mixing with the base distribution guards against neglecting underexplored regions where the predictor initially underestimates residuals.Source: §2.4.2 · p. 8
- The domain-informed mixture proposal combines the learned generator gϕ(x | t, µ) with base distribution b(x | t), weighted by α and 1 − α.Smaller α emphasizes learned high-residual regions; larger α retains broader coverage to defend against residual-estimation error.Source: §2.4.2 · p. 8
3 Experiments
Experiments use a bare-plate laser-scanning benchmark to test thermal prediction across material conditions, including out-of-distribution (OOD) extrapolation cases. The proposed sampling method is compared with two PINN baselines under a matched collocation budget using relative L2 error.
System Description
- The benchmark models a moving laser heat source on a metal substrate, producing localized transient thermal gradients and subsequent heat diffusion.Ground-truth snapshots are shown at 0.5, 1.5, and 2.5 s for Ti–6Al–4V.Source: §3 · p. 9, Figure 3 · p. 9
Process conditions
- Five materials represent unseen process conditions; Ti–6Al–4V, Inconel 718, and SS 316L are in-distribution, while AlSi10Mg and Copper are OOD extrapolation cases.The OOD materials exceed the training upper bound for thermal conductivity.Source: §3 · p. 9
Baselines and Evaluation Metric
- The proposed method is compared with a non-parametric PINN and the state-of-the-art AP-PINN, which uses static domain-informed collocation sampling.The proposed predictor uses the AP-PINN architecture unchanged, attributing performance differences to adaptive sampling.Source: §3 · pp. 9–10
- Relative L2 error measures normalized discrepancy between predicted and ground-truth temperature fields over the uniformly discretized spatiotemporal domain.The reference field comes from JAX-AM finite-element simulations with 88,939 nodes.Source: §3 · p. 10
Implementation Details
- All methods use the same collocation-point budget, and drawing adaptive samples adds less than 1% to per-run training time.Training the conditional Flow Matching generator takes approximately 2 minutes on a single GPU.Source: §3 · p. 10
4 Results and Discussion
The adaptive method reduces relative L2 error against AP-PINN across all five materials, while concentrating collocation points in high-residual regions improves population-loss and thermal-field predictions. Its gains vary with material-dependent heat dissipation, and ablations show that the domain-informed base supports accuracy and training stability.
Quantitative Evaluation
- 62.1% average and up to 70.1% reductions in relative L2 error versus AP-PINN were achieved consistently across all five materials.The comparison uses an identical collocation budget.Source: §4 · p. 11, Table 1 · p. 11
Training Loss Analysis
- The method has higher losses on its own sampled points but lower estimated population loss and relative L2 error than AP-PINN.The proposed sampler concentrates points in high-residual regions, so its own sampled residual losses are higher.Source: §4 · pp. 11–12, Figure 5 · p. 12
Thermal History Comparison
- At 4 mm depth, the method captures subsurface thermal profiles that AP-PINN misses, with gains in material-dependent heat-dissipation regions.For low-conductivity materials, gaps emerge later and farther from the laser; for high-conductivity materials, they appear earlier as heat dissipates toward the subsurface.Source: §4 · p. 12, Figure 6 · p. 13
Collocation Sampling Distribution Comparison
- Adaptive collocation shifts from the melt pool toward far-field subsurface regions over time, with sampling distributions varying by material properties.Higher thermal diffusivity shifts points deeper toward the bottom, where heat accumulates and dissipates; the method also allocates points to heat-dissipation regions alongside the laser zone.Source: §4 · pp. 14–16
Ablation Study and Sensitivity Analysis
- The domain-informed base outperforms the uniform base across nearly all mixture weights; error is lowest at α = 0.6 (1.48±0.31%).Accuracy has a broad low-error plateau for α ∈[0.5, 0.8]; the domain-informed base also avoids the uniform-base convergence failures at α = 0.9 and collapse at α = 1.Source: §4 · pp. 16–17
Overall discussion
- The evaluation uses FEM simulations and varies feedstock material, while both methods retain deviations near the melt pool under direct laser irradiation.The authors identify validation against experiments and variation of additional process parameters and scan paths as future work.Source: §4 · pp. 12, 14, 18
5 Conclusion
The proposed adaptive sampling method improves parametric PINN accuracy on a metal AM benchmark while retaining low training overhead. Its process-conditioned proposals address a theoretical limitation of static sampling, and domain knowledge helps stabilize training.
5 Conclusion
- The analysis shows that static, process-independent proposals face a strict variance ceiling, while conditional Flow Matching approximates a near-optimal proposal for each process condition in one forward pass.The method mixes learned samples with a domain-informed base distribution for training stability.Source: §5 · p. 18
- 62.1% average and up to 70.1% relative L2 error reduction versus the state-of-the-art parametric PINN baseline, with less than 1% additional training overhead.The adaptive proposal reallocates collocation points toward heat-dissipation regions that conventional sampling overlooks.Source: §5 · p. 18
- The domain-informed base distribution is essential for training stability, complementing the learned proposal to achieve peak accuracy and robust convergence.Source: §5 · p. 19
- The authors conclude that adaptive, process condition-aware collocation sampling is critical to realizing parametric PINNs’ generalization potential in metal AM.Source: §5 · p. 19
A.1 Nomenclature
The nomenclature defines the paper’s domains, sampling proposals, model and residual notation, and physical quantities used for thermal modeling.
A.1 Nomenclature
- The spatiotemporal point is (x, t), the domain is Ω = Ωx × [0, tend], and μ denotes the process condition with target density p.The simulated horizon is tend; Ωx and Ω denote spatial and spatiotemporal domains, respectively.Source: §A.1 · p. 19
- The proposal notation distinguishes the general proposal α, variance-optimal proposal, domain-informed base, and learned CFM generator gϕ approximating q⋆.Source: §A.1 · p. 19
- The predictor fθ has PDE, boundary, and initial-condition residuals, whose weighted contributions form the residual loss and empirical and population loss notation.The notation also includes a likelihood-ratio bound, estimator variance, and its supremum over Θ.Source: §A.1 · p. 19
- The algorithm notation covers residual groups, collocation pools and batches, stored conditions, flow steps, and stage iteration counts for warm-start, flow, and PINN training.Source: §A.1 · p. 19
- Physical notation includes spatial position and time, ground-truth and predicted temperatures, material properties, laser settings, and convective and radiative heat-transfer quantities.The material properties are density, specific heat capacity, and thermal conductivity; the laser and surface quantities include power, absorptivity, beam radius, convection, emissivity, and radiation.Source: §A.1 · p. 19
A.2 Governing Equations, Boundary Conditions, and Residuals
The appendix specifies a transient heat-transfer model for a bare-plate metal AM process, its boundary and initial conditions, and the PINN residuals used for training.
A.2 Governing Equations, Boundary Conditions, and Residuals
- The experiments vary the material-property vector μ = (ρc, Cp, kc), while other process parameters and surface-exchange coefficients are held fixed.Source: §A.2 · p. 19
- The temperature field follows energy conservation coupled with Fourier heat conduction, with nonlinearity entering through the radiative boundary term.Source: §A.2 · p. 20
- A Gaussian laser heat source moves along a prescribed one-dimensional top-surface scan path; convection and radiation act on exposed surfaces, while the bottom has fixed temperature.The boundary is divided into top, side, and bottom surfaces; the laser center follows xlaser(t) = x0 + vt.Source: §A.2 · p. 20
- The initial condition sets temperature to ambient T0 at t = 0, and the PINN residuals substitute predicted temperature into the governing conditions.The boundary residual combines Neumann-type conditions on the top and sides with a Dirichlet-type condition on the bottom; PDE, boundary, and initial residuals are evaluated on corresponding collocation subdomains and combined with balancing weights.Source: §A.2 · p. 20
- The initial-condition residual is Tθ(x, 0; μ) − T0 and is independent of time because it is evaluated at t = 0.Source: §A.2 · p. 20
A.3 Proof of Excess Generalization Error Decomposition Eq. (4)
The proof decomposes excess generalization error into training-related terms and bounds them using the empirical-loss minimizer property and suprema over the hypothesis class.
A.3 Proof of Excess Generalization Error Decomposition Eq. (4)
- The proof begins by decomposing excess generalization error using the population-loss minimizer, empirical-loss minimizer under proposal q, and returned training parameters.Source: §A.3 · p. 21
- Because the empirical-loss minimizer under q has no greater empirical loss than the population-loss minimizer, the proof obtains an inequality for the decomposition.Source: §A.3 · p. 21
- The final bound replaces the last two terms with their suprema over the hypothesis class Θ, identifying the optimization-error term.Source: §A.3 · p. 21
A.4 Proof of Proposition 2.1
The proof establishes concentration and uniform generalization for the empirical loss estimator, then isolates how the proposal distribution affects its bound. Under the stated assumptions, the estimator is unbiased, and the proposal affects the bound through variance and a likelihood-ratio bound.
A.4 Proof of Proposition 2.1
- The proof obtains a uniform concentration bound over Θ by controlling the capacity of the hypothesis function class.It proceeds from pointwise Bernstein concentration and uses a complexity term evaluated under target measure p.Source: §A.4 · pp. 22–23
- The empirical loss estimator is unbiased for the population loss under the stated assumptions.The proof treats it as an average of N i.i.d. random variables and establishes its variance as part of Lemma A.1.Source: §A.4 · pp. 21–22
- The proposal q affects the generalization bound through the estimator variance and a secondary likelihood-ratio bound.In practical regimes described in the proof, reducing variance tightens the leading term of the bound.Source: §A.4 · p. 23
A.5 Proof of Theorem 2.1.
The proof compares the minimum empirical-loss estimator variance for proposals that may depend on process parameters with proposals restricted to be independent of them. The conditional proposal has no larger minimum variance, with the comparison following from Minkowski’s integral inequality.
A.5 Proof of Theorem 2.1
- For a conditional spatial proposal q(x | t, µ), equality in the Cauchy–Schwarz bound requires q(x | t, µ) ∝ p(x)rθ(x, t; µ)^2.This gives the form of the variance-minimizing conditional proposal.Source: §A.5 · p. 23
- For an unconditional proposal q(x | t), the spatial sampling distribution is restricted to be independent of µ, and its second moment averages rθ(x, t; µ)^4 over µ.The proof derives this bound after moving the expectation over µ inside the spatial integral.Source: §A.5 · p. 24
- Minkowski’s integral inequality yields that the minimum variance for the conditional proposal is no greater than for the unconditional proposal.The comparison concerns the order of spatial expectation and the L2(µ)-norm; the proof subtracts L(θ)^2 to obtain the variance inequality.Source: §A.5 · p. 24
A.6 Proof of Remark 2.1.
The proof relates equality in the variance comparison to whether the normalized spatial residual shape changes with µ. Assumption A.4 makes the Minkowski inequality strict when that shape varies across process conditions.
A.6 Proof of Remark 2.1
- Equality in Minkowski’s inequality requires squared residuals across µ to share one spatial shape, differing only by nonnegative scalar factors.The proof expresses this separability as a product of a spatial factor and a µ-dependent factor.Source: §A.6 · p. 25
- The normalized spatial residual distribution is independent of µ exactly when the residual has that separable spatial-shape form.The scalar factor depending on µ cancels in the normalized distribution.Source: §A.6 · p. 25
- Assumption A.4 makes the variance inequality strict when normalized residual shapes vary with µ on a set of times with positive measure.The paper relates this condition to metal AM, where process conditions change PDEs and boundary conditions, shifting or reshaping localized high-residual regions.Source: §A.6 · p. 25
A.7 Qualitative temperature fields comparison
The figures compare predicted and FEM temperature fields across five validation materials and multiple times. They also show material-specific signed-deviation and collocation overlays.
A.7 Qualitative temperature fields comparison
- At t = 0.5 s, Figure 11 compares FEM and proposed-method temperature fields across five materials on the top surface and y = 5 mm cross-section.Each material has its own color scale because of differences in thermophysical properties.Source: Figure 11 · p. 26
A.8 Temperature fields deviation from FEM
- At t = 2.5 s, the proposed method reproduces the melt pool, trailing heat tail, and heat-penetration depth for all materials, including OOD AlSi10Mg and Copper.At t = 1.5 s, the laser has advanced to x = 20 mm and the trailing heat tail has developed.Source: Figure 12 · p. 27, Figure 13 · p. 28
- Figures 14–16 show signed-deviation and collocation overlays for Ti-6Al-4V, SS316L, and AlSi10Mg, respectively.The captions report thermal conductivity values of 6.7, 16, and 150 W m−1 K−1 for those materials, respectively.Source: Figure 14 · p. 28, Figure 15 · p. 29, Figure 16 · p. 29