Unit 3 / 12

Feature Prediction and Structure-Process-Property Relationships (Machine Learning)

Gains:

  • Ability to accurately construct the machine learning problem with AI for mechanical property prediction from composition and process parameters
  • Ability to critically read a model's output by recognizing risks of data quality, overfitting, and extrapolation
  • Ability to test prediction model results with physical plausibility, confidence interval and verification experiment

The most basic law of metallurgy is summarized as "the process determines the structure; the structure determines the property." The yield strength of a steel depends not only on the composition; It arises from how it is processed (forging, rolling, heat treatment) and the resulting microstructure (grain size, phase ratio, precipitates). Artificial intelligence, and especially machine learning (ML: methods that learn and make predictions from patterns in data), is powerful at extracting these composition–process–property relationships from thousands of data points and predicting the properties of a new alloy. But this power is completely dependent on data quality and knowing where the model is reliable. In this unit, you will learn how to construct ML-based feature prediction and how to critically read its output.

Setting up the machine learning problem correctly

Before dumping a feature prediction problem into ML, make three things clear:

  • Input (attributes): Variables to be used in prediction. For example, composition percentages (C, Mn, Cr, Ni...), heat treatment temperature and time, grain size.
  • Output (target): The feature to be predicted. For example, yield strength, elongation, hardness.
  • Data: A table of input–output pairs. Each row is a sample, each column is an attribute or target.

The model learns a “function” from this data: it takes inputs and predicts the output. Methods such as linear regression (simple weighted sum), random forest or gradient boosting are common. AI is helpful in suggesting which method is suitable, writing the code, and interpreting the result; but you check whether the model is valid or not.

Data quality: ceiling of the model

An ML model cannot be better than the data it is trained on. The principle of "garbage in, garbage out" is very strong in metallurgy because test data is expensive and scarce. Watch out for these traps:

  • Little data: you can't build complex models with 30 samples; The model memorizes the data.
  • Unbalanced data: If most of the data is low carbon steels, the prediction will be poor in a high carbon alloy.
  • Measurement noise: The hardness of the same sample may vary with different operators; This noise is reflected in the model.
  • Missing variable: If you haven't measured grain size, the model that tries to predict strength by composition alone will miss an important reason.
Attention: Just because a model has high success in training data does not mean that it will also be successful in new samples. This may be overfitting: the model has memorized the noise in the training data, not the true relationship. Real success is measured on “test data” that the model has never seen before.

Extrapolation: the most dangerous limit

ML models work reasonably within the range covered by the training data (interpolation). When outside this range (extrapolation), predictions become unreliable and the model often does not show this; continues to produce a confident number. For example, a model trained on steels with carbon content in the range of 0.2–0.6% may show its value for an alloy with 1.2% carbon as “safe”, but this value is completely unfounded. For each prediction, “is this sample within the training data distribution?” It is imperative to ask the question.

Step by step: Building a prediction flow with AI

  1. Define the goal and inputs: What will you predict and from which variables?
  2. Prepare the data: Clean, fix units, flag missing values. (AI: Writes Python code.)
  3. Split the data: Separate the training and testing sets so that you can measure success accurately.
  4. Select and train model: Start simple (linear), move to tree-based if necessary.
  5. Evaluate: Look at error metrics on the test set (e.g. RMSE, R²).
  6. Comment: Which variable is how effective? Does it make sense physically?
  7. Verify: Test a critical prediction with actual experimentation; Check for extrapolation.

concept

Meaning

Why is it important in metallurgy?

Overfitting

Model memorizing the noise

It is very easy with little test data

interpolation

Prediction within training range

Relatively safe region

extrapolation

Prediction outside training range

unreliable; experiment is required

Proportion of variance explained by the model

Indicator of fit quality

Feature importance

The magnitude of the impact of an input

Physical reasonableness check

three mini cases

Case 1 — Memorizing model. A team builds a complex model that predicts yield strength with 45 steel samples; The training data turns out to be R² = 0.99 and they rejoice. However, in the test data it drops to R² = 0.42. The model is overfit. When they switch to a simpler model and increase the data, the test success increases to 0.80. Lesson: educational success is misleading; The decision is made with test data.

