Controlling a 3D Printer Toward the Inspector Who Will Judge the Part

When a learning controller adjusts a 3D printer mid-build, it needs a signal telling it whether the layer it just printed is good. Current systems get that signal from a defect classifier trained on one fixed notion of "defect." Human quality inspectors do not share one notion. Medical imaging has shown repeatedly that experts looking at the same image disagree. Some of that disagreement comes from the image being genuinely borderline, and some comes from experts holding different personal thresholds. This proposal brings that lesson into closed-loop manufacturing. We will build a reward model for a printing controller that separates the two kinds of disagreement. It conditions on the specific acceptance standard that will be applied to the part, learned from a few dozen example judgments by that inspector. Separately, it estimates how ambiguous the current layer is regardless of who judges it. The controller then steers toward what the target inspector will accept, and it declines to make large parameter changes when the evidence is ambiguous.

The prediction is concrete. A controller rewarded this way will converge to different print settings for a strict and a lenient inspector. It will also make fewer back-and-forth parameter reversals than a controller rewarded by a consensus or averaged classifier. Both differences should be measurable on a desktop extrusion printer within the action budgets already reported for this kind of system.

Background and the gap

The closest existing system is Reinforcement Learning-based Defect Mitigation for Quality Assurance of Additive Manufacturing. It runs a fused filament fabrication printer (a printer that extrudes molten plastic line by line) under a learning agent that adjusts flow rate, print speed, and fan cooling between layers. A digital microscope images each layer. A one-class support vector machine labels the image "Normal" or "Defect," and that binary label is the reward. The agent's method, Continual G-learning, constrains each policy update to stay close to a prior built from published knowledge. This lets it reach a good mitigation strategy in 17 actions, versus 33 for standard Q-learning. That paper supplies our platform and our agent. What it assumes away is exactly our subject: that "defect" has a single, uncontested boundary.

Medical imaging supplies the method for modeling disagreement. The Latent Doctor Model for Modeling Inter-Observer Variability represents each rater as a point in a learned low-dimensional space. It infers that point from a small "support set" of other images the same rater labeled, using a set encoder, which is a network that summarizes an unordered collection of examples. A conditional variant also lets the image itself shape how spread out the predicted labels are. It reaches a KL divergence of 0.461 to the expert panel distribution on Gleason2019. Its predictive entropy correlates with the disagreement of 20 pathologists at Spearman 0.728 on ISUP grading.

More is more: leveraging multi-rater information for whole slide images grading via virtual expert panel instead trains one model per pathologist and aggregates them. It reports average F1 of 78.2% versus 72.9% for a model trained on consensus labels, and expected calibration error of 0.050 versus 0.183. These papers motivate our reward design. Neither connects predicted disagreement to an actuation decision. The panel paper also removed its "indefinite" cases rather than handle them, and our ambiguity gate is a direct answer to that limitation.

Two control papers constrain the design. In-situ Controller Autotuning by Bayesian Optimization for Closed-loop Feedback Control of Laser Powder Bed Fusion Process shows that a well-tuned controller cutting laser power to avoid overheating can push the process out of its stable window and create lack-of-fusion porosity. Aggressive correction is itself a defect source, so a reward that is overconfident on borderline states is dangerous. Force Controlled Printing for Material Extrusion Additive Manufacturing shows that a physical sensor can replace perception over part of the operating range: extrusion force tracks bead width at $R^2 = 0.99$. The same paper shows that this relationship saturates below half the nominal layer height. Physical proxies therefore cover some defects but not surface acceptability in general.

Core Claim

The obvious combination is to replace the binary classifier with a "distribution-aware" one. That combination has a weakness a careful reviewer will spot immediately. If the controller maximizes expected reward under the panel's distribution of opinions, the expected reward equals the fraction of inspectors who would accept the layer. A plain classifier trained on soft (vote-fraction) labels predicts exactly that. Fancy observer modeling buys nothing for a risk-neutral controller judged by "the average inspector."

