Login| Sign Up| Help| Contact|

Patent Searching and Data


Title:
SYSTEMS AND METHODS INCORPORATING A NEURAL NETWORK AND A FORWARD PHYSICAL MODEL FOR SEMICONDUCTOR APPLICATIONS
Document Type and Number:
WIPO Patent Application WO/2017/210455
Kind Code:
A1
Abstract:
Methods and systems for training a neural network are provided. One system includes one or more components executed by one or more computer subsystems. The one or more components include a neural network configured for determining inverted features of input images in a training set for a specimen input to the neural network, a forward physical model configured for reconstructing the input images from the inverted features thereby generating a set of output images corresponding to the input images in the training set, and a residue layer configured for determining differences between the input images in the training set and their corresponding output images in the set. The one or more computer subsystems are configured for altering one or more parameters of the neural network based on the determined differences thereby training the neural network.

Inventors:
ZHANG JING (US)
BHASKAR KRIS (US)
Application Number:
PCT/US2017/035494
Publication Date:
December 07, 2017
Filing Date:
June 01, 2017
Export Citation:
Click for automatic bibliography generation   Help
Assignee:
KLA TENCOR CORP (US)
International Classes:
G06N3/063; G06N3/04; G06N3/08; G06V10/764
Domestic Patent References:
WO2009129496A22009-10-22
Foreign References:
US20050089215A12005-04-28
US20140032463A12014-01-30
US20030086081A12003-05-08
US20090238432A12009-09-24
Other References:
See also references of EP 3465552A4
Attorney, Agent or Firm:
MCANDREWS, Kevin et al. (US)
Download PDF:
Claims:
WHAT IS CLAIMED IS:

1. A system configured to train a neural network, comprising: one or more -computer subsystems ; a d one or more components executed by the one or more computer subsystems, wherein die one or more components comprise: a neural network configured for determming inverted features of input images in a training set for a specimen input to the neural network; a forward physical model configured for reconstructing the input images from the inverted feature's thereby generating a set of output images corresponding to th input images in the training set; and a residue layer configured for detemmiing differences between' the input images in the training- set and their corresponding output images in the set; wherein the one or more computer subsystems are configured, for altering one or more parameters of the neural network based on the determ ined differences thereby training the neural network. 2, The system of claim 1, wherein the neural network is configured as a

convolutional neural network,

3. The system of claim 1 , wherein the neural network is configured, as a fully convolutional model. 4, The system of claim 1 , wherein the neural network is configured as a deep generative model.

5. The system of claim 1 , wherein the neural network is configured as a generative

5 adversarial net.

6, The system of claim ί„ wherein the neural network is configured as a conditional generative adversaria! net. i o 7, The system of claim 1 , wherein the neural network is configured as a generative adversarial network and variational auioencoder,

8. The system of claim I , wherein a pari of the neural network is configured as a convoiutiona! neural network,

15

9. The system of claim 1, wherein the forward physical model is configured as a dsffereritiable forward physical model.

10. The. system of claim I, wherein the forward physical model is implemented or 0 approximated as an additional neural network,

1 1. The. system of claim I , wherein the forward physical model comprises model •parameters corresponding to imaging parameters used for generating the input images for the specimen.

5

12. The system, of claim 1, w herein the forward physical model comprises model parameters corresponding to physical pardiiieier involved in generating the input images for the specimen.

1.3. The system of claim 1 , wherein the forward physical model comprises at least one adjustable model parameter.

14, The system of claim 1 , wherein the forward physical model comprises at least one 5 fixed model parameter,

15. The system of claim I„ wherein the one or more computer subsystems are further configured to input a raiitime image for the specimen or another specimen Into the trained neural network such that the trained neural network determines the inverted features for i 0 the runtime image, and wherein the in verted features are features of an optically corrected version of t he runtime image,

16. The system of claim 1 , wherein the one or more computer subsystems are further configured to input a rantime image for the specimen or another specimen into the trained

15 neural network such that the trained neural network determines the inverted features for the runtime image, and wherein the inverted features are features of a amplitude and phase version of the runtime image.

17. The. system of claim L wherein the one or more computer subsystems are furthe 0 configured to input a runtime image fo the specimen or another specimen into the trained neural network such that: the trained neural network determines the inverted features for the runtime image; 5 the forward physical mode! reconstructs the runtime image from the inverted features determined for the runtime image; and the residue layer determines differences between the runtime image and the

reconstructed rantime image, wherein the inverted features are features of 0 an optically corrected version of the runtime image, and wherein the differences between the runtime image and the constructed runtime image are features of a residue image.

18. The system of claim 1 , wherein the input images are generated by an electron 5 beam based imaging system.

1 . The system of claim ί„ wherein the input images are generated by an optical based imaging system. i 0 20. The system of claim 1 , wherein the input images art1 generated by an inspection system.

21. The system of claim I , wherein the inpu images are generated by a metrology system.

.15

22. The system of claim 1 , wherein the specimen is a wafer.

23. The system of claim I , wherein the specimen is a reticle. 0 24. Th e system of claim I , wherein the one or more com puter subsystems are further configured to input a runtime image for the specimen or another specimen into the trained neural network such that the trained neural network determines the inverted features for the .runtime, image, wherein the inverted features are features of an optical ly corrected version of the runtime image, and w herein the one or more computer subsystems are 5 further configured for delecting a defect on the specimen or the other specimen based on the optical ly corrected version of the runtime image.

25. The system of claim 1 , wherein the one or more computer subsystems are further configured to input a runtime image for the specimen or another specimen into the trained 0 neural network such thai the trained neural network determines the inverted features for the runtime image, wherein the inverted features are features of an optically corrected version of the nmtime image, wherein the one or more computer subsystems are further configured for classifying a defect detected in the runtime image or the optically corrected version of the runtime image, and wherein said classifying is performed based on the 5 optically corrected version of the runtime image,

26. The system of claim ί , wherein the one or more computer subsystems are further configured to input a runtime image for the specimen or another specimen Into the trained neural network such thai the trained neural network determines the inverted features for i d the runtime image, wherein the inverted features are features of an opticall y corrected version of t he runtime image, and 'Wherein the one or more computer subsystems -are further' configured tbr measuring one or more features of the specimen or the other specimen or a defect defected on the specimen or the other specimen based on the optically corrected version of the runtime image,

.15

27. The system. Of claim 1 , wherein the one or more computer subsystems are further configured to input a stack of .runtime images for the specimen or. another specimen int the trained neural network such that the trained neural, network determines the inverted features for the stack of runtime images, wherein the inverted, features are phase

0 information for the stack of runtime images, and wherein the one or more computer

subsystems are further configured, for increasing selectivity for defects on the: specimen or the other specimen based on the phase information.

28. The system of claim 1, wherei n the one or more computer subsystems are further 5 configured for detemiining one or more adjustments for one or more parameters used for generating the input images based on results of Che training.

29. A system configured to train a neural network, comprising: 0 an. imaging subsystem configured for generating images of a specimen; one or more computer subs stems configured for acquiring the images and generating a training -set of input images from the acquired, images; and one or more' -components executed by the one or more- computer subsystems, wherein the one or more, components comprise; a neural network configured for determining inverted .features of the input images in the training set for the specimen Input to the neural network; a forward physical model configured for reconstructing: the inpu images from the inverted features thereby generating a set of output images corresponding to the input images in the training set; and a residue layer configured for detennin ng differences between the inpu images in. the training set and their corresponding output images in the set; wherein the one or more computer subsystems are configured, for altering one or more parameters of the neural network based on the determined differences thereby training the neural network.

30. A non-transitory computer-readable medium, storing program instructions executable on one or more computer systems for performing a computer-implemented method for training a neural network, wherein the computer-implemented method comprises: determining inverted features of input images, in a training set for a specimen by inputting the training set of input images to a neural network; recomtructiiig the input images from the inverted features by inputting the inverted features into a forward physical model thereby generating a set of output images corresponding to the input images in the 'training set; detemiining differences betwee the input images in the training set and their corresponding output images in the set; and altering one or more parameters of the neural network based on the 'determin d difference thereby training the neural network, wherein said determin.bg the inverted features, reconstructing the input images, determining the differences, and aitering the one or more parameters are ' performed by one or more computer systems, wherein one or more components are executed by the one or more computer systems, and wherein the one or more components comprise the neural network and the forward physical model,

A eornputei-implemented method for training a neural, network, comprising: detemiining inverted features of inpu t images in a training set ibx a specimen by inputting the training set of input images to a neural network; reconstructing the input images from the inverted features by inputting the

inverted features into a forward physical model thereby generating a set of outpu images corresponding to the input images in the training set; determining difference between the input images in the training set. and their corresponding output images in the set; and altering one or more parameters of the neural network based on the determined differences thereby training the neural network, wherein said determining the inverted features, reconstructing the input images-, determining the differences, and altering: the one or more -parameters are performed b one or more computer -systems, wherein one or more components are executed by the one or more computer systems, and wherei the one or more components eomprise the neural network and the forward physi cal -model.

Description:
SYSTEMS A D METHODS INCORPORATING A NEURAL NETWORK AND A FORWARD PHYSICAL MODEL FOR SEMICONDUCTOR APPLICATIONS

BACKGROUND OF THE INVENTION

1 , Field of the jn yen lion

The present invention generally relates to methods and systems incorporating a neural network and a forward physical model for se icon uctor applications.

2, Description of the Related Art

The following description and examples are not admitted to be prior art by virtue of their inclusio in this section.

Fabricating semiconductor devices such as logic and memory devices, typically includes processing a substrate such as a semiconductor wafer using large number of semiconductor fabrication processes to form various features and multiple levels of the semiconducto devices. For example, lithography is a: semiconductor fabrication process that involves transferring a pattern from a .reticle to a resist arranged on a semiconductor wafer. Additional examples of semiconductor abrication processes include, but are not limited to, chemical-mechanical polishing (CMP), etch, deposition, and ion implantation. Multiple semiconductor devices may be fabricated in an arrangement on a single semiconductor wafer and then separated into individual semiconductor devices, inspection processes are used at various steps during, a semiconductor

manufacturing process to detect defects on specimens to drive higher yield in the manufacturmg process and thus higher profits, inspection has always been an important part of .fabricating semiconductor devices. However, .as the dimensions of semiconductor devices decrease, inspection becomes even more important to the sacees&tul manufacture of acceptable semiconductor devices because smal ler detects- can cause the devices to fail. Defect review typically in volves m-t!eieeiirig defects detected, as such by an inspection process and generating additional information about the defects at a higher resolution using either a high magnification optical system or a scanning electron

