← Back
Home › Systems › Hardware and datacenter

wafer-inspection-yield

Finds defects on semiconductor wafers by inspecting each die, then analyzes them across tools, wafers and lots to find the causes of lost yield for fab engineers.

KLA, Applied SEMVision, PDF Solutions Exensio

Open the wafer-inspection-yield pagewafer-inspection-yie… k-d treegeometry: A binary tree that splits k-dimensional points by one coordinate per level, giving fast nearest-neighbour and box queries on static low-dimensional data.›Active learningmachine-learning: Choosing which unlabeled examples to label next: uncertainty, margin, diversity and committee samplingDensity-based clustering(DBSCAN)machine-learning: Group points that are packed densely, label the rest as noise: no k, arbitrary shapes, two parameters (eps, minPts), cost set by the neighbour index.›Geometric pattern matchingmachine-learning: Find a model contour in an image under rotation and scale using gradient-orientation features and a pyramid search with a match scoreGradient-boosted decision trees(GBDT)machine-learning: Add small regression trees one at a time, each fitted to the loss gradient; histogram splits over 256 bins make it the strongest tabular default.›Image segmentationmachine-learning: Pixel/instance segmentation networks and promptable segmentation (Mask R-CNN, SAM-style)Isolation forestmachine-learning: Score each record by how few random axis-aligned splits it takes to isolate it in a small forest of random trees; anomalies are few and different, so they isolate fast.›k-means clusteringmachine-learning: Partition points into k clusters by alternating nearest-centroid assignment and centroid averaging; k-means++ seeding makes it dependable.›Subpixel edge measurementmachine-learning: Locate edges to a fraction of a pixel by interpolating the gradient peak along caliper projections, then fit lines or circlesImage alignment registrationmedia: Align frames via feature matching or pyramidal optical flow for burst merging and stitchingImage denoisingmedia: Bilateral, non-local means and temporal noise reduction for sensor imagesConvolutional networksml-training: Layers that slide a small shared kernel over a grid, giving translation equivariance and few parameters; still the most compute-efficient choice for many vision tasks.›Weight quantizationml-training: Store weights as 8/4-bit integers with per-group scales; decode is memory-bound, so 4-bit weights give about 3-4x tokens/s and fit 4x larger models.›Secs gem equipment protocolnetworking: SECS-II message structures over HSMS or SECS-I with GEM state models for semiconductor tool control, events and recipesFast Fourier transformnumerics: Computes the DFT in O(n log n) by recursively splitting into even and odd halves; the basis of fast convolution and spectral methods.›Change point detectionstatistics: CUSUM/E-divisive/PELT to find shifts in a time series mean or distributionNegative binomial yield modelstatistics: Yield models with defect clustering (negative binomial, Murphy) from defect density and critical areaRobust statisticsstatistics: Location and scale estimates (median, MAD, trimmed mean, Huber M-estimator) that stay correct when a minority of the data is garbage.›Control charts (Shewhart,CUSUM, EWMA)statistics: Estimate normal behaviour from healthy data, then signal when values leave limits (Shewhart) or small deviations add up (CUSUM, EWMA); tune by average run length.›Time-series anomaly detectionstatistics: Predict the expected value from a seasonal baseline, scale the residual by a robust spread (MAD), threshold at a chosen false-alarm rate, then merge flags into incidents.›Columnar file formatstorage: Row groups, column chunks, pages, encodings and footer stats (Parquet/ORC style) (listed in Moved to the wiki)Data lineage trackingstorage: Recording which inputs and transforms produced each output value for audit and rerunsEntity resolutionstorage: Decide which records describe the same real-world thing: block to cut the pair space, score pairs with a probabilistic model, cluster the matches transitively.›Time-series chunk storagestorage: Store each series as immutable compressed chunks of consecutive samples behind a small time index; a range query decodes only the chunks that overlap it.›Calibrationmachine-learning: Make predicted probabilities match observed frequencies: measure with ECE, fix post hoc with temperature, Platt or isotonic scaling on held-out data.›Quantile sketchesdata-structures: Mergeable quantile sketches: t-digest, DDSketch, HDR histogramsRegularizationmachine-learning: Techniques that trade training fit for generalization: weight decay, dropout, early stopping, label smoothing and data mixing, with the exact update rules and defaults.›Loss functionsmachine-learning: The scalar a model minimizes: cross-entropy for classes and tokens, MSE or Huber for values, each with a stable form and simple gradient.›Non-maximum suppressionmachine-learning: Keep the best-scoring candidate in each neighbourhood and drop the rest; greedy NMS, Soft-NMS and 1-D peak picking share one loop.›Vision transformerml-training: ViT: patch embeddings, position encodings, encoder blocks; vision-language connectorsPRNGs (PCG, xoshiro)numerics: Small, fast, statistically strong non-cryptographic generators: PCG32 and xoshiro256**, with seeding, parallel streams and unbiased ranges.›Homogeneous transformsgeometry: 4x4 affine and projective matrices, homogeneous coordinates, view and projection, normal matricesImage warping remapgraphics: Resampling with lookup maps: resize, lens undistortion, homographies, bilinear/bicubicFeature detection orbrobotics: FAST corners with oriented BRIEF descriptors and Hamming matching for tracking and relocalizationRansacrobotics: Random sample consensus for robust model fitting with outliers (homographies, planes, poses)Image pyramidsgraphics: Gaussian/Laplacian pyramids and tiled multi-resolution images for zoom and blending+ 17 moreLinear and logistic regressionmachine-learning: Fit a weighted sum of features to a number (least squares) or a probability (logistic); the baseline every model must beat.›Attention variantsmachine-learning: Multi-head, multi-query, grouped-query, sliding-window and latent attention; same softmax(QKᵀ/√d)V core, different trade-offs between quality and KV-cache size.›Data augmentationmachine-learning: Generate label-preserving variants of each training example on the fly to enlarge the effective dataset and bake in invariances.›Transformer blockml-training: The decoder-only pre-norm block (attention plus MLP on a residual stream) behind every modern LLM, with exact shapes, parameter, FLOP and KV-cache counts.›+ 13 moreL-BFGSnumerics: Quasi-Newton minimizer that approximates the inverse Hessian from the last m gradient differences via the two-loop recursion; O(m·n) memory and work per step.›+ 7 more+ 2 more

