System of neural networks based on distillation, and improved training methods

The student-teacher neural network system addresses inefficiencies in existing anomaly detection systems by minimizing cost functions based on linear processing layer outputs and independently optimizing each layer, resulting in a faster, more flexible, and efficient anomaly detection solution for industrial applications.

WO2024184324A1PCT designated stage expired Publication Date: 2024-09-12DEEPHAWK SAS

Patent Information

Application Number
PCT/EP2024/055628
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-09
Filing Date
2024-03-04
Publication Date
2024-09-12

AI Technical Summary

Technical Problem

Existing neural network systems for anomaly detection in industrial settings are inefficient, requiring large amounts of data, slow to learn, and inflexible, making them unsuitable for real-time industrial applications due to reliance on complex deep learning schemes and standard backpropagation algorithms.

Method used

A student-teacher neural network system is configured to minimize cost functions based on data from the output of linear processing layers, allowing for faster and more flexible learning by using a pre-trained teacher network to adapt a smaller student network, with incremental addition of layers and independent optimization of each layer, reducing the need for iterative non-linear optimization processes.

Benefits of technology

This configuration enables faster and more efficient learning, allowing the system to adapt to changing industrial conditions and improve detection precision, making it suitable for real-time industrial applications with reduced data requirements and increased flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure EP2024055628_12092024_PF_FP_ABST
    Figure EP2024055628_12092024_PF_FP_ABST
Patent Text Reader

Abstract

The invention relates to a system of neural networks of the student-teacher type, in which a first pre-trained neural network, referred to as teacher network (REN), is used during a learning phase to train a second neural network, referred to as student network (REL), by minimising at least one cost function (FC) between corresponding intermediate layers of the networks, the intermediate layers each comprising a linear processing layer (L) followed by a non-linear processing layer (NL). According to the general principle of the proposed technique, during this learning phase, these cost functions are minimised on the basis of data obtained directly at the output of the linear processing layers (L) of the corresponding intermediate layers.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] DESCRIPTION

[0002] Distillation neural network system, improved training methods

[0003] Technical field

[0004] The invention lies in the field of artificial neural networks. More particularly, the invention relates to the use of such neural networks to detect anomalies or defects in manufactured products, for example at the time of their manufacture, or in raw products.

[0005] Prior art

[0006] The automatic detection of defects or anomalies on manufactured products, from images or videos of these products provided as input to an electronic system, is of the greatest interest, particularly in the context of quality control processes implemented in industrial environments.

[0007] In this field, computer vision and artificial intelligence techniques are increasingly being used to provide automatic fault detection and localization solutions that are as reliable as possible and relatively inexpensive. Many of these solutions rely on the use of artificial neural networks, which, once trained, prove to be particularly efficient and well-suited to carrying out specific applications of this type, involving pattern recognition and / or data classification.

[0008] Figure 1 schematically and simplifiedly presents a standard prior art neural network architecture, in which a variable number of layers of neurons follow one another to produce an output S (for example a classification) as a function of input data E injected into the network (for example images of a machined part or a product). Such a network generally comprises an input layer CE and an output layer CS, between which one or more intermediate layers (C11, C12, C13) are arranged.

[0009] The intermediate layers each comprise one or more neurons (not shown), the neurons of a layer taking their inputs from the outputs of the neurons of the previous layer. Within a neuron, the neuron's inputs are combined linearly (i.e. via a weighted sum of the inputs), and the result of this linear combination of inputs is injected as input to a non-linear activation function (e.g. a sigmoid or ReLu function) which delivers the output value of the neuron which will in turn feed the next layer of the network. In a simplified manner, and as illustrated in Figure 1, we can therefore consider that each intermediate layer (Cil, Cl 2, CI3, etc.) can be decomposed into a linear processing layer L (linear combination), followed by a non-linear processing layer NL (non-linear activation).

[0010] The different weights of the neural network (i.e. the different weighting coefficients used for the implementation of the linear combination of inputs at the level of each neuron) are adjusted during a learning phase, by minimizing a cost function. More specifically, during this learning phase, an output generated by the network is compared with an expected output provided by the user (supervised learning) or generated automatically (unsupervised learning), and the weights of the neural network are adjusted progressively, using a backpropagation algorithm of the gradient descent type, so as to reduce the error (i.e. minimize the cost function) between the obtained output and the expected output.By repeating this procedure a sufficient number of times with many training examples, the network's weights are gradually adapted until the generated output matches the ground truth as closely as possible in most cases. The neural network can then be used to perform the specific application for which it was trained, such as pattern recognition or data classification, for example.

[0011] Such deep learning-based neural networks for image analysis have shown great potential in recent years in these fields related to image classification and object detection. Based on a large amount of images labeled or tagged with object classes or concepts, artificial intelligence algorithms based on neural networks are notably capable of learning image representations with high generalization power, and of providing detection performances close to those of humans.

