As we are stepping towards sub-10 nm nodes, process window monitoring for systematic defects is becoming more and more critical. In traditional process window excursion and control (PWEC) methods often optical defect inspection is done on a focus and dose modulated wafer first. Once the different systematic defects are detected in a particular focus/energy die, we flag the repeating defect locations as potential hotspots and rank them based on how early/late they fail in a focus/energy modulated columns. So, during this first pass we get a rough idea of which locations are failing. However, due to limited resolution of optical tools, the true process window can only be gathered during a second pass with an ebeam tool. The key idea to define a true process window demands a detailed analysis of CD and other underlying features. We have proposed a new method of analyzing the process window with an unsupervised machine learning approach. Our proposed algorithm will extract the underlying key features and encode these to latent feature vectors or latent vector space instead of the conventional CD, given a dataset of thousands of CD-SEM images, and then rank the images based on a similarity index and then to automatically determine the process window. This work addresses the following problems (1) with a defect inspection tool this task seems tedious and time consuming and often require human intervention to analyze a large number of features, (2) a CD-SEM based process window analysis might not always match with a defect inspectionbased process window. Our generalized variational auto-encoder based approach does this automatically. Also, we have analyzed and validated our result against conventional approach.