How it is built

Architecture overview

A semiconductor fab turns a silicon wafer into hundreds of identical dice through hundreds of process steps. A particle, a scratch or a pattern error at any step can kill a die, and the cost of finding out late is large: a wafer travels through the line for weeks. The wafer inspection and yield system finds defects early, measures critical dimensions, and ties the findings to the yield that comes out of final electrical test, so engineers know which tool, which step and which lot is losing money.

It works at three scales. At the tool, optical or electron-beam inspection and metrology tools scan each wafer and detect defects by comparing each die to a reference (another die, or a rendering of the design). At the wafer, defect positions and test failures form a map whose shape is diagnostic: a ring points to a spin or etch step, a scratch to a handling tool, a cluster to a particle source. At the fab, inline measurements flow as time series into statistical process control (SPC), and yield models and machine-learning models connect process and tool data with final yield. The result is a loop: detect, classify, trace to a cause, fix the tool, check that the signature disappears.

Parts:

 process tools ─┐ events, sensor traces (SECS/GEM)                ┌──► SPC / excursion alerts ──► hold lot, fix tool
 inspection ────┼─► collection ─► time-series store ─► SPC, change-point, anomaly
 metrology  ────┘      │
                       ▼
  wafer images ─► align ─► denoise ─► die-to-die diff ─► candidate defects ─► review images ─► classifier
                                                                         │                        │
                                                                         ▼                        ▼
                                                              defect map (x, y, class) ──► clustering ──► signature
                                                                                                │
 final test (die pass/fail) ─► wafer map ─────────────────────────────────────────────────────┤
                                                                                                ▼
 lot genealogy, recipes, tools (joined by entity resolution) ───────────► yield model (negative binomial, trees)

