AI 4 Materials / KI-Materialtechnologie
FAU Erlangen-Nürnberg
| Method | One-line summary | When to reach for it |
|---|---|---|
| Gaussian Process | Closed-form Bayesian regression over functions | Small \(n\) (\(\lesssim 10^3\)), tabular, smooth response, need calibrated CI |
| MC Dropout | Keep dropout on at inference, sample \(T\) passes | Big NN already trained, cheap epistemic estimate per pixel/voxel |
| Deep ensembles | Train \(M\) independent NNs, use disagreement | Best-calibrated NN UQ; budget for \(M\times\) training |
| MDN | NN outputs \((\pi_k, \mu_k, \sigma_k)\) of a Gaussian mixture | Multi-modal output (phase A or phase B from the same input) |
| Calibration | Reliability diagram + temperature scaling | Mandatory before any deployed model |
Note
We are not re-deriving the math. See MFML W12 for posteriors, ELBO, marginal likelihood. Today: which tool, on which lab task, with which numbers.

Note
Trust = prediction + calibrated confidence. The “calibrated” word is what most published materials-ML papers skip.
(a) Tool / operator / coating domain shift
(b) Experiments cost €1k+/h
Warning
A model that gets quieter as the input drifts is broken — under tool, operator, or coating shift your uncertainty must grow.
| Lab task | Recommended UQ | Rationale | Cost driver |
|---|---|---|---|
| Tabular regression, \(n \in [10, 300]\) (composition \(\to\) property) | GP, RBF or Matérn \(\nu{=}5/2\) | Closed-form CI, smooth response, hyperparams interpretable | \(O(N^3)\) once — fine for \(N \lesssim 10^3\) |
| Pixel-wise segmentation of microscopy (CNN, U-Net) | MC Dropout, \(T \approx 30\) | Reuse trained net, get per-pixel variance map | \(T\times\) inference per image |
| High-stakes property regression with budget for retraining | Deep ensemble, \(M \in [5, 10]\) | Best calibration in literature (Lakshminarayanan et al. 2017) | \(M\times\) training |
| Multi-modal output (one input, two phases possible) | MDN, \(K \in \{2,3\}\) | Bimodal \(p(y\|x)\) — mean is meaningless | One training, harder to fit |
| Any deployed model | Reliability diagram + temp scaling | Free, post-hoc, on a held-out cal set | Trivial |
Note
Every row except the MDN is post-hoc — you can bolt it onto an already-trained model. The calibration row is mandatory on top of all the others.
Training-time vs inference-time tradeoff is more loaded in a lab than in webscale ML:
Warning
MC Dropout’s variance estimate degrades with very deep nets and very low dropout rates — it can collapse to near-zero variance and look overconfident. Always validate with a held-out reliability diagram.
Warning
All four anti-patterns share the same antidote: a reliability diagram on a held-out, lab-realistic calibration set.
data_mantzoukas2021_table3.csv).Why this is a textbook GP problem:
Note
Small \(n\), one physical input, replicate scatter, non-trivial shape — the textbook regime for a GP.

Note
At \(n = 50\) the GP’s posterior CI is honest by construction — the leave-one-out check on this fit gives 92% empirical coverage for the 95% band (slide 10).
\[ k_{\text{RBF}}(T, T') = \sigma_f^2 \exp\!\left(-\frac{(T - T')^2}{2\,\ell^2}\right) \]

Note
For metallurgical responses with regime changes, prefer Matérn \(\nu{=}5/2\) over RBF — it is once-differentiable instead of \(C^\infty\), which matches the physics better.
Held-out check (figure). Refit with the entire 525 °C group hidden: the GP predicts \(399 \pm 26\) HV30 (95%) there; the hidden group measured \(382 \pm 5\) — inside the band. The interval is wide because the neighbouring peaks make interpolation genuinely uncertain. That width is information, not weakness.

Note
Trust the ribbon only after a held-out or leave-one-out check says you may — here: 92% empirical coverage for a 95% band.

Warning
The CI growth is only honest if the kernel is correct. A too-long \(\ell\) will make the GP overconfident outside the data. Always cross-check with a held-out CV reliability diagram before you trust extrapolation.
Warning
Caveat: the GP does not replace verification at the spec extremes. It replaces redundant tests in the smooth interior of the process window.
v2) handles up to \(\sim 10\,000\) rows and is competitive with tuned XGBoost on small-tabular benchmarks.github.com/PriorLabs/TabPFN — pip install tabpfn, scikit-learn-compatible API.When the GP still wins:
Note
On a 50-row task like the 21CrMoV5-7 data, expect TabPFN and a disciplined GP to give comparable held-out error; the GP wins on interpretability of \(\ell\) and \(\sigma_f\) and on encoding the replicate-based \(\sigma_n\). Use whichever your stakeholder will sign off on — try it as a homework exercise against data_mantzoukas2021_table3.csv.
ai4mat.datasets.MetalDAMDataset.Warning
Always evaluate on a session or tool you did not train on — a random split of one SEM session hides exactly the drift that breaks deployment.
Note
\(T{=}30\) is the typical knee — below 10 the variance estimate is too noisy, above 50 you are paying for diminishing returns. Validate \(T\) on a held-out reliability diagram.

Note
These are diagnostic: the model is honestly uncertain exactly where a human operator would also hesitate. On your own instrument, FoV/tile edges and charging halos light up the same way.

Note
Report the operating curve, not a single threshold — the deployment context picks the operating point.
Note
“My segmentation accuracy dropped after the chamber vent” is a calibration failure as often as a model failure. Diagnose with a reliability diagram before retraining.
Note
Every point in the \((P, v)\) plane costs €300 — the experiment budget, not the model, is the scarce resource.
Note
Honest \(\sigma\) is what makes the exploration–exploitation trade fair — a miscalibrated surrogate sends the €300 experiments to the wrong place.
Warning
Safety constraints must be hard constraints — a soft penalty that “usually” avoids the keyhole regime will eventually damage the optics.



Note
Active learning beats grid search — the actual lab default, not just random sampling.
Note
The real benchmark is grid search, not random sampling. AL outperforms the common lab practice and accelerates discovery.

Note
The AL advantage is the steep early slope — under a hard experiment budget you stop exactly in the regime where AL is far ahead of the grid.
Warning
With a miscalibrated \(\sigma\) the loop still runs — it just spends your budget on the wrong experiments, and nothing in the loop’s output tells you.
Warning
Always run a reliability diagram on a held-out, lab-realistic calibration set — not a random split of the training data.
Practical detectors:
Note
Calibration and OOD detection are separate responsibilities — a perfectly calibrated model still needs a detector that refuses to predict off-distribution.
The one-paragraph “uncertainty section” of a model card:
“Uncertainty is reported as 95% CIs from \(T{=}30\) MC-dropout passes. The model is calibrated by temperature scaling on a 200-image held-out set; expected calibration error 0.03. The model is in-distribution iff Mahalanobis score \(<\tau_{\text{OOD}} = 14.2\); outside that, predictions are not returned.”
Note
If you cannot write that paragraph for your model, you cannot deploy it.
Pointer slide. If you want the math behind today’s tools:
MFML W12 (uncertainty in predictions):
MFML W8 (tree ensembles & tabular):
Note
Read the MFML math first, then deploy with this deck open — the reverse order produces copy-pasted snippets with no diagnostic intuition.
Note
A model without calibrated uncertainty fails silently; a model with it tells you exactly which experiment to run next.

© Philipp Pelz - ML for Characterization and Processing