Constrained Dynamic Time Warping and Polyline Distance for Anomaly Detection in Semiconductor Manufacturing
Abstract
1. Introduction
- Scarcity of Anomalous Data: Anomalous events are rare in wafer production, leading to insufficient labeled data and constraining the training of supervised learning models.
- High Variability in Time-Series Data: Time-series data generated by different sensors exhibit significant differences in length and patterns, and the definitions of anomalous events also vary considerably. Even experts struggle to define the boundaries of anomalous events, necessitating dynamic adjustments to the definitions of anomalies within FDC systems.
- We propose a two-stage constrained DTW alignment strategy for wafer-level sensor traces.
- We introduce a bidirectional polyline distance for post-alignment anomaly measurement.
- We evaluate the proposed framework on real semiconductor production line data.
2. Related Work
2.1. Statistical FDC
2.2. Learning-Based FDC
2.3. Positioning of This Work
3. Problem Space
- is a timestamp indicating when the j-th sample was recorded. The sequence is non-uniformly sampled, meaning is not constant.
- is a process step identifier, where represents the finite set of all manufacturing steps in the process recipe.
- is a sensor reading vector from n distinct sensors, such that , where denotes the measured value from the i-th sensor at observation j.
- Temporal Irregularity and Sparsity. As per the formal definition, the timestamps are inherently non-uniform. The number of sampling points and their intervals can vary significantly even for the same process step k across different wafers. This irregular sampling introduces a primary distortion in the raw signal, making direct point-to-point comparison of time-series in the original time domain unreliable without further alignment.
- Non-uniform Inter-Process Idling. The transitions between consecutive process steps ( to ) are characterized by variable idle periods. These intervals are not only unequal in length across wafers but also contain sensor behaviors (e.g., equipment stabilization) that are largely irrelevant to the core process physics. This phenomenon make it impossible to simply apply linear temporal alignment across complete wafer histories.
- Systematic Sensor Drift and Shift. Sensor data often exhibit inherent non-stationarity, displaying as baseline shifts or gradual drifts over time. These are influenced by external factors such as maintenance cycles, ambient environmental changes, or consumable degradation. Consequently, an anomaly detection scheme focusing solely on the absolute value of sensor readings is highly susceptible to false alarms. A robust approach must therefore prioritize the identification of anomalies based on the relative shape and dynamic trends of the signal within a process step.
4. Basics on Dynamic Time Warping
4.1. Constrained DTW
4.2. Signal Alignment and DTW Average
- Initialization: Choose one sequence (or a simple pointwise average) as the initial estimate of the average sequence .
- Alignment: Align each sequence to the current average using DTW, producing aligned sequences .
- Update: Compute a new average by taking the pointwise mean of the aligned sequences:
- Iteration: Repeat the alignment and update steps until convergence.
5. Anomaly Detection Framework
5.1. Preprocessing
5.2. Two-Stage DTW Alignment
- Distance Matrix Calculation: Compute the constrained DTW distance matrix between the input sequence and the reference template. This matrix encapsulates the pairwise Euclidean distances between every point in the two sequences subject to the allowed warping window.
- Optimal Warping Path Identification: Find the optimal alignment path through the distance matrix that minimizes the cumulative distance. This path defines the non-linear mapping between the indices of the input sequence and those of the template.
- Temporal Re-mapping: Based on the identified optimal warping path, re-map the timestamps of the input sequence to align its salient features with corresponding points in the template.
- Interpolation and Length Normalization: Finally, apply interpolation techniques to the warped sequence to generate a uniformly sampled sequence of a standardized length, facilitating direct point-wise comparison with other aligned sequences.
5.3. Anomaly Detection
| Algorithm 1 Adaptive Anomaly Detection |
| Require: D: Bidirectional distance values for all wafers : Sensitivity parameter (default: 2.0) : Continuous anomaly multiplier (default: 2.0) : Minimum threshold (default: 0.01) |
| Ensure: Anomaly flags for each temporal point |
|
6. Case Study and Evaluation
6.1. Parameter Selection
6.2. Case Study I: Alignment Case
6.3. Case Study II: Anomaly Detection Case
6.4. Performance Evaluation
- Naive Alignment: employs standard DTW without temporal constraints for alignment, followed by the same polyline distance metric.
- Naive Distance: uses the constrained DTW alignment as in the proposed method, but computes anomaly scores by directly comparing sensor values at the same aligned time step. Specifically, after DTW alignment, the distance is calculated as the pointwise difference between corresponding sensor values.
6.5. Computational Overhead
7. Conclusions
Limitations and Future Work
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
Abbreviations
| DTW | Dynamic Time Warping |
| FDC | Fault Detection and Classification |
| DBA | Dynamic Time Warping Barycenter Averaging |
| FPR | False Positive Rate |
| FNR | False Negative Rate |
References
- Chen, H.-Y.; Chen, C. Reviews of the Static, Adoptive, and Dynamic Sampling in Wafer Manufacturing. Appl. Syst. Innov. 2025, 9, 1. [Google Scholar] [CrossRef] [Scilit]
- Yeo, W.; Chang, Y.C.; Chen, L.C.; Chang, K.H. A Novel Out-of-Control Action Plan (OCAP) for Optimizing Efficiency and Quality in the Wafer Probing Process for Semiconductor Manufacturing. Sensors 2024, 24, 5116. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Gang, D.; He, Y.; Shao, X. Anomaly Detection and Analysis of FDC Data. In Proceedings of the 2021 5th IEEE Electron Devices Technology & Manufacturing Conference (EDTM); IEEE: New York, NY, USA, 2021; pp. 1–3. [Google Scholar] [CrossRef] [Scilit]
- Owens, R.; Sun, F.K.; Venditti, C.; Blake, D.; Dillon, J.; Boning, D. Dynamic Time Warping Constraints for Semiconductor Processing. In Proceedings of the 2024 35th Annual SEMI Advanced Semiconductor Manufacturing Conference (ASMC); IEEE: New York, NY, USA; pp. 1–6. [CrossRef] [Scilit]
- Chien, C.F.; Wang, W.C.; Cheng, J.C. Data mining for yield enhancement in semiconductor manufacturing and an empirical study. Expert Syst. Appl. 2007, 33, 192–198. [Google Scholar] [CrossRef] [Scilit]
- Khakifirooz, M.; Chien, C.F.; Chen, Y.J. Bayesian inference for mining semiconductor manufacturing big data for yield enhancement and smart production to empower industry 4.0. Appl. Soft Comput. 2018, 68, 990–999. [Google Scholar] [CrossRef] [Scilit]
- Lee, K.B.; Cheon, S.; Kim, C.O. A Convolutional Neural Network for Fault Classification and Diagnosis in Semiconductor Manufacturing Processes. IEEE Trans. Semicond. Manuf. 2017, 30, 135–142. [Google Scholar] [CrossRef] [Scilit]
- Kim, E.; Cho, S.; Lee, B.; Cho, M. Fault Detection and Diagnosis Using Self-Attentive Convolutional Neural Networks for Variable-Length Sensor Data in Semiconductor Manufacturing. IEEE Trans. Semicond. Manuf. 2019, 32, 302–309. [Google Scholar] [CrossRef] [Scilit]
- Lee, S.; Choi, J.; Kim, M.S. Generative pre-training of time-series data for unsupervised fault detection in semiconductor manufacturing. arXiv 2023, arXiv:2309.11427. [Google Scholar]
- Chen, C.Y.; Chang, S.C.; Liao, D.Y. Equipment anomaly detection for semiconductor manufacturing by exploiting unsupervised learning from sensory data. Sensors 2020, 20, 5650. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Hsu, C.Y.; Liu, W.C. Multiple time-series convolutional neural network for fault detection and diagnosis and empirical study in semiconductor manufacturing. J. Intell. Manuf. 2021, 32, 823–836. [Google Scholar] [CrossRef] [Scilit]
- Hwang, R.; Park, S.; Bin, Y.; Hwang, H.J. Anomaly detection in time series data and its application to semiconductor manufacturing. IEEE Access 2023, 11, 130483–130490. [Google Scholar] [CrossRef] [Scilit]
- Kim, Y.; Lee, H.; Kim, C.O. A variational autoencoder for a semiconductor fault detection model robust to process drift due to incomplete maintenance. J. Intell. Manuf. 2023, 34, 529–540. [Google Scholar] [CrossRef] [Scilit]
- Liu, Y.; Wang, W.; Wu, Y. Titad: Time-invariant transformer for multivariate time series anomaly detection. Electronics 2025, 14, 1401. [Google Scholar] [CrossRef] [Scilit]
- Shyalika, C.; Roy, K.; Prasad, R.; Kalach, F.E.; Zi, Y.; Mittal, P.; Narayanan, V.; Harik, R.; Sheth, A. RI2AP: Robust and interpretable 2D anomaly prediction in assembly pipelines. Sensors 2024, 24, 3244. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Cools, A.; Belarbi, M.A.; Mahmoudi, S.A. Benchmarking of anomaly detection methods for industry 4.0: Evaluation, ranking, and practical recommendations. Big Data Cogn. Comput. 2025, 9, 128. [Google Scholar] [CrossRef] [Scilit]
- Petitjean, F.; Ketterlin, A.; Gançarski, P. A global averaging method for dynamic time warping, with applications to clustering. Pattern Recognit. 2011, 44, 678–693. [Google Scholar] [CrossRef] [Scilit]
- Sakoe, H.; Chiba, S. Dynamic programming algorithm optimization for spoken word recognition. IEEE Trans. Acoust. Speech Signal Process. 2003, 26, 43–49. [Google Scholar] [CrossRef] [Scilit]