Two data rates meet here: images at the tool (large, bursty, processed on the tool or next to it) and numbers everywhere else (small, continuous, kept for years). The architecture keeps them apart and joins them on wafer, die and step identifiers.

How the parts fit together

Equipment interface

Tools talk to the factory host through SEMI standards. secs-gem-equipment-protocol (no page yet) covers the message layer (SECS-II, SEMI E5), the equipment behaviour model (GEM, SEMI E30) and the TCP/IP transport (HSMS, SEMI E37). The host subscribes to events (lot started, step done, alarm), requests status variables and reports, and sends remote commands such as hold or start. Defect results are usually not sent over SECS/GEM: the tool writes result files (inspection lots, defect lists, review images) that the system picks up, while SECS/GEM carries the control and state side so the system knows which wafer was on which chamber at what time.

The contract to the rest of the system is a timestamped stream of events keyed by tool, chamber, lot, wafer and recipe. Clock skew between tools breaks genealogy, so all of them are synchronised and the receive time is stored beside the event time.

Defect detection

A scan produces a stream of image patches. Die-to-die detection compares each patch to the same position on a neighbouring die; the design repeats, so the difference should be zero except for defects and noise. Die-to-database compares against a rendering of the intended layout, needed when there is no neighbour (a single die in the field) or when a systematic error is identical on neighbouring dice.

The comparison only works if the images are aligned to a fraction of a pixel. image-alignment-registration (no page yet) finds the shift (and small rotation or scale) between test and reference: pyramid matching for the coarse estimate, then phase correlation or feature matching for sub-pixel refinement. The shift can be found with the Fast Fourier transform: the normalised cross-power spectrum of two shifted images is a pure phase ramp, whose inverse transform is a sharp peak at the shift. The same transform removes repeating patterns: memory arrays are periodic, their spectrum is a few strong peaks, and notching those peaks suppresses the array so defects stand out.

After alignment, image-denoising (no page yet) lowers the noise in the difference image. Sensor noise, line-edge roughness and grain create false differences; averaging several reference dice into one golden reference lowers the reference's noise, and filtering the difference (a bilateral or non-local-means filter) keeps edges and kills speckle. A per-pixel threshold based on the local noise estimate, and not a global threshold, decides what is a candidate defect; the threshold is the sensitivity knob, and the sensitivity versus nuisance-rate trade-off is the central tuning problem.

geometric-pattern-matching (no page yet) serves alignment of the wafer itself and of each care area: it finds a known contour (an alignment mark, a die corner) under rotation and small scale change using gradient-direction matching, so the tool knows where each die is. subpixel-edge-measurement (no page yet) supports metrology: the edge of a line in an electron-beam image is located to a small fraction of a pixel by fitting the gradient profile across it, and the distance between two edges is the critical dimension. A drifting critical dimension is often the first sign that a process is leaving its window.

Review and classification

Detection finds thousands of candidates per wafer; many are nuisance (noise, harmless variation). A review step re-images the sites at higher magnification, and a classifier labels each: particle, scratch, residue, pattern bridge, missing pattern, nuisance. image-segmentation (no page yet) outlines the defect region so size, shape and position relative to the design features (on a line, between lines, over a via) are measurable; Convolutional networks do both the segmentation and the classification. A classifier is only as good as its labels, and labels are expensive because they need an engineer's judgement.

active-learning (no page yet) spends that effort well: the model picks the images it is least sure of or that are unlike anything labelled, the engineer labels those, and the model retrains. Uncertainty must be Calibration-checked, or the pick list is dominated by overconfident mistakes. New defect types appear whenever the process changes, and a classifier that cannot say "unknown" will fit a new type into the nearest old class; an explicit unknown class sent to a human is the safer default.

Inference runs next to the tool, often on an embedded GPU or a shared server. Weight quantization keeps the network small and fast (8-bit weights, per-group scales), which matters because the review budget is seconds per wafer, not per defect.

Wafer-map signatures

