Through the technique, SamplingPrediction of Lithography Overlay Errors, the costtime of overlay error measurement can be reduced to improve the process efficiency. We identify key sampling through clusteringmachine learning models,design a new sampling algorithm in photolithography process. Due to the complexity of wafermany training factors of wafer data, we combine the clustering algorithm with incremental learning to meet customers' unique needsachieve the goal of optimally samplingreducing the costs.