A system configured to train a machine learning based model, comprising: one or more computer subsystems (36, 102); and one or more components executed by the one or more computer subsystems, wherein the one or more components comprise: a machine learning based model (104, 206) configured for performing one or more simulations for the purposes of mask inspection, wafer inspection and wafer metrology for specimens, the specimens comprising semiconductor wafers or reticles, wherein the machine learning based model is trained with only information for nominal instances of one or more of the specimens, wherein the nominal instances comprise instances of no defects on the one or more specimens; wherein the one or more computer subsystems (36, 102) are configured for: acquiring information for non-nominal instances of one or more of the specimens, wherein the non-nominal instances comprise instances of defects on the one or more specimens; wherein the defects comprise one or more synthetic defects generated by altering a design for the one or more specimens to create the synthetic defects in the design; characterized in that the one or more computer subsystems are further configured for: re-training the machine learning based model with the information for the non-nominal instances of the one or more of the specimens thereby performing transfer learning of the information for the non-nominal instances of the one or more of the specimens to the machine learning based model; wherein the training and re-training of the machine learning based model corresponds to the transfer learning, with the training performed with the nominal instances of one or more of the specimens being a training for a source task of the transfer learning, the re-training with non-nominal instances corresponding to the training of the machine learning based model for a target task, the target task being the performing of the one or more simulations for the purposes of mask inspection, wafer inspection and wafer metrology for specimens. one or more computer subsystems (36, 102); and one or more components executed by the one or more computer subsystems, wherein the one or more components comprise: a machine learning based model (104, 206) configured for performing one or more simulations for the purposes of mask inspection, wafer inspection and wafer metrology for specimens, the specimens comprising semiconductor wafers or reticles, wherein the machine learning based model is trained with only information for nominal instances of one or more of the specimens, wherein the nominal instances comprise instances of no defects on the one or more specimens; wherein the one or more computer subsystems (36, 102) are configured for: acquiring information for non-nominal instances of one or more of the specimens, wherein the non-nominal instances comprise instances of defects on the one or more specimens; wherein the defects comprise one or more synthetic defects generated by altering a design for the one or more specimens to create the synthetic defects in the design; re-training the machine learning based model with the information for the non-nominal instances of the one or more of the specimens thereby performing transfer learning of the information for the non-nominal instances of the one or more of the specimens to the machine learning based model; wherein the training and re-training of the machine learning based model corresponds to the transfer learning, with the training performed with the nominal instances of one or more of the specimens being a training for a source task of the transfer learning, the re-training with non-nominal instances corresponding to the training of the machine learning based model for a target task, the target task being the performing of the one or more simulations for the purposes of mask inspection, wafer inspection and wafer metrology for specimens.