This paper proposes a method for the characterization of multilayer defects from extreme ultraviolet (EUV) projection images at different focus positions. The transport-of-intensity equation is applied to retrieve the phase distribution of the reflected light in the vicinity of the defect. The defect-induced intensity and phase modifications and their dependency from defect geometry parameters are analyzed by several selected optical properties of multilayer defect. To reconstruct the defect geometry parameters from the intensity and phase of a defect, a principal component analysis (PCA) is employed to parameterize the intensity and phase distributions into principal component coefficients. In order to construct the base functions of the PCA, a combination of a reference multilayer defect and appropriate pupil filters is introduced to obtain the designed sets of intensity and phase distributions. Finally, an artificial neural network is applied to correlate the principal component coefficients of the intensity and the phase of the defect with the defect geometry parameters and to reconstruct the unknown defect geometry parameters. The performance of the proposed approach is evaluated both for mask blank defects and for defects in the vicinity of an absorber pattern.