Case 2 — Extrapolation trap. An engineer applies a model trained on low-alloy steels to a high-Cr stainless composition. The model says "about 620 MPa." The actual tensile test comes out to 410 MPa. The composition is completely outside the educational distribution. Lesson: before prediction it is imperative to check whether the input is within the training range.

Case 3 — Correct use. An R&D team models the effect of tempering temperature on hardness with thousands of records in a family of alloys. The model reproduces the known physical trend (hardness decreases with increasing tempering temperature) and narrows down in which composition range the target hardness will be achieved. The team uses the model to reduce the number of experiments: reaching the goal with 8 experiments instead of 40 and validating each step with measurements. Lesson: ML intelligently narrows down experiment planning with good data and physical plausibility checks.

Copiable prompt templates

ML PROBLEM SETTING TEMPLATE "Role: You are a material data science assistant. Goal: [feature to be predicted]. Inputs: [attributes]. I have [n] samples. For this problem: (1) suggest appropriate simple and advanced model options, (2) explain the training/test split and evaluation metric, (3) interpret the risks of overfitting and extrapolation based on this data. Do not promise definite success; write the limits clearly."

DATA QUALITY AUDIT TEMPLATE"Check the quality of the following data table: [paste columns and sample rows]. Flag: missing values, outliers, unit inconsistencies, unbalanced distribution. For each issue, suggest how to handle it. List what checks I should do before modeling."

EXTRAPOLATION CONTROL TEMPLATE "The min-max range of each input in my training yield is: [write ranges]. The new sample I want to predict is: [write values]. Is this sample inside or outside the training range in each attribute? If it is outside, explain in which variables and why the prediction would be unreliable. Suggest verification by experiment."

PHYSICAL plausibility TEMPLATE "The model's order of feature importance is [sort]. Is this order consistent with known metallurgical relationships (e.g. Hall-Petch, precipitate hardening, carbon effect)? If there is a physically unexpected effect, mark it and explain the possible data/model problem."

Weak prompt / Strong prompt

WEAK PROMPT: "Predict the yield strength based on this composition."

STRONG PROMPT:"Role: You are the material data science assistant. I have 800 lines of low alloy steel data (C, Mn, Cr, Ni, tempering temperature ->yield strength). New sample: C=0.38, Mn=0.8, Cr=1.0, Ni=0.2,temper=550 °C. First check if this sample is within the training range. If appropriate, adjust the prediction approach and uncertainty Explain; if not suitable, suggest experiment. Cross-check physical plausibility with Hall-Petch and temperature effect. Do not give a single point exact value.

The strong prompt asks for an extrapolation check before making a prediction, removes the uncertainty, and tests the result against physical laws. This gives a much more reliable decision basis than a raw number.

Common mistakes

  • Mistaking educational success for real success (skipping overfitting).
  • Evaluating the model without doing a training/test split.
  • Accepting the estimate produced in the extrapolation region as safe.
  • Building complex models with little and unbalanced data.
  • Not comparing feature importance to physical plausibility.
  • Putting a critical guess into the design without verifying it through experiment.

In summary

Machine learning powerfully captures composition–process–property relationships with good data and intelligently narrows down experiment planning. But a model is only as good as its data; Training achievement can be misleading (overfitting) and estimates outside the training range (extrapolation) are unreliable. Test each prediction with test data success, extrapolation control, physical plausibility, and, in critical cases, actual experimentation.

Application task

Define a property prediction problem with an existing (or fictional) material data set: write down the target and inputs. Ask for an approach from AI with the “ML PROBLEM FIGURE” template. Then define a "new sample" and check whether this sample is within the training range with the "EXTRAPOLATION CHECK" template. Finally, describe in a paragraph with which experiment you will verify an output of the model.

checklist

  • [ ] I clearly defined the goal and inputs.
  • [ ] I checked the data quality (missing, outlier, unit, balance).
  • [ ] I measured honest success with the training/test split.
  • [ ] I checked the extrapolation risk for each estimate.
  • [ ] I compared feature importance to physical plausibility.
  • [ ] I made a plan to verify the critical prediction with actual experimentation.