| Time | Wafer_ID | StepNumber | Sensor_1 | Sensor_2 | Sensor_3 | Sensor_4 | ⋯ |
|---|---|---|---|---|---|---|---|
| 100 | WAFER_A01 | 1 | 0.001 | 0 | 0.023 | 40 | ⋯ |
| Method | FPR (%) | FNR (%) | Precision | Recall | F1-Score |
|---|---|---|---|---|---|
| Naive Alignment | 23.36 | 46.15 | 0.22 | 0.54 | 0.31 |
| Naive Distance | 38.32 | 30.77 | 0.18 | 0.69 | 0.29 |
| Ours | 6.54 | 30.77 | 0.56 | 0.69 | 0.62 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license.
Share and Cite
Li, G.; Hang, Y.; Yang, Z.; Yang, Z. Constrained Dynamic Time Warping and Polyline Distance for Anomaly Detection in Semiconductor Manufacturing. Appl. Sci. 2026, 16, 5779. https://doi.org/10.3390/app16125779
Li G, Hang Y, Yang Z, Yang Z. Constrained Dynamic Time Warping and Polyline Distance for Anomaly Detection in Semiconductor Manufacturing. Applied Sciences. 2026; 16(12):5779. https://doi.org/10.3390/app16125779
Chicago/Turabian StyleLi, Gangjiang, Yihong Hang, Zaizhou Yang, and Zhice Yang. 2026. "Constrained Dynamic Time Warping and Polyline Distance for Anomaly Detection in Semiconductor Manufacturing" Applied Sciences 16, no. 12: 5779. https://doi.org/10.3390/app16125779
APA StyleLi, G., Hang, Y., Yang, Z., & Yang, Z. (2026). Constrained Dynamic Time Warping and Polyline Distance for Anomaly Detection in Semiconductor Manufacturing. Applied Sciences, 16(12), 5779. https://doi.org/10.3390/app16125779