Our claim is therefore narrower and testable. Observer modeling helps control in two specific situations. The first is when the part will be judged by a particular standard that differs from the average: a strict aerospace-style inspector versus a lenient commercial one. That standard can be specified with a small support set instead of a new labeled dataset. The second is when the controller uses image-inherent ambiguity to scale how aggressively it acts, which a single vote fraction cannot express. A layer where all inspectors sit at 50% because the surface is genuinely borderline should not trigger the same response as a layer whose vote fraction reflects a split between strict and lenient people.

Concretely, let $x$ be the microscope image of the current layer and $S$ the support set of the target inspector's past judgments. Let $q(z \mid x, S)$ be the inferred distribution over that inspector's position $z$ in the learned rater space, and $p(y \mid x, z)$ the probability of label $y$. The reward is the predicted acceptance probability for that inspector:

$$r(x; S) = \mathbb{E}_{z \sim q(z \mid x, S)}\big[\, p(\text{accept} \mid x, z) \,\big].$$

The ambiguity signal $a(x)$ is the entropy of $p(y \mid x, z)$ averaged over $z$ drawn from the image-conditioned prior. It is high when the image confuses everyone, not just when inspectors differ. The controller scales its step size by $\exp(-\lambda\, a(x))$, where $\lambda$ is a single gain tuned once. It also never takes a step larger than the bound the agent's prior already imposes.

Research Program

The first piece is data that does not yet exist: a multi-inspector labeled corpus of in-process print surfaces. We will print a grid of coupons in ABS on an extrusion printer with a layer microscope, matching the Hyrel-class setup of Chung et al. as closely as our hardware allows. The grid spans flow rate, speed, and fan settings, and includes induced disturbances such as flow-multiplier drops and fan failure. This yields several thousand surface patches.

Eight to ten inspectors will label every patch as accept, borderline, or reject. The panel will mix trained technicians with quality engineers who are given different written specifications. A subset will be relabeled weeks later to measure each inspector's self-consistency. We are not aware of any reported inter-inspector agreement figure for in-process extrusion surfaces, and the file contains none. Measuring it is the first finding, and it decides whether the rest of the program is worth running. If inspectors agree almost perfectly, the problem is not there.

The second piece is the reward model. It is a latent-rater classifier in the style of the Latent Doctor Model, with a small convolutional image encoder suited to between-layer inference times. It is trained with leave-one-inspector-out splits so that every evaluation inspector is unseen and enters only through a support set of $k \in \{10, 20, 50\}$ judgments.

The third piece is the closed loop. We reuse Continual G-learning with its literature prior unchanged and swap only the reward source and the step-size gate. Every comparison then isolates the reward.

Baselines

The naive reference point is the open-loop printer running fixed nominal settings through the same disturbance schedule. It tells us how much any controller helps.

The strongest existing method is the original system of Reinforcement Learning-based Defect Mitigation for Quality Assurance of Additive Manufacturing: Continual G-learning with a one-class support vector machine reward. Its reported result is convergence in 17 actions, versus 33 for Q-learning and 26 for basic G-learning. It is the only closed-loop extrusion controller in the file that learns from surface images. We will train its classifier on the patches our panel majority labels acceptable, so it sees the same images as our model. We will report its convergence count on our hardware rather than assume the published 17 transfers.

The second consensus baseline is the same agent with a convolutional classifier of identical architecture trained on majority-vote labels. This mirrors the consensus model that More is more: leveraging multi-rater information for whole slide images grading via virtual expert panel reports at 0.183 calibration error.

The two baselines most likely to match us get equal care. The soft-label classifier, trained on vote fractions, is the right comparison for "average inspector" outcomes. Per-inspector models in the virtual-panel style, each trained on that inspector's full label set, form the upper bound for target-inspector outcomes. Both receive the same image encoder, the same hyperparameter search budget, and the same number of closed-loop runs. The per-inspector models, however, get the full labeled data while our model gets only $k$ support examples.