5 microscope (SEM), Defect review is therefore performed at discrete locations on

specimens where defects have been detected by inspection. The higher resolution data for the delects generated by defect review is more suitable for determining attributes of the defects such as profile, roughness, more accurate size information, etc, i o Metrology processes are also used at various steps during a semiconductor

manuiaeturing process to monitor and. control the process. Metrology processes are different than inspection processes in- that * unlike inspection processes in which delects are detected on specimens,, metrology processes are used to measure one or more characteristics of the specimens that cannot be determined usin currently osed inspection

15 tools. For example, metrology processes are used to measure one or more characteristics of specimens such as a dimension (e.g., line width, thickness, etc.) of features formed on the specimens during a. process such that the performance of the process can be determined from the one or more characteristics. In. addition * if th oue or more characteristics of the specimens are unacceptable (e.g., out of a predetermined range for 0 the characteri stic's)); the measurements of the one or more characteristics of the

specimens may be used to- alter- one or more parameters of the process such that- additional specimens manufactured by the process have acceptable eharacteristic(s).

Metrology processes are also different than defect review processes in that, unlike 5 defect review processes in which defects thai are detected, by inspection are re-visited in defect review, metrology processes may be performed at locations at which no defect has been detected- In other words, unlike defect review, the locations at which a metrology process is performed on specimens may be independent of the results of an inspection process performed on the specimens. In particular, the location at. which a metrology 0 process is performed may be selected independently of inspection results. As design roles shrink, the design that is formed on a specimen such as reticles and wafers, even when formed using an optimally perfomung process, can look much different from the actual design. For example, due to the inherent limitations of the physical processes involved in forming a design on a physical specimen,, features in the design formed on th physics! specimen typically have somewhat different characteristics than the design such. as different shapes (e.g., due to corner rounding and other proximity effects) and can have somewhat different dimensions (e.g., due to. proximity effects) even when the ' best possible version of the design has been formed on the specimen .

Sometimes, it is not ' possible to know how the design will appear on the- specimen and. in images of the '' specimen, on which the design information has been formed,, generated by tools such as inspection tools, defect review tools, metrology tools and the like. However, it is often desirable to- know how the design will appear on the specimen and in images generated by such tools for a number of reasons. One reason is to make sure that the design will be formed on the specimen in an acceptable manner. Another reason is to provide a reference for the design, which illustrates how the design, is meant to he formed on. the specimen, that can fee used for one or more fenetions performed for the specimen. For example, hi general, a reference is needed for delect detection so thai any differences between the design formed- on the specimen and the reference can be detected and identified as detects or potential defects.

Much work has dierefbre been done to develop various methods and systems that can simulate one image for a specimen from anothe image for the specimen,

Conventional approaches In general involve two steps: (1) restoring or inversing the undesired optical effects (e.g., diffraction, interference, partial coherence, etc.); and (2) using the restored/processed imaging data as the input to train an application-specific neural network. Restoring or inversing the undesired optical effects can be performed through (a) either conventional image processing or signal processing algorithms (e.g., Lucy-Richardson deconvolution and regularized Loey-Riehardson deconvolution, Wiener filter, tool calibratio , etc.); (b) fhst-prineiple optics sitmVlatiois; or (c) supervised machine learning or deep learning algorithms, given, that a training dataset can be obtained from tool measurements and/or through .simulation.

There are, however, a number of disadvantages to the currently used methods. For example, currently used restormg/inversing algorithms (e.g., Lucy- iehardson deconvolution, Wiener filter) are often under-determinate and noise sensitive. hi addition, the currently used restoring/inverting algorithms described above are computationally intensive (i.e., they are not suitable for real -time on-tool applications). The currently used restoring inversing algorithms described above can also only be applied to algorithmic-ally .avertible optical parameters (e.g., it is still substantially difficult to perform phase retrieval on semiconductor ' optical images). Furthermore, the currently used restoring inversing algorithms described above require the exact (at least good) estimated optical parameters as inputs. Moreover, currently used supervised training algorithms for restoring described above require a training dataset of tuples of original collected images and their corresponding restored images, which is often impossible or substantially expensive to be measured or simulated. In addition, the two- step approach is inefficient from the mathematically optimization perspective.

Accordingly, it would, be advantageous to develop systems and methods for training a neural network that do not have one or more of the disadvantages described above.

SUMMARY OF THE INVENTION

The following description of various embodiments is not to be construed in an way as limiting the subject matter of the appended claims.

On embodiment, relates to a system configured to tram a neural network. The system mcludes one or more computer subsystems and one or more components executed fey the one or more computer subsystems-. The one: or more -components include a neural network, configured for determining inverted features of mpul images in a training set for a specimen input to the neural network. The one or more components also include a forward phys cal model configured, for reconstructing the input images from the inverted 5 features thereby generating a set of output images corresponding to the input images in the training set in addition, the one or more components include a. residue layer configured for determining differences between the input images in the training set and their corresponding output images in the set The one or more computer subsystems ar configured for altering one or more parameters of the neural network based on the i d determined di fferences thereby training the neural network. The system may be further configured as described herein.

An additional embodiment relates to another system configured to train a neural network. This system is configured as described above. This system also includes an 15 imaging subsystem configured for generating image of a specimen. The computer

subsystem(s) are, in this embodiment, configured for acquiring ' the images ' and generating a training set of input images from the acquired images. This embodiment of the system may b further configured as described herein. 0 Another embodiment relates to a computer-implemented method for training a neural network. The method includes determining inverted, features of input images i a. training set for a specimen by inputting the training set of input image to a .neural network. The method als includes reconstructing the input images from the inverted features by inputting the inverted features into a forward physical model thereby

5 generating a set of output images corresponding, to the input images in the training set. In addition, the method includes determining differences between the input images in the training set and their corresponding output images in the set The method further includes alt ering one or m ore parameters of the neural network based on the determined differences thereby training the neural network, Detemiining the inverted features, 0 reconstructing the input images, determining the differences,. and altering the one or more parameters are performed by one or .more computer systems. One or more components are executed by the one or more computer systems, and the one or more components ' include the neural network and the forward physical model. Each of the steps of the method described above may be farther performed as described further herein. In addition, the embodiment of the method described above ma include-any: other step(s) of any other method(s) described herein. Furthermore, the method described above may be performed by any of the systems described herein. Another embodiment re! ates to a non-transitory computer-readable medium storing program instructions executable on one or more computer systems for performing a computer-implemented method for training a neural network. The compater- implemented method includes the steps of the method described a ove. The eompuier- readable medium may be further configured as described herein. The steps of the computer-implemented method may be performed as described iurther herein. In addition, the computer-implemented method for which the program instructions are executable may include any other step(s) of any other nietbod(s) described herein.

BRIEF DESCRIPTIO OF THE DRAWINGS

Further ' advantages of the present invention will become apparent to those skilled in the art with the benefit of the following detailed description of the preferred embodiments and upon reference to the accompanying drawings in which: Figs. 1 and la are schematic diagrams illustrating side views of embodiments of a system configured as described herein;

Fig. 2 is a flow chart illustrating one embodiment of training a neural network; Figs. 3-4 are flow charts illustrating embodiments of deploying a ' trained neural network and

Fig. 5 is a block diagram illustrating one embodiment of a non-transitory

5 computer-readable medium storing program instructions for causing one or more

computer systems to perform a eomputer rap!e∞enied method described herein.

While the invention is susceptible to various modifications and alternative forms, specific embodiments thereof are shown by way of example in the drawings and are i d herein described in detai l. The drawings may not be. to scale. It should be understood, however, that the drawings and. detailed description thereto are not intended to limit the Invention t the particular form disclosed, but on. the contrary, the intention is to cover all modifications, equi valents and alternatives falling within the spirit and scope of the present invention as defined by the appended claims.

15

DETAILED DESCRIPTION OF THE PREFERRED ' EMBODIMENTS

The terms "design," "design da a," and "design irtfonrjation'' as used interchangeably herein generally refer to the .physical design (layout) of an IC and data 0 derived from the physical design through comple simulation or simple geometric and Boolean operations. In addition, an image of a reticle acquired ' by a reticle inspection system and or derivatives thereof can be used as a '"proxy" or "proxies' ' for the design. Such a reticle image or a derivative thereof ears serve as a substitute for the design layout in any embodiments described herein, that use a design. The design may include any other 5 design data or design data proxies ' described m common ly owned U.S. Patent os.

7,570,796 issued on August 4, 2009 to Zafar et al. and 7,676,077 issued on March 9, 2010 t Ku&arni et a.L, both of which are incorporated by reference, as if felly set forth herein, in addition, the design data can be standard cell library data, integrated layout data, design data for one or more layers, derivatives of the design data, and full or partial 0 chip design data. in addition, the . "design," "design data," and "design information' * described herei refers to information and data thai is generated by semiconductor device designers in a design process and is iherefore available for use in the embodimenis described herein well in advance of printing of the design on any physical specimens such as reticles and wafers.

Turning now to the drawings, it is noted that the figures are not drawn to scale. hi particular, the scale of some of the elements, of the figures is greatly exaggerated to emphasize characteristics of the elements. It is also noted that the figures are not drawn to the same scale. Elements shown in more than one figure that may be similarly configured have been indicated using the same reference numerals, Unless otherwise noted herein, any of the elements described, and shown may include any .suitable commercially available elements,

One embodiment relates to a system configured to train a neural network. As described farther herein, the embodiments may include an inversion neural network (INN) to solve the inverse problem for semiconductor "applications, such as inspection, defect review, metrology, and. others described herein. In. addition, as described farther herein, the embodiments may provide a generic and systematic approach to incorporate a differentiahle forward physical model, into a trainable neural network to solve the conventional difikidt inverse problem for semiconductor inspection, metrology, review, and quality assurance (OA) applications on optical, electron beam, and ion beam tools. One embodiment of a system configured to train a neural network is shown in Fig.

1. The system includes one or more computer subsystems (e.g., computer- subsystem 36 and computer subsystera(s) 102} and one or more components 100 executed by the one or more computer subsystems, in some embodiments, the system includes imaging system (or subsystem) 10. in the embodiment of Fig, 1, the imaging system is configured for scanning light over or directing light to a physical version of the specimen while detecting light from the specimen to thereby generate the images few * th s ecime . The imaging system may also be configured to perform the scanning f or directing) and the detecting with multiple modes.

5 In one embodiment, the specimen is- a wafer. The wafer may include any wafer known in the art. In another embodiment, the specimen is a reticle. The reticle may include any reticle known in the art.

In one embodiment, the imaging system is an optical based imaging system. In i d ibis manner, in some embodiments, the input images are generated by an optical, based imagin system . In one such example, in the embodiment of the system shown in Fig. 1 , optical based imaging system 10 includes an. illumination subsystem configured to direct light to specimen 14, The illumination subsystem includes at least one light source. For example, as shown in Fig. 1 , the illuminadoti subsystem includes light source 16. in one 15 embodiment, the .illumination, subsystem is configured to direct the light to the specimen at one or more angles of incidence, whic may include one or more oblique angles and/or one or more normal angles. For example, as shown in. Fig. I , light from light source 16 is directed through optical element 18 ' and then, lens 20 to specimen 14 at an oblique angle of incidence . The oblique ang le of incidence may inc lude any suitable oblique angle of 0 incidence, which may var depending on, for instance, characteristics of the specimen.

The. imaging system may be configured to direct the Sight to the specimen at different angles of incidence at different times. For example, the imaging system may be configured to alter one or more characteristics of one or more elements of the

5 illumination subsystem such that the light can be directed to the specimen at an angle of incidence that is different than that shown in Fig. 1. in one such example, the imaging system may be configured to m ve light source 16, optical element 18., and leas 20. such that the light is directed to the specimen at a different oblique angle of incidence or a normal (or near normal) angle of incidence.

0 in some instances, the imaging system may be configured to direct light to the specimen at more tha one angle of incidence at the same time. For example, the illumination subsystem may include more than one illuminatio channel , one of the illumination channels may include light source 16, optical element 18, and lens 20 as 5 shown in Fig. 1 and another of the illumination channel s (not shown) ma include similar elements, which may he configured differently or the Same, or may include at least a light source and possibly one or .more other components such as those described further herein, if such light is directed to the specimen at the same time as the other light, one or more characteristics (e.g., wa vel ength, pol arization, etc .) of the light directed to the specimen at i d different angles of incidence ma he different such that Sight resulting from illumination of the specimen at the different angles of incidence can be discriminated from each other at the defeetorts).