[0012] Although promising, particularly in the field of defect detection, many obstacles mean that existing solutions based on standard neural networks (i.e. with an architecture of the type illustrated in Figure 1) remain poorly adapted to the real needs and constraints of industrial players. In particular, when trying to deploy such solutions in practice in a production environment, the large amount of data required to train the network, the need to identify and label samples en masse for each type of defect, the slow learning process, and the rigidity of current technology in the face of constantly changing situations are among the main bottlenecks that prevent these solutions from reaching their full maturity for applications on an industrial scale.

[0013] Various solutions have been explored to at least partially address some of these issues. For example, instead of learning to detect defects, a different, more powerful approach is to train the neural network to learn the normal (i.e., defect-free) appearance of objects, so as to then detect any deviation from normality as a defect or anomaly. Through this paradigm shift, the amount of data required to train the network is significantly reduced, and this data is easier to gather (since this time we will only target "good" products, i.e., "normal" images of parts, without defects), and training is faster (since the system does not need to learn to detect multiple classes of defects).Existing solutions based on this approach for anomaly detection, however, still do not address some of the significant constraints identified previously. In particular, they still rely on complex deep learning schemes that remain inflexible and require substantial learning effort, making them still poorly suited for implementation in real industrial production conditions.

[0014] In an attempt to overcome these drawbacks, solutions based on the concept of knowledge distillation and on student-teacher neural network systems have been developed and used in the field of fault detection, with the particular aim of reducing the amount of data required for training. Figure 2 presents in a schematic and simplified manner an example of the architecture of such a student-teacher neural network system, according to the prior art, which is based on the use of a pair of neural networks: a teacher network REN and a student network REL.In such an approach, the REN teacher network is pre-trained: in other words, it has already been trained with a large amount of data (for example, based on a dataset of the ImageNet type, well known in the field of computer vision, comprising millions of arbitrary images annotated in such a way as to specify the presence or absence of certain classes of objects in each image) to carry out a task, for example an image classification task, which ultimately has little importance (such a task is therefore sometimes referred to as a "proxy" task). In a system of student-teacher networks, the idea is not to exploit the teacher network for its ability to carry out a particular task, but rather to exploit its capacity to extract at the level of its intermediate layers (and more particularly the intermediate layers Cil, CI2, etc., upstream of the network) of the important generic characteristics of the images provided as input to this network. The final decision layers of the REN teaching network are therefore not significant in this context.

[0015] By integrating a pre-trained REN teacher network into a neural network system, it becomes possible, during a learning phase, to force the REL student network to adapt to given characteristics, typically characteristics representative of the normality of a product, even if the student network has a significantly smaller number of intermediate layers (CH', CI2', etc.) than the teacher network. To do this, during the learning phase, IMG images of defect-free products are injected into the system's input, and the features extracted from the output of the intermediate layers of the REN teacher network, which are then generic characteristics representative of a "normal" (i.e. defect-free) product, are used to train the REL student network, by minimizing FC cost functions between the corresponding intermediate layers (Cil and CH', CI2 and CI2', etc.) of these two networks, via a progressive adjustment of the weights of the REL student network. In this way, the student network also learns not to solve a specific task, but to specialize in the “normal” (i.e. defect-free) appearance of an object.

[0016] Subsequently, in the operational phase (i.e. once the learning phase is completed), injecting into the neural network system an image of a product presenting defects or anomalies (i.e. a product which is not "normal") will tend to produce different characteristics in the two networks at the level of their corresponding intermediate layers, a measurement of these differences thus allowing the detection of the presence or on the contrary the absence of the defects or anomalies in question.

[0017] The previously described approach, based on the use of a prior art student-teacher neural network system as illustrated in relation to Figure 2, still suffers from certain drawbacks that may prove prohibitive for use on an industrial scale. Firstly, although faster than traditional deep learning approaches, the learning is still not fast enough for certain industrial applications, in particular because it remains based on standard backpropagation and gradient descent algorithms, i.e. non-linear optimization implemented via highly iterative and therefore relatively slow processes. Secondly, the learning of the student network is always carried out before the deployment of the system in a production environment (i.e.offline), and the system actually deployed therefore has a fixed dimension, which limits the system's ability to adapt to continuous changes that are nevertheless frequent in an industrial environment. Thirdly, a supervision step is always necessary, during which normal samples are presented to the system, before the system can be deployed in production and effectively used for fault detection.

[0018] There is therefore a need for neural network-based solutions that are more efficient, faster and more flexible than those of the prior art, particularly in the field of fault detection.

[0019] Summary of the invention

