On the basis of the theory of pattern recognition, the problem of identifying flaws in welded joints on the basis of ultrasonic quality control was stated. The article substantiates the principle of classifying flaws. It provides an a priori terminology of flaws. An optimum decision rule of identification is suggested.