Two ablations isolate our ingredients: rater conditioning with the gate removed, and the gate with rater conditioning removed (image-conditioned prior only).

Beating the field means three things. Under a held-out target inspector, our controller's parts must reach a higher acceptance rate by that inspector than the consensus and soft-label controllers. They must come within a small margin of the per-inspector upper bound using 20 support examples. The gated controller must show fewer parameter reversals and fewer excursions outside the coupon-mapped acceptable window than the ungated one, without needing more actions to converge than the 17-action reference.

Why not just…?

Why not just train on a majority vote of several inspectors? Majority voting throws away the information that matters here. On whole-slide grading, the consensus model's calibration error was 0.183 against 0.050 for a multi-rater panel (More is more: leveraging multi-rater information for whole slide images grading via virtual expert panel). A miscalibrated reward is confidently wrong exactly on borderline layers, the states where In-situ Controller Autotuning by Bayesian Optimization for Closed-loop Feedback Control of Laser Powder Bed Fusion Process shows aggressive correction itself causes defects. The consensus baseline directly measures whether this matters on a printer.

Why not just use soft labels, the fraction of inspectors who accept? This is the most serious threat. For a risk-neutral controller judged by the average inspector, it is mathematically equivalent to our reward, and we expect it to tie on that outcome. Our claim stands only if two things hold. First, outcomes judged by a specific held-out inspector must differ from the average. Second, the ambiguity gate must reduce reversals beyond what a step size scaled by the soft label's own uncertainty, $p(1-p)$, achieves. We include that $p(1-p)$-gated soft-label controller as a baseline for exactly this reason. If it matches our gate, we will report that the latent-rater machinery is only needed for standard adaptation.

Why not just train a separate model for each inspector or specification? When an inspector has labeled thousands of patches, this probably works as well as anything. The Latent Doctor Model paper itself reports that its latent model is competitive with more expensive deep ensembles rather than better. The practical case for our approach is a new customer or new inspector with twenty examples. The learning curve of per-inspector models against our support-set adaptation, plotted over labeled-example count, settles where the crossover lies.

Why not just measure something physical and skip human judgment? Where a clean physical proxy exists, it should be used. Force feedback cut line-width error by 54% on a tilted bed (Force Controlled Printing for Material Extrusion Additive Manufacturing). But that relationship saturates at low layer heights. Surface acceptability, stringing, and texture remain judged by people, and the specification is ultimately what the inspector applies. Our disturbance schedule deliberately includes defects that change surface appearance without changing extrusion force, so this limitation is visible in the results rather than assumed.

Proposed Experiments

The decisive offline check comes first. Using held-out inspectors and 20 support examples, the reward model must predict that inspector's labels better than the soft-label classifier does, measured by log-likelihood and calibration error. If it cannot, closed-loop experiments are pointless, and we stop.

The decisive closed-loop check is the strict-versus-lenient test. Two held-out inspectors with clearly different acceptance rates in the offline data each supply a support set. We then run ten replicate builds per condition through the disturbance schedule. Our controller should settle on measurably different flow and speed settings for the two inspectors, and the consensus and soft-label controllers by construction cannot. Each inspector then blind-judges all parts. The primary metrics are target-inspector acceptance rate, actions to convergence, number of sign reversals in commanded parameters, and time spent outside the acceptable region mapped from the coupon grid.

A secondary measurement extends the question to metal printing. Several metallurgists will independently trace melt-pool boundaries on a sample of cross-sections of the kind used as ground truth in Deep Learning for Melt Pool Depth Contour Prediction From Surface Thermal Images via Vision Transformers. That work reports 10 μm average contour deviation and IoU of 0.77 against a single traced boundary. If the spread between human tracers is comparable to 10 μm, that accuracy is already at the label-noise floor. Disagreement-aware targets would then matter for laser control as well, which motivates a follow-on study without overreaching in this one.