[0020] The present technique makes it possible to propose a solution aimed at remedying certain drawbacks of the prior art. According to one aspect, the present technique relates to a system of student-teacher type neural networks, in which a first pre-trained neural network, called the teacher network, is used during a learning phase to train a second neural network, called the student network, by minimizing at least one cost function between corresponding intermediate layers of said networks, said intermediate layers each comprising a linear processing layer followed by a non-linear processing layer. According to the general principle of the proposed technique, said system is configured so that, during said learning phase, said cost functions are minimized as a function of data obtained directly at the output of the linear processing layers of said corresponding intermediate layers.

[0021] In a particular embodiment, said neural network system is further configured so that, during said learning phase, the linear processing layers of the intermediate layers of the student network have as inputs the outputs of the immediately preceding intermediate layers of said teacher network.

[0022] In a particular embodiment, said neural network system is used to detect the presence or absence of a defect on a target product, from at least one image of said target product provided as input to said system.

[0023] According to a particular characteristic of this embodiment, during said learning phase, only images of products of the same type as the target product in which said products do not have defects are injected into the input of said system. Alternatively, according to another particular characteristic of this embodiment, during said learning phase, any images of products of the same type as the target product are injected into the input of said system, and said system integrates robust estimation means configured to automatically reduce, during said learning phase, the sensitivity of said system to images of products comprising a defect among said any images.

[0024] In a particular embodiment, the dimensioning of the student network is adapted incrementally, by successively adding, one after the other, intermediate layers to said student network, as long as a predetermined efficiency threshold has not been reached in the detection of the presence or absence of defects on target products.

[0025] In a particular embodiment, said neural network system further comprises at least one processor, called a configuration processor, configured to arrange inputs and outputs of said intermediate layers of said neural network system between: a learning configuration, implemented during said learning phase, in which the linear processing layers of the intermediate layers of the student network have as inputs only the outputs of the intermediate layers immediately preceding said teacher network; an inference configuration, implemented during an inference phase, in which the linear processing layers of the intermediate layers of the student network have as inputs only the outputs of the intermediate layers immediately preceding said student network.

[0026] According to another aspect, the proposed technique also relates to a method for adapting the sizing of a student network of a neural network system as described previously in its various embodiments. Such a method comprises the following steps:

[0027] (a) adding an intermediate layer to said student network;

[0028] (b) estimation of the parameters associated with said added intermediate layer, independently of the rest of said student network;

[0029] (c) obtaining a measurement representative of an accuracy achieved by the neural network system, said measurement taking into account all of the intermediate layers added to said student network; (d) comparing said measurement representative of an accuracy achieved with a predetermined accuracy threshold, and when said measurement representative of an accuracy achieved is greater than said predetermined accuracy threshold, stopping said method of adapting the dimensioning of the student network; when said measurement representative of an accuracy achieved is less than said predetermined accuracy threshold, implementing a new iteration of steps (a), (b), (c) and (d).

[0030] According to another aspect, the proposed technique also relates to a computer program product downloadable from a communication network and / or stored on a computer-readable medium and / or executable by a microprocessor, comprising program code instructions for executing a method of adapting the sizing of a student network of a neural network system as described above, when executed on a computer.

[0031] The proposed technique also relates to a computer-readable recording medium on which is recorded a computer program comprising program code instructions for executing the steps of the method as described above, in any of its embodiments.

[0032] Such a recording medium may be any entity or device capable of storing the program. For example, the medium may include a storage medium, such as a ROM, for example a CD ROM or a microelectronic circuit ROM, or a magnetic recording medium, for example a USB flash drive or a hard disk.

[0033] On the other hand, such a recording medium may be a transmissible medium such as an electrical or optical signal, which may be conveyed via an electrical or optical cable, by radio or by other means, so that the computer program contained therein is remotely executable. The program according to the invention may in particular be downloaded over a network, for example the Internet.

[0034] The various embodiments mentioned above can be combined with each other to implement the invention.

[0035] Figures Other characteristics and advantages of the invention will appear more clearly on reading the following description of a preferred embodiment, given as a simple illustrative and non-limiting example, and the appended drawings, among which:

[0036] [Fig 1] presents in a schematic and simplified manner a standard neural network architecture according to the prior art;

[0037] [Fig 2] presents in a schematic and simplified manner an architecture of a teacher-student type neural network system, according to the prior art;

[0038] [Fig 3] presents in a schematic and simplified manner a first improved configuration of a teacher-student type neural network system, in the learning phase, in a particular embodiment of the proposed technique;

[0039] [Fig 4] presents in a schematic and simplified manner a second improved configuration of a teacher-student type neural network system, in the learning phase, in a particular embodiment of the proposed technique;

[0040] [Fig 5] illustrates the different stages of a method for adapting the dimensioning of a student network of a neural network system, in a particular embodiment of the proposed technique;