Each defect and each failing die has coordinates on the wafer. Their pattern tells the cause. The system groups points with Density-based clustering (DBSCAN): points packed densely form clusters, isolated points are labelled noise, and the number of clusters need not be known in advance. This fits scratches (long thin clusters) and particle clouds. A k-d tree makes the neighbour queries behind it fast: DBSCAN asks "which points lie within ε of this one" for every point, which a k-dimensional tree answers in logarithmic time. k-means clustering fits compact shapes: it separates a centre-concentrated failure from an edge ring when the number of groups is chosen from the data, and it is a quick way to group wafers by their binned failure map before labelling.

Labelled signature classes are public for research: the WM-811K data set of wafer maps with failure-pattern labels (Wu, Jang and Chen 2015) uses classes such as centre, donut, edge-ring, edge-local, local, random and scratch. In production the same ideas are applied to the maps of the fab's own products, and the signature names map to process areas.

Inline monitoring

Metrology and inspection produce thousands of numbers per lot: critical dimensions, film thickness, defect counts. They are stored as Time-series chunk storage: immutable compressed chunks per series, with timestamps delta-of-delta coded and values XOR-coded, so years of history are cheap and a range read touches only the chunks it needs.

Control charts (Shewhart, CUSUM, EWMA) estimates the normal behaviour from healthy data and flags points beyond control limits (for instance three standard deviations) or non-random runs. Fab data are not clean: tool maintenance, recipe changes and mixed products create steps. Robust statistics gives limits that survive outliers, using the median and the median absolute deviation instead of mean and standard deviation. change-point-detection (no page yet) (CUSUM, PELT and relatives) finds the moment a mean shifts, which separates a slow drift from a step and gives the time to look for causes in the maintenance log. Time-series anomaly detection predicts the expected value from a seasonal or trend model and flags large residuals, for series with daily cycles from fab temperature or load. When many correlated parameters matter together, Isolation forest scores a lot as an anomaly by how few random splits isolate it, with no assumption of a distribution; it catches combinations that no single control chart shows.

An alert must say which tool, chamber and lots are affected and what to do (hold, re-measure, send for review). Alert fatigue is the failure to design against: each chart has an owner and a documented action.

Yield model and analytics

The baseline model of random-defect yield is the Poisson model, Y = exp(−A · D₀), for die area A and defect density D₀. Real defects cluster, which means that the dice lost to one defect cluster are fewer than Poisson predicts, and observed yield is higher. The negative-binomial-yield-model (no page yet) Y = (1 + A · D₀ / α)^(−α) adds a clustering parameter α (Poisson is the limit as α grows large) and is the standard working model. Fitting α and D₀ from inspected defect counts and measured yield per layer turns the inspection data into a forecast of how much yield each layer costs, and which layer to fix first.

For causes that are not random particles (systematic loss from tool, chamber, recipe or lot), the system uses Gradient-boosted decision trees (GBDT) to predict die or wafer yield from process, metrology and tool-history features, and ranks features by importance to point to the tool or step where yield separates. Since fab data are observational, a ranking is a lead, not proof: a suspect chamber is confirmed by comparing wafers that were processed in parallel on the other chambers.

Data integration

A wafer carries different identifiers in different systems: lot and slot in the MES, a scribe ID read by the tool, a tool-local wafer index, and a file name. Dice are named by grid coordinates that differ in origin and orientation between inspection, test and design. Entity resolution links these: block on lot and slot, then match scribe IDs and timestamps, and union the equivalences into one canonical wafer and die key. Wrongly merged wafers poison the yield analysis, so the match rules are conservative and ambiguous cases wait for review.

data-lineage-tracking (no page yet) records which inputs and transforms produced each number: which scan, recipe version, model version and threshold gave this defect count. When a classifier or threshold changes, lineage tells which stored results are stale and need a rerun. Analytic tables are stored in a columnar-file-format (no page yet): one column per attribute, compressed with dictionary and run-length coding, so a scan over "defect class by layer by month" reads only those columns. Apache Parquet is the common open example.

Data and control flow

