| |

Modeling Elements from Joint Distribution Decomposition for Manufacturing Data

Modeling Elements from Joint Distribution Decomposition for Manufacturing Data

Version 21 | Created: 2026-10-03 | Updated: 2026-11-07 13:46 UTC

1. Purpose

  • Problem Statement: There is no framework that ties together the elements needed to build an AI/ML model.
  • Goal: Present a framework that, through the decomposition of the joint probability distribution $P(X,Y) = P(Y\vert{}X) \cdot P(X)$, clearly connects the elements of AI/ML on manufacturing process data (data, model, prediction), their changes (shift, drift) and the estimation error of the model.
  • Non-Goal: The diagnostic figures of any specific project are out of scope.

2. Summary

Good predictions come from good data and good models.

  • Taxonomy: Factorizing the joint distribution P(X,Y) by the chain rule yields three elements, data P(X), model P(Y|X) and prediction P(Y), and each element undergoes shift, a change at once, and drift, a gradual change (section 3).
  • Error: Prediction error splits into the estimation error of the model and the change of the X → Y relation after training, and a change in P(X) enlarges the error by moving weight toward regions where the estimation error is large (section 4).
  • Reading rule: In a manufacturing process, which has an X → Y structure, a change in P(Y) is mostly the result of a change in P(X) or in the X → Y relation, and the three elements rest on the premises of uncertainty sources, sample selection and the i.i.d. assumption (section 3, section 5).

3. Taxonomy and its Hierarchy

The joint distribution factorizes into the product of the relation P(Y|X) and the data distribution P(X), the output P(Y) is obtained by integrating that product over X, and each of the three elements changes in two modes, shift and drift (Fig 1).

                 P(X, Y)   joint distribution
                    |
      factorize     |   P(X, Y) = P(Y|X) * P(X)
          +---------+---------+
          |                   |
        P(X)               P(Y|X)
   data marginal       relation X -> Y
   good data           good model
          |                   |
          +---------+---------+
      marginalize   |   integrate over X
                    |
                  P(Y)
            output marginal
            good prediction

  change mode (each element): shift = changes at once, drift = changes gradually
  estimation error: P(Y|X)_model departs from the true P(Y|X), set at training
  reverse factorization: P(X, Y) = P(X|Y) * P(Y), defines P(Y) shift in a Y -> X structure
  premises: uncertainty sources, sample selection, i.i.d. and lot / chamber hierarchy

Fig 1. Taxonomy and hierarchy of the joint distribution

  • P(X) and P(Y|X) in the upper layer are the two factors that make up the joint distribution.
  • P(Y) in the lower layer is a marginal distribution derived from the two factors, so a change in P(X) or P(Y|X) can carry over into P(Y).
  • A change of the three elements splits by speed into shift, which happens at once, and drift, which happens gradually over time, and the two modes call for different detection and response methods (section 3.1).
  • Estimation error is how far P(Y|X)model departs from the true P(Y|X) even when the true relation stays fixed, and it is one term of the prediction error (section 4).

In this document P(·) denotes a probability distribution: a probability mass function for a discrete variable and a probability density function for a continuous one. From the definition of the conditional distribution, P(Y|X) = P(X,Y) / P(X), the joint distribution factorizes by the chain rule of eq. (1).

$$P(X, Y) = P(Y \mid X) \cdot P(X) \hspace{19em} (1)$$ $$P(Y) = \int P(Y \mid X)\, P(X)\, dX \hspace{19em} (2)$$

Integrating both sides of eq. (1) over X gives eq. (2). The left side, ∫ P(X,Y) dX, is the marginal distribution P(Y) of Y with X integrated out, and the right side is the conditional distribution P(Y|X) averaged with the distribution P(X) as weight. This integration is called marginalization: eq. (1) splits the joint distribution into two factors, and eq. (2) recovers P(Y) from those two factors.

The three elements of the quote in section 2 take the three places of eqs. (1) and (2).

  • $P(Y)$ (Good Prediction): good prediction; the marginal distribution obtained by integrating the joint distribution P(X,Y), the product of the two factors, over X (eq. (2)).
  • $P(X)$ (Good Data): good data; a factor of eq. (1), the distribution of the measured data.
  • $P(Y \mid X)$ (Good Model): good model; a factor of eq. (1), the X → Y relation that yields the metrology value given the measured data.

The joint distribution also factorizes in the direction opposite to eq. (1).

$$P(X, Y) = P(X \mid Y) \cdot P(Y) \hspace{19em} (3)$$

P(Y) shift is defined in eq. (3) as a change in P(Y) alone while P(X|Y) stays fixed, and the literature calls it prior shift (Appendix D). This definition holds in a causal structure where Y causes X (Y → X), whereas a manufacturing process, in which the process runs, leaves measured data X behind and then yields the metrology value Y, has an X → Y structure. In an X → Y structure a process change alters P(X|Y) through P(Y|X) and P(X), so the premise that P(X|Y) stays fixed often fails. When it fails, a correction that relies on that premise (label shift correction) loses its basis.

The three elements rest on the three premises below.

  • Sources of uncertainty: The metrology value is Yobs = Y + εm and the measured data is Xobs = X + εx. The spread of P(Yobs|Xobs) that the model learns contains intrinsic process variation, metrology error εm (label noise) and sensor measurement error εx, all three of which are aleatoric uncertainty that more data does not reduce. Beyond widening the spread, εx pulls the slope of the estimated relation toward 0 (regression dilution) and so distorts the estimate of P(Y|X). Only the model's uncertainty from too little training data (epistemic uncertainty) shrinks with more data, and the accuracy ceiling a good model can reach is set by intrinsic process variation and the two measurement errors.
  • Sample selection: Metrology samples only some wafers, so the distribution P(Xi) of the training data Xi is that of the measured wafers and can differ from P(X) over all wafers (selection bias). Inference runs on wafers that were not measured, so this difference becomes P(X) shift as it stands. When metrology goes missing depending on the value of X or Y, P(Xi) or the P(Y) of the training data is skewed in the same way.
  • i.i.d. assumption and hierarchy: Obtaining predictions for inference data from training data through eq. (4) rests on the assumption that wafers are independent and drawn from the same distribution (i.i.d.). Process data carries temporal autocorrelation and a lot and chamber hierarchy in which wafers from the same lot or chamber resemble each other; splitting training and validation while ignoring this structure puts the same lot on both sides and makes performance look better than it is.

The changes of the three elements fall into the 3×2 cells of Table 1.

Table 1. Shift and drift of the three elements

Cell Example Effect
P(X) shift New equipment, recipe change The value range of X moves at once
P(X) drift Sensor drift The measured value Xobs skews gradually
P(Y) shift Target spec change The metrology reference of Y changes at once
P(Y) drift Gradual change in product mix Y moves gradually with the share of each product
P(Y|X) shift PM, part replacement The X → Y relation changes at once
P(Y|X) drift Chamber aging, residue buildup Z(t) The X → Y relation changes gradually

One event can affect several cells at once, and Table 1 puts each event in the cell of the element that changes first. Sensor drift is an example: it is P(X) drift and also changes the relation P(Y|Xobs) on measured values. The literature and industry tools call the same cells by other names: P(X) shift is covariate shift, P(Y) shift is prior shift or label shift, P(Y|X) shift and drift are concept shift and concept drift, and model monitoring tools call P(X) drift data drift (Appendix C).

3.1 Comparison

Table 2 places the three elements on six lenses: decomposition, change, intervention, question, observation and lever.

Table 2. Six lenses on P(X), P(Y) and P(Y|X)

Lens P(X) P(Y) P(Y|X)
Decomposition Marginal distribution of measured data Marginal distribution of output Conditional X → Y relation
Distribution change P(X) shift, P(X) drift P(Y) shift, P(Y) drift P(Y|X) shift, P(Y|X) drift
Intervention point Data space Target engineering (transform, decomposition) Model and algorithm space (relation learning)
Question Has inference data Xo moved away from training data Xi? Has the metrology value distribution changed? Has the relation between measured data and metrology value changed since training?
Observation (detection) PSI·KS, domain classifier, T²·SPE control chart Metrology value distribution comparison, Shewhart·EWMA control chart Binning CDT, residual CUSUM·Page-Hinkley, ADWIN
Lever Feature selection and augmentation, importance weighting, domain adaptation Target transform and decomposition, per-group scaling, prior correction Retraining after an event, recency weighting, adaptive update

The observation row lists ways to measure a change, and the lever row lists ways to fit the model while assuming a change. Shift is found by comparing two sets, the training data and the inference data, and drift is found by control charts and sequential tests that track a statistic per time window. Only the methods in the observation row pin down when a change happened. The detection, response and validation methods for the six cells and the estimation error are collected in Appendix B. Cases in which research and industry use this classification are collected in Appendix C.

4. Prediction from the Joint Distribution