[0041] [Fig 6] presents a simplified architecture of a device for adapting the sizing of a student network of a neural network system, in a particular embodiment.

[0042] Detailed description of the invention

[0043] This technique makes it possible to overcome some of the aforementioned drawbacks.

[0044] The proposed technique aims in particular to provide a neural network system that is efficient, fast and flexible, and therefore well suited to being deployed in industrial production environments, for example for automatic defect detection applications on raw or manufactured parts or products.

[0045] In one aspect, the present technique relates more particularly to innovative configurations of student-teacher type neural network systems, which notably allow the simplification and optimization of the learning of the student network.

[0046] In all figures in this document, elements and steps of the same nature are designated by the same reference.

[0047] As already described in relation to Figure 2 of the prior art, and again presented below in relation to Figures 3 and 4 illustrating various particular embodiments of the present technique, a student-teacher type neural network system is a system in which a first pre-trained neural network, called a teacher network REN, is used during a learning phase to train a second neural network, called a student network REL. Independently of the application envisaged for the neural network system, the teacher network has for example been previously pre-trained for any classification task, by means of a data set comprising a very large number (e.g. several tens or hundreds of thousands, or even millions) of annotated images of various entities or classes of objects (objects, living beings, etc.).The implementation of such pre-training of the teaching network is not the subject of the present technique, but it results therefrom, as already described in relation to the prior art, that the teaching network thus already has the capacity to extract at the level of its intermediate layers (and more particularly of the intermediate layers upstream of the teaching network) important generic characteristics of the images provided as input to this network.

[0048] The neural network system according to the present technique is however distinguished from the systems of the prior art in that it is configured in a particular manner, in particular during the learning phase, according to innovative configurations giving it multiple advantages. More particularly, in a particular embodiment and as detailed below, the proposed neural network system comprises at least one processor, called configuration processor, configured to arrange the inputs and outputs of different layers of the neural network system according to different configurations described below. According to a particular characteristic, the configuration processor is in particular configured to connect the inputs and outputs of the intermediate layers of the neural network system in different ways, depending on whether a learning phase or an inference phase is implemented within the neural network system.In other words, the proposed technique allows, in a way, to "wire" differently certain internal inputs and outputs of the neural network system, depending for example on the current phase - learning or inference - implemented within the neural network system, in order to benefit from advantageous technical effects linked to these different configurations.

[0049] According to a first configuration, illustrated in relation to figure 3 in a particular embodiment, rather than minimizing during the learning phase of the FC cost functions as a function of the data obtained at the output of the non-linear processing layers of the intermediate layers of the network, as is conventionally carried out in the systems of the prior art such as presented in figure 2, it is proposed to carry out this operation as a function of data obtained upstream, directly at the output of the linear processing layers of the intermediate layers.To this end, upon receiving, for example, data that the neural network system is in a learning phase, or upon automatic detection that such a phase is being implemented, the configuration processor configures the neural network system in accordance with the configuration shown in Figure 3, by connecting the inputs of the FC cost function minimization modules directly to the outputs of the linear processing layers of the corresponding intermediate layers of the student and teacher networks. In this way, the adjustment of the weights of the intermediate layers of the student network is performed so as to adapt to the output of the linear processing layers of the intermediate layers of the teacher network, and no longer to the non-linear processing layers as in the existing system.

[0050] Such an adaptation is possible on the one hand due to the use of two networks (the teacher network and the student network) operating in parallel, and on the other hand due to the fact that the activation functions classically used for the implementation of the non-linear processing layers of the intermediate layers - particularly in systems used for fault detection applications - are continuous increasing monotonic functions.

[0051] Thus, minimizing a cost function as a function of output data from the linear processing layer of the intermediate layers is, from the overall point of view of the learning purpose of the student network, equivalent to minimizing a cost function as a function of output data from the non-linear processing layer of the intermediate layers as is done in the prior art.

[0052] On the other hand, from the point of view of the process of optimizing the weights of the REL student network during its training phase, such a configuration according to Figure 3 is particularly advantageous in that it makes it possible to switch from an objective of solving a non-linear optimization problem as posed with the solutions of the prior art to an objective of solving a purely linear optimization problem within the framework of the proposed technique. In other words, a previously complex optimization problem (non-linear minimization) is transformed, by means of the present technique, into a much less complex optimization problem of determining a linear regression model with respect to the parameters of the linear layers of the system.Simple and fast linear estimation techniques, for which a solution is also directly accessible without the need to resort to a process of successive iterations as is the case for solving a nonlinear problem, can then be implemented. For example, the present technique makes it possible to use tools such as Singular Value Decomposition (SVD) for this purpose, instead of the classic gradient descent backpropagation algorithms conventionally implemented in existing networks. Such linear estimation tools provide exact solutions quickly and also make it possible to avoid certain common problems of existing neural networks, such as the problem of vanishing gradients for example.