One inspected wafer:

  1. The MES releases the lot; SECS/GEM events say the wafer entered the inspection tool with a given recipe.
  2. The tool scans, aligns patches, subtracts the reference, applies thresholds and writes a defect list and patches.
  3. A sample of defects goes to review; the classifier labels them; low-confidence ones go to an engineer.
  4. The defect map is joined to wafer and die keys; clustering finds signatures.
  5. Counts per class and layer are appended to the time-series store; SPC rules run on arrival.
  6. If a rule fires, an alert goes to the area owner with lots and tools; a hold may be placed through the host.

Closing the loop: final electrical test produces a die pass/fail map weeks later. It is joined to the defect maps; the yield model compares predicted and actual loss per layer, and the sampling plan is adjusted (more inspection where loss was missed).

Scaling

  1. Image volume bites first: order of gigabytes of images per wafer scan. Levers: process on or beside the tool, store only defect patches, reduce at the source.
  2. Sensitivity vs. nuisance: more sensitivity means more candidates to review. Levers: better classifiers to discard nuisance early, local noise models, care areas that skip uncritical regions.
  3. Label effort scales with product mix. Levers: active learning, reuse of embeddings across products, an explicit unknown class.
  4. Time-series volume: many parameters times many wafers. Levers: chunked compressed storage, downsampled rollups for dashboards, raw data kept in cold storage.
  5. Join cost across systems: identifiers differ. Lever: resolve once, store canonical keys, and make joins on keys only.

Failure modes

FailureSymptomCauseFix
Misalignmentrows of false defects along edgesregistration error above a pixel fractionsub-pixel registration, re-align per patch
Nuisance floodreview queue overflowsthreshold too low or noise model wrongper-pixel noise threshold, classifier-based nuisance filter
Missed defectsyield loss without a flagged causesensitivity too low, care area misses the regionadjust sensitivity, add care areas, compare with test failures
Classifier forced fitnew defect type labelled as an old oneno unknown class, labels staleunknown class, active-learning refresh after process changes
Mean-based SPC limitslimits move with outliers, alarms are missednon-robust estimatesmedian and MAD based limits
Step mistaken for noiseslow alarms after maintenanceno change-point detectiondetect shifts, tie to maintenance events
Wafer mix-upyield tied to the wrong toolidentifiers merged incorrectlyconservative entity resolution, review ambiguous matches
Coordinate mismatchdefect maps do not match test mapsdifferent die origin and orientationone canonical die coordinate system with documented transforms
Stale resultsnumbers differ after a model updateresults not versionedlineage with model and recipe versions, rerun affected data
Spurious causationa tool is blamed for a loss that follows the productobservational correlationcompare parallel chambers, hold out lots

Real implementations

namewhat it isrepolicencenotes
KLA inspection and metrology systemscommercial optical and e-beam inspection with defect classificationproprietaryproprietarytool vendor
Applied Materials SEMVisioncommercial e-beam defect reviewproprietaryproprietaryreview and classification
PDF Solutions Exensiocommercial yield and manufacturing analyticsproprietaryproprietaryanalytics platform
secsgemPython SECS/GEM implementationbparzella/secsgemLGPL-2.1equipment and host sides
OpenCVimage processing, template matching, optical flowopencv/opencvApache-2.0alignment and matching
scikit-learnDBSCAN, k-means, isolation forest and morescikit-learn/scikit-learnBSD-3-Clausesignatures and anomaly detection
Apache Parquetcolumnar file format specificationapache/parquet-formatsee repoanalytic tables
WM-811Kpublic wafer-map data set with labelled patternsKaggleCC0 (as shown on the data set page)research and baselines

Sources

  • M.-J. Wu, J.-S. R. Jang, J.-L. Chen, Wafer Map Failure Pattern Recognition and Similarity Ranking for Large-Scale Data Sets, IEEE Transactions on Semiconductor Manufacturing 28(1), 2015; data set: WM-811K
  • SEMI E5 (SECS-II), E30 (GEM), E37 (HSMS), summarised at SECS/GEM
  • Background on wafer-level testing and maps: Wafer testing
  • Background on the process flow: Semiconductor device fabrication

Similar systems

Share the most building blocks with this one.