In another instance, the illumination subsystem may include only one light source 15 (e.g., source 16 shown i Fig. 1} and light from the light source may be separated into different optical paths (e.g., based on wavelength, polarization, etc) by one or more optical elements (not shown) of the illumination subsystem. Light in eac of the different optical paths may then be directed to the specimen. Multi le illumination channels may be configured to direct light to the specimen at the same time or at. different times (e.g., 0 when different illumination channels are used to sequentially illuminate the specimen). i another instance, the same ' illumination channel may be configured to direct light to the specimen wh¾ different characteristics at different times. For example, in some instances, optical element 18 may be configured as a spectral filter and tbe properties of the spectral fil ter can be changed in a vari ety of di fferent ways (e.g., by swapping out the 5 spectral filter) such that different wavelengths of light can be directed to the specimen at different times. The illumination subsystem may have any other suitable configuration known in the art for directing the light having different or the same characteristics to the specimen at different or the same angles of incidence sequentially or simultaneously. in one -embodiment, light source 16 may include a broadband -plasma (HBP) light source. In this manner, the light generated by the light source and directed: to the specimen may include broadband light, However, the light source may include any other suitable light source such as a laser. The laser may include an suitable laser known in the art and ma be configured to generate light at any suitable wavelength or wavelengths known in the ait. In addition, the laser may be configured to generate light that, is monochromatic or nearly-monochromatic. In this manner, the laser ma be a narrowband laser. The light source may also include a polychromatic light source that generates light at multiple discrete wavelengths or wavebands.

Light from optical element 18 may be focused, onto specimen 14 by lens 20.

Although len 20 is shown in Fig. I as a single refractive optical element, it is to be understood that, in practice, lens 20 may include a number of refractive and/or reflective optical elements that in combination focus the light from the optical element to the specimen. The illumination subsystem, shown in Fig. 1 and described herein may include any other suitable ' optical elements (not shown). Examples of such optical elements include, " but are not limited to, polarizing components), spectral filterfs). spatial filters), reflective optical elements), apotHster(s),. beam splitterCs), aperture(s), and the like, which may include any such suitable optical elemenis known in the art,, in addition, the imaging system may be configured to alter one or more of the elements of the illumination subsystem based on the type of illumination to be used for imaging.

The imaging system may also include a scanning subsystem configured to cause the light to be scanned over the specimen.. For example, the imaging system may include stage 22 on which specimen 14 is disposed during inspection. The scanning subsystem may include any suitable mechanical and/or robotic assembly (that includes stage 22) that can be configured to move the specimen such, that - he -light ca ' be- scanned over the specimen. In addition, or alternatively, the imaging system may be configured such that one or more optical elements of the imagi ng system perform some scanning of the light over the specimen. The light may be ' scanned over th specimen in any suitable fashion such as in a serpentine-like path or in a spiral path.

The imaging system further includes one or more detection channels. At least one 5 of the one or more detection channels includes a detector configured to detect light from the specimen due to illumination of the specimen by the system and to generat output responsive to the detected light For example, the imaging system shown in Fig. 1 includes two detection channels, one formed by collector 24, element 26, and detector 28 and another formed by collector 30, element 32, and detector 34. As shown in Fig, t, the i d two detection channels are configured to collect and detect light at different angles of collection, in some instances, both detection channels are configured to detect scattered light and the detection channels are configured to detect light that is scattered ' at different angles from the specimen. However, one or mote of the detection channels may be configured to detect another type of light from the specimen (e.g.,. reflected light).

.15

As further shown in Fig. I. both detection channels are shown positioned in the plane of the paper and the llumination subsystem is also shown positioned in the plane of the paper. Therefore, in this embodiment both detection channels are positioned in (e.g., centered in) the plane of incidence. However, one or more of the detection channels may 0 be positioned out of the plane of incidence. For example, the detection channel formed by collector 30, element 32, and detector 34 may be configured to collect and detect tight that is scattered out of the plane of incidence. Therefore, such a detection channel may he commonl .referred to as a "side" channel, and such a side, channel may be centered in a plane that is substantially perpendicular to the plane of incidence.

5

Although Fig. 1 sho ws an embodiment of the i maging system that includes two detection channels, the imaging system may ' include, a. different number of detection channels (e.g., only one detection channel or two or more detection channels). In one such instance, the detection channel formed by collector 30, element 32, and detector 34 0 may form one side channel as described above, and the imaging system may include an additional detection channel (not shown}-. formed as another side channel that is positioned on the opposite side of the plane of incidence. Therefore, the imaging system may include the detection channel thai includes . collector 24, element 26, and detector 28 and that is centered in the plane of incidence and configured to collect and detect light at 5 scattering angle(s) that are at or close to normal to the specimen surface. This detection channel .may therefore be- commonly referred to as a- "top'' channel, and the imaging system may als include two or more- side channels, configured as described above. As such,, the imaging system may include at least three channels (i.e., one top channel and two side channels}, and each of the at least three channels has its own collector, each of i d which is con-figured to col lect li ght at different scattering angles than each of the other collectors.

As described further above, each of the detection channels included in the imaging system may be configured to detect scattered light Therefore, the imaging system shown.

15 in Fig. 1 may be configured for dark field (Df ) imaging of specimens. However, the imaging system may also or alternatively include detection ehannei(s) that are configured for bright field (BF) imagin of specimens. in other words, the imaging system may include at least one detection channel that is configured to detect light specularly reflected from the specimen. Therefore, the imaging systems described herein may be configured 0 for only DF, only BP. o both DF and BF imaging. Although each of the collectors are shown hi Fig, 1 as single refractive optica! elements, it is to be understood that each of the collectors may include one or more refractive optical elements) and/or one or more reflective optical elenient{s). 5 The one or more detection channels may include any suitable detectors known in the art For example, the detectors may include photo-multiplier tubes (FMTs). charge coupled devices (CCDs) time delay integration (TDI) cameras, and an other suitable detectors known in the art The detectors may also include non-imaging detectors or imaging detectors. In this manner, if the detectors are non-imaging detectors, each of the 0 detectors may be configured to detect certain characteristics of the scattered light such as intensity but .may not be configure -to detect such characteristics as a function of position within the imaging plane. As such, th output that is generated by each of the detectors included in each of the detection channels of the imaging system may be signals or data , bill' not image signals or image data. In such instances, a computer subsystem such as computer- subsystem 36 ma be configured to generat images of the specimen from the non-imaging output of the detectors. However, in other instances, the detectors may be configured as imaging detectors that arc configured to generate image signals or image data. Therefore, the imaging system may be configured to generate the images described herein in a n umber of ways, it is noted that Fig, i is provided herein to generally illustrate a configuration of an imaging system, or subsystem that may be included, in the system embodiments described herein or that may generate images that are used by the system embodiments described herein. Obviously, the imaging system configuration described herei ma be altered to optimize the performance of the imaging system as is normal ly performed when designing a commercial imaging system, m addition, the systems described herei may be implemented using an existing system (e.g., by addin functionality described herein t an existing system) such as the 29x:x/39x.x and Puma.9xxx series of tools that are commercially available from JLA-Tencor, Milpitas, Calif. For some such systems, the embodiments described herein may be provided as optional functionality of the system (e.g., in addition to other functionality of the system). Alternatively, the imaging, system described herein may be designed 'fro scratch*' to provide a completely new imagi system.