[0053] A second configuration, presenting additional and complementary adaptations to the first configuration previously presented, is illustrated in relation to figure 4, in a particular embodiment of the proposed technique.

[0054] In this second configuration, it is proposed to exploit even more thoroughly the parallelism between the teacher network REN and the student network REL, by directly injecting into the input of the intermediate layers of the student network the output data of the immediately preceding intermediate layers of the teacher network, during the learning phase of the student network.In other words, as shown in Figure 4, the neural network system is configured in such a way that an intermediate layer of rank n of the student network REL no longer accepts as input the output of the intermediate layer of rank n-1 of the student network REL, but that of rank n-1 of the teacher network REN (for example, the output of the non-linear processing layer NL of the intermediate layer Cil of the teacher network REN is injected into the input of the linear processing layer L of the intermediate layer CI2' of the student network, the output of the non-linear processing layer NL of the intermediate layer Cl 2 of the teacher network REN is injected into the input of the linear processing layer L of the intermediate layer CI3' of the student network, etc.).To this end, upon receipt, for example, of data indicating that the neural network system is in a learning phase, or following automatic detection that such a phase is being implemented, the configuration processor makes configuration modifications complementary to those already presented in relation to Figure 3, by connecting the inputs of the linear processing layers of the intermediate layers of the student network only to the outputs of the immediately preceding intermediate layers of the teacher network, in accordance with the configuration presented in Figure 4.According to a particular characteristic, all the features extracted at the output of an intermediate layer of the teacher network REN are thus injected directly at the input of the next intermediate layer of the student network, which distinguishes the proposed solution from certain neural network compression techniques according to which only a part of the features generated at the output of an intermediate layer is retained and taken into account. Such an adaptation according to Figure 4 is based on the fact that the propagation of data from the input to the output of a neural network corresponds to the implementation of a composition of functions, and that minimizing the cost function at the output of each linear processing layer separately is equivalent, due to the continuity properties of the functions used, to minimizing the composition of the functions (the limit of a composition of functions is the composition of the limits, given the continuity).

[0055] With this configuration in the learning phase, a complete decoupling of the estimation of the weights associated with the different linear processing layers of the intermediate layers (CH', Cl 2', etc.) of the student network is obtained, insofar as: the input of a linear processing layer L of an intermediate layer of the student network REL is taken directly from the output of a previous intermediate layer of the teacher network REN (except for the very first intermediate layer of the student network); the minimization of the cost function is carried out at the output of the linear processing layer of the intermediate layer of the student network, on the basis of output data from the linear processing layer of the corresponding intermediate layer of the teacher network (according to the general principle already described in relation to the first configuration presented in relation to Figure 3).

