In the second step, the measured signature with its profile model identified is mapped into a sublibrary by another set of several trained SVM classifiers. The sublibrary is a subset of the whole signature library that is commonly used in the traditional library search method. As there are possible geometrical profiles for the measured signature , we establish signature libraries in advance for the profiles, respectively, and each signature library is divided into several sublibraries. Before mapping the measured signature into its corresponding sublibrary, we need to perform three substeps off-line in advance, including (1) the division of variation ranges of geometrical parameters, (2) the establishment of sublibraries, and (3) the training of SVM classifiers. In the substep 1 as shown in Fig. 2, we take three geometrical parameters, namely, critical dimension (CD), depth, and sidewall angle (SWA) into account. The variation range of each geometrical parameter represented by a long rectangular is divided into two subranges, and each subrange is represented by a short rectangle with a unique color. Then we select a subrange from the range of each geometrical parameter to form a set of subranges, thus we have eight sets of subranges total as shown in the large ellipse in Fig. 2. Here we only take the binary division as an example, but actually, the number of subranges is a user-defined variable. The substep 2 involves the establishment of each sublibrary based on its corresponding set of subranges. We generate a series of discrete values equidistantly for each subrange, and then we select three values in total from each of the subranges of CD, depth, and SWA to completely characterize the trapezoidal grating. Finally, we generate the simulated diffraction signature for the selected set of values of geometrical parameters and store it in the sublibrary. We can establish the whole sublibrary by repeatedly choosing a different set of discrete values of geometrical parameters in the set of subranges, and following this, all the sublibraries can be established. The substep 3 is to train the SVM classifiers by generating training pairs. We generate three SVM classifiers with each one corresponding to a geometrical parameter, as there are three geometrical parameters to be extracted. Since the range of each parameter is divided into several subranges, its corresponding classifier has several classes with each one corresponding to a different subrange. The optical signatures are generated by randomly varying the values of geometrical parameters in the ranges of geometrical parameters for each class. We combine the optical signatures and their corresponding class to form the training pairs and to train each SVM classifier. Once all the SVM classifiers are generated and trained off-line, we will use them to quickly map the measured signature of a trapezoidal grating to its corresponding sublibrary.