Computer subsystem 36 of the imaging system may be coupled to the detectors of the imaging system in any suitable manner (e g., via one or more- transmission media, which may include 'Svir d" and/or "wireless" transmission media) such that the computer subsystem can receive the output generated by the detectors during scanning of the specimen. Computer subsystem 36 may be configured to perform a number of fonctions described further herein using the output of the detectors. The. computer subsystems shown in. Fig. 1 (as well as other computer subsystems described herein) may also be referred to herein as computer system(s). Each of the computer sab$vstem(s) or system(s) described herein may take various forms, including a 5 personal " . computer system, image computer, mainframe computer system, workstation, network appliance, Internet appliance, or other device. In general, the term "computer system" ma be broadl defined to encompass any device having one or more -processors, which executes instructions from a memory medium. The computer subsystem(s) or system(s) may also include any suitable processor known in the art such as a parallel i d processor. In addition, the computer subsy¾tem(s) or systemfs) may include a computer platform wi h high speed processing and software, e ther as a standalone or a networked tool, if the system includes more than one computer subsystem, men the different

15 computer subsystems may be coupled to each other such that images, data, mtbrmation, instructions, etc. can be sent between the computer subsystems as described flvrthe hereiii For example, computer subsystem 36 may be coupled ' to computer- subsystem.(s) 1.02 as shown by the dashed line in Fig, 1 by any suitable transmissio media, which may include any suitable wired and/or wireless transmission media known in the art. Two or 0 more of such computer subsystems may also be effectively coupled b a shared computer- readable storage medium (not shown).

Although the imaging system is described above as being an optical or light-based imaging system, the imaging system may be an electron beam based imaging system. In 5 thi manner, hi some embodiments, the input images are generated b an electron beam based imaging system. In one such embodiment. shown in Fig. la, the imaging system includes electron column.122 coupled, to compute subsystem 124, As. also, shown in Fig. l , the electron column includes electron beam source- 126 configured to generate electrons that are focused to specimen 128 by one or more elements 130, The electron 0 beam source may include, for example, a cathode source or emitter tip, and one or more elements 130 may include, for example, a gun Sens, -m anode, a beam limiting aperture, a gat valve, a beam current selection aperture, an objective lens, and a scanning

subsystem, all of which may include any such suitable elements known in the art.

Electrons returned from the specimen -(e.g., secondary electrons) may he focused by one or .more elements 132 to detector 134, One or .more elements 132 may include, for example, a scanning subsystem, which may be the same scanning subsystem included in elenient(s) 130.

The electron column may include any other suitable elements known in the art. In. addition, the electron column may be further configured as described, in U.S. Patent Nos. 8,664,594 issued April 4, 2014 to Jiang et af 8,692,204 issued April 8, 2014 to ojima et al„ 8,698,093 issued April 15, 2014 to Oubbens et l, and 8,716,662 issued May 6, 2014 to MacDonald et. al, which are incorporated by reference as if fully set forth herein.

Although the elec tron column is shown in Fig, l a as being con figured such that t he elections are directed to the specimen at an oblique angle of incidence and are scattered from the specimen at another oblique angle, it is to be understood thai the electron beam may he directed to and scattered from the specimen at any suitable angles, in addition, the electron beam based imaging system may be configured to use multiple modes to generate images of the specimen as described further herein (e.g., with different illumination angles, collection angles, etc.). The multiple modes of the electron beam based imaging system ma be different in any image generation parameters of the imaging system..

Coiiiputer subsystem 124 may be coupled to detector 134 as described above, ' file detector may detect electrons returned from the surface of the specimen thereby forming electron beam images of the specimen. The electron beam images may include any suitable electron beam images. Computer subsystem 124 may be configured to perform one or more functions described further herein i¾r the specimen using output generated fey detector 134. Computer subsystem 124 may be -configured to perform any additional step(s) described herein, A system that includes the imaging system shown in Pig. 1 a may be further configured as described herein.

5 It is noted that Fig. 1 a i provided herein to generally illustrate a configuration of an electron beam based imaging system that may be included in th embodiments described herein. As with the- optical based imaging -system described abo ve, the electron beam based imaging syste configuration described herein may be altered to optimize the performance of the imaging system as is normally performed when designing a i d commercial imaging system, hi addition, the systems described herein may be

implemented using an existing system (e.g., by adding functionality described herein to an existing system) such as the eSxxx and eDR-xxx series of tools that are commercially available from KLA-Teneor. For some. uch systems, the embodiments, described herein may be provided as optional functionality of the system (e.g., in addition to other

15 functionality of the system). Alternatively, the system described herein may be designed "from scratch" to provide a completely new system.

Although the imaging system is described above as being an optical; based or electron beam based; imaging system, the imaging system may be an ion beam based 0 imaging system, Such an imaging system ma be configured as shown in Fig, l except that the electron beam source may be replaced with any suitable ion beam source know in the art. In addition, the imaging system may be any other suitable ion beam based imaging system suc -as those included in commercially available focused ion beam (FIB) systems, helium ion microscopy (HIM) systems, and secondary ion mass spectroscopy 5 (SIMS) systems.

As noted above, the imaging system is configured for scanning energ (e.g>, light or electrons) over a physical version of the specimen thereby generating, actual images for the physical version of the specimen. In this manner, the imaging system may be

0 configured as an ' "actuaP system, rather than a "virtual" system. For example, a storage medium (not shown) and computer s«bsystem(s) 102 ' shown in Fig, I .may fee ' configured as a "virtual" system. In particular, the storage, medium and the computer subsystem.(s) are not part of imaging system 10 and do not. have any capability for handling the physical version of the specimen. In other words, in systems configured as virtual systems, the 5 outpu of its one. or more "detectors" may be output that was previous ly generated by one or more detectors of an actual system .and that: is. stored in the virtual system, and during the "scanning," the virtual system may replay the stored output as though the specimen is being scanned. In this manner, scanning the specimen with a virtual system may appear to be the same as -though a physical specimen is being scanned with an actual system, i d while, in reality, the "scanning" involves simply replaying output for the specimen in the same maimer as the specimen may be scanned. Systems and method configured as "virtual" inspection systems are described m commonly assigned VS. Patent Has, 8 > 126,255 issued on February 28, 2012 to Bhaskar et ah and 9,222,895 issued on

December 29, 2015 to Duffy et at, both of which are incorporated by reference as if folly is set forth herein. The. embodiments described herein may he further configured as

described in these ' atents. For example, the one or more computer subsystems described herein may be former configured as described in these patents. In addition, configuring- the one or more virtual systems as a central compute and storage (CCS) system may be performed as described in the above-referenced paten to Duffy. The persistent storage0 mechanisms described herein can hav distributed computing and storage such as the CCS architecture, but the embodiments described herein are not limited to that architecture.

As further noted above, the imaging system may be configured to generate images 5 of the specimen with multiple mode*, hi general, a "mode * ' can be defined by the values of parameters of the imaging system used for generating images of a specimen or the output used to generate images of the- specimen. Therefore, mode that are different may be different hi the values for at least one of the imaging parameters of the imaging system. For example, in one embodiment of an optical based imaging system, at least one0 of the multiple modes uses at least one wavelength of light for illumination that is different from at least one. wavelength of the light for illumination used for at least one other of the multiple modes. The modes may b different in the illumination wavelength as described further herein (e.g., by using different light sources, different spectral filters, etc,) for different modes, in another embodiment, at least one of the multiple modes uses an illumination channel of the imaging system that is different from an illuminatio channel of the imaging system used for at least one othe of the multiple modes. For example, as noted above, the imaging system may include more than one illumination channel. As such, different illumination channels may be used for different modes. in one embodiment, the input images are generated by an inspection system. For example, the optical and. electron beam imaging systems described herein may be configured as inspection systems. In this manner, the image inputs to the neural network are generated by an inspection system in some embodiments. In another embodiment, the imaging system is a defect review system. For example, the optica! and electron beam imaging systems described herein may be configured as defect review systems. In a further " embodiment, the imaging system is a metrology system. For example, the optical and electron beam imaging systems ' described herei may be configured as metrology systems. In this manner, the input images are generated, by a metrology system i some embodiments. In particular, the embodiments of the imagin systems, described herein and shown in Figs, 1 and la ma be modified in one or more parameters to provide different imaging capability depending, on the application for which they will be used. In one such example, the imaging system shown in Fig. 1 may be configured to have a higher resoluti on if it is to be used for defect review or metrology rather than for inspection, in other words, the embodiments ' of the imaging system shown in Figs. 1 and 1 a describe some . general and various configurations for an imaging system that can be tailored in a number of manners that will be obvious to one skilled in the art. to produce imaging systems having different imaging capabilities that are more or less suitable for different applications . The one or more computer subsystems may fee configured for .acquiring the image for the specimen generated by an imaging subsystem described herein. Acquiring the image may be performed using one of the imaging systems described, herein (e.g., by directing light or an electron beam to the specimen and detecting light or an electron beaiii from the specimen), in this manner, acquiring- the image may be performed using the physical .specimen itself and som e sort of imaging hardware. However, acquiring the image does not necessarily include imaging the specimen using imaging hardware. For example, another system and/or method ma generate the image and may store the generated image in one or more storage media such as a virtual inspection system as described herei or another storage media described, herein. Therefore, acquiring the image may include acquiring the image front the storage media in which it has been stored.

The eomponent(s), e.g., components) 100 shown in Fig, 1, executed by the computer suhsy$tem(s), e.g., computer subsystem 36 and/or computer subs stem(s) 102, include neural network 104, The neural network is configured for determining inverted features of input images in a training set for a spec men Input to the neural network. F or example, as shown in Fig. 2, image 200 may be input to neural network 202, which determines inverted features 204 for the image.- In this manner, a neural network is used to .approximate the inversion function t (), and the neural network generates the inverted features from the input image, in the context of semiconductor applications such as inspection, metrology, and defect review, the neural network described herein can be used to solve inverse problems in imaging formatio (e,g, ; diffraction, interference, partial coherence, blurring, etc..) to regenerate optiea ' Uy-eorreeted features. "Inverted features" (where inverted is related to the contex t of an inversion neural network) are generally -defined he ein as fea lures after inverting a physical process and " features" are defined as generally referring to measurable properties i ncluding, but not limited to, intensity, amplitude, phase, edge, gradients, etc. in general the neural network does not have to be defined by a unique topology to implement the mnclions described herein. Inst ad, the neural network ma he application specific, and its layer type and number of layers are undefined. The neural network may include two or more encoder layers configure for determining the inverted features of an image for a specimen. The term "encode " generally refers to a neural network or part of a neural network that "encodes" the information content of input data to a more compact representation. The encode process may he effectively lossy or lossless. In addition, the encode process may or may not be human interpretable. The encoded representation can be a vector of scalar values or distributions.

In one embodiment, the neural network is a deep learning model. Generally speaking, "deep learning * ' ' (also known as deep structured learning, hierarchical learning or dee machine learning) is a branch of machine learning based on a set of algorithms thai attempt to model high level abstractions i data. In a simple, case, there may be two sets of neurons : ones that receive an input signal and ones that send an output signal.

When the input layer receives a ' input, i t passes o a modi fied version of the input to the next layer, i a deep network, there are many layers betwee the input and output (and the layers are not made of neurons but it can. help to think of it. that way), allo wing the algorithm to : use multiple processing layers, composed .of multiple linear and non-linear transformations.

Deep learning is part of a broader family of machine S eaming methods based on learning representations of data. An observation (e.g., an. image) can be represented in many ways such as a vector of intensity val ues per pixel , or in a more abstract way as a set of edges, regions of particular shape, etc. Some representations are better than others at simplifying, the learning task (e.g., face recognition or facial expression recognition). One of the promises of deep learning is replacing handcrafted, features with efficien algorithms for unsupervised or semi -supervised feature learning and hierarchical feature extraction. Research in this area attempts to make better .representations and create models to learn these representations from large-scab unlabeled data. Some of the representations are inspired by advances in neuroscience and are loosely based on. interpretation of informatio processing and communication patterns in a nervous system, such as neural coding which attempts to define a relationship between various ' stimuli and associated .neuronal responses in the brain.

