gp-extrusion

gp-extrusion: where to extrude next

A Gaussian-process model that maps an extrusion process window and says where to extrude next. Inputs are three process settings (CD.T., RPM, B.T.). The model predicts 12 outputs (four structural measures at Mid, Side and Top of the extrudate) with calibrated uncertainty, and picks the next settings where it knows least. It is built for understanding the space, not for maximising a property.

On a simulated benchmark, after 24 extra runs the error over the whole space is 0.16 σ for the GP, 0.25 σ for random sampling and 0.30 σ for the usual one-factor-at-a-time sweep (median of 10 seeds), each counting only successful runs; failed attempts are retried. The same GP ignoring failure risk reaches 0.16 σ but fails 279 times on the way, against 11 for the success-weighted GP.

Use

Try it in the browser, no install: the playground lets you sculpt a truth, tune the kernel and priors, choose or blend the next-run rule and compare strategies.

hf download carbon-lab/gp-extrusion --local-dir gp-extrusion && cd gp-extrusion
env PYTHONPATH=src uv run --with-requirements requirements.txt python -m gp_extrusion.propose -q 4

Predict with the shipped checkpoint (fitted to the 8 settings in carbon-lab/extrusion-saxs); run from the repo root with PYTHONPATH=src:

import numpy as np
from gp_extrusion.model import GPModel

m = GPModel.load("model.pt")
mean, var = m.predict(np.array([[70.0, 400.0, 140.0]]))  # CD.T., RPM, B.T. -> (1, 12), (1, 12)

var is in units of the prior variance: 0 means fully known, 1 means nothing known.

Results

Simulation: 8 starting settings (4 real, 4 synthetic), then 6 rounds of 4 runs. Each strategy refits the same GP after every round; only the choice of runs differs. Error is RMSE over the grid, each setting weighted by its chance of extruding, in standard deviations of the (placeholder) ground truth, averaged over all 12 outputs. Lower is better. Every attempt can fail: the chance of no extrusion is 0 for CD.T. ≥ 60 and B.T. ≤ 140, and ramps linearly to 1 at CD.T. = 40 and at B.T. = 150. A failed attempt is retried with the next pick and does not count toward the run budget, so every strategy ends with the same number of successful runs and the cost of failure shows up as wasted extrusions. Table: median over 10 seeds.

successful runs added one factor at a time random GP-guided GP ignoring failure risk
0 0.73 0.73 0.73 0.73
4 0.65 0.63 0.49 0.49
8 0.59 0.46 0.35 0.34
12 0.53 0.38 0.29 0.25
16 0.50 0.26 0.24 0.22
20 0.36 0.26 0.18 0.19
24 0.30 0.25 0.16 0.16

One factor at a time repeats the template CD.T. rows at RPM 150, 300, 450, then changes B.T. and repeats. It trails random throughout, though the gap narrows as the grid fills, and it never fails because its first runs stay away from the risky edges. The GP is ahead of random. The most uncertain settings sit at the edges of the box, where failure is likely, so the plain max-variance GP ends at the same error as the success-weighted one but only by failing a great deal first. Weighting each candidate by its chance of extruding reaches that error with far fewer wasted extrusions.

Failed attempts while adding 24 successful runs (mean over seeds): one factor at a time 0.0, random 13.7, GP-guided 10.6, GP ignoring failure risk 279.0.

First attempts the GP made, in order (including any that failed):

CD.T. RPM B.T.
65 500 120
90 500 140
60 500 140
90 450 120

where each strategy goes

Left three: every run of one campaign in the CD.T. x RPM x B.T. box (circles real, squares synthetic, crosses did not extrude; the grey planes mark where the failure risk starts, CD.T. 60 and B.T. 140). Right: error over the whole space as runs are added.

How it works

stage op detail
input scale CD.T., RPM, B.T. to the unit cube using the bounds in config.json
model GP per output RBF, ARD lengthscales, fixed noise 1e-6, outputs z-scored; 12 independent GPs
acquire greedy batch take the unmeasured grid setting with highest mean posterior variance, condition on it, repeat
loop refit extrude the batch, append the rows, refit, propose again

Posterior variance does not depend on the measured values, so a batch of q settings can be chosen exactly without running anything in between.

Inputs

input range runnable step
CD.T. 40 to 90 5
RPM 150 to 500 25
B.T. (°C) 120 to 150 5

Outputs: saxs_np_radius, saxs_fractal_dim, saxs_nematic_order, cutting_ai, each at Mid, Side, Top.

GP fit

Cutting AI: truth, the GP fitted to the 8 current settings, and the error. Top row is the B.T. = 130 °C slice where the data sits; bottom row is 150 °C, where the GP has seen nothing.

uncertainty as runs are added

GP uncertainty (mean over CD.T.) as each strategy adds runs.

campaign

Limitations

  • The benchmark ground truth is a placeholder. It is anchored to the spreadsheet at B.T. = 130 and hand-designed elsewhere (truth.py). The results show how efficient the strategy is, not what the material does.
  • Half the training data is synthetic (RPM = 300). The shipped checkpoint is for the pipeline, not for scientific claims.
  • Eight settings is very little. Lengthscales are barely identified; B.T. is not identified at all.
  • The failure risk is given, not learned. The selection step is told the chance of no extrusion at each setting; the GP does not learn it from failed runs. The ramp itself (CD.T. below 60, B.T. above 140) is a placeholder.
  • Noise-free by assumption. Real measurements are noisy and repeats are needed to estimate it.
  • Max-variance favours the edges of the box, so early batches sit on boundaries and can cluster.
  • XRD is not modelled (3 real measurements).
  • Outputs are modelled independently; correlation across positions and outputs is not used yet.

Figures

  • figures/hero.png: the runs each strategy chooses in the 3-D box, and the error curves.
  • figures/truth.png: the placeholder ground truth the benchmark runs on.
  • figures/fit.png: GP error and uncertainty from the current data.
  • figures/feasibility.png: the chance that an attempt does not extrude.
Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train carbon-lab/gp-extrusion

Space using carbon-lab/gp-extrusion 1