[0056] In other words, in the configuration according to Figure 4, the optimization of each intermediate layer (Cil', CI2', CI3', etc.) of the student network becomes a problem independent of the rest of the student network, which does not depend in particular on the optimization of the preceding or following intermediate layers of the student network.

[0057] Such a configuration is particularly interesting in many aspects.

[0058] First, it is no longer necessary to use error backpropagation algorithms to estimate the weights of each intermediate layer of the student network.

[0059] Second, each intermediate layer of the student network can be optimized independently of the other intermediate layers of this network, which makes it possible to parallelize the optimization operations of the different layers of the student network during the learning phase, with the effect of an overall speed gain.

[0060] Third, training can be easily distributed for each intermediate layer of the student network since these intermediate layers are no longer interdependent. Fourth, directly using the characteristics of the teacher network as input to the linear processing layers of the intermediate layers of the student network allows for faster convergence to the solution that minimizes the cost function, when an iterative optimization method is used. In particular, convergence is much faster than in standard architectures such as the one illustrated in Figure 2, in which many iterations are required in the training phase before obtaining relevant inputs on all the intermediate layers of the student network.Indeed, in existing systems, the input data injected into an intermediate layer of the student network correspond to the output data of the previous layer of this network. Also, as long as the parameters of a layer are still poorly estimated, the results produced at the output of this layer are not relevant and are therefore similar to noise injected into the next layer. In other words, as long as the process of adjusting the weights of a layer of the student network has not reached a certain degree of adaptation to the characteristics of the corresponding layer of the teacher network, the adjustment of the weights of the next layer of the student network is not carried out on relevant data. The overall process of adjusting all the weights of the student network is therefore slow to converge, in existing solutions.The configuration according to the present technique, as illustrated in relation to Figure 4, does not have such drawbacks: in fact, as the teacher network is already pre-trained, the output data of the linear processing layers of the intermediate layers of the teacher network which are injected into the input of the intermediate layers of the student network are already relevant data (the process of adjusting the weights of the teacher network having already been completed during the prior training of this network). The learning phase of the student network is therefore faster with the proposed technique than in existing solutions.

[0061] A neural network system according to the proposed technique is for example particularly suitable for use in applications for detecting the presence (or absence) of defects or anomalies on target products, from at least one image of the target product provided as input to said system. Such images can for example be provided by image acquisition devices (e.g. camera, camera) installed on a production line (acquisition of images of products conveyed on a conveyor belt, for example).

[0062] In a particular embodiment, during the learning phase of the student network of the neural network system, only images of products of the same type as the target product, which do not have defects, are presented as input to the system. Thus, in this “supervised” type learning mode, the student network is allowed to specialize in learning the “normal” appearance of the product in question (i.e. without defects), insofar as the generic characteristics extracted at the intermediate layers of the pre-trained teacher network will then be representative of such normality of a product.The properties of layer independence and rapid convergence of the optimization presented previously are then particularly interesting, in that they make it possible to limit the number of iterations during which the characteristics extracted at the level of the intermediate layers and used for the optimization are not yet relevant, that is to say to limit the optimization on the basis of data which would not yet be representative of the "normality" of the product considered.

[0063] In a particular alternative embodiment, it is also possible to implement “unsupervised” type learning, by integrating robust estimation means into the neural network system. In this case, during the learning phase of the student network of the neural network system, any images of products of the same type as the target product are injected into the system, with the assumption that a majority of the images thus injected are images of “normal” products, i.e. not exhibiting defects or anomalies. In other words, it is considered that statistically, on a panel of products of the same type selected at random, the vast majority of products (e.g. more than 95% of the products) will have a normal appearance, while only a small minority of products (e.g. less than 5% of the products) will exhibit a defect.The robust estimation means are then configured to reduce the sensitivity of the system to product images comprising a defect among the images injected as inputs, based for example on statistical anomaly detection techniques. Product images not corresponding to normality can thus for example be automatically rejected or discarded during the learning phase. Such a variant is of definite interest, in that it allows learning to be implemented even after deployment of the system in a production environment, and moreover in a completely unsupervised mode.In other words, it is sufficient, for example, for products to "scroll" for a certain time (considered as a learning time) under the image acquisition device coupled to the neural network system, under normal production conditions, for the learning phase and therefore the optimization of the system to be carried out automatically and autonomously. In a particular embodiment, when this learning time has elapsed, in other words when the learning phase is considered complete, the configuration processor previously presented modifies the arrangement of the inputs and outputs of the different layers of the neural network system so as to adopt, for the inference phase (i.e. the exploitation phase), the conventional configuration illustrated in relation to FIG. 2, according to which the intermediate layers of the student network have as inputs the outputs of the immediately preceding intermediate layers of the student network.

[0064] The decoupling during the training phase of the different intermediate layers of the student network as obtained with the neural network system configuration presented in Figure 4 offers other particularly interesting advantages. Thus, it makes it possible to easily adapt the sizing of the student network to the different needs of manufacturers and / or to changes in the industrial environment in which the solution is deployed. More specifically, this decoupling facilitates the progressive addition of complexity to the model, by making possible an “à la carte” or “on demand” adaptation of the number of intermediate layers of the student network, even when the system is already deployed in a production environment. Indeed, to the extent that the parameters of the intermediate layers of the student network are estimated independently for each layer (i.e.without any interdependent relationship between the different intermediate layers of the student network), layers can be added (or removed) as needed, without this modification affecting the other layers of the student network. A criterion such as reaching a predetermined effectiveness threshold (for example an effectiveness threshold in detecting the presence or absence of defects on target products), or any other means of decision, can for example be used to determine, for example at the configuration processor level, whether or not it is useful to add an intermediate layer to the student network.

[0065] Figure 5 presents, in a particular embodiment of the proposed technique, an example of a method for adapting the sizing of a student network of a neural network system configured in the embodiment described previously in relation to Figure 4. Such an example is given purely for illustrative and non-limiting purposes, in the context of an application to the detection of defects on a target product. Such a method is for example implemented after deployment of the neural network system in a production environment, possibly with a student network in which no intermediate layer is yet instantiated, and it comprises the following steps: (a) a step 51 of adding an intermediate layer to the student network (at the end of the very first implementation of this step, the student network comprises for example only a single intermediate layer);

[0066] (b) a step 52 of estimating the parameters (i.e. the weights) associated with the added intermediate layer, using the approach already described in relation to figure 4 (in other words, thanks to the particular configuration of the neural network system during the learning phase, this estimation is carried out independently of the rest of the student network, and in particular of the other intermediate layers possibly already present);

[0067] (c) a step 53 of obtaining a measurement MES representative of a precision achieved by the neural network system, said measurement taking into account all of the intermediate layers added to said student network (such a measurement is for example determined as a function of the output characteristics of the intermediate layers of the student network, with regard to the characteristics of the corresponding intermediate layers of the teacher network, for example by evaluating the values ​​of the different cost functions between corresponding layers);

[0068] (d) a step 54 of comparing the measurement MES representative of an accuracy achieved with a predetermined accuracy threshold SL and: when said measurement representative of an accuracy achieved is greater than the predetermined accuracy threshold, stopping said method of adapting the dimensioning of the student network (in other words, the number of intermediate layers of the student network is considered sufficient for the desired objective and it is unnecessary to add more, the method of adapting the dimensioning is then terminated); when said measurement representative of an accuracy achieved is lower than said predetermined accuracy threshold, implementing a new iteration of steps (a), (b), (c) and (d) (in other words, the level of accuracy achieved is still considered insufficient, and it is necessary to add at least one more intermediate layer to the student network to improve its accuracy).

[0069] The neural network system according to the present technique is therefore particularly flexible.

[0070] Steps 51 to 54 (ie (a), (b), (c) and (d)) previously described are for example implemented by the configuration processor, in the learning phase. According to a particular characteristic, during step 51 of adding an intermediate layer to the student network, the configuration processor ensures that the added intermediate layer takes as input the output of the immediately preceding intermediate layer of the teacher network.According to a particular optional characteristic, when the student network already comprises intermediate layers, the configuration processor proceeds, prior to the implementation of steps 51 to 54, to a step of arrangement (or at least a step of verification) of the inputs and outputs of the intermediate layers of the neural network system, in order to ensure that the neural network system conforms to the configuration presented and already described in relation to Figure 4, according to which the existing intermediate layers of the student network have in particular as inputs only the outputs of the immediately preceding intermediate layers of the teacher network. This guarantees that the decoupling of the different intermediate layers of the student network is indeed effective, and that it is therefore possible to benefit from the advantages associated with such decoupling.

[0071] Once the learning phase is complete, the neural network system according to the proposed technique can be used in an operational phase called the inference phase. For example, for a defect detection application as described throughout this document, injecting into the neural network system an image of a product with defects or anomalies (i.e., a product that is not "normal") will tend to produce different characteristics in the two networks at their corresponding intermediate layers, a measurement of these differences thus allowing the detection of the presence or, on the contrary, the absence of the defects or anomalies in question. It should be noted that for this operational phase (i.e.,inference), the neural network system can be used in its configuration illustrated in relation to Figure 4, which allows for maintaining parallelization of information processing, and in particular the possibility of processing each layer of the student network completely independently of the other layers of this network. Alternatively, for this inference phase the neural network system can also be reconfigured after the learning phase to be used in a more classic configuration as illustrated in relation to Figure 2.Also, according to a particular characteristic, at the end of the learning phase and prior to the inference phase, the configuration processor carries out a new step of arranging the inputs and outputs of the intermediate layers of the neural network system, in order to place the neural network system in the classic configuration of Figure 2, according to which the intermediate layers of the student network have as inputs the outputs of the immediately preceding intermediate layers of the student network. Adopting the configuration of Figure 2 for inference rather than retaining the configuration of Figure 4 is of particular interest in the context of anomaly detection. Indeed, as a reminder, it is the comparison between the outputs of the layers of the teacher network on the one hand and of the student network on the other hand which makes it possible to detect possible defects or anomalies.More specifically, injecting an image of a product with defects or anomalies (i.e., a product that is not "normal") into the neural network system produces different characteristics in the two networks at their corresponding intermediate layers, and it is the measurement of these differences that makes it possible to detect the presence or absence of defects or anomalies. The configuration of Figure 2 is then particularly relevant for inference operations, since the output of each layer of the student network is again propagated directly through the following layers of the student network, which has the advantageous effect of amplifying any existing gap (or difference) between the outputs of corresponding layers of the student and teacher networks as the data is propagated through the neural network system.Reconfiguring the system according to the configuration of Figure 2 in the inference phase then makes it possible to obtain increased sensitivity of the system for the detection of anomalies (in other words, better sensitivity than that which would have been obtained with the configuration of Figure 4 in particular).

[0072] According to another aspect, the proposed technique also relates to a device capable of carrying out the method of adapting the dimensioning of a student network of a neural network system presented previously. More particularly, such a device according to the present technique comprises means allowing the implementation of steps (a), (b), (c) and (d) previously described, i.e.: means for adding an intermediate layer to the student network; means for estimating the parameters associated with said added intermediate layer, independently of the rest of said student network; means for obtaining a measurement representative of a precision achieved by the neural network system, said measurement taking into account all of the intermediate layers added to said student network; means for comparing said measurement representative of a precision achieved with a predetermined precision threshold.

[0073] According to a particular characteristic, such a device also comprises means for arranging the inputs and outputs of the intermediate layers of the neural network system (i.e., means for modifying the connections - or the "wiring" - of these different layers, for example in the form of a configuration processor configured to be able to carry out such modifications).

[0074] Figure 6 represents, in a schematic and simplified manner, the structure of such a device, in a particular embodiment. The device according to the proposed technique comprises for example a memory 61 consisting of a buffer memory M, a processing unit 62, equipped for example with a processor or microprocessor pP (taking for example the form of a configuration processor as previously described), and controlled by the computer program Pg 63, implementing steps of the method for adapting the dimensioning of a student network of a neural network system, according to at least one embodiment of the invention.

[0075] Upon initialization, the code instructions of the computer program 63 are loaded into the buffer memory before being executed by the processor of the processing unit 62.

[0076] The microprocessor of the processing unit 62 then carries out the steps of the method for adapting the dimensioning of the student network, according to the instructions of the computer program 63. More particularly, the processing unit 62 receives, for example, as input E a request for adapting the dimensioning of the student network of a neural network system, and proceeds to successively add, one after the other, intermediate layers to the student network, as long as the neural network system has not reached a predetermined precision threshold. Once this threshold is reached, the processing unit 62 then delivers as output S a student-teacher type neural network system in which the number of intermediate layers of the student network is dimensioned for the execution, with the desired precision, of the application for which the student-teacher type neural network system is configured.

Claims

CLAIMS 1. A student-teacher type neural network system, configured to detect the presence or absence of a defect on a target product from at least one image of said target product provided as input to said system, in which a first pre-trained neural network, called a teacher network (REN), is used during a learning phase to train, on the basis of images of products of the same type as the target product injected as input to said system, a second neural network, called a student network (REL), by minimizing at least one cost function (FC) between corresponding intermediate layers of said networks, said intermediate layers each comprising a linear processing layer (L) followed by a non-linear processing layer (NL), said system being characterized in that, during said learning phase,the linear processing layers of the intermediate layers of the student network have as inputs only the outputs of the immediately preceding intermediate layers of said teacher network, and in that, in response to the injection of an image of a product of the same type as the target product at the input of said system, said cost functions are minimized as a function of data obtained directly at the output of the linear processing layers (L) of said corresponding intermediate layers., 2. System according to claim 1, characterized in that during said learning phase, only images of products of the same type as the target product in which said products do not present defects are injected into the input of said system.

3. System according to claim 1, characterized in that during said learning phase, any images of products of the same type as the target product are injected into the input of said system, and in that said system integrates robust estimation means configured to automatically reduce, during said learning phase, the sensitivity of said system to images of products comprising a defect among said any images.

4. System according to claim 1, characterized in that the dimensioning of the student network is adapted incrementally, by successively adding, one after the other, intermediate layers to said student network, as long as a predetermined efficiency threshold has not been reached in the detection of the presence or absence of defects on target products.

5. System according to claim 1, characterized that it further comprises at least one processor called configuration processor configured to arrange inputs and outputs of said intermediate layers of said neural network system between: a learning configuration, implemented during said learning phase, in which the linear processing layers of the intermediate layers of the student network have as inputs only the outputs of the intermediate layers immediately preceding said teacher network; an inference configuration, implemented during an inference phase, in which the linear processing layers of the intermediate layers of the student network have as inputs only the outputs of the intermediate layers immediately preceding said student network.

6. Method for adapting the dimensioning of a student network of a neural network system according to claim 1, said method being characterized in that it comprises the following steps: (a) adding (51) an intermediate layer to said student network; (b) estimation (52) of the parameters associated with said added intermediate layer, independently of the rest of said student network; (c) obtaining (53) a measurement (MES) representative of a precision achieved by the neural network system, said measurement taking into account all of the intermediate layers added to said student network; (d) comparison (54) of said measurement (MES) representative of an accuracy achieved with a predetermined accuracy threshold (SL), and when said measurement representative of an accuracy achieved is greater than said predetermined accuracy threshold, stopping said method of adapting the dimensioning of the student network; when said measurement representative of an accuracy achieved is lower than said predetermined accuracy threshold, implementing a new iteration of steps (a), (b), (c) and (d).

7. Computer program product downloadable from a communication network and / or stored on a computer-readable medium and / or executable by a microprocessor, characterized in that it comprises program code instructions for the execution of a method according to claim 6, when executed by a computer.

Citation Information

Patent Citations

  • Neural network compression method and device, computer equipment and storage medium

    CN110880036A

  • Methods, devices and media for improving knowledge distillation using intermediate representations

    US20220335303A1

Cited By

  • Student model training method and device based on gradient decoupling

    CN121390201A