Various deep learning architectures such as deep neural networks, eonvolutional deep neural networks, deep belief networks and recurrent neural networks ha ve been applied to fields like computer vision, automatic speech recognition, natural language processing, audio recognition and biomfdnuatics ' where they have been shown to produce state-of-the-ar results on various tasks.

In another embodiment, the neural network is a machine learning model.

Machine learning can be generally defined as a type of artificial intelligence (Al) that provides computers with the ability to learn without being explicitly programmed.

Machine learning focuses on the development of computer programs that can teach themselves to grow and change when exposed to new data. In other words, machine learning can be defined as the subfield of computer science that "gives computer the ability to learn without being explicitly programmed." Machine learning explores the study and construction of algorithms that can learn from and make predictions on data - such algorithms overcome following strictly static program instructions by making data driven prediction or decisions, through building a model from sample inputs.

The machine learning described herein may be further performed as described in ''Introduction to Statistical Machine Learning," by Sugiyama, Morgan Xauitoami, 2016, 534 pages; "Discriminative, Generative, and ' Imitative. LeaTOing, * ' Jebara, MIT Thesis, 2002, 212 pages; and "Principles of Data Mining (Adaptive Computation and Machine Learning}," Hand et al, MIT Press, 2001, 578 pages * which are incorporated by reference as if fully set forth herein. The embodiments described herein may e ikrthef configured as described in these references. in some embodiments, the neural network is a generative model. A "generative" 5 model can be generally defined as a model that is probabilistic in nature. In other words, a "generative" model is. not one that performs forward simulation or rale-based approaches and, as such, a mode! of the physics of the processes involved in generating an actual image (for which a simulated ' mage is being generated) is not necessary', instead, a described further herein, the generati ve mode! can be learned (in that its i d parameters can be learned) based on a -suitable training set of data .

In one embodiment, the neural network is configured as a deep generative model For example, the model may be configured to have a deep .learning architecture, in that, the model may include multiple layers, which perform a number of algorithms or

15 transformations. The number of layers on the encoder side oft.be generative model is use case dependent. For practical purposes, a suitable range of layers on the encoder side is from 2 layers to a few tens of layers. in a further embodiment, the neural network may be a deep neural network with a 0 set of weight that model the world according to the data that it has been fed: to train it.

Neural networks can he generally defined as a computational approach which is based on a relatively large collection of neural units loosely modeling the way a biological brain solves problems with relatively large clusters of biological neurons connected by axons. Each neural unit is connected with, many others, and links can be enforcing or inhibitory 5 in their effect on the activation state of connected neural units. These systems are self- learning and trained rather than explicitly programmed and excel in areas where the solution or feature detection is difficult to express in a traditional computer program.

Neural networks typically consist of multiple layers, and the signal path traverses 0 from front to back, The goal of the neural network is to solve problems in the same way that the human brain would,■■although several neural networks, are much .more abstract. Modern neural network projects typically work with a lew thousand to a lew tnillion neural units and .millions of connections. The neural network may have any suitable architecture and/or " configuration known in the art.

5

hi another embodiment, the neural network is configured as a convolution neural network (CNN). For example, the neural network ma be configured, as a CNN, which is usu all stacks of convolution, and. pooling layers, to extract local features. The embodiments described herein can take advantage of deep learning concepts such as a i d CNN to solve the normally intractable representation in versio problem. The model may ha ve any CNN configuratio or architecture known in the art:. In another embodiment, the neural network is configured as a fully eonvoiuiiohal model, in additional

embodiments, the neural network may be configured s a deep generative model a CNN, a generative adversarial net (GAN) . , a conditional generative adversarial net (cGAN), a

15 GAN and variational autoeneoder (YAE), and a network that contains a CNN as a part (i.e., a part- of the neural network is configured as a CNN), all of which can be configured as described herein.

A GA included in the embodiments described herein may be configured as

0 described in "Generative Adversarial Nets," Goodfellow et a!,, arXiv; 1406.2661. June i 0, 201 , pages, which is incorporated by reference as if fully set forth herein. Goodfello et al, describe a new framework for estimating generative models via an adversarial process, in which two models are simultaneously trained: a generative model G that captures the data distribution, and a discriminative model D that estimates the probability 5 that a sample came from the training data rather than G. The training procedure for G is to maximize the probability of D making a. mistake. This framework corresponds to a minimax two-player ■■ game, in the: space- of arbitrary functions G and. D, .a unique -solution exists, with G recovering the training data distribution and D equal to 1/2 everywhere, in the ease where G and D are defined by multilayer perceptrons, the entire system can be 0 trained with backpropagation. There is no need for any Markov chains or unrolled approximate inference networks during either training or generation of samples.

Experiments demonstrate the potential of the framework: through qualitative and quantitative evaluation of the generated samples. The neural networks of the

embodiments described herein may be further configured as described by Ooodiellow et al.

A CGA included in the embodiments described herein may be configured as- described in "Conditional Generative Adversarial ets," by Mkm et al,

arXiv:l41.1.1784, November 6, 2014, 7 pages, which is incorporated by reference as if iy set forth herein. Generative adversarial nets can be extended to a. conditional model if both the generator and discriminator are conditioned on some extra information y. y. could be an kind of auxiliary information such as class labels or data from other modalities. Conditioning can be performed by feeding y into both the discriminator and generator as an additional input layer, in the generator, the prior input noise z(z), and y are combined in joint hidden representation and the. adversaria! training framework allows for considerable flexibility in how this hidden representation is composed. In the discriminator x. and y are presented as inputs to a discriminative function (embodied in some cases by a multi-layer perception (MO*)), The objective function of ' two-player iruoimax game would then, be: min max F(D, G) -

The neural networks included in the mbodiments described herein may be further configured as described in the above incorporated reference by Mirza et al

A variational auto-encoder is a component thai takes the merits, of deep learning and variational inference and leads to significant advances in generative modeling. In addition or alternatively, a variational autoeneoder (VAE) combined with a OAN or a deep generative adversarial network (DG AN)) may- be configured as described in "Adversarial Autoencoders," Makhzani et ai, arXiv: 151 L0S644v2, May 25, 2016, 16 pages, which is incorporated by reference as if fully set, forth herein.. The mbodiments described herein may fee further configured as described In this reference.

Th e neural network is confi gured for determ ining inverted -features of input images in a, training set for a specimen input to the neural network. The inverted features determined by the neural network may include any suitable features described further herein or known in the art that can be inferred from the input and used to generate the output described further herein. For example, the/features may include a vector of intensity values per pixel. The features may also include any other types of features described, herein, e.g. , vectors of scalar values, vectors of independent distributions, joint distributions,, or any other suitable feature types known in the art.

As described further herein, the computer subsysiem(s) may be configured to acquire the input images in the training set from an imaging subsystem or system described herein and/or from a storage medium in. which the images have been stored by an imaging subsystem or system, in addition, in. some instances, as described further herein, the computer subsystem(s) may be configured, for selecting the input images in the training set (thereby generating the training set of images) from a larger set of images, in some instances, the computer su.bsysiem(s) may also select which imaging parameters) are or will be used to genera te the input images and/or which input images are selected based on selected imaging parameters. or example, the computer subsystem(s) may select imaging parameters that will be used to collect image data from the imaging subsystem or system, which may include one or more imaging parameters selected from group of imaging parameters that includes, but is not limited to, illumination

band wavelength, aperture, polarization, pixel size, and other imaging parameters described, herein. In addition, the computer sobsysiem(s) may select an other imaging parameters that affect the input images, A relatively large quantity of images may then be collected under the imaging parameters that are selected on an imaging subsystem or system described herein (e.g., a real tool, a virtual tool, an inspection tool, a review tool, a metrology tool, an optical tool an -electron beam tool, an ion beam tool, etc.). The number of input i mages in the traimng set ma he any suitable number o f input images. In a.ddition s the si e of the input images- (e.g., in pixels) may be any suitable size.

The training set of input images may also vary depending on the- application for which the neural network is being trained. For example, in the deconv lution use case, which is described further herein, a training sample is a single image collected per location, and the training dataset is a collection of training samples, in the phase retrieval use ease, which is also described further herein, a training sample is a stack of images collected at various focus offsets per location, and the training dataset is a collection of training samples. In fee review use ease., the training sample and training dataset may be the same as in the dccowoiution use case. In addition, in the tool, calibration and optics mode design use cases, the training sample and training datasei Is not defined and is dependent on the targeted use case.

The computer subsystern(s) may also determine where on the specimen that the images are collected from.. For example, the computer subsystem(s) may be configured for an optional specimen location sampling step that may fee performed using design information for the specimen (e.g., CAD information) and/or hot spot information.

Prior to inputting the input images i the training set into the neural network, the computer subsystem! ' s) may perform -one or more data pre-processing steps on the input images in the training set, which may include any suitable pre-processing steps known in the art.

Each of the layers of the neural network described, above may have one or more parameters such- as- eights W, and biases, 8» whose values can be determined, by training the neural network, which may be performed as described further herein. For example, the weights and biases of any layers included in the neural network may be determined during trainin ' by taininuxing a cost function. The cost function may vary depending on the transformation that is being performed on tiie images.

The one or more components also include forward physical model 106 shown in 5 Fig, 1. configured for reconstructing the input images from the inverted features thereby generating a set of output images corresponding to the input images in the training set. In this manner, the major functionality of this componen t is to apply a physical model on the extracted features to regenerate the inputs. For example, as shown in Fig. 2. the system may include forward physical model 206, which may be forward transformation model :::: i d tX). The forward transformation model is applied on inverted features 204 to regenerate model transformed features 208. The forward physical model may be configured as physical simulation layers, which can be derived from differentiahle first-principle physics or optics laws (e.g., Maxwell equation, Fourier Optics, etc.).

15 The forward physical model may also fee generated or configured based on

information about parameters used for generating the input images and/or runtime images. For example, the forward physical model may be configured based on the physical (optical) conditions that are or will be used to collect image data for the

specimen or another specimen, which may include, hut are not limited to, optical0 band/wavelength, optical, aperture, polarization, pixel size, etc, in one embodiment, the forward physical model is configured as a differentiable forward physical model. A ph sical model can be expressed by certain mathematical functions, in this manner, "differeniiahle" as used herein means that these mathematical 5 functions are differentiable, he,, the gradient of these mathematical functions are