Eq. (4) writes the relation of the three elements when a trained model is used for inference, keeping training data Xi and inference data Xo apart, and eq. (5) splits the error of that prediction into two terms, estimation error and relation change. Xi is in-sample, the data used to train the model, and Xo is out-of-sample, the new data that arrives at inference.

$$P(Y)_{\mathrm{pred}} = \int P(Y \mid X = x;\, X_{i})_{\mathrm{model}} \cdot P(X_{o} = x)_{\mathrm{true}}\, dx \hspace{19em} (4)$$
  • $P(Y)_{\mathrm{pred}}$ (Overall Predicted Distribution): the final distribution of the target variable $Y$ expected on out-of-sample inference data; a marginal distribution with the measured data integrated out.
  • $P(Y \mid X = x;\, X_i)_{\mathrm{model}}$ (Model's Conditional Prediction): the predictive model itself. It is trained on in-sample training data $X_i$ and, given a measured data value $x$, returns the conditional distribution of $Y$. The subscript model marks it as an estimated, learned function that may differ from the true distribution. The $X_i$ after ; marks the data the model was trained on, set apart from the conditioning variable after |. Elsewhere in this document it is shortened to P(Y|X)model.
  • $P(X_o = x)_{\mathrm{true}}$ (True Distribution of Out-of-Sample Data): the true probability density that out-of-sample inference data $X_o$ takes the value $x$. It describes how $X_o$ is actually distributed when the model is used for inference.
  • $\int \ldots dx$ (Marginalization over $x$): sums the predictions over every value $x$ the inference data can take. Each value is weighted by how likely it is at inference time, so the result is a weighted average of the predictions.

Eq. (4) carries the output marginal distribution of eq. (2) over to prediction. The true P(Y)t at inference time t is obtained by integrating the true relation at that time, P(Y|X=x)t, with the same P(Xo), so subtracting P(Y)t from eq. (4) splits the prediction error into the two terms of eq. (5). ti is the training time.

$$\begin{aligned} P(Y)_{\mathrm{pred}} - P(Y)_{t} &= \int \left[ P(Y \mid X = x;\, X_{i})_{\mathrm{model}} - P(Y \mid X = x)_{t_{i}} \right] P(X_{o} = x)_{\mathrm{true}}\, dx \\\ &+ \int \left[ P(Y \mid X = x)_{t_{i}} - P(Y \mid X = x)_{t} \right] P(X_{o} = x)_{\mathrm{true}}\, dx \end{aligned} \hspace{19em} (5)$$
  • Estimation error: the first term; the part by which the model estimates the relation differently even when the true relation stays as it was at training.
  • Relation change: the second term; the part from a change in the true X → Y relation after training, which holds the P(Y|X) shift and drift of Table 1.
  • Weight: both terms are weighted by the inference data distribution P(Xo). P(X) shift or drift leaves the differences in brackets unchanged but moves the weight, enlarging the share of regions where the difference is large.

P(Y|X)model fails to reflect the true relation for the five reasons below; the first four belong to the first term and the last to the second.

  • Variance: when samples are few relative to variables, the estimated relation swings widely with the training sample.
  • Bias: when the model family cannot express the form of the true relation, error remains however many samples are added, as when a linear model fits a nonlinear relation.
  • Measurement error: metrology error εm widens the spread, and sensor error εx pulls the estimated slope toward 0 (sources of uncertainty in section 3).
  • Extrapolation: where P(Xi) is sparse, no training samples constrain the model and the estimate is left undetermined. When P(X) shift or drift moves P(Xo) into such a region, this share grows in eq. (5).
  • Unobserved state: when the chamber state Z is not in the measured data X, the model learns the relation averaged over the distribution of Z at training. When the distribution of Z changes after training, the difference becomes the second term (section 5.3).

Read through eq. (5), the three elements are as follows.

  • Good prediction: P(Y)pred is close to the true P(Y) when both terms of eq. (5) are small.
  • Good data: Xi is training data measured by equipment sensors and paired with wafer metrology values for model training, and P(Xo)true is the distribution of the inference data actually measured at inference. P(Xi) must cover P(Xo) for the Extrapolation share to stay small.
  • Good model: P(Y|X)model is the X → Y relation the model estimates from training data Xi. The first term shrinks through the choice of estimator and validation (B.4), and the second only through detecting the relation change and retraining (B.3).

5. Physical Meaning

In a manufacturing process the three elements correspond to measured data, metrology results and the X → Y relation between measured data and metrology values. Table 3 collects that correspondence and the role of each element in eq. (4).

Table 3. Physical meaning of each term

Term Role in eq. (4) Physical meaning
P(X) Good data: P(Xi), P(Xo)true Distribution of data measured by equipment sensors
P(Y) Good prediction: P(Y)pred Distribution of wafer metrology values (measurement map, spatial decomposition coefficients)
P(Y|X) Good model: P(Y|X)model X → Y relation that process physics leaves between measured data and metrology values

5.1 P(X) Shift and Drift

  • Meaning: P(X) shift is a change at once of the inference data distribution P(Xo) away from the training data distribution P(Xi), and P(X) drift is a gradual move of P(Xo) over time. The X → Y relation may stay the same.
  • Interpretation: the model has learned the relation, but inference data has moved into a region that training data covers sparsely, enlarging the Extrapolation share of eq. (5).
  • Scope: work in the data space covers feature selection and generation in general, along with responses to change.

5.2 P(Y) Shift and Drift

  • Meaning: the output marginal distribution changes. It is defined in eq. (3) as a change in P(Y) alone while P(X|Y) stays fixed, and the definition holds in a Y → X causal structure.
  • Reading in a manufacturing process: in an X → Y structure an observed change in P(Y) mostly appears as the result of a change in P(X) or in the X → Y relation. P(Y) itself changes in P(Y) shift, when the definition or reference of Y changes at once as with a target spec change, and in P(Y) drift, when the product mix changes gradually and moves the distribution of Y while the product is not in X.
  • Target engineering: an intervention on P(Y) changes the definition and structure of the output, and covers target transforms (log, Box-Cox), spatial decomposition and multi-task target reformulation.
  • Spatial decomposition: target engineering that turns a wafer measurement map into coefficients on a spatial basis. The output becomes smooth, physically meaningful coefficients, which makes P(Y|X) easier to learn.

5.3 P(Y|X) Shift and Drift

The X → Y relation between measured data and metrology values itself changes after training, and this is the second term of eq. (5). A change at once, as with PM or part replacement, is P(Y|X) shift, and a gradual change, as with chamber aging, is P(Y|X) drift. It is the hardest of the three to handle.

From a process physics view, a change of the X → Y relation comes from a change in an unobserved chamber state variable Z(t) (aging, residue), and eq. (6) writes that relation.

$$P(Y \mid X, t) = \int P(Y \mid X, Z)\, P(Z \mid t)\, dZ \hspace{19em} (6)$$

Z is a latent variable. Eq. (6) holds on the premise that Z is independent of X at a given t (Z ⫫ X | t); when the premise fails, the integral must use P(Z|X,t) in place of P(Z|t). Even when the relation P(Y|X,Z) given the chamber state does not change over time, Z is not in the measured data X, so the model sees a change in P(Z|t) only as a change in P(Y|X). When P(Z|t) steps at a PM it becomes P(Y|X) shift, and when it moves gradually over time it becomes P(Y|X) drift. A relation change has two paths, response and observation.

  • Response: drift calls for detrending, recency sample weighting and retraining on a recent window, and shift calls for retraining on the data after an event such as PM. The effect is checked in time order with temporal CV, and these methods cannot pin down when a change happened.
  • Observation: measures the change and pins down when it happened.

Observation methods differ in how directly they look at P(Y|X).

  • Binning CDT: splits X into bins and tests P(Y|bin) per time window to pin down when a change happened. It looks at P(Y|X) most directly.
  • Residual CUSUM, Page-Hinkley: reports the time at which a statistic of the prediction residuals crosses a threshold.
  • I(X;Y): total amount of dependence (a macro indicator). Used alone it picks up changes in P(X), P(Y) and the relation together, so it comes closer to a relation change only when tracked per time window. For high-dimensional X it is hard to estimate accurately per window, so it is narrowed to I(Xk;Y) over the top K variables Xk by importance.

References

[1] Kang, S., & Kang, P. (2017). An intelligent virtual metrology system with adaptive update for semiconductor manufacturing. Journal of Process Control, 52, 66–74.
[2] Quiñonero-Candela, J., Sugiyama, M., Schwaighofer, A., & Lawrence, N. D. (Eds.). (2009). Dataset Shift in Machine Learning. MIT Press. ISBN 978-0-262-17005-5.
[3] Moreno-Torres, J. G., Raeder, T., Alaiz-Rodríguez, R., Chawla, N. V., & Herrera, F. (2012). A unifying view on dataset shift in classification. Pattern Recognition, 45(1), 521–530.
[4] Gama, J., Žliobaitė, I., Bifet, A., Pechenizkiy, M., & Bouchachia, A. (2014). A survey on concept drift adaptation. ACM Computing Surveys, 46(4), 44.
[5] Amazon Web Services. Data and model quality monitoring with Amazon SageMaker Model Monitor. Amazon SageMaker AI Developer Guide.
[6] Google Cloud. Introduction to Vertex AI Model Monitoring. Vertex AI documentation.
[7] Evidently AI. Concept drift in ML. ML in Production guide.


Appendix A. Terminology

  • aleatoric uncertainty: uncertainty from the spread inherent in the data. More data does not reduce it.
  • covariate: an input variable X of the model. Variate is the general word for a single random variable and applies to both X and Y; the "co-" marks a variable that varies together (co-varies) with Y, the variable of main interest, that is, a variable observed alongside Y to explain it. In this document it is the data measured by equipment sensors, and the literature calls a change in its distribution P(X) between training and inference covariate shift.
  • CUSUM (Cumulative Sum): a control chart that accumulates deviations from a reference and flags the time the sum crosses a threshold as a change point.
  • drift: a gradual change of a distribution or relation over time. It is found by tracking a statistic per time window.
  • epistemic uncertainty: uncertainty the model carries because training data is insufficient. More data reduces it.
  • EWMA (Exponentially Weighted Moving Average): a control chart that catches small, steady moves with a moving average that weights recent values more.
  • I(X;Y): mutual information. A macro indicator of the total dependence between X and Y.
  • i.i.d. (independent and identically distributed): the assumption that each sample is independent and drawn from the same distribution.
  • label noise: noise mixed into the target value Y, such as metrology error.
  • latent variable: a variable that affects the outcome but is not observed directly, such as the aging or residue buildup of a chamber.
  • marginal distribution (주변분포): the distribution left for Y alone after integrating X out of the joint distribution P(X,Y). P(Y) = ∫ P(X,Y) dX, describing how Y is distributed regardless of the value of X.
  • regression dilution: the shrinking of an estimated regression slope toward 0 when the input X carries measurement error.
  • selection bias: a skew in which the sample distribution departs from the population distribution because of how the sample is chosen.
  • shift: a change at once of a distribution or relation. It is found by comparing two sets, the training data and the inference data.
  • spatial decomposition: decomposing a wafer measurement map onto a spatial basis (polynomials) and predicting its coefficients (a1, …).
  • target engineering: transforming, decomposing or reformulating the prediction target Y into a form the model learns more easily.
  • temporal CV: time-ordered cross-validation that trains on the past and validates on the future.

Appendix B. Detection and Implementation by Cell

B.1 to B.3 collect, for each of the three elements of Table 1, how to detect its shift and drift (Detection) and which models and techniques respond and how they are validated (Response), and B.4 covers the estimation error of eq. (5). Shift is found by comparing two sets, and drift by tracking per time window.

B.1 P(X) Shift and Drift

Univariate methods compare each variable's distribution separately and miss changes in the correlation between variables. Manufacturing data with hundreds of sensor variables calls for multivariate methods alongside them.

Shift Detection

  • PSI (Population Stability Index): compares, per variable, the binned proportions of training and inference data to measure how far P(X) has moved.
  • KS test (Kolmogorov–Smirnov test): tests, per variable, whether two data sets share a distribution by the maximum gap between their cumulative distributions.
  • KL divergence (Kullback–Leibler divergence): measures, in information terms, how far the inference data distribution is from the training data distribution.
  • MMD (Maximum Mean Discrepancy): tests multivariate distribution difference by the gap between the means of two data sets in a kernel space.
  • Domain classifier: trains a classifier to separate training from inference data; the further the AUC rises above 0.5, the more the two distributions differ.

Drift Detection

  • Hotelling T²·SPE control chart (PCA-based): plots T² and the residual SPE of inference data in time order in a PCA model built on training data, and finds when they cross the control limits.
  • Autoencoder reconstruction error: tracks the reconstruction error of inference data in time order in an autoencoder built on training data, and finds when it crosses a control limit.
  • Windowed PSI: computes PSI per time window to see the trend of inference data moving away from training data.

Response

  • Methods: for shift, importance weighting that weights training samples by a density ratio estimated with a domain classifier, domain adaptation that aligns training and inference input distributions, and a metrology sampling plan adjusted so that training data covers the inference range. For drift, sensor recalibration and retraining on a recent window.
  • Validation: adversarial validation, which builds the validation set from training samples that resemble inference data.

B.2 P(Y) Shift and Drift

Shift Detection

  • Metrology value distribution comparison: compares the distribution of training metrology values with recent ones by KS test or PSI.
  • Shewhart control chart: watches for the time the mean and spread of metrology values leave their control limits at once.

Drift Detection

  • EWMA control chart: watches small, steady moves through an exponentially weighted moving average of metrology values.
  • Prediction distribution monitoring: when metrology values arrive late, watches the move of P(Y)pred first to give early warning of a change in P(Y).

Response

  • Methods: for shift, redefining the target and retraining to match a target spec change. For drift, per-group scale normalization and target engineering (log and Box-Cox transforms, spatial decomposition).
  • Validation: evaluating error separately per spec and per group.

B.3 P(Y|X) Shift and Drift

Shift Detection

  • Binning CDT (Conditional Distribution Test): splits X into bins and tests P(Y|bin) per bin and per time window to pin down when a change happened.
  • Event-split comparison: compares the distribution of prediction residuals before and after a PM or part replacement.

Drift Detection

  • Residual CUSUM: takes the time the cumulative sum of prediction residuals crosses a threshold as the time the relation changed.
  • Page-Hinkley: flags a change in the mean when the gap between the cumulative deviation of prediction residuals and its minimum crosses a threshold.
  • ADWIN (Adaptive Windowing): splits the error window in two and, if the means differ significantly, drops the older part and flags a change.
  • Windowed performance monitoring: computes R²·RMSE per time window to find when performance degrades. It requires metrology values.
  • Windowed I(Xk;Y): tracks dependence changes by computing, per time window, the mutual information between the top K variables Xk by importance and the metrology value. I(X;Y) over all of a high-dimensional X is hard to estimate accurately per window because the dimension is large relative to the sample size. I(Xk;Y) can change from a change in P(X) alone, so it is read together with the detection results of B.1.

Response

  • Methods: for shift, retraining on the data after the event and adding proxies for the chamber state Z(t) (time since PM, accumulated RF hours) as features. For drift, periodic retraining on a recent window, recency weighting, and adaptive update that measures only low-reliability wafers and updates the model at once [1].
  • Validation: temporal CV that trains on the past and validates on the future, and a group split by lot.

B.4 Estimation Error

B.3 covers the second term of eq. (5), from a change in the true relation P(Y|X) after training, while B.4 covers the first term, from how the model estimates that relation even when it stays fixed. The first term is set at training time by the choice of estimator, overfitting and hyperparameters.

Detection

  • Train–validation gap: reveals overfitting from the difference between training and validation performance. Degradation over time is watched with the Windowed performance monitoring of B.3.
  • Out-of-range check: checks whether inference data lies outside the range of the training data, flagging wafers where the Extrapolation share of eq. (5) grows.

Response

  • Methods: regularized linear models such as PLS, ridge and lasso when samples are fewer than variables; tree ensembles such as LightGBM, XGBoost and CatBoost for nonlinear relations; Gaussian process, quantile regression or conformal prediction when uncertainty is needed. Physics knowledge enters through monotone constraints or a hybrid that learns only the residual on top of a physics equation, and hyperparameters are searched with Bayesian optimization such as Optuna.
  • Validation: group split by lot together with temporal CV, reading R², RMSE and the coverage of prediction intervals.

Appendix C. Benchmarking

Table 4 collects cases in which the classification of this document appears in the dataset shift literature and in industry model monitoring tools.

Table 4. Use of the shift taxonomy in research and industry

Source Kind Terms used Term in this document
Quiñonero-Candela et al. [2] Book dataset shift, covariate shift P(X,Y) difference between training and inference, P(X) shift
Moreno-Torres et al. [3] Paper covariate shift, prior probability shift, concept shift P(X) shift, P(Y) shift, P(Y|X) shift
Gama et al. [4] Survey concept drift detection, adaptation Observation and response for P(Y|X) drift in 5.3
Kang & Kang [1] Paper virtual metrology adaptive update Response to P(Y|X) drift in manufacturing data
Amazon SageMaker Model Monitor [5] Industry tool data quality drift, model quality drift P(X) drift, loss of good prediction performance
Vertex AI Model Monitoring [6] Industry tool training-serving skew, inference drift P(X) shift, P(X) drift
Evidently AI [7] Open-source tool data drift, prediction drift, concept drift P(X) drift, P(Y)pred drift, P(Y|X) drift
  • Research: dataset shift is defined as a change in the joint distribution P(X,Y) between training and inference [2]. Moreno-Torres et al. organized covariate shift (P(X) moves, P(Y|X) stays), prior probability shift (P(Y) moves, P(X|Y) stays) and concept shift by which term of the joint distribution changes [3], and eq. (3) and the shifts of the three elements in this document follow that work.
  • Manufacturing data: in semiconductor virtual metrology, wafer characteristics change over time and prediction performance degrades, so an adaptive update was proposed that measures only wafers with low prediction reliability and updates the model at once with those results [1]. Gama et al. surveyed methods for detecting and adapting to concept drift [4].
  • Industry tools: model monitoring tools watch the P(X) change that is visible without ground truth under the names data quality drift [5], training-serving skew and inference drift [6], and data drift [7]. Once ground truth arrives, they check model quality drift [5] or concept drift [7] from the gap between predictions and ground truth.
  • Framework of this document: classifying the changes of the three elements is a standard concept in research and industry. Splitting each element into the 3×2 cells of shift and drift under neutral names, and tying them to the prediction error through eq. (5), is this document's own framing and is not a named standard framework in the sources above.

Appendix D. Prior in Bayes' Theorem

Written in the variables of this document, Bayes' theorem is eq. (7). The unknown the model infers is the metrology value Y, and the measured data X is the evidence for that inference.

$$P(Y \mid X) = \frac{P(X \mid Y) \cdot P(Y)}{P(X)} \hspace{19em} (7)$$

The terms mean the following.

  • Prior: P(Y). The prior probability: the distribution held for the metrology value Y before the measured data X is seen.
  • Likelihood: P(X|Y). The probability that the measured data X appears, assuming the metrology value Y is given.
  • Posterior: P(Y|X). The posterior probability: the distribution of Y updated after the measured data X is observed, which is the conditional distribution the model sets out to estimate.
  • Evidence: P(X). The marginal distribution of the measured data, a normalizing constant that makes the posterior a probability distribution.

The prior belongs to the unknown being inferred, the metrology value Y, so the prior shift of the literature is the P(Y) shift of this document. The numerator P(X|Y)·P(Y) of eq. (7) equals the right side of eq. (3), so P(Y) shift, in which P(Y) alone changes while P(X|Y) of eq. (3) stays fixed, is a change of this prior. Label shift names the same change in P(Y) after the label Y. Both names come from classification problems with a Y → X structure, in which Y produces X. Such a problem picks the cause class from the effect, as when the disease Y is identified from the symptoms X it causes. A manufacturing process runs the other way, with the process data X as the cause and the metrology value Y as the effect in an X → Y structure, so the names do not fit it as they stand. A change in P(Y) observed in a manufacturing process therefore mostly results from a change in P(X) or P(Y|X) (section 5.2).

Appendix E. Talk Slides

Three slides present this document, and the source file is modeling-elements-invited-talk.pptx.

The first slide shows the taxonomy of section 3 (Fig 2).

Fig 2

Fig 2. Talk slide 1, taxonomy from the joint distribution

The joint distribution is split into P(X), P(Y|X) and P(Y), eqs. (1) and (2) connect the three elements, and the slide also shows that each element changes in two modes, shift and drift.

The second slide shows eq. (4) of section 4 (Fig 3).

Fig 3

Fig 3. Talk slide 2, prediction from the joint distribution

The three terms of eq. (4) are read as good data, good model and good prediction, and a schematic under each shows the change that breaks it: P(X) shift, P(Y|X) drift and P(Y) shift. The bottom of the slide states the two error terms of eq. (5).

The third slide condenses Appendix B (Fig 4).

Fig 4

Fig 4. Talk slide 3, detection, response and validation by cell

Each of the three elements' shift and drift, and the estimation error, has one panel with its detection, response and validation methods.

Modeling Elements from Joint Distribution Decomposition for Manufacturing Data

Version 74 | Created: 2026-05-29 | Updated: 2026-11-07 13:46 UTC

1. Purpose

  • Problem Statement: AI/ML model 개발을 위한 요소를 묶는 체계가 없다.
  • Goal: 결합확률분포 $P(X,Y) = P(Y\vert{}X) \cdot P(X)$의 분해를 통해 제조 공정 데이터 기반 AI/ML의 요소 (데이터, 모델, 예측) 와 그 변화 (shift, drift), 그리고 model 의 추정 오차를 명확하게 연결하는 framework 를 제시한다.
  • Non-Goal: 특정 과제의 진단 수치는 다루지 않는다.

2. Summary

좋은 예측은 좋은 데이터와 좋은 모델에서 나옵니다.

  • Taxonomy: 결합분포 P(X,Y) 를 chain rule 로 분해하면 데이터 P(X), 모델 P(Y|X), 예측 P(Y) 의 세 요소가 나오고, 각 요소는 한 번에 바뀌는 shift 와 서서히 바뀌는 drift 를 겪는다 (section 3).
  • Error: 예측 오차는 model 의 추정 오차와 학습 뒤 X → Y 관계의 변화로 나뉘며, P(X) 의 변화는 추정 오차가 큰 영역으로 가중치를 옮겨 오차를 키운다 (section 4).
  • Reading rule: X → Y 구조인 제조 공정에서 P(Y) 의 변화는 대부분 P(X) 나 X → Y 관계가 바뀐 결과이며, 세 요소는 불확실성 출처·표본 선택·i.i.d. 가정을 전제로 한다 (section 3, section 5).

3. Taxonomy and its Hierarchy

결합분포는 관계 P(Y|X) 와 데이터 분포 P(X) 의 곱으로 분해되고, 출력 P(Y) 는 그 곱을 X 에 대해 적분하여 얻으며, 세 요소는 각각 shift 와 drift 의 두 방식으로 바뀐다 (Fig 1).

                 P(X, Y)   joint distribution
                    |
      factorize     |   P(X, Y) = P(Y|X) * P(X)
          +---------+---------+
          |                   |
        P(X)               P(Y|X)
   data marginal       relation X -> Y
   good data           good model
          |                   |
          +---------+---------+
      marginalize   |   integrate over X
                    |
                  P(Y)
            output marginal
            good prediction

  change mode (each element): shift = changes at once, drift = changes gradually
  estimation error: P(Y|X)_model departs from the true P(Y|X), set at training
  reverse factorization: P(X, Y) = P(X|Y) * P(Y), defines P(Y) shift in a Y -> X structure
  premises: uncertainty sources, sample selection, i.i.d. and lot / chamber hierarchy

Fig 1. Taxonomy and hierarchy of the joint distribution

  • 위층의 P(X) 와 P(Y|X) 는 결합분포를 이루는 두 factor 다.
  • 아래층의 P(Y) 는 두 factor 에서 유도되는 marginal distribution 이므로, P(X) 나 P(Y|X) 가 바뀌면 P(Y) 도 따라 바뀔 수 있다.
  • 세 요소의 변화는 빠르기에 따라 한 번에 바뀌는 shift 와 시간에 따라 서서히 바뀌는 drift 로 갈리며, 두 방식은 탐지 방법과 대응 방법이 다르다 (section 3.1).
  • 추정 오차는 실제 관계가 그대로여도 P(Y|X)model 이 실제 P(Y|X) 와 다른 정도이며, 예측 오차를 이루는 한 항이다 (section 4).

이 문서의 P(·) 는 확률분포 (이산 변수는 확률질량함수, 연속 변수는 확률밀도함수) 를 뜻한다. 조건부 분포의 정의 P(Y|X) = P(X,Y) / P(X) 로부터, 결합분포는 식 (1) 의 chain rule 로 분해된다.

$$P(X, Y) = P(Y \mid X) \cdot P(X) \hspace{19em} (1)$$ $$P(Y) = \int P(Y \mid X)\, P(X)\, dX \hspace{19em} (2)$$

식 (1) 의 양변을 X 에 대해 적분하면 식 (2) 를 얻는다. 좌변 ∫ P(X,Y) dX 는 X 를 적분하여 없앤 Y 의 marginal distribution P(Y) 이고, 우변은 조건부 분포 P(Y|X) 를 X 의 분포 P(X) 로 가중하여 평균한 값이다. 이 적분을 marginalization 이라 하며, 식 (1) 이 결합분포를 두 factor 로 나눈다면 식 (2) 는 두 factor 에서 P(Y) 를 다시 얻는다.

꼭지 2 에 있는 인용구의 세 요소는 식 (1) 과 식 (2) 의 세 자리에 놓인다.

  • $P(Y)$ (Good Prediction): 좋은 예측. 두 factor 의 곱인 결합분포 P(X,Y) 를 X 에 대해 적분하여 얻는 marginal distribution 이다 (식 (2)).
  • $P(X)$ (Good Data): 좋은 데이터. 식 (1) 의 factor 로, 측정 데이터의 분포다.
  • $P(Y \mid X)$ (Good Model): 좋은 모델. 식 (1) 의 factor 로, 측정 데이터가 주어졌을 때 계측값이 나오는 X → Y 관계다.

결합분포는 식 (1) 과 반대 방향으로도 분해된다.

$$P(X, Y) = P(X \mid Y) \cdot P(Y) \hspace{19em} (3)$$

P(Y) shift 는 식 (3) 에서 P(X|Y) 가 그대로인 채 P(Y) 만 바뀌는 경우로 정의되며, 문헌은 이것을 prior shift 라 부른다 (Appendix D). 이 정의는 Y 가 X 의 원인인 인과 구조 (Y → X) 에서 성립하며, 공정이 진행되어 측정 데이터 X 를 남긴 뒤 계측값 Y 가 나오는 제조 공정은 X → Y 구조다. X → Y 구조에서는 공정 변화가 P(Y|X) 와 P(X) 를 통해 P(X|Y) 까지 바꾸므로, P(X|Y) 가 그대로라는 전제가 깨지는 경우가 많다. 그 경우 그 전제에 기댄 보정 (label shift 보정) 은 근거를 잃는다.

세 요소는 아래 세 전제 위에서 성립한다.

  • 불확실성의 출처: 계측값은 Yobs = Y + εm, 측정 데이터는 Xobs = X + εx 이다. Model 이 학습하는 P(Yobs|Xobs) 의 산포에는 공정 고유 산포, 계측 오차 εm (label noise), sensor 측정 오차 εx 가 함께 들어 있으며, 셋은 데이터를 늘려도 줄지 않는 aleatoric uncertainty 다. εx 는 산포를 키울 뿐 아니라 추정한 관계의 기울기를 0 쪽으로 줄여 (regression dilution) P(Y|X) 추정을 왜곡한다. 학습 데이터가 부족해 생기는 model 의 불확실성 (epistemic uncertainty) 만 데이터로 줄어들며, 좋은 모델이 도달할 수 있는 정확도의 한계는 공정 고유 산포와 두 측정 오차가 정한다.
  • 표본 선택: 계측은 일부 wafer 만 sampling 하므로, 학습 데이터 Xi 의 분포 P(Xi) 는 계측된 wafer 의 분포이며 전체 wafer 의 P(X) 와 다를 수 있다 (selection bias). 추론은 계측하지 않은 wafer 에 하므로, 이 차이는 그대로 P(X) shift 가 된다. X 나 Y 의 값에 따라 계측이 누락 (missing) 되면 P(Xi) 나 학습 데이터의 P(Y) 가 같은 방식으로 치우친다.
  • i.i.d. 가정과 계층 구조: 식 (4) 로 학습 데이터에서 추론 데이터의 예측을 얻는 것은 wafer 가 서로 독립이고 같은 분포에서 나온다 (i.i.d.) 는 가정 위에서다. 공정 데이터에는 시간 자기상관과 lot·chamber 의 계층 구조가 있어 같은 lot·chamber 의 wafer 가 서로 닮으며, 이 구조를 무시하고 학습·검증을 나누면 같은 lot 이 양쪽에 들어가 성능이 실제보다 높게 나온다.

세 요소의 변화는 Table 1 의 3×2 칸으로 나뉜다.

Table 1. Shift and drift of the three elements

Cell Example Effect
P(X) shift 새 장비, recipe 변경 X 의 값 범위가 한 번에 옮겨 감
P(X) drift sensor drift 측정값 Xobs 가 서서히 치우침
P(Y) shift target spec 변경 Y 의 계측 기준이 한 번에 바뀜
P(Y) drift 제품 구성의 점진적 변화 제품별 비율을 따라 Y 가 서서히 옮겨 감
P(Y|X) shift PM, 부품 교체 X → Y 관계가 한 번에 바뀜
P(Y|X) drift chamber 노화, 찌꺼기 누적 Z(t) X → Y 관계가 서서히 바뀜

한 사건이 여러 칸에 함께 영향을 줄 수 있으며, Table 1 은 각 사건을 가장 먼저 바뀌는 요소의 칸에 둔다. Sensor drift 는 P(X) drift 이면서 측정값 기준의 관계 P(Y|Xobs) 도 바꾸는 예다. 문헌과 업계 도구는 같은 칸을 다른 이름으로 부른다. P(X) shift 는 covariate shift, P(Y) shift 는 prior shift 또는 label shift, P(Y|X) shift 와 drift 는 concept shift 와 concept drift 이며, model monitoring 도구는 P(X) drift 를 data drift 라 부른다 (Appendix C).

3.1 Comparison

Table 2 는 세 요소를 분해, 변화, 개입, 질문, 관측, 대책의 여섯 관점에 놓는다.

Table 2. Six lenses on P(X), P(Y) and P(Y|X)

Lens P(X) P(Y) P(Y|X)
분포 분해 측정 데이터의 marginal distribution 출력의 marginal distribution X → Y 조건부 관계
분포 변화 P(X) shift, P(X) drift P(Y) shift, P(Y) drift P(Y|X) shift, P(Y|X) drift
개입 지점 데이터 공간 Target engineering (변환·분해) 모델·algorithm 공간 (관계 학습)
질문 형태 추론 데이터 Xo 가 학습 데이터 Xi 와 달라졌나? 계측값 분포가 달라졌나? 학습 뒤 측정 데이터와 계측값의 관계가 달라졌나?
관측 (탐지) PSI·KS, domain classifier, T²·SPE 관리도 계측값 분포 비교, Shewhart·EWMA 관리도 Binning CDT, 잔차 CUSUM·Page-Hinkley, ADWIN
대책 (lever) Feature 선택·증강, importance weighting, domain adaptation Target 변환·분해, group 별 scale, prior 보정 사건 뒤 재학습, 최신성 가중, adaptive update

관측 행은 변화를 재는 방법이고, 대책 행은 변화를 가정하고 model 을 맞추는 방법이다. Shift 는 학습 데이터와 추론 데이터의 두 집합을 비교하여 찾고, drift 는 시간창마다 통계량을 추적하는 관리도와 순차 검정으로 찾는다. 변동 시점을 특정하는 것은 관측 행의 방법뿐이다. 여섯 칸과 추정 오차의 탐지·대응·검증 방법은 Appendix B 에 모은다. 이 분류가 학계와 업계에서 쓰이는 사례는 Appendix C 에 모은다.

4. Prediction from the Joint Distribution

식 (4) 는 학습한 model 로 추론할 때 세 요소의 관계를 학습 데이터 Xi 와 추론 데이터 Xo 로 나누어 적고, 식 (5) 는 그 예측의 오차를 추정 오차와 관계 변화의 두 항으로 나눈다. Xi 는 in-sample, 곧 model 을 학습할 때 쓴 데이터이고, Xo 는 out-of-sample, 곧 추론 때 새로 들어오는 데이터다.

$$P(Y)_{\mathrm{pred}} = \int P(Y \mid X = x;\, X_{i})_{\mathrm{model}} \cdot P(X_{o} = x)_{\mathrm{true}}\, dx \hspace{19em} (4)$$
  • $P(Y)_{\mathrm{pred}}$ (Overall Predicted Distribution): out-of-sample 추론 데이터에서 나오리라 기대하는 target 변수 $Y$ 의 최종 분포로, 측정 데이터를 적분하여 없앤 marginal distribution 이다.
  • $P(Y \mid X = x;\, X_i)_{\mathrm{model}}$ (Model's Conditional Prediction): 예측 model 그 자체다. In-sample 학습 데이터 $X_i$ 로 학습하며, 측정 데이터의 값 $x$ 가 주어지면 $Y$ 의 조건부 분포를 내놓는다. 첨자 model 은 이것이 추정·학습한 함수이며 실제 분포와 다를 수 있음을 나타낸다. ; 뒤의 $X_i$ 는 model 을 학습한 데이터를 나타내며, | 뒤의 조건 변수와 구별된다. 이 문서의 다른 자리에서는 줄여 P(Y|X)model 로 적는다.
  • $P(X_o = x)_{\mathrm{true}}$ (True Distribution of Out-of-Sample Data): out-of-sample 추론 데이터 $X_o$ 가 값 $x$ 를 가질 실제 확률밀도다. Model 을 추론에 쓸 때 $X_o$ 가 실제로 어떻게 분포하는지를 나타낸다.
  • $\int \ldots dx$ (Marginalization over $x$): 추론 데이터가 가질 수 있는 모든 값 $x$ 에 걸쳐 예측을 더한다. 각 값의 가중치는 추론 때 그 값이 나올 확률이므로, 적분 결과는 예측의 가중 평균이다.

식 (4) 는 출력의 marginal distribution 식 (2) 를 예측에 옮긴 것이다. 추론 시점 t 의 실제 P(Y)t 는 그 시점의 실제 관계 P(Y|X=x)t 를 같은 P(Xo) 로 적분하여 얻으므로, 식 (4) 에서 P(Y)t 를 빼면 예측 오차가 식 (5) 의 두 항으로 나뉜다. ti 는 학습 시점이다.

$$\begin{aligned} P(Y)_{\mathrm{pred}} - P(Y)_{t} &= \int \left[ P(Y \mid X = x;\, X_{i})_{\mathrm{model}} - P(Y \mid X = x)_{t_{i}} \right] P(X_{o} = x)_{\mathrm{true}}\, dx \\\ &+ \int \left[ P(Y \mid X = x)_{t_{i}} - P(Y \mid X = x)_{t} \right] P(X_{o} = x)_{\mathrm{true}}\, dx \end{aligned} \hspace{19em} (5)$$
  • Estimation error: 첫 항. 실제 관계가 학습 시점 그대로여도 model 이 그 관계를 다르게 추정한 몫이다.
  • Relation change: 둘째 항. 학습 뒤 실제 X → Y 관계가 바뀐 몫이며, Table 1 의 P(Y|X) shift 와 drift 가 여기에 든다.
  • Weight: 두 항은 모두 추론 데이터의 분포 P(Xo) 로 가중된다. P(X) shift 나 drift 는 괄호 안의 차이를 바꾸지 않고 가중치를 옮겨, 차이가 큰 영역의 몫을 키운다.

P(Y|X)model 이 실제 관계를 반영하지 못하는 원인은 아래 다섯 가지이며, 앞의 넷은 첫 항에, 마지막 하나는 둘째 항에 든다.

  • Variance: 표본이 변수에 비해 적으면 추정한 관계가 학습 표본에 따라 크게 흔들린다.
  • Bias: model 계열이 실제 관계의 형태를 담지 못하면 표본을 늘려도 오차가 남는다. 비선형 관계를 선형 model 로 맞추는 경우다.
  • Measurement error: 계측 오차 εm 은 산포를 키우고, sensor 오차 εx 는 추정한 기울기를 0 쪽으로 줄인다 (section 3 의 불확실성의 출처).
  • Extrapolation: P(Xi) 가 드문 영역에서는 model 을 묶어 줄 학습 표본이 없어 추정이 정해지지 않는다. P(X) shift 나 drift 가 P(Xo) 를 그 영역으로 옮기면 식 (5) 에서 이 몫이 커진다.
  • Unobserved state: chamber 상태 Z 가 측정 데이터 X 에 없으면 model 은 학습 시점의 Z 분포로 평균한 관계를 배운다. 학습 뒤 Z 의 분포가 바뀌면 그 차이가 둘째 항이 된다 (section 5.3).

식 (5) 로 보면 세 요소는 아래이다.

  • 좋은 예측: P(Y)pred 는 식 (5) 의 두 항이 모두 작을 때 실제 P(Y) 에 가깝다.
  • 좋은 데이터: Xi 는 wafer 계측값과 짝지어 model 학습에 쓰는, 장비 sensor 등에서 측정한 학습 데이터이고, P(Xo)true 는 추론 때 실제로 측정되는 추론 데이터의 분포다. P(Xi) 가 P(Xo) 를 덮어야 Extrapolation 몫이 작다.
  • 좋은 모델: P(Y|X)model 은 model 이 학습 데이터 Xi 로 추정한 X → Y 관계다. 첫 항은 추정기 선택과 검증으로 줄이고 (B.4), 둘째 항은 관계 변화를 탐지하여 다시 학습해야 줄어든다 (B.3).

5. Physical Meaning

세 요소는 제조 공정에서 각각 측정 데이터, 계측 결과, 측정 데이터와 계측값 사이의 X → Y 관계에 대응한다. Table 3 이 그 대응과 식 (4) 에서의 역할을 모은다.

Table 3. Physical meaning of each term

Term Role in eq. (4) Physical meaning
P(X) 좋은 데이터: P(Xi), P(Xo)true 장비 sensor 등에서 측정한 데이터의 분포
P(Y) 좋은 예측: P(Y)pred Wafer 계측값 (측정 map, 공간 분해 계수) 의 분포
P(Y|X) 좋은 모델: P(Y|X)model 공정 물리가 측정 데이터와 계측값 사이에 남긴 X → Y 관계

5.1 P(X) Shift and Drift

  • 의미: P(X) shift 는 추론 데이터의 분포 P(Xo) 가 학습 데이터의 P(Xi) 와 한 번에 달라지는 것이고, P(X) drift 는 P(Xo) 가 시간에 따라 서서히 옮겨 가는 것이다. X → Y 관계는 그대로일 수 있다.
  • 해석: model 이 관계는 학습했으나 추론 데이터가 학습 데이터로 드물게 덮인 영역으로 옮겨 가, 식 (5) 의 Extrapolation 몫이 커진 경우다.
  • 범위: 데이터 공간 작업은 변화 대응과 함께 feature 선택·생성 전반을 포함한다.

5.2 P(Y) Shift and Drift

  • 의미: 출력의 marginal distribution 이 바뀐다. 식 (3) 에서 P(X|Y) 가 그대로인 채 P(Y) 만 바뀌는 경우로 정의되며, 이 정의는 Y → X 인과 구조에서 성립한다.
  • 제조 공정에서의 해석: X → Y 구조에서 관측되는 P(Y) 변화는 대부분 P(X) 변화나 X → Y 관계 변화의 결과로 나타난다. P(Y) 자체가 바뀌는 경우는 target spec 변경처럼 Y 의 정의나 기준이 한 번에 바뀌는 P(Y) shift 와, 제품 구분이 X 에 없을 때 제품 구성이 서서히 바뀌어 Y 의 분포가 옮겨 가는 P(Y) drift 다.
  • Target engineering: P(Y) 에 대한 개입은 출력의 정의와 구조를 바꾸는 것이며, target 변환 (log, Box-Cox), spatial decomposition, multi-task target 재구성이 여기에 든다.
  • Spatial decomposition: wafer 측정 map 을 공간 기저의 계수로 바꾸는 target engineering 이다. 출력이 매끄럽고 물리적 의미가 있는 계수가 되어 P(Y|X) 학습 난이도가 낮아진다.

5.3 P(Y|X) Shift and Drift

측정 데이터와 계측값 사이의 X → Y 관계 자체가 학습 뒤에 바뀌는 경우이며, 식 (5) 의 둘째 항이 이것이다. PM 이나 부품 교체처럼 한 번에 바뀌면 P(Y|X) shift, chamber 노화처럼 서서히 바뀌면 P(Y|X) drift 다. 세 요소 가운데 다루기 가장 어렵다.

공정 물리 관점에서 X → Y 관계의 변화는 관측되지 않은 chamber 상태 변수 Z(t) (노화, 찌꺼기 등) 의 변화로 일어나며, 그 관계는 식 (6) 으로 적는다.

$$P(Y \mid X, t) = \int P(Y \mid X, Z)\, P(Z \mid t)\, dZ \hspace{19em} (6)$$

Z 는 잠재 변수 (latent variable) 이다. 식 (6) 은 주어진 t 에서 Z 가 X 와 독립 (Z ⫫ X | t) 이라는 전제에서 성립하며, 이 전제가 깨지면 P(Z|t) 대신 P(Z|X,t) 로 적분해야 한다. Chamber 상태가 주어졌을 때의 관계 P(Y|X,Z) 는 시간에 따라 바뀌지 않아도, Z 가 측정 데이터 X 에 들어 있지 않으므로 model 은 P(Z|t) 의 변화를 P(Y|X) 의 변화로만 본다. P(Z|t) 가 PM 시점에 계단처럼 바뀌면 P(Y|X) shift 가 되고, 시간에 따라 서서히 옮겨 가면 P(Y|X) drift 가 된다. 관계 변화에는 대응과 관측의 두 가지 길이 있다.

  • 대응: drift 에는 detrending, 최신성 sample 가중, 최근 window 재학습을 쓰고, shift 에는 PM 같은 사건 뒤의 데이터로 다시 학습한다. 효과는 temporal CV 로 시간순으로 검증하며, 변동 시점은 특정하지 못한다.
  • 관측: 변화를 측정하고 시점을 특정한다.

관측 방법은 P(Y|X) 를 얼마나 직접 보는지로 갈린다.

  • Binning CDT: X 를 bin 으로 나눠 P(Y|bin) 을 시간창별로 검정하여 변동 시점을 특정한다. P(Y|X) 를 가장 직접 본다.
  • 잔차 CUSUM, Page-Hinkley: 예측 잔차 통계량이 임계값을 넘는 시점을 출력한다.
  • I(X;Y): 의존성 총량 (거시 지표). 단독으로 쓰면 P(X), P(Y), 관계의 변화가 함께 잡히므로 시간창별로 추적해야 관계 변화에 가까워진다. 고차원 X 에서는 시간창마다 정확히 추정하기 어려우므로, 중요도 상위 K 개 변수 Xk 에 대한 I(Xk;Y) 로 좁혀 추적한다.

References

[1] Kang, S., & Kang, P. (2017). An intelligent virtual metrology system with adaptive update for semiconductor manufacturing. Journal of Process Control, 52, 66–74.
[2] Quiñonero-Candela, J., Sugiyama, M., Schwaighofer, A., & Lawrence, N. D. (Eds.). (2009). Dataset Shift in Machine Learning. MIT Press. ISBN 978-0-262-17005-5.
[3] Moreno-Torres, J. G., Raeder, T., Alaiz-Rodríguez, R., Chawla, N. V., & Herrera, F. (2012). A unifying view on dataset shift in classification. Pattern Recognition, 45(1), 521–530.
[4] Gama, J., Žliobaitė, I., Bifet, A., Pechenizkiy, M., & Bouchachia, A. (2014). A survey on concept drift adaptation. ACM Computing Surveys, 46(4), 44.
[5] Amazon Web Services. Data and model quality monitoring with Amazon SageMaker Model Monitor. Amazon SageMaker AI Developer Guide.
[6] Google Cloud. Introduction to Vertex AI Model Monitoring. Vertex AI documentation.
[7] Evidently AI. Concept drift in ML. ML in Production guide.


Appendix A. Terminology

  • aleatoric uncertainty: 데이터 자체가 지닌 산포에서 오는 불확실성. 데이터를 늘려도 줄지 않는다.
  • covariate: model 의 입력 변수 X. 확률변수 하나를 가리키는 일반적인 말인 variate 는 X 와 Y 모두에 쓰이고, "co-" 는 주된 관심 변수 Y 와 함께 변하는 (co-vary) 변수, 곧 Y 를 설명하려고 함께 관측하는 변수라는 뜻이다. 이 문서에서는 장비 sensor 등에서 측정한 데이터이며, 문헌은 그 분포 P(X) 가 학습과 추론 사이에 달라지는 것을 covariate shift 라 부른다.
  • CUSUM (Cumulative Sum): 기준값과의 편차를 누적하여 임계값을 넘는 시점을 변화점으로 보는 관리도.
  • drift: 분포나 관계가 시간에 따라 서서히 바뀌는 변화. 시간창마다 통계량을 추적하여 찾는다.
  • epistemic uncertainty: 학습 데이터가 부족하여 model 이 지니는 불확실성. 데이터를 늘리면 줄어든다.
  • EWMA (Exponentially Weighted Moving Average): 최근 값에 더 큰 가중치를 주는 이동평균으로 작고 꾸준한 이동을 잡는 관리도.
  • I(X;Y): 상호정보량 (mutual information). X 와 Y 의 의존성 총량을 나타내는 거시 지표.
  • i.i.d. (independent and identically distributed): 각 표본이 서로 독립이고 같은 분포에서 나온다는 가정.
  • label noise: 계측 오차처럼 정답값 Y 에 섞인 잡음.
  • latent variable: 결과에 영향을 주지만 직접 관측되지 않는 변수. Chamber 의 노화나 찌꺼기 누적 상태가 그 예다.
  • marginal distribution (주변분포): 결합분포 P(X,Y) 에서 X 를 적분하여 없애고 Y 하나만 남긴 분포. P(Y) = ∫ P(X,Y) dX 이며, X 의 값과 상관없이 Y 가 어떻게 분포하는지를 나타낸다.
  • regression dilution: 입력 X 에 측정 오차가 있을 때 추정한 회귀 기울기가 0 쪽으로 줄어드는 현상.
  • selection bias: 표본을 고르는 방식 때문에 표본의 분포가 모집단의 분포와 달라지는 치우침.
  • shift: 분포나 관계가 한 번에 바뀌는 변화. 학습 데이터와 추론 데이터의 두 집합을 비교하여 찾는다.
  • spatial decomposition: wafer 측정 map 을 공간 기저 (다항식) 로 분해하고, 그 계수 (a1, …) 를 예측하는 방법.
  • target engineering: 예측 대상 Y 를 변환·분해·재구성하여 model 이 학습하기 쉬운 형태로 바꾸는 일.
  • temporal CV: 과거로 학습하고 미래로 검증하는 시간순 교차검증.

Appendix B. Detection and Implementation by Cell

Table 1 의 세 요소마다 shift 와 drift 를 무엇으로 탐지하고 (Detection), 어떤 model·기법으로 대응하며 어떻게 검증하는지 (Response) 를 B.1 부터 B.3 에 모으고, 식 (5) 의 추정 오차를 B.4 에 둔다. Shift 는 두 집합의 비교로, drift 는 시간창별 추적으로 찾는다.

B.1 P(X) Shift and Drift

단변량 방법은 변수마다 분포를 따로 비교하므로 변수 사이의 상관 변화를 잡지 못한다. 수백 개 sensor 변수를 쓰는 제조 데이터에서는 다변량 방법을 함께 쓴다.

Shift Detection

  • PSI (Population Stability Index): 변수마다 학습 데이터와 추론 데이터의 구간별 비율을 비교하여 P(X) 의 이동 크기를 잰다.
  • KS test (Kolmogorov–Smirnov test): 변수마다 두 데이터의 누적분포 최대 차이로 분포가 같은지 검정한다.
  • KL divergence (Kullback–Leibler divergence): 학습 데이터 분포에 대한 추론 데이터 분포의 차이를 정보량으로 잰다.
  • MMD (Maximum Mean Discrepancy): kernel 공간에서 두 데이터의 평균 차이로 다변량 분포 차이를 검정한다.
  • Domain classifier: 학습 데이터와 추론 데이터를 가르는 classifier 를 학습하여, AUC 가 0.5 보다 클수록 두 분포가 다르다고 본다.

Drift Detection

  • Hotelling T²·SPE control chart (PCA-based): 학습 데이터로 만든 PCA model 에서 추론 데이터의 T² 와 잔차 SPE 를 시간순으로 그려 관리 한계를 넘는 시점을 찾는다.
  • Autoencoder reconstruction error: 학습 데이터로 만든 autoencoder 에서 추론 데이터의 재구성 오차를 시간순으로 추적하여 관리 한계를 넘는 시점을 찾는다.
  • Windowed PSI: 시간창마다 PSI 를 계산하여 추론 데이터가 학습 데이터에서 멀어지는 추세를 본다.

Response

  • Methods: shift 에는 domain classifier 로 추정한 밀도비로 학습 sample 에 가중치를 주는 importance weighting, 학습·추론 입력 분포를 맞추는 domain adaptation, 학습 데이터가 추론 범위를 덮도록 계측 sampling 계획을 조정. Drift 에는 sensor 교정과 최근 window 재학습.
  • Validation: 추론 데이터와 닮은 학습 sample 로 검증 set 을 꾸리는 adversarial validation.

B.2 P(Y) Shift and Drift

Shift Detection

  • Metrology value distribution comparison: 학습 데이터의 계측값과 최근 계측값의 분포를 KS test 나 PSI 로 비교한다.
  • Shewhart control chart: 계측값의 평균과 산포가 관리 한계를 한 번에 벗어나는 시점을 감시한다.

Drift Detection

  • EWMA control chart: 계측값의 지수가중 이동평균으로 작고 꾸준한 이동을 감시한다.
  • Prediction distribution monitoring: 계측값이 늦게 들어올 때 P(Y)pred 의 분포 이동을 먼저 감시하여 P(Y) 변화를 미리 알린다.

Response

  • Methods: shift 에는 target spec 변경에 맞춘 target 재정의와 재학습. Drift 에는 group 별 scale 정규화와 target engineering (log·Box-Cox 변환, spatial decomposition).
  • Validation: spec·group 별로 나누어 오차를 따로 평가.

B.3 P(Y|X) Shift and Drift

Shift Detection

  • Binning CDT (Conditional Distribution Test): X 를 bin 으로 나눠 bin 마다 P(Y|bin) 을 시간창별로 검정하여 변동 시점을 특정한다.
  • Event-split comparison: PM 이나 부품 교체 앞뒤로 예측 잔차의 분포를 나누어 비교한다.

Drift Detection

  • Residual CUSUM: 예측 잔차의 누적합이 임계값을 넘는 시점을 관계 변화 시점으로 본다.
  • Page-Hinkley: 예측 잔차의 누적 편차와 그 최솟값의 차이가 임계값을 넘으면 평균 변화를 알린다.
  • ADWIN (Adaptive Windowing): 오차 window 를 두 부분으로 나눠 평균 차이가 유의하면 오래된 부분을 버리고 변화를 알린다.
  • Windowed performance monitoring: 시간창마다 R²·RMSE 를 계산하여 성능 저하 시점을 찾는다. 계측값이 있어야 한다.
  • Windowed I(Xk;Y): 시간창마다 중요도 상위 K 개 변수 Xk 와 계측값의 상호정보량을 계산하여 의존성 변화를 추적한다. 고차원 X 전체의 I(X;Y) 는 표본 수에 비해 차원이 커서 시간창마다 정확히 추정하기 어렵다. I(Xk;Y) 는 P(X) 변화만으로도 바뀔 수 있으므로, B.1 의 탐지 결과와 함께 해석한다.

Response

  • Methods: shift 에는 사건 뒤의 데이터로 다시 학습하고, chamber 상태 Z(t) 의 대리 변수 (PM 이후 경과 시간, RF 누적 시간) 를 feature 로 추가. Drift 에는 최근 window 로 일정 간격 재학습, 최신성 가중, 신뢰도가 낮은 wafer 만 계측해 즉시 갱신하는 adaptive update [1].
  • Validation: 과거로 학습하고 미래로 검증하는 temporal CV, lot 단위로 나눈 group split.

B.4 Estimation Error

B.3 은 학습 뒤 실제 관계 P(Y|X) 가 바뀌어 생기는 식 (5) 의 둘째 항을 다루고, B.4 는 실제 관계가 그대로여도 model 이 그 관계를 추정하며 생기는 첫 항을 다룬다. 첫 항은 추정기 선택, 과적합, hyperparameter 처럼 학습 시점에 정해진다.

Detection

  • Train–validation gap: 학습 성능과 검증 성능의 차이로 과적합을 본다. 시간에 따른 성능 저하는 B.3 의 Windowed performance monitoring 으로 본다.
  • Out-of-range check: 추론 데이터가 학습 데이터의 범위 밖에 있는지 보아, 식 (5) 의 Extrapolation 몫이 커지는 wafer 를 가린다.

Response

  • Methods: 표본이 변수보다 적으면 PLS·ridge·lasso 같은 정규화 선형 model, 비선형이면 LightGBM·XGBoost·CatBoost 같은 tree ensemble, 불확실성이 필요하면 Gaussian process 나 quantile regression·conformal prediction. 물리 지식은 monotone constraint 나 물리식 위에 잔차만 학습하는 hybrid 로 넣고, hyperparameter 는 Optuna 같은 Bayesian 최적화로 찾는다.
  • Validation: lot 단위 group split 과 temporal CV 를 함께 쓰고, R²·RMSE 와 예측 구간의 coverage 를 본다.

Appendix C. Benchmarking

Table 4 는 이 문서의 분류가 학계의 dataset shift 이론과 업계의 model monitoring 도구에서 쓰이는 사례를 모은다.

Table 4. Use of the shift taxonomy in research and industry

Source Kind Terms used Term in this document
Quiñonero-Candela et al. [2] Book dataset shift, covariate shift 학습·추론 사이의 P(X,Y) 차이, P(X) shift
Moreno-Torres et al. [3] Paper covariate shift, prior probability shift, concept shift P(X) shift, P(Y) shift, P(Y|X) shift
Gama et al. [4] Survey concept drift detection, adaptation 5.3 의 P(Y|X) drift 관측과 대응
Kang & Kang [1] Paper virtual metrology adaptive update 제조 데이터의 P(Y|X) drift 대응
Amazon SageMaker Model Monitor [5] Industry tool data quality drift, model quality drift P(X) drift, 좋은 예측의 성능 저하
Vertex AI Model Monitoring [6] Industry tool training-serving skew, inference drift P(X) shift, P(X) drift
Evidently AI [7] Open-source tool data drift, prediction drift, concept drift P(X) drift, P(Y)pred drift, P(Y|X) drift
  • Research: dataset shift 는 학습과 추론 사이에 결합분포 P(X,Y) 가 달라지는 문제로 정의된다 [2]. Moreno-Torres et al. 은 결합분포의 어느 항이 바뀌는지로 covariate shift (P(X) 이동, P(Y|X) 유지), prior probability shift (P(Y) 이동, P(X|Y) 유지), concept shift 를 정리하였고 [3], 이 문서의 식 (3) 과 세 요소의 shift 가 이를 따른다.
  • Manufacturing data: 반도체 virtual metrology 에서는 wafer 특성이 시간에 따라 바뀌어 예측 성능이 떨어지므로, 신뢰도가 낮은 wafer 만 계측하고 그 결과로 model 을 즉시 갱신하는 adaptive update 가 제안되었다 [1]. Concept drift 의 탐지와 적응 방법은 Gama et al. 이 정리하였다 [4].
  • Industry tools: model monitoring 도구는 정답값 없이 볼 수 있는 P(X) 변화를 data quality drift [5], training-serving skew·inference drift [6], data drift [7] 라는 이름으로 감시한다. 정답값이 들어온 뒤에는 예측과 정답의 차이로 model quality drift [5] 나 concept drift [7] 를 확인한다.
  • Framework of this document: 세 요소의 변화 분류는 학계와 업계에서 쓰는 표준 개념이다. 각 요소를 shift 와 drift 의 3×2 칸으로 나누어 중립 이름으로 부르고, 식 (5) 로 예측 오차에 잇는 틀은 이 문서가 정리한 것이며, 위 출처들이 이름 붙여 쓰는 표준 framework 는 아니다.

Appendix D. Prior in Bayes' Theorem

베이즈 정리 (Bayes' theorem) 를 이 문서의 변수로 적으면 식 (7) 이다. Model 이 추론하는 미지의 양은 계측값 Y 이고, 측정 데이터 X 는 그 추론에 쓰는 증거다.

$$P(Y \mid X) = \frac{P(X \mid Y) \cdot P(Y)}{P(X)} \hspace{19em} (7)$$

각 항의 뜻은 다음과 같다.

  • Prior: P(Y). 사전 확률이며, 측정 데이터 X 를 보기 전에 계측값 Y 에 대해 가지고 있던 분포다.
  • Likelihood: P(X|Y). 가능도이며, 계측값 Y 가 주어졌다는 가정 아래 측정 데이터 X 가 나타날 확률이다.
  • Posterior: P(Y|X). 사후 확률이며, 측정 데이터 X 를 관측한 뒤 갱신된 Y 의 분포로, model 이 추정하려는 조건부 분포다.
  • Evidence: P(X). 측정 데이터의 marginal distribution 이며, posterior 를 확률분포로 맞추는 정규화 상수다.

Prior 는 추론하려는 미지의 양인 계측값 Y 에 붙으므로, 문헌의 prior shift 는 이 문서의 P(Y) shift 다. 식 (7) 의 분자 P(X|Y)·P(Y) 는 식 (3) 의 우변과 같으므로, 식 (3) 에서 P(X|Y) 를 그대로 둔 채 P(Y) 만 바뀌는 P(Y) shift 는 이 prior 가 바뀌는 경우다. Label shift 는 같은 P(Y) 변화를 label Y 쪽에서 부르는 이름이다. 두 이름은 Y 가 X 를 만드는 Y → X 구조의 분류 문제에서 왔다. 증상 X 를 보고 그 원인인 병 Y 를 맞히는 문제처럼, 결과를 보고 원인 class 를 고르는 분류 문제를 가리킨다. 제조 공정은 반대로 공정 데이터 X 가 원인이고 계측값 Y 가 결과인 X → Y 구조여서, 이 이름이 그대로 들어맞지 않는다. 그래서 제조 공정에서 관측되는 P(Y) 변화는 대부분 P(X) 나 P(Y|X) 변화의 결과로 나타난다 (section 5.2).

Appendix E. Talk Slides

이 문서를 발표할 때 쓰는 slide 는 세 장이며, 원본은 modeling-elements-invited-talk.pptx 이다.

첫 slide 는 section 3 의 taxonomy 를 보인다 (Fig 2).

Fig 2

Fig 2. Talk slide 1, taxonomy from the joint distribution

결합분포를 P(X), P(Y|X), P(Y) 로 나누고 식 (1) 과 식 (2) 로 세 요소를 이으며, 세 요소가 shift 와 drift 의 두 방식으로 바뀐다는 것을 함께 보인다.

둘째 slide 는 section 4 의 식 (4) 를 보인다 (Fig 3).

Fig 3

Fig 3. Talk slide 2, prediction from the joint distribution

식 (4) 의 세 항을 좋은 데이터, 좋은 모델, 좋은 예측으로 읽고, 각 요소를 깨는 P(X) shift, P(Y|X) drift, P(Y) shift 를 schematic 으로 보인다. Slide 아래쪽에는 식 (5) 의 두 오차 항을 적었다.

셋째 slide 는 Appendix B 를 줄여 보인다 (Fig 4).

Fig 4

Fig 4. Talk slide 3, detection, response and validation by cell

세 요소의 shift 와 drift, 그리고 추정 오차마다 탐지, 대응, 검증 방법을 한 칸에 모았다.

Our Score
Click to rate this post!
[Total: 0 Average: 0]
Visited 14 times, 1 visit(s) today

Leave a Comment

Your email address will not be published. Required fields are marked *