computable. If the physical model is not .differentiable,- the model will be approximated by a differentiable model or a linear combination of several differentiable models. The differentiable constraints allow the implementation of the forward physical model via a neural network, and this allows the training of the unified model via stochastic gradient0 descent or equivalent. in this manner, the embodiments described herein may he referred to as inversion neural networks (IKNs). An 'INN 5' as that term is used herein can be generally defined as a generic and systematic computational framework, which combines a neural network 5 (such as a deep learning neural network) with a forward differendable first-principle physical model together as a unified trainable mode! to solve the- inverse problem in imaging. In general, as long as a forward difTerentiabie physical model (either exact or approximated) is available, INN can be used as described herein to solve the inverse problem.. It is noted that the term "inverse problem ** described herein is intended to have $0 the generally accepted definition of that term, in that it is called an inverse problem

because it slam with the results and then calculates the causes. This is the inverse of a forward problem, which start with the causes and then calculates the results.

The embodiments described herein, therefore, combine a firsi-prineipie

! 5 imaging/ hysics model (i.e., the forward physical model) ' with a neural network (e.g., a machine learning/deep learning model) as a unified trainable model to inverse the imaging effects (e.g., diffraction, interference, partial coherence, etc.) and to identify the signal cause. The I Ns described herein only require the forward, physical model for forward simulation. I other words, there is no need to solve the inverse problem from 20 first principles; In addition, the configuration of the embodiments described herei

enable a computationally efficient approach to extract optical phase information from optical images. Furthermore, the embodiments described- herein are capable of learning physically inierpretahle tool parameters during training, 5 in another embodiment, the forward physical model is implemented. r

approximated as an additional neural network. For example, the forward physical model ma be implemented via deep learning neural layers, which indeed may form a neural net-work and perform exact mathematical computation as the original model does. As the original model math is diiierentiable, its neural network implementation allows back

30 propagation to be applied during training. In this manner, implementing the forward physical model as a neural network means Implementing the mathematics of the physical model exactly b a e ral network, However, the forward physical model may be approximated as a neural network In situations in which the exaet Implementation is not possible or the model is not directly differentlahle.

In som embodiments, the forward physical model includes model parameters corresponding to. imaging parameters used for generating the input images for the specimen. For example, the forward physical model ma include, but i not limited to, all possible imaging setup parameters on any of the imaging subsystems described herein (e.g.. a wafer inspection tool, a mask tool,- etc.). in a further embodiment, the forward physical model includes model parameters corresponding t physical parameters involved in generating the input images for the specimen. For example, the forward -physical model may include, but is not limited to, all possible imaging physical model parameters from first-principle physics. hi one embodiment, the forward physical model includes at least one adjustable mode! parameter. For example, depending on the use ease, some .of the parameters of th forward physical model may be trained as trainable parameters. If any of the parameters are chosen to he trained, their initial values for training can be (a) a. random alue from a physically valid value range; (b) Ά hardware crude measurement; (c) a hardware fine calibrated value; or (d) a software- fine calibrated value. In one particular example, images may ' be grabbed from an inspection tool with aperture "A." Aperture "A" is a known tool parameter, and aperture- "A" can be used, to estimate a crude point spread function. (PSF) for the tool. However, the fine (or exact) PSF may be unknown.

Therefore, the fine (or exact) PSF can be trainable. In another embodiment, the forward physical model includes at least one fixed model parameter, For example ail or part of the parameters are allowed, to be fixed during training if they are representing the hardware specifications or calibrated hardware parameters. Furthermore, the forward physical model may include at least one adjustable model parameter and at least one fixed model parameter. in other words, some of the model parameters of the forward physical model may be fixed and others may be adjustabl e. In this mariner, none, pari, or all of the model parameters can be trainable, and none, part, or all of the mode! parameters can be fixed.

The one or more components further include residue layer 108 shown in Fig. 1 configured for determining differences between the input images in the training set and their correspondin output images in. the set. For example, as shown, in Fig. 2, the system may include residue layer 210. Input image 2(H) and model transformed features 208 may be input to the residue layer, which may determine differences between the input images and their corresponding model transformed features, which may be output as residue Ima e 212. In this manner, the residue layer may determine a quality metric. For example, the difference between the original transformed i¾atore(s) and regenerated transformed i:eature(s) may be computed as the metric for training, in general, the residue layer measures the similarity between the .^transformed data (i.e., the output of the forward physical model) and the original data (i.e., the input to the neural network), ' The possibl metrics for the similarity measure include, hut are not limited to, various distance measures (e.g., LI , L2, L inf, Manhattan, etc.), various cross-correlations,, mutual information, etc. Unlike the neural network and. the forward physical model, the residue layer -will in general not have trainable parameters.

The one or more computer subsystems are configured for altering one or more parameters of the neural .network based on. the determined differences thereby training the neural network. The training objective of the one or more computer subsystems is t minimize the residue layer outputs a small as possible. The parameters of the neural network that are altered by the computer subsystem(s) based on the di ferences ma include any trainable- arameters of any of the neural networks described herein (e.g., the trainable parameters of a CNN), In addition, the computer subsystem(s) may be configured to train the neural network in an unsupervised manner; that is, the training requires no labels (nor anything equivalent) for the input images in the training set that are used for training the neural, network. The training set of input images may also include a eol Section of images (optical, electron beam, etc.) with, arbitrary size.

The computer sabsystem(s) may also be configured for training the neural network and the forward physical, model. Such training of both models may be performed simultaneously. At training time, the computer subsystem^) may use the images collected at the chosen physical condition (used as input to the neural network), which are therefore the input images in the training set, and the physical parameters (used as hyper-parameters (either trainable or fixed)} for the forwar physical model,

The neural network described herein may be generated for specific specimens (e.g., specific wafer or reticles),, processes, and imaging parameters, in other words, the neural network described herein may be specimen specific, process specific, and imaging parameter specific. For example, in one embodiment, each neural network may be trained to be specific to a- particular design and wafer layer, t he trained neural network will then only be used to perform predictions for that layer, in this manner, different neural networks may be generated for different wafer layers. However, in another embodiment, single neural network may be trained with data from different designs and wafer type layers. The resulting neural network may be: used to perform predictions in: general for all types of the specimens included in the training data. In general, a neural network may be independent of tool as long as the selected imaging modes are repeatab!e across the tools. For example, tools of the same type may have the same specifications. Therefore, the trained model does not need to be tied to the tool on which the training data was acquired. Each of the different neural networks may be generated with different training sets of data. Each of the different training set of data may be generated in any suitable manner.

The embodiments described herein may also be configured, for deployment of the neural network in a variety of way s and for generating a variety of outputs after it has been trained as described further herein. For example, as shown in Fig. 3, in one manner of deployment, ' trained neural network 302 may be deployed itself ( without the forward physical model and ithout the .residue layer). n. this manner, during runtime (or deployment), runtime image- 300 may be input to trained neural network 302 by the computer sabsystem(s) (not shown in Fig. 3 , which may be the same computer subsystemis) that trained the neural network or may be different computer subsystem(s ), winch generates .inverted features 304, which is the output, of the trained neural network. Runtime image 300 may be input to trained neural network 302 along with the imaging parameters (not sho n in Fig. 3) that were used to generate the runtime image. Runtime image 300 a also have an arbitrary size. A. "runtime" image as that term is used herein simply means a test image that is input to the trained neural network. A such, in one deployment situation, only the first model of the INN (the trained neural network) is deployed,, which, will generate, the inverted features (or the inverted images) alone at prediction time, in different manner of deployment, as shown in Fig. 4, trained neural network 402 may be deployed with forward ' hysical model 406 and residue layer 410. Forward physical model 406 ma or may not be trained as described herein. In this manner, runtime, image 400: is input to th - trained neural network during deployment, which generates inverted features 404. As such, during runtime, (or deployment), runtime image 400 may be input to trained neural network 402 by the computer s«bsystem(s) (not shown in Fig. 4, which may be the same computer $ub$ystem(s) that trained, the neural network or may he different computer suhsysiem(s)), which generates inverted features 404, which is the output of the trained neural network. Runtime: image 400 ma be input to trained neural network 402 along with the imaging parameters (not shown in Fig. 4) that were used to generate the .runtime image. Runtime image 400 may also have an -arbitrary size, inverted features 40 may be input to forward physical model 406. which generates model transformed, features 408. The model transformed features may then be input to residue, layer 410 in combination with image 400, which may use those inputs to generate residue image 412, As such, in another deployment situation the entire INN (the trained neural network, the forward physical, model (trained or not), and the residue layer) is deployed, which wit! generate both the inverted features- (or mverted images) and th residue images. In this manner, the inverted features/images are the desired result from the INN, the "model transformed" is the intermediate ' data that describes how well the INN performs, and the '"residue image" is a quantitative measure of performance or "wellness" of INN. For example, the "residue" images are expected to be close- to zero-valued at each pixel The pixel values hi the residue image can therefore be used to identify any catastrophic failure of the INN .model. That is, if the "residue" images have relatively large values at certain pixels, that is an indication thai the INN model, performs poorly on generating the inverted images. Therefore* the generated inverted images can b filtered for these locations.

The embodiments described herein may be configured for performing number of different types of transformations (I.e., transforming the input image to the inverted features). For example, the inverted image/features ' may be- different things for differen use cases- because the physical model is different for each, use case, in other words, the configuration, of the neural, network will depend, on the forward physical model that ' is used during training, For example, in one embodiment, the one or more computer subsystems are configured to input runtime " image for the specimen or another spec imen into the trained neural network such that the trained neural network determines the inverted features for the runtime image, and the inverted features are features of an Optically corrected version of the runtime image. Such a configuration may therefore perform deconvoiution of the input i mage, hi this manner, the inverted features may be the desired sharp image (for deconvoiution). Although the term "Optically corrected" is used herein, an "optically corrected ** version may be corrected for -optical and other types (e.g., electron beam and ion beam) of imaging effects. In other words, the "optically corrected" version of the runtime image is not limited to just light-based imaging corrections of the input image. The optically corrected version of the nmtime image may be corrected in a number of different, ways. For example, the raatitae image may be optically corrected for blur,, contrast, -color, noise, and other adverse imaging effects caused by the imaging subsystem or system thai generated the runtime image from the specimen or caused by the specimen itself (or one or more processes performed on the specimen). In one such example, the runtime image ma be a hiurred imaged that is input to the trained neural network, which produces inverted features images, i.e., a sharp image, for the blurred image. In this manner, in. the deconvohrtion case, the inverted features/image is a shar image, which is generated by removing blur from the .runtime image, if the INN is deployed with the forward physical mode!, and the residue layer, the forward physical model (an optical model iti this case) may be an optical blurring model given wavelength, FSF, etc, The forward physical model generates model transformed features/images, i.e., a simulated blurred image based on the generated "sharp" image. The residue layer may then subtract, the simulated blurred image from the runtime image (or vice versa) to generate a residue image.

The optically corrected version of the image may also be corrected for resolution problems and/or to improve the resol ution of the runtime, image. For example, in some embodiments, the neural network may be configured to generate one or more high resolution images from a low resolution input image. Therefore, the embodiments described herein may ' b configured for deconvolntion for the purpose of enhancing resolution, which can thereby improve defect signal-to-noise (SNR) ratio for applications such as inspection, metrology, and review, in addition, the embodiments described herein may be configured for electron beam and/or ion beam decoivvolution for the purpose of enhancing electron beam and/or ion beam resolution, which can thereb improve defect SME ratio for applications such as inspection, metrology, and review. In this manner, the optically corrected versions.- of the runtime images may include more specific information for the specimen, which can then be used, for defect detection, classification, review, etc. in an additional embodiment, the one or more computer subsystems are configured to input a runtime linage for tire specimen or another specimen into the trained neural network such that: the trained neural network determines the Inverted features for the runtime image; the forward physical model reconstructs the runtime image from the inverted features determined for the runtim image; and the -residue layer determines differences between the runtime image and the reconstructed runtime image, where the inverted features are features of an optically corrected version of the runtime image, and the differences between the runtime image and the reconstructed runtime image are features of a residue image. I one embodiment, therefore, the raw runtime images may be collected from an imaging subsystem or system under the same imaging conditions as in training. Then, the raw runtime images may be .input to the trained INN model to generate- the deconvolved image (Le., the "inverted" image) and a residue image. The deconvolved image may be a sharper image than the raw image, and it may have a higher resolution thereby improving the SNR for defect detection. The- residue image can be used for identifying catastrophic failure of the INN model as described further herein.

The term 'low resolution image" of a specimen, as used ' herein, is generally defined as an image in which all of the patterned features formed in the area of the specimen at which the image was generated, are not resolved in the image. For example, some of the patterned features in the area of the -specimen at which a low resolution image was generated may be resolved in the low resolution image if their size is large enough to render them resolvable. However, the Sow resolution Image is not generated at a resolution that renders all patterned features in the image resolvable. In this manner, a "low resolution image," as that term is used herein, does no contain information about patterned features on the specimen thai is sufficient for the low resolution image to be used for applications such as defect review, which may include defect classification and/or verification, and metrology . In addition, a "low resolution image" as that term is used herein generally refers to images generated by inspection systems, which typically have relatively lower resolution (e.g., lower than defect review and/or metrology systems) in order to have relatively fast throughput. The. "low r solution images" may also be "low resolution" in thai they have lower resolution than a "high resolution image ' ' described herein, A "high resolution image" as that term is used herein can be generally defined as an image in which all patterned features of the specimen, are resolved with relatively high accuracy, hi this maime , ail of the patterned features in the area of di specimen for which a high resolution image is generated are resolved in the high resolution image regardless of thei size. As such, a "high resolution image," as that term is used herein, contains information about patterned featitres of the specim en that is suffici en t for th e high resol ution image to be used for applications such as defect review, which may include defect -classification and/or verification, and metrology. In addition, a "high resolution image" as thai term is used herein generally refers to images that cannot be generated b inspection systems during routine operation, which are configured to sacrifice resolution capability for increased throughput. hi another embodiment, the one or more computer subsystems are configured to input a runtime imag for the specimen or another specimen into the trained neural network such that the trained neural network determines the inverted features for the runtime image, and the inverted features are features of an amplitude and phase version of the runtime image. For example, the runtime image may be an intensity image that is input to the trained neural network, which may in this configuration generate inverted features/images, i.e., amplitude and phase images (for phase retrieval), li the deployed INN Includes the .forward physical, model and the residue layer, then the forward physical model (e.g., an optica! model), i.e., an image formation model given wavelength, PSF, amplitude transfer function (AIM), etc. may generate model transformed

feafirres/images, i.e., a simulated intensity image based on an optical mode! given the generated "amplitude" and "phase" images. The residue layer ma subtract the inverted features/images from the model ' transformed feamres images (or vice versa) thereby generating a residue linage. The embodiments described ' herein are therefore fundamentally different than currently used methods and s stems since the embodiments described herein combine a neural network (e.g., machine learning, deep learning, etc.) with imaging simulation -(i.e. * , the forward physical model). In addition, the embodiments described herein were created by finding a breakthrough point on how to combine the neural network and physical, .model for inverse problem -{not every problem) and establishing a systematic: way to solve and implement it In contrast, deep learning is widely adopted by the industry especiall for image classification and language processing. Until n w * the majority of applications and research treat deep learning/machine. learning as a black, box. In. addition, until now, there is no explicit way to combine deep learning (e.g., a neural network) with a physical model, nor to use a physical model to guide the learning of a neural network.

For the computer science and image processing community, the inverse problem (i.e., deeonvoluiion) is often solved via a supervised manner if a training based approach has to be used. These applications are mainly focused on natural images, which do not have strong imaging effects (like scattering, interference, etc). Therefore, it is affordable to learn a model without the -guidance of a physical/imaging model. However, for applications (e.g., a wafer at nanoscale) whic have to consider strong physics/imaging interaction, the naive (brute force) training approach, often leads to substantially poor generalization performance for unseen data (due to overfitiing).

In the past decades, many in the physics, chemistry, and computer science fields have undertaken significant efforts to explore whether machine learning (e.g., kernel- based approach) methods can be used to train models fo learning complicated physic models (e.g., predictio energy). I general, the idea is to use machine learning to replace conventional analytical methods instead of combining them. In general, there is not much breakthrough- due to the poor accuracy of trained models. Even though deep learning is getting popular in the last three years, the major efforts in the science communit are still either to use it as a black box or to teat it as an alternative to analytical physical models. The embodiments described herein have, therefore, a number of advant ges over other currently wsed methods and systems. For example,, the embodiments described herein combine a neural network- (e.g., machine learning, deep learning, etc.) with imaging simulation (i.e., the forward physical model), hi this manner, the embodiments described herein enable solving the imaging inverse problem, which is often impossible or extremely slow via either first-principie optics, or conventional optimization methods (e.g., deeonvolution). The embodiments described herein also do not have the under- determined problems of currently used deconvoludoo methods and systems because the embodiments described herein mathematically learn how to perform the deeonvolution. transformation via a neural network (which is -well-constrained given a relatively large number of training dataset is used), instead of optimizing the "deconvolved output' * as in currently used methods. In addition, the embodiments described herein do not have the under-determined problems of currently used deeonvolution methods and systems since the mathematical formula or neural network topology adds constraints to the learning of the inversion process. The embodiments ' described herein lurther do not have the under- determined problems of currently used deeonvolution .methods and systems because the forward physi cal model adds die constraints .from the fi rst-principle to learning of the inversion process. Furthermore, these constraints help to improve the generalisation and prevent overfitting. In addition, the imaging !ayet(s) (i.e.., the forward physical model) based an first-principle imaging tremendously reduces the number of model parameters, e.g., compared to the general purpose machine learning/deep learning models.

Furthermore, the embodiments described herein make it possible to combine imaging tool design with an INN to improve imaging resolution vi deeonvolution. The embodiments described herein are also configured as -a unified model. In this manner,. instead of a two-step approach, the INN is a unified model for training and prediction. The embodiments described herein are also capab le of learning complex imaging effects and interpreting them irora first-principle imaging. This method is capable of learning complex and diverse imaging effects (diffraction, interference, partial coherence, etc). In addition, unlike general machine learning models, the tool parameters learned in ie IN have explicit physical meanings, which can help to understand and to guide the model design.

The embodiment ' s described herein further require no labeling and have a

5 relatively fast setup time, Fo example, as -described further herein, the training of the INN is unsupervised. The embodiments described herein also are: configured, for relatively fast trainin time and relatively fast runtime. For example, fewer numbers of parameters and the forward physical model makes training faster than, general -purpose machine learning/deep. learning models. In addition, the embodiments described herein i d provide faster speed in production runtime (i.e., can do relatively quick prediction).

Furthermore, the embodiments described herein enable real time processing on tool. Real time processing in the contex t of the embodiments described herein ' refers to the processing time of an algorithm with fixed computation hardware that is equal to or faster than the data collection time of the hardware. Therefore,, the hardware can run at the is maximum throughput. For example, if collecting an image from an inspection tool takes about I fas, the algorithm ca run at least in 1 mi In this manner, the prediction time of t he IN i s fast enough to keep up with ' the data coll ection speed of the imaging subsystem or system (hardware). In. currently used methods, the ones which can provide decent results often require iterative non-linear optimization, which is : orders of magnitude0 slower than the "real time" requirement

T he embodiments described herein may be configured to perform a number of different functions using the. inverted image, possibly in combination with, the runtime image. Each of these functions may be performed as described further herein.

5

In one embodiment., the one or more computer -subsystems are configured to input a runtime image tbr the specimen or another specimen int the trained neural, network such that the trained neural network determines the inverted features for the runtime image, the inverted features are features of an optically corrected version of the runtime0 image, the one or more computer subsystems are configured for classifying a defect detected in the rimt ne image or the. optically corrected version of the runtime image, and the classifying is performed based on the opticaily corrected version of the runtime image. For exa ie the runtime image may e an optical image of a specimen or trie- other specimen and the optically corrected version of the runtime image may include a higher resolution image of the specimen or the other specimen such as an image that may be generated by an electron beam imaging subsystem and/or an image of design data or design information for the specimen or the other specimen.

One benefit of optical image to SEM and/or design translbrmations is that optical inspection is still the key for high volume production yield in semiconductor

manuiacturing processes. Due to lack of resolu tion, defects detected by optical inspectors require SEM revie for defect classification. Methods that automatically transform optical to SEM and/or design can potentially reduce SEM review requirements for yield management, thereby reducing total inspection cycle time. For example, the

embodiments described herein can eliminate the need for acquiring SEM images on a defect review system, after specimen inspection since the optically corrected version of the runtime image described herein can be 1) acquired without the specimen: or the other specime and without imaging hardware and 2} used for defect review applications such as defect classification.

The defect that is classified by the one o more computer subsystems may be detected in the runtime image and/or the optically corrected version of the runtime image as described herein. In addition, classifying the defect based on the opticaily corrected version of the runtime image may be performed in any suitable manner known in the art For example, the optically corrected version of the runtime image may be used as input to an suitable defect classification methods and/or algorithms: known in the art In other words, the optieaily corrected versi on of the: runtime, image may be used as an other images for defect classification. Results of the defect classification performed by the embodiments described herein may have any suitable format (e.g., defect classification codes* etc.). in a further ' embodiment, the one or more computer subsystems a e configured to input a raniime image for the specimen or another specimen into the trained neural network such that the trained neural network determines the inverted .features for the runtim image, t he inverted features are fea tures of an optically corrected version: of the amtime image, and the one or more computer subsystems are configured for .detecting a defect on the specimen or the other specimen based on the optically corrected version of the .runtime image. The computer subsystem(s) may be configured to use the optically corrected version of the runtime image to detect defects on the specime or the other specimen in. any suitable .manner. For example, the computer subsystemfs) may be configured to apply one or more defect detection algorithms aftd or methods to the optically corrected version of the niutime Image, which may include any suitable defect detection algorithms and/or methods known in the art. In one- .such example, the computer subsystemfs) may be configured to compare th optically corrected version of the runtime image to a reference for the specimen or the other specimen and then apply threshold to results of the comparison. Pixels in the optically corrected version of the runtime image having results of the comparison above the threshold maybe identified a defects while pixels in the optically corrected version of the runtime image having results of the comparison below the threshold may not. be identified, as defects.

In another example, the computer subsystemfs) ma be configured for single image detection as described in U.S. Patent Application Serial No. 15/353,210 filed No vember 16, 20.16 ' by Karsenti et aL which Is incorporated by reference as if fully set forth herein, in one such embodiment, the inverted features determined for the input image b the neural network may be used, as -described i this patent application, to detect defects in the optically corrected version of the runtime image. For example, the computer subsystern(s) may be configured for selecting labels for pixels or blocks of pixels in the input image based on (1) the inverted features and (2) mapping of the pixels or blocks of the pixels of an inverted feature map volume into the labels. The computer subsystems may be further configured for detecting defects on the specimen or the other specimen based cm the selected labels for the pixels or blocks, in addition, the computer subsystem^} may be configured to detect defects on the specime or the other specimen using the runtime, image in. combination with the optically corrected version of the runtime image,. For example, if the runtitrie. image is a low resolution image and the optically corrected version of the runtime image includes a high resolution image, a position of a defect delected in die low resolution image may be identified in the high resolution image to determine the design context of the defect, which can then be used to determine if the defect is a nuisance defect or an actual defect. In addition, a position of a defect detected in the low resolution image may be used to identif the osition of the defect in the high resolution image to determine if the defect is present (can be detected) in the high resolution image. If the defect can be detected in the high resolution image, it is designated as an actual defect. If the defect cannot be detected in the high resolution image, it is designated as a nuisance defect. in an additional embodiment, the one or more computer subsystems. are configured to input a runtime image for the specimen or another specimen into the trained neural network such that the trained neural network determines the inverted features for the runtime image, the in verted features are feat ures of an optically corrected version of the runtime■ image, and. the one or more computer subsystems are configured for measuring one or more features of the specimen or the other spec imen or a defect detected on the specimen or the other specimen based on. the optically corrected version of the runtime image. For example, the neural network may he configured ' such that the optically corrected version of the runtime image generated by the neural network is a high resolution image generated from a runtime image that is a low resolution image, " f he optically corrected version of the runtime image may therefore contain greater detail, about features formed on the specimen or the other specimen (e.g., patterned features such as lines, spaces, contacts, etc, as well, as defects on the specimen or the other specimen) than the runtime image. The computer suhsysiem(s) may then use the opticall corrected version of the runtime image to measure -or determine one or more characteristics of the features on the specimen or the other - specimen...

The one or more characteristics of the features may be determined in any suitable manner. In addition, the one or more characteristics of th features thai are determined o .measured by the computer subsyste-m(s) may include any suitable characteristics such as dimension {e.g., line width, contact diameter, etc.), shape* . relative location, etc. The measurements may be performed on die optically corrected version of the runtime im age by the computer subsystem(s) as described in U.S. Patent Application Publication Mos. 2016/01 1.6420 published on April 28, 201.6 by- Duffy et a!.., 20160372303 published on

December 22, 2016 by Park et al., and 2016/0377425 published on December 29, 201 ' 6 by Gupta et a!., which are incorporated by reference as if fully set forth herein. The embodiments described herein maybe further configured as described in these publications. in some embodiments, the one or more computer subsystems are configured t input a stack of runtime images for the specimen or another specimen into the trained neural network such that the trained neural network4eiermin.es the inverted features .for the stack of runtime images, the inverted features are phase information for the stack of runtime images, and the one or more computer subsystems are configured for increasing selectivity for defects on the specimen or the other specimen based on the phase information. For example, the embodiments described herein can be performed for optical phase retrieval, to generate phase information from a stack of optical images, which can be used to increase defect selectivity. In particular, in the optical phase retrieval use case, the IN generates an inverted image that is an amplitude and phase image, which contains phase information that can be used to help on SNE, detection, etc. Increasing the selectivity for defects based on the -phase information may -be- performed in any suitable manner known i the art. in one -embodiment, the on or more computer subsystems are configured for determining one or more adjustments for one or more parameters used for generating the input images based on results of the taming. For example, the embodiments, described herein may be configured for 'Substantially accurate tool calibration, In other words, better tool parameters ca he optimized out from the crude measured initial tool parameters during training of the INN, and the optimized parameters are better calibration values, hi one: particular example, images may be grabbed: from an inspection tool with aperture "A." Aperture "A" is a k own tool parameter, and aperture '** Α" can be used to estimate a etude PSF for the tool. However, the fine (or exact) PSF is unknown.

Therefore, the fine (or exact) PSF ' can he trainable. The tool calibration for PSF can then be performed based, on these results. For example, file crude PSF is used as the initial value for training. After training is done, the optimized PSF is considered, as the fine calibrated PSF.

The embodiments described herein may be further configured for performing, other transformations (from an input image to a simulated image) such as those described iff commonly owned U.S . Patent Application Serial Nos. 15/176,139 filed June 7, 2016 by Zhang et ah, 15/353,210 filed November 1.6, 2016 by Karseriti et a!., 15/394,790 filed December 29, 2016 b Bhaskar et al, 15/394,792 filed December 29, 2016 by Bhaskar et al., 15/396,800 filed. January 2, 2017 by Zhang et al, 15/402,094 filed January 9, 2017 by Bhaskar et. ah, 15/402 J 69 filed. January^ 2017 by Bhaskar et l, 15/402, 197 filed January 9, 2017 by Park et al, and 15/603,249 filed May 23, 2017 by Zhang et al, which are incorporated by reference as if foll set forth herein. The■ . ' embodiments described herein may be further configured as described in these patent applications. In addition, the embodiments described herein may be configured to perform any steps described in these patent applications.

Another embodiment of a system configured to train a neural network includes an imagin subsystem configured for generating images of a specimen. The imaging subsystem may have any configuration described herein. The system also includes one or more computer subsystems, e.g., computer subsystem^) 102 shown in Fig. .1 , configured for acquir ng the images arid generating a training, set of input images from the acquired images. The computer subsystemis) may be configured as described further herein. The system also includes one or more components, e.g., components) 100, executed, by the one or more computer subsystems,, which may incl ude any of the components) descri bed herein. The components) include neural neiwork 104, forward- hysical mode! 106, and residue layer 10% each of which may be configured as described herein. For example, the neural network is configured for determining inverted features of the input images in the training set forthe specimen input to the neural, network. The forward physical model is configured for reconstructing the input images from the inverted features thereby generating a set of output images corresponding to the input images in the training set. The residue layer is configured for determining differences between the . input images in the training set and their corresponding output images in the set. The computer subsysiem(s) are also configured for altering one or more parameters of the n eural network based on the determined .differences- thereby training the neural network. This system embodiment may : be further configured as described herein.

Each of the embodi en s of each of the systems described above may be combined together into one singl embodiment.

Another embodiment relates to a computer-implemented method for training a neural network. The method . includes determining inverted, features.- of input images in a training set for a specimen b inputting the training set of Input images to a .neural network. The method also includes reconstructing the input images from the inverted features by inputting the inverted features into a forward physical mode! thereby generating a set of output images corresponding to the inpu t images in the training set In addition, the method includes determining .differences between th input images in the training set and their correspondin output images in the set. The method further includes determining one or more parameters of the neural network based on the determined differences thereb training the neural network. Determining the inverted features, -reconstructing the input images, ' determining the differences, and alterin the one or more parameters are performed by one or more computer systems. One or more components are executed by the one or more computer -systems, and the one or more components include the neural network and the forward physical model.

Each of the steps of the method may he performed as described farther herein. The method may also include any other siep s) that can be performed by the system, computer subsYstemis), and/or imaging systems or subsystems described herein. The one or more computer systems, the one or more components, the neural network, and the forward physical model may be configured according to any of the embodiments described herein, e.g., computer suhsystem(s) 102, components) 100, neural network .104, and forward physical model 106. In addition, the method described above may fee performed by any of the system embodiments described herein.

An additional embodimen relates to a non-transitory computer-readable medium storing program instructions execiiiable on one or more computer systems for performing a computer-implemented method for training neural network. One such embodiment is shown in Fig. 5. In particular,, as shown in Fig, 5, non-transitory computer-readable medium 500 includes program instructions 502 executable on computer system(s) 504, The computer-implemented method may include any step(s) of any method(s) described herein.

Program instructions 502 implementing methods such as those described herein may be stored on computer-readable medium 500, The computer-readable medium may be a storage medium such as a magnetic or optical disk, a magnetic ta pe, or any other suitable non-transitory computer-readable medium known in the art.

The program instructions maybe implemented i any of various ways, including procedure-based techniques, component-based techniques, and/or object-oriented techniques, among others, For example, the program instructions may be implemented using ActiveX controls, OH- objects, JavaBeans, Microsoft Foundation Classes ("MFC'), SSE (Streamin SIMD Extension) or oilier technologies or methodologies, as desired.

Computer sysiem(s) 504 may be configured according to any of the embodiments 5 described herein.

Further modifications: and alternative embodiments of various aspects of the invention will be apparent to those skilled in the art in view of ' this description. For example, methods and systems for training a neural network are provided. Accordingly. i d this description is to be construed, as illustrative only and is for the purpose of teaching those skilled in the art. the general manner of carryin out the invention. It is to be understood that the forms of the invention shown and descnbed herein are to be taken as the presently preferred embodiments. Elements and materials may be substituted for those illustrated and described herein, parts and processes may be reversed, and certain

15 features of the invention may be utilized independently; all as would be apparent to one skilled in the art after having the benefit of this description of the invention. Changes may..be made in the elements described herein without departing from the spirit and scope of the invention as described in the following claims.