Methods and apparatus for training neural network models

CN116957071BActive Publication Date: 2026-08-14TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-14
Publication Date
2026-08-14

AI Technical Summary

Benefits of technology

[0010]本公开的实施例还提供了一种计算机可读存储介质,其上存储有计算机可执行指令,指令在被处理器执行时,提供上述方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116957071B_ABST
    Figure CN116957071B_ABST
Patent Text Reader

Abstract

This disclosure provides a method, apparatus, computer program product, and storage medium for training a neural network model. The method includes: initializing an information processing neural network model and a corresponding reference neural network model, wherein the information processing neural network model includes multiple processing modules, and the reference neural network model includes multiple reference modules; and updating the parameters of the information processing neural network model and the reference neural network model through multiple iterations. This method reduces the difficulty of training neural network models, improves the training efficiency of neural network models, enhances the confidentiality of model training parameters, and can be better applied to training scenarios for large-scale neural network models or real-time training scenarios for neural network models, while avoiding the collapse problem during neural network training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of artificial intelligence, and more specifically, to a method, apparatus, computer program product, and storage medium for training a neural network model, as well as a method, apparatus, computer program product, and storage medium for performing information processing tasks based on a neural network model. Background Technology

[0002] Artificial Intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a branch of computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to have perception, reasoning, and decision-making capabilities. Research in the field of AI involves robot control, natural language processing, computer vision, decision-making and reasoning, human-computer interaction, information recommendation and search, and more.

[0003] Neural networks (NNs), an important branch of artificial intelligence, are network structures that mimic the behavioral characteristics of animal neural networks for information processing. A neural network consists of a large number of interconnected nodes (or neurons), which learn and are trained on input information based on a specific computational model to process information. A neural network includes an input layer, hidden layers, and an output layer. The input layer receives the input signal, the output layer outputs the computational results, and the hidden layers are responsible for learning, training, and other computational processes. They are the network's memory units, and their memory function is represented by a weight matrix, typically with each neuron corresponding to a weight coefficient.

[0004] As the number of layers in a neural network model increases, the scale of network parameters also grows larger. This expansion in parameter size increases the difficulty of model training and the time required for training. Therefore, effectively improving the training efficiency of neural network models and reducing training time is a pressing issue that needs to be addressed. Summary of the Invention

[0005] Existing methods for training neural network models typically employ a forward propagation approach to calculate the outputs of all processing modules of the neural network model sequentially, followed by a backpropagation approach to calculate the gradients of the loss function with respect to the parameters of each processing module. The parameters of the entire neural network are then updated based on these gradients. In this approach, both forward and backpropagation involve all processing modules of the neural network. Furthermore, during backpropagation, each processing module must know the network parameters of all subsequent processing modules before it can update its network parameters. Consequently, the training efficiency of the entire model is low.

[0006] To improve the training efficiency of neural network models, this disclosure provides a method for training neural network models, comprising: initializing an information processing neural network model and a reference neural network model corresponding to the information processing neural network model, wherein the information processing neural network model includes multiple processing modules, and the reference neural network model includes multiple reference modules; updating the parameters of the information processing neural network model and the reference neural network model through multiple iterations, wherein in each iteration, based on training samples and the parameters of the multiple reference modules, the output results corresponding to the multiple reference modules are determined respectively; based on a mask sample obtained after masking the training samples and the parameters of the multiple processing modules, the output results corresponding to the multiple processing modules are determined respectively; based on the output results corresponding to the multiple processing modules and the output results corresponding to the multiple reference modules, the parameters of the multiple processing modules are updated respectively; and the parameters of the multiple reference modules are updated based on the updated parameters of the multiple processing modules.

[0007] Embodiments of this disclosure also provide an apparatus for training a neural network model, comprising: an initialization module configured to: initialize an information processing neural network model and a reference neural network model corresponding to the information processing neural network model, wherein the information processing neural network model includes a plurality of processing modules, and the reference neural network model includes a plurality of reference modules; and a parameter update module configured to: update the parameters of the information processing neural network model and the reference neural network model through multiple iterations, wherein in each iteration, based on training samples and the parameters of the plurality of reference modules, the output results corresponding to the plurality of reference modules are determined respectively; based on a mask sample obtained after masking the training samples and the parameters of the plurality of processing modules, the output results corresponding to the plurality of processing modules are determined respectively; based on the output results corresponding to the plurality of processing modules and the output results corresponding to the plurality of reference modules, the parameters of the plurality of processing modules are updated respectively; and the parameters of the plurality of reference modules are updated based on the updated parameters of the plurality of processing modules.

[0008] Embodiments of this disclosure also provide a method for information processing based on a neural network model, comprising: acquiring information to be processed, wherein the information to be processed includes at least one of image information, text information, audio information, and video information; processing the information to be processed based on the information processing neural network model to obtain a result of processing the information to be processed; wherein the information processing neural network model is trained by the above-described method for training neural network models.

[0009] Embodiments of this disclosure also provide a computer program product, which includes computer software code that provides the above-described method when run by a processor.

[0010] Embodiments of this disclosure also provide a computer-readable storage medium having computer-executable instructions stored thereon, which, when executed by a processor, provide the above-described method.

[0011] Since the method for training neural network models disclosed herein can train each processing module in the information processing neural network model individually and the processing modules can be trained in parallel, it can effectively improve the training efficiency of the neural network model.

[0012] The method for training a neural network model disclosed herein can train a processing module based solely on the output of the processing module and the output of the corresponding reference module. This process does not require explicit definition of the gradient of the loss function with respect to the parameters of other processing modules, thus reducing the difficulty of training the neural network model, effectively saving computer resources, and reducing the requirements for computer performance.

[0013] Furthermore, since each processing module in the information processing neural network model can be trained independently, and there is no need for the processing modules to share their respective network parameters, the method for training the neural network model disclosed herein has good confidentiality and can better protect the parameters of each processing module, preventing the parameters from being stolen. Therefore, the method for training the neural network model disclosed herein has significant advantages for application scenarios with high confidentiality requirements (e.g., involving trade secrets, personal privacy, etc.).

[0014] The method for training neural network models disclosed herein can effectively reduce the computational load on computers, fully utilize computer resources to achieve parallel training of multiple processing modules, thereby reducing the training time of neural network models. Since the method can train each processing module separately, it has high training efficiency and can be better applied to training scenarios of large-scale neural network models or real-time training scenarios of neural network models (i.e., training is performed while task processing is being carried out, rather than the task processing and training processes being completely independent).

[0015] Furthermore, compared with existing neural network model training methods based on backpropagation, the neural network model training method disclosed herein can stably train the neural network model and effectively avoid the collapse problem during the neural network training process. Attached Figure Description

[0016] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely some exemplary embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.

[0017] In the attached image:

[0018] Figure 1 A schematic diagram of an application scenario according to an embodiment of this disclosure is shown.

[0019] Figure 2 This is an example schematic diagram illustrating a scenario of information processing and training based on a neural network model according to an embodiment of the present disclosure.

[0020] Figure 3A and Figure 3B This is a schematic flowchart illustrating a method for training a neural network model according to an embodiment of the present disclosure;

[0021] Figures 4A-4E This is a schematic diagram illustrating the process of processing training samples according to an embodiment of the present disclosure;

[0022] Figure 5 This is a schematic diagram illustrating the process of training a neural network model according to an embodiment of the present disclosure;

[0023] Figure 6 This is a schematic flowchart illustrating a method for information processing based on a neural network model according to an embodiment of the present disclosure;

[0024] Figure 7 This is a schematic diagram illustrating an information processing procedure based on a neural network model according to an embodiment of the present disclosure;

[0025] Figure 8 This is a schematic diagram illustrating the composition of an apparatus for training a neural network model according to an embodiment of the present disclosure;

[0026] Figure 9 This is a schematic diagram illustrating the composition of an apparatus for information processing based on a neural network model according to an embodiment of the present disclosure; and

[0027] Figure 10This illustrates the architecture of a computing device according to an embodiment of the present disclosure. Detailed Implementation

[0028] To make the objectives, technical solutions, and advantages of this disclosure more apparent, exemplary embodiments according to this disclosure will now be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this disclosure, and not all embodiments of this disclosure. It should be understood that this disclosure is not limited to the exemplary embodiments described herein.

[0029] Furthermore, in this specification and the accompanying drawings, steps and elements that are substantially the same or similar are indicated by the same or similar reference numerals, and repeated descriptions of these steps and elements will be omitted.

[0030] Furthermore, in this specification and accompanying drawings, elements are described in singular or plural forms according to embodiments. However, the singular and plural forms have been suitably chosen for the presented cases merely for ease of explanation and are not intended to limit this disclosure. Thus, a singular form may include a plural form, and a plural form may include a singular form, unless the context clearly indicates otherwise.

[0031] In this specification and accompanying drawings, steps and elements that are substantially the same or similar are indicated by the same or similar reference numerals, and repeated descriptions of these steps and elements are omitted. Furthermore, in the description of this disclosure, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance or order.

[0032] The various neural networks (or neural network models) that can be used in embodiments of this disclosure, as described below, can all be artificial intelligence models, especially artificial intelligence-based neural network models. Typically, artificial intelligence-based neural network models are implemented as acyclic graphs, where neurons are arranged in different layers. Generally, a neural network model includes an input layer and an output layer, separated by at least one hidden layer. The hidden layer transforms the input received from the input layer into a representation useful for generating the output in the output layer. Network nodes (i.e., neurons) are fully connected to nodes in adjacent layers via edges, and there are no edges between nodes within each layer. Data received at nodes in the input layer of the neural network is propagated to nodes in the output layer via any of the hidden layers, activation layers, pooling layers, convolutional layers, etc. The inputs and outputs of the neural network model can take various forms, and this disclosure does not limit them.

[0033] The embodiments of this disclosure will now be described in further detail with reference to the accompanying drawings.

[0034] First refer to Figure 1 This document describes application scenarios of the methods and corresponding apparatuses according to embodiments of the present disclosure. Figure 1A schematic diagram of an application scenario 100 according to an embodiment of the present disclosure is shown, wherein a server 110 and a plurality of terminals 120 are schematically illustrated.

[0035] The information processing neural network model of this disclosure can be integrated into various electronic devices, for example. Figure 1 The information processing neural network model can be integrated into any electronic device in server 110 and multiple terminals 120. For example, the information processing neural network model can be integrated into terminal 120. Terminal 120 can be a mobile phone, tablet computer, laptop computer, desktop computer, personal computer (PC), smart speaker, or smartwatch, but is not limited to these. Alternatively, the information processing neural network model can also be integrated into server 110. Server 110 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery network (CDN), and big data and artificial intelligence platforms. Terminals and servers can be directly or indirectly connected via wired or wireless communication, and this disclosure does not impose any limitations.

[0036] It is understood that the apparatus for information processing based on the neural network model in the embodiments of this disclosure can be a terminal, a server, or a system composed of a terminal and a server. The information processing method in the embodiments of this disclosure can be executed on a terminal, on a server, or jointly by a terminal and a server.

[0037] The information processing neural network model provided in this disclosure can be used to perform various information processing tasks, including: information extraction (e.g., key information extraction, information search, feature extraction, etc.), information classification (e.g., image classification, disease diagnosis, spam identification), information restoration (e.g., image restoration, incomplete information prediction, etc.), information style transfer (e.g., image style transfer, timbre conversion, etc.), information enhancement (e.g., image sharpness enhancement, audio denoising, etc.), information mining (e.g., big data mining, network information mining, etc.), information recognition (e.g., disease diagnosis, spam identification, etc.), machine translation, etc., and is not limited thereto. In this disclosure, the information processed based on the neural network model can include: images, text, audio, video, sequences, etc.

[0038] The information processing neural network model provided in this disclosure can also relate to artificial intelligence cloud services in the field of cloud technology. Cloud technology refers to a hosting technology that unifies hardware, software, network, and other resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Cloud technology is a general term for network technology, information technology, integration technology, management platform technology, and application technology applied based on the cloud computing business model. It can form resource pools, be used on demand, and is flexible and convenient. Cloud computing technology will become an important support. The backend services of technical network systems require a large amount of computing and storage resources, such as video websites, image websites, and many portal websites. With the rapid development and application of the internet industry, every item may have its own identification mark in the future, requiring transmission to the backend system for logical processing. Data of different levels will be processed separately, and various industry data will require strong system support, which can only be achieved through cloud computing.

[0039] Artificial intelligence cloud services are generally referred to as AIaaS (AI as a Service). This is currently a mainstream service model for artificial intelligence platforms. Specifically, AIaaS platforms break down several common AI services and provide them as independent or packaged services in the cloud. This service model is similar to opening an AI-themed marketplace: all developers can access and use one or more AI services provided by the platform through application programming interfaces (APIs). Some experienced developers can also use the AI ​​frameworks and AI infrastructure provided by the platform to deploy and maintain their own cloud-based artificial intelligence services.

[0040] Figure 2 This is an example schematic diagram illustrating scenario 200 of information processing and training based on a neural network model according to an embodiment of the present disclosure.

[0041] During the training phase, server 110 can train the neural network model based on training samples. After training, the server can deploy the trained neural network model to one or more servers (or cloud services) to provide artificial intelligence services related to information processing based on the neural network model. It is worth noting that all training samples used in this disclosure comply with legal, ethical, and privacy regulations. Specifically, all training samples are legally sourced and have been explicitly permitted by users during collection. Furthermore, all training samples used in this disclosure adhere to privacy protection principles; these training samples have undergone rigorous screening and cleaning and will not be disclosed to any unauthorized third party.

[0042] In the information processing stage based on the neural network model, it is assumed that the user terminal 120 performing the information processing has a client or application (e.g., image processing application, text processing application, etc.) installed to interact with the server 110 for information processing. The user terminal 120 can send an information processing request to the server 110 corresponding to the application via the network, requesting the neural network deployed on the server 110 to process the information. For example, after receiving the information processing request, the server 110 uses the trained neural network model to respond to the request, performs information processing, and feeds back the predicted information processing result to the user terminal 120. The user terminal 120 can receive the information processing result. Afterwards, the user terminal 120 can perform further analysis or processing based on the information processing result.

[0043] It is worth noting that, Figure 2 The training sample data shown can also be updated in real time. For example, users can rate the information processing results. For instance, if a user believes that the information processing result is reasonable and accurate, the user can give the information processing result a high score, and the server 110 can use the information processing result as a positive sample for real-time training of the neural network model. If the user gives the information processing result a low score, the server 110 can use the information processing result as a negative sample.

[0044] Figure 2 The training sample set shown can also be pre-set. For example, refer to Figure 2 The server can retrieve training data (e.g., image training samples, text training samples, audio training samples, video training samples, etc.) from the database and then generate a training sample set for the neural network model. Of course, this disclosure is not limited to this.

[0045] Figure 3A This is a schematic flowchart illustrating a method 300 for training a neural network model according to an embodiment of the present disclosure.

[0046] In step S310, the information processing neural network model and the corresponding reference neural network model are initialized.

[0047] It should be noted that the information processing neural network model in this disclosure may include multiple processing modules, and the reference neural network model may include multiple reference modules.

[0048] According to embodiments of this disclosure, the plurality of processing modules can be L processing modules, the plurality of reference modules can be L reference modules, and the l-th processing module among the L processing modules and the l-th reference module among the L reference modules have the same structure, wherein L and l are positive integers, and l≤L.

[0049] It should be understood that each of the plurality of processing modules may have the same structure or function as the other processing modules, or may have different structures or functions. Similarly, each of the plurality of reference modules may have the same structure or function as the other reference modules, or may have different structures or functions.

[0050] According to embodiments of this disclosure, the initial parameters of the information processing neural network model and the reference neural network model can be determined based on random numbers, or the initial parameters of the information processing neural network model and the reference neural network model can be determined based on the experience of those skilled in the art. The initial parameters of the information processing neural network model and the reference neural network model can be the same or different. Optionally, the information processing neural network model can be pre-trained a predetermined number of times, and then the parameters of the pre-trained information processing neural network model can be used as the initial parameters of the reference neural network model.

[0051] It should be noted that each of the plurality of processing modules, or each of the plurality of reference modules, can be a sub-neural network model or a neural network layer. For example, each processing module or each reference module may include: convolutional neural network, attention-based neural network, recurrent neural network, recurrent neural network, feedforward neural network, generative adversarial neural network, deep neural network, etc.

[0052] In step S320, the parameters of the information processing neural network model and the reference neural network model are updated through multiple iterations.

[0053] To explain step S320 more clearly, Figure 3B The processing steps in each iteration are further illustrated. For example... Figure 3B As shown, step S320 may specifically include steps S321, S322, S323, and S324.

[0054] In step S321, based on the training samples and the parameters of multiple reference modules, the output results corresponding to the multiple reference modules are determined respectively.

[0055] It should be understood that the training samples may include one or more of the following: image training samples, text training samples, audio training samples, and video (optionally, both image and audio) training samples.

[0056] In step S322, based on the mask sample obtained after masking the training sample and the parameters of multiple processing modules, the output results corresponding to the multiple processing modules are determined respectively.

[0057] For example, with Figure 4A Taking the image training samples as an example, by performing masking processing on the image training sample P0, mask samples P0-1, P0-2, ..., P0-i with different mask positions can be obtained. Figure 4B Taking the text training sample as an example, by performing masking processing on the text training sample T0, mask samples T0-1, T0-2, ..., T0-i with different mask positions can be obtained. Figure 4C Taking the audio training sample as an example, by performing masking processing on the audio training sample V0, mask samples V0-1, V0-2, ..., V0-i with different mask positions can be obtained. For Figures 4A-4C Example, where i is a positive integer.

[0058] According to embodiments of this disclosure, masking the training samples may include: masking the training samples with different sizes (e.g., dimensions, lengths, etc.), masking at different positions, and masking with different shapes (e.g., square, circular, irregular shapes, etc.). For example, using... Figure 4D Taking the image training sample as an example, by performing mask processing on the image training sample P1, we can also obtain mask samples P1-1, P1-2, ..., P1-j with different mask sizes and positions, where j is a positive integer.

[0059] By applying different masking techniques to the training samples, the diversity of mask samples processed by the processing module can be increased, thereby improving the performance of the trained processing module. As a result, more accurate processing results can be obtained based on the trained processing module.

[0060] In step S323, the parameters of the multiple processing modules are updated based on the output results of the multiple processing modules and the output results of the multiple reference modules.

[0061] According to an embodiment of this disclosure, for the l-th processing module among the L processing modules, the parameters of the l-th processing module can be updated based on the output of the l-th processing module and the output of the reference module corresponding to the l-th processing module.

[0062] It should be noted that the reference module corresponding to the l-th processing module can be the l-th reference module among the L reference modules, but is not limited to this. Optionally, the reference module corresponding to the l-th processing module may include one or more reference modules surrounding the l-th reference module. For example, the reference modules corresponding to the l-th processing module include the lm-th to the (l+n)-th reference modules, where m and n are integers and satisfy m≥0, n≥0, lm≥1, l+n≤L, and the values ​​of m and n can be the same or different.

[0063] According to embodiments of this disclosure, the value of an energy function can be calculated based on the output results corresponding to the plurality of processing modules and the output results corresponding to the plurality of reference modules, and the parameters of the plurality of processing modules can be updated based on the value of the energy function, wherein the energy function is used to evaluate the accuracy of the output results of the plurality of processing modules.

[0064] It should be understood that the energy function can be either a global energy function (i.e., a global optimization objective common to all processing modules) used to evaluate the difference between the output of the Lth processing module and the output of the Lth reference module, or a local energy function (i.e., an optimization objective for a single processing module) used to evaluate the difference between the output of the lth processing module and the output of the reference module corresponding to the lth processing module. Optionally, the energy function can also be determined based on both the global energy function and the local energy function (e.g., by adding them together, averaging them, or calculating a weighted average).

[0065] According to embodiments of this disclosure, the energy function (whether a global energy function or a local energy function) can take various forms.

[0066] For example, for the l-th processing module among the L processing modules, the value of the first local energy function can be determined based on the difference between the output of the l-th processing module and the output of the reference module corresponding to the l-th processing module.

[0067] Furthermore, the expected output of the l-th processing module can be determined based on the global energy function; and the value of the second local energy function can be determined based on the difference between the output of the l-th processing module and the expected output of the l-th processing module.

[0068] Specifically, in determining the expected output of the l-th processing module based on the global energy function, the reverse calculation difference of the output of the l-th processing module can be determined based on the value of the global energy function; then, based on the reverse calculation difference of the output of the l-th processing module and the output of the l-th processing module, the expected output of the l-th processing module is determined. The reverse calculation difference of the output of the l-th processing module is obtained by propagating the difference between the output of the L-th processing module and the output of the L-th reference module sequentially to the l-th processing module.

[0069] For example, for the (l+k)th processing module from the Lth processing module to the lth processing module, the partial derivative of the output of the (l+k)th processing module with respect to the output of the (l+k-1)th processing module (the output of the (l+k-1)th processing module is the input of the (l+k)th processing module) can be calculated; then, based on the partial derivative and the reverse calculation difference of the output of the (l+k+1)th processing module, the reverse calculation difference of the output of the (l+k)th processing module is determined, where k is an integer and satisfies k≥0, l+k+1≤L.

[0070] According to embodiments of this disclosure, a comprehensive local energy function can be determined based on different local energy functions, and the parameters of the l-th processing module can be updated based on the comprehensive local energy function.

[0071] For example, a third local energy function can be determined based on the first and second local energy functions, and the parameters of the l-th processing module can be updated based on the third local energy function.

[0072] According to embodiments of this disclosure, the parameters of the l-th processing module can also be updated based on different local energy functions under different circumstances.

[0073] For example, if the first local energy function corresponding to the l-th processing module has not converged, the parameters of the l-th processing module can be updated based on the value of the first local energy function corresponding to the l-th processing module (i.e., only considering the optimization objective of a single processing module); and if the first local energy function corresponding to the l-th processing module has converged, the parameters of the l-th processing module can be updated based on the second local energy function corresponding to the l-th processing module (determined based on the global energy function) (i.e., considering the common global optimization objective of all processing modules).

[0074] In step S324, the parameters of multiple reference modules are updated based on the updated parameters of the multiple processing modules.

[0075] According to embodiments of this disclosure, the parameters of the plurality of reference modules can be updated using the values ​​of the parameters of the plurality of processing modules in at least one previous iteration. For example, the parameters of the plurality of reference modules can be updated using the exponential moving average of the parameters of the plurality of processing modules in at least one previous iteration. That is, assuming the updated parameter of the processing module is W, and the current parameter of the reference module is... The parameters of the updated reference module can then be: Where 0 ≤ τ ≤ 1. In addition, the parameters of the multiple processing modules can be updated using the arithmetic mean or weighted mean of the parameters in at least one previous iteration (optionally, the weight of the latest parameter of the processing module can be set to be greater than that of the previous parameter), etc., but this disclosure is not limited thereto.

[0076] It should be understood that the above-described method 300 for training neural network models can be used for both supervised training and self-supervised training of the information processing neural network model.

[0077] by Figure 4A The image training samples shown are used as examples. In the case of self-supervised training of the information processing neural network model, the process of processing the training samples can be as follows: Figure 4E As shown.

[0078] In step S1, the training image sample P0 can be masked at different locations to obtain mask samples P0-1...P0-i. Optionally, the training samples can also be masked based on the information contained in the image training samples. For example, for an information processing neural network used to identify people in an image, the part of the image containing the person can be masked with finer granularity (e.g., each mask size is smaller), while the part containing the surrounding environment can be masked with coarser granularity (e.g., each mask size is larger), so that the trained neural network model focuses on learning the features of the person.

[0079] In step S2, the structure and parameters of the corresponding reference neural network model can be determined based on the structure and parameters of the information processing neural network model. For example, the structure of each processing module in the information processing neural network model can correspond one-to-one with the structure of each reference module in the reference neural network model, both of which can extract image features. The difference is that the information processing neural network model extracts image features based on complete training image samples P0, while the reference neural network model extracts image features based on mask samples. The parameters of each reference module in the reference neural network model can be determined based on the historical results of the parameters of its corresponding processing module. For example, before training the information processing neural network model based on the reference neural network model, the information processing neural network model can be subjected to a predetermined number of supervised training sessions (e.g., 50 times, but not limited to this) using labeled image training samples. (It should be noted that each training session in the predetermined number of supervised training sessions refers to an epoch of training, not a batch of training.) Then, the parameters of the information processing neural network model updated after the predetermined number of training sessions are used as the initial parameters of the reference neural network model. The information processing neural network model is then trained based on the reference neural network model to update the parameters of both the information processing neural network model and the reference neural network model. During the training process of the information processing neural network model, each time the parameters of the information processing neural network model are updated, the parameters of its corresponding reference module are also updated using the updated parameters of the processing module.

[0080] In step S3, the training image sample P0 can be forward-processed using a reference neural network model to obtain the feature representation F0 of the training image sample P0.

[0081] Simultaneously, in step S4, the information processing neural network model can be used to perform forward processing on the mask samples P0-1...P0-i to predict the predicted feature representations F0-1...F0-i of the training image sample P0. It should be noted that the predicted feature representation consists of two parts: the feature representation for the unmasked portion (i.e.,...). Figure 4E The mask sample shown is filled with diagonal textures) and the feature representation for the mask portion (i.e., Figure 4E (The part shown in the mask sample is filled with dotted texture).

[0082] It should be noted that the reference neural network model can encode the features of the complete training image sample P0 to obtain the complete feature representation F0 of the training image sample P0. However, the information processing neural network model encodes the features of the mask sample. Therefore, it can only obtain the feature representation of the unmasked part first, and then decode and predict the feature representation of the masked part based on the feature representation of the unmasked part to obtain the predicted feature representation of the training image sample P0.

[0083] Next, in step S5, an energy function can be calculated based on the difference between the output of the information processing neural network model (i.e., the feature representations F0-1...F0-i of the mask sample P0-1...F0-i) and the output of the reference neural network model (i.e., the feature representation F0 of the training image sample P0), and the parameters of the information processing neural network model can be updated based on the value of the energy function.

[0084] exist Figure 4E In this embodiment, the information processing neural network model can be used to extract image features or predict (or repair) incomplete parts of an image. Figure 4E The processing described herein only requires pre-determining the image training samples and the structure of the information processing neural network model to train the model. This process eliminates the need for labeled training samples, saving time and manpower, and significantly improves the processing efficiency of neural network models used for image processing. For example, in training a neural network model for processing medical images, labeling medical images requires meticulous judgment from professional doctors, resulting in low labeling efficiency. The method disclosed herein effectively reduces labeling costs and improves model training efficiency.

[0085] according to Figure 4A and Figure 4EAs an example, this disclosure also discloses a method for training a neural network model for image processing. Optionally, the neural network model for image processing is an example of the information processing neural network model described above. The method includes: initializing a neural network model for image processing and a reference neural network model corresponding to the neural network model for image processing, wherein the neural network model for image processing includes a plurality of processing modules, and the reference neural network model includes a plurality of reference modules; updating the parameters of the neural network model for image processing and the reference neural network model through multiple iterations, wherein in each iteration, image features corresponding to the plurality of reference modules are determined based on image training samples and the parameters of the plurality of reference modules; determining image features corresponding to the plurality of processing modules based on a mask sample obtained after masking the image training samples and the parameters of the plurality of processing modules; updating the parameters of the plurality of processing modules based on the image features corresponding to the plurality of processing modules and the image features corresponding to the plurality of reference modules; and updating the parameters of the plurality of reference modules based on the updated parameters of the plurality of processing modules. Then, optionally, a pre-trained neural network model for image processing can be used to extract features from the image data to further complete tasks such as face recognition or disease diagnosis.

[0086] Furthermore, given predetermined training sample labels, it is also possible to use and Figure 4E A similar process is used for supervised training of the information processing neural network model. That is, method 300 is applicable to both supervised and self-supervised training. In the case of supervised training of the information processing neural network model, the global energy function can be determined based on the difference between the output of the Lth processing module and the predetermined training sample labels (i.e., the output that the Lth processing module should produce).

[0087] When the updated information processing neural network model meets predetermined conditions (e.g., energy function convergence, reaching a predetermined number of training iterations), the training of the information processing neural network model can be considered complete, and a trained information processing neural network model is obtained. At this point, the trained information processing neural network model can be used to extract features (from multimedia information such as images, text, audio, and video), predict missing information (including at least one of multimedia information such as images, text, audio, and video), etc.

[0088] Optionally, the trained information processing neural network model can be further trained using the information processing training samples corresponding to the information processing task (e.g., fine-tuning the structure and parameters of the information processing neural network model) to complete downstream information processing tasks such as information extraction, information classification, information restoration, information style transfer, information enhancement, information mining, and information recognition.

[0089] Figure 5 This is a schematic diagram illustrating the process of training a neural network model according to an embodiment of the present disclosure.

[0090] Figure 5 Using audio training sample V1 as an example, the process of training an information processing neural network model is explained. It should be understood that this can be achieved using... Figure 4C The method shown is used to mask the audio training sample V1 to obtain multiple different mask samples V1-1, mask sample V1-2...mask sample V1-j, where j is a positive integer. Figure 5 This explanation uses mask V1-1 as an example only. The process of training an information processing neural network model using other mask samples is similar to... Figure 5 Similar examples are shown below and will not be repeated here.

[0091] like Figure 5 As shown, the information processing neural network model M1 includes L processing modules (such as...). Figure 5 The squares M1-1, M1-2...M1-L filled with dotted texture are shown. Based on the information processing neural network model M1, which includes L processing modules, L reference modules (such as...) can be determined. Figure 5 The reference neural network model M2 is shown for the blocks M2-1, M2-2...M2-L filled with diagonal texture, where L is a positive integer. Figure 5 Each processing module and each reference module in the network can have the same network structure.

[0092] For example, each processing module may include neural network layers such as attention-based neural network layers, fully connected layers, and linear layers to jointly extract features from the audio training sample V1. Each processing module may employ the same network structure. Similarly, each reference module may also include the same neural network layers such as attention-based neural network layers, fully connected layers, and linear layers as the processing modules to jointly extract features from the masked audio training sample V1-1. Each reference module may employ the same network structure, i.e., the same network structure as the processing modules.

[0093] It should be understood that, for Figure 5In the example, the information processing neural network model M1 includes L identical processing modules for feature extraction, designed to more accurately acquire features from audio training samples. In fact, each processing module is a complete sub-neural network capable of acquiring features from audio training samples and predicting information from missing parts of the audio training samples.

[0094] Optionally, each of the L processing modules or each of the L reference modules may have a different network structure as needed.

[0095] In the information processing neural network model M1, the input of the l-th processing module can be represented as x. l (like Figure 5 (As shown by the black solid dots in the image), the output can be expressed as f(x) l W l ), where x represents the eigenvector, W l Let be the network parameters of the l-th processing module, where l is a positive integer and l ≤ L. Furthermore, Figure 5 In the example, the processing modules are connected in series, meaning that the output of the l-th processing module is the input of the (l+1)-th processing module, i.e., x l+1 =f(x) l W l ).

[0096] Similarly, in the reference neural network model M2, the input of the l-th reference module can be represented as x″. l The output can be represented as Where f(·) is the forward transfer function, Let be the network parameters of the l-th reference module, where l is a positive integer and l ≤ L. Furthermore, Figure 5 In the example, the reference modules are connected in series, meaning that the output of the l-th reference module is the input of the (l+1)-th reference module.

[0097] for Figure 5 The embodiment shown allows for the training of each processing module independently, without having to calculate the gradient of the loss function with respect to the parameters of each processing module through backward computation after calculating the forward computation results of each processing module, and then update the parameters of the entire neural network based on the gradient.

[0098] For example, for the l-th processing module among the L processing modules, the l-th processing module can be trained and its parameters updated based on the output of the l-th processing module and the output of the reference module corresponding to the l-th processing module.

[0099] like Figure 5 As shown, the reference module corresponding to the l-th processing module may include the l-th reference module and the reference modules surrounding the l-th reference module. For example, the reference modules corresponding to the l-th processing module may include the (l-1)-th reference module, the l-th reference module, and the (l+1)-th reference module, where l-1≥1 and l+1≤L. The reference module corresponding to the 1-th processing module may include the 1-th reference module, and the reference module corresponding to the L-th processing module may include the L-th reference module. Optionally, the reference module corresponding to the 1-th processing module may include the 1-th reference module and one or more reference modules thereafter, and the reference module corresponding to the L-th processing module may include the L-th reference module and one or more reference modules before it.

[0100] An output reference result x′ can be determined based on the output result of the reference module corresponding to the l-th processing module. l+1 (like Figure 5 (As shown in the fork shape in the diagram) for training the l-th processing module. For example, if the reference modules corresponding to the l-th processing module include the (l-1)-th reference module, the l-th reference module, and the (l+1)-th reference module, the output results of the (l-1)-th reference module, the output results of the l-th reference module, and the output results of the (l+1)-th reference module can be averaged or weighted (for example, the weight of the output result of the l-th reference module can be set to be greater than the weight of the output results of the other two reference modules) to determine the reference result x′ corresponding to the l-th processing module. l .

[0101] Next, the output reference result x′ corresponding to the l-th processing module can be used. l+1 and the output x of the l-th processing module l+1 =f(x) l W l The energy function is determined to be used for training the l-th processing module.

[0102] The energy function E corresponding to the entire information processing neural network model can be calculated using formula (1):

[0103] E = E local +λE global (1)

[0104] Among them, E local It is a local energy, and has Among them, E local,l E represents the local energy corresponding to the l-th processing module. globalLet λ be the global energy function, representing the degree of influence of global energy on total energy, where 0 < λ ≤ 1. When considering only the optimization objective of a single processing module, λ = 0.

[0105] According to embodiments of this disclosure, in order to train each processing module individually, the local energy function corresponding to the l-th processing module can be used to train the l-th processing module, wherein the local energy function corresponding to the l-th processing module is used to evaluate the difference between the output of the l-th processing module and the output of its corresponding reference module.

[0106] For example, considering the local optimization objective of the l-th processing module itself and the local optimization objective influenced by the global optimization objective shared by all processing modules, the local energy function E corresponding to the l-th processing module is... local,l It can be calculated using formula (2):

[0107]

[0108] Where B is the batch size, T represents the frame after masking (subscripts are omitted here for simplicity), D is the dimension of the feature vector x, and Dec(·) represents the feature representation predicted for the masked portion. λ represents the expected output of the l-th processing module. PM and λ PC The value of λ is either 0 or 1, and the two are opposite. PM When E is 1 (i.e., considering only the optimization objective of the l-th processing module), local,l (Hereinafter denoted by the first local energy function) represents the difference between the feature representation predicted by the l-th processing module for the mask portion and the feature representation encoded by the l-th reference module for the mask portion. In λ PC When E is 1 (i.e., considering the common global optimization objective of all processing modules), local,l (Hereinafter referred to as the second local energy function) represents the difference between the output of the l-th processing module and the expected output of the l-th reference module, where the expected output of the l-th reference module is determined based on the output of the L-th processing module.

[0109] According to embodiments of this disclosure, the l-th processing module can be trained first using the first local energy function corresponding to the l-th processing module, and then, when the first local energy function corresponding to the l-th processing module converges (at which point it can be considered that...), the l-th processing module can be trained. The parameters of the l-th processing module are updated based on the second local energy function.

[0110] As shown in equation (3), the second local energy function can be based on the global energy function E. global(That is, the feature representation Dec(x) predicted by the Lth processing module for the mask part) L+1 The output result x′ of the Lth reference module L+1 The difference between them is used to determine the second local energy function. The second local energy function reflects the common global optimization objective of all processing modules.

[0111]

[0112] The expected output of the l-th processing module mentioned above It can be based on the global energy function E global To determine, for example, the expected output of the l-th processing module can be determined through the following process.

[0113] When the local energy function converges, the energy function has the property shown in equation (4):

[0114]

[0115] Therefore, it can be concluded that for the l-th processing module,

[0116]

[0117] Where, ε l+1 This indicates that the difference is calculated in reverse. Reverse calculation means starting from the Lth processing module and calculating backwards sequentially (i.e., in the order of the Lth processing module, the (L-1)th processing module, ..., the lth processing module).

[0118] Furthermore, the differences in reverse calculation can be determined sequentially for each processing module from the Lth processing module to the lth processing module, thereby propagating the differences from the Lth processing module to the lth processing module.

[0119] For example, for the (l+k)th processing module from the Lth processing module to the lth processing module, the output result f(x) of the (l+k)th processing module can be calculated. l+k W l+k The output result x of the (l+k-1)th processing module l+k partial derivatives Then based on this partial derivative The difference ε calculated in reverse with the output of the (l+k+1)th processing module l+k+1 Determine the reverse calculation difference ε of the output result of the (l+k)th processing module. l+k , where k is an integer and satisfies k≥0, l+k+1≤L.

[0120] That is, through derivation, the reverse calculation difference of the output result of the (l+k)th processing module can be determined by formula (6). That is, based on... ε l+k .

[0121]

[0122] The difference ε is calculated by reverse calculation based on the output result of the l-th processing module obtained from formula (6). l+1 Then, the difference ε can be calculated in reverse based on the output of the l-th processing module. l+1 and the output of the l-th processing module Determine the expected output of the l-th processing module. For example, in formula (7), based on and ε l+1 The difference is obtained in, This represents the output of the l-th processing module when the first local energy function converges.

[0123]

[0124] The process of updating the parameters of the l-th processing module based on the second local energy function can be implemented based on formula (8).

[0125]

[0126] Furthermore, given that the parameters of the l-th processing module are determined, the parameters of the l-th reference module can also be updated based on the parameters of the l-th processing module.

[0127] For example, referring to formula (9), the parameters of the reference module can be updated using the exponential moving average of the parameters of the processing module in at least one preceding iteration.

[0128]

[0129] Where 0 ≤ τ ≤ 1. Therefore, the parameters of the reference module... It is associated with the historical results of the parameters of the processing module.

[0130] After training the information processing neural network model according to the above process, the information processing neural network model can be used to extract audio features or predict (or repair) missing (or unclear) parts of the audio.

[0131] Optionally, according to Figure 3A , Figures 4B to 4C ,and Figure 5As an example, this disclosure also discloses a method for training a neural network model for processing audio. Optionally, the neural network model for processing audio is an example of the information processing neural network model described above. The method includes: initializing a neural network model for processing audio and a reference neural network model corresponding to the neural network model for processing audio, wherein the neural network model for processing audio includes multiple processing modules, and the reference neural network model includes multiple reference modules; updating the parameters of the neural network model for processing audio and the reference neural network model through multiple iterations, wherein in each iteration, audio features corresponding to the multiple reference modules are determined based on audio training samples and the parameters of the multiple reference modules; determining the audio features corresponding to the multiple processing modules based on a mask sample obtained after masking the audio training samples and the parameters of the multiple processing modules; updating the parameters of the multiple processing modules based on the audio features corresponding to the multiple processing modules and the audio features corresponding to the multiple reference modules; and updating the parameters of the multiple reference modules based on the updated parameters of the multiple processing modules. Then, optionally, the trained neural network model for processing audio can be used to extract features from audio data to further complete speech recognition tasks or sentiment analysis tasks, etc. In addition, neural network models can be used to process audio and repair audio data.

[0132] Through the above-mentioned targets Figures 3A-5 As can be seen from the description, the method for training neural network models disclosed herein can train each processing module in the information processing neural network model independently. This process does not require explicit definition of the gradient of the loss function with respect to the parameters of other processing modules, as is the case with the traditional backpropagation algorithm. Therefore, it reduces the difficulty of training the neural network model, and each processing module can be trained in parallel, thus effectively improving the training efficiency of the neural network model.

[0133] Since each processing module in the information processing neural network model can be trained independently, and there is no need for the processing modules to share their respective network parameters, the method for training the neural network model disclosed herein has good confidentiality and can better protect the parameters of each processing module, preventing the parameters from being stolen. Therefore, the method for training the neural network model disclosed herein has significant advantages for application scenarios with high confidentiality requirements (e.g., involving trade secrets, personal privacy, etc.).

[0134] The method for training neural network models disclosed herein can effectively reduce the computational load of computers and save computer resources. It can make full use of computer resources to achieve parallel training of multiple processing modules, thereby reducing the training time of neural network models. Since the method for training neural network models disclosed herein can train each processing module separately, the training efficiency is high. Therefore, it can be better applied to training scenarios of large neural network models or real-time training scenarios of neural network models (i.e., training is performed while task processing is performed, rather than the task processing process and the training process being completely independent).

[0135] In the method for training neural network models disclosed herein, the training of each processing module can be performed by different servers. During the training process, there is no need for each server to transmit its own network parameters, which effectively reduces the amount of data that needs to be transmitted between servers, thereby reducing the requirements for server performance and the requirements for communication bandwidth during service.

[0136] In fact, the method of training each processing module in the information processing neural network model separately in this disclosure is closer to the human brain's information processing process (that is, each neuron processes information separately, and its information processing process only involves the input or output of adjacent neurons, without involving multiple neurons transmitting information back in sequence), and therefore is more capable of producing an intelligent machine that can react in a way similar to human intelligence.

[0137] Figure 6 This is a schematic flowchart illustrating a method 600 for information processing based on a neural network model according to an embodiment of the present disclosure.

[0138] In step S610, the information to be processed is obtained.

[0139] The information to be processed may include one or more of image information, text information, audio information, and video information. That is, method 600 can be used to process one type of data (e.g., machine translation processes only text information) or to process multiple types of data simultaneously (e.g., pathological analysis based on medical images and medical reports simultaneously).

[0140] In step S620, the information to be processed is processed based on the information processing neural network model to obtain the result of the processing of the information to be processed.

[0141] The information processing neural network model can be achieved through, for example... Figures 3A-3BThe method described in section 300 trains the information processing neural network model. This model can be trained solely on training samples and a mask sample to perform information processing tasks such as feature extraction and missing information prediction; alternatively, it can be further trained on training samples for downstream information processing tasks. The information processing neural network model further trained for downstream information processing tasks can be used to complete downstream information processing tasks such as information extraction, information classification, information restoration, information style transfer, information enhancement, information mining, and information recognition.

[0142] After processing the information to be processed based on step S620, the processing result can be displayed as follows: Figure 1 On the terminal 120 shown. Optionally, as needed, Figure 1 The server 110 or terminal 120 shown can further analyze or display the processing result.

[0143] Figure 7 This is a schematic diagram illustrating an information processing procedure based on a neural network model according to an embodiment of the present disclosure.

[0144] like Figure 7 As shown, the information processing process based on the neural network model according to the embodiments of this disclosure includes a training phase of the neural network model and a testing phase of the neural network model (or a usage phase of the neural network model).

[0145] During the training phase of a neural network model, an information processing neural network model can be constructed first. Then, based on the structure and parameters of this information processing neural network model, the structure and parameters of a corresponding reference neural network model can be determined. For example, assuming the information processing neural network model includes L processing modules, the corresponding reference neural network model can include L reference modules. The l-th processing module among the L processing modules and the l-th reference module among the L reference modules can have the same structure, where L and l are positive integers, and l ≤ L. Optionally, the initial parameters of the information processing neural network model and the initial parameters of its corresponding reference neural network model can be initialized based on random numbers.

[0146] During training, training samples can be acquired and used to train the information processing neural network model and the reference neural network model. These training samples can include image training samples, text training samples, audio training samples, video training samples, or combinations thereof. The training process involves multiple iterations of the parameters of the information processing neural network model and the reference neural network model.

[0147] Specifically, in each iteration, the output results corresponding to the multiple reference modules can be determined based on the training samples and the parameters of the multiple reference modules; the output results corresponding to the multiple processing modules can be determined based on the mask sample obtained after masking the training samples and the parameters of the multiple processing modules; then, the parameters of the multiple processing modules are updated based on the output results corresponding to the multiple processing modules and the output results corresponding to the multiple reference modules; and the parameters of the multiple reference modules are updated based on the updated parameters of the multiple processing modules (for example, in each iteration, the values ​​of the parameters of the multiple processing modules in at least one previous iteration can be used to update the parameters of the multiple reference modules).

[0148] After each iteration of training, it can be determined whether the current training process meets the predetermined conditions. If the current training process meets the predetermined conditions, the training of the information processing neural network model is confirmed to be complete, and the information processing neural network model is saved. If the previous training process does not meet the predetermined conditions, the training samples are used to continue training the information processing neural network model and its corresponding reference neural network model, and the parameters of the information processing neural network model and its corresponding reference neural network model are updated.

[0149] It should be understood that the predetermined condition can take various forms. For example, the predetermined condition can be reaching a predetermined number of training iterations (e.g., 1000 iterations, but not limited to this; it should be noted that each training iteration in this predetermined number of training iterations refers to an epoch of training, not a batch of training); the predetermined condition can also be energy function convergence, where the energy function is used to evaluate the accuracy of the output results of the multiple processing modules; or, the predetermined condition can also be simultaneously satisfying both the predetermined number of training iterations and energy function convergence; or, the predetermined condition can also be satisfying either the predetermined number of training iterations or energy function convergence. Optionally, the energy function can be a global energy function used to evaluate the difference between the output result of the Lth processing module and the output result of the Lth reference module, a local energy function used to evaluate the difference between the output result of the lth processing module and the output result of the reference module corresponding to the lth processing module, or it can be determined based on both the global energy function and the local energy function.

[0150] By pre-setting the number of training iterations, the training of the information processing neural network model can be stopped after the pre-set number of training iterations are reached. This can prevent the network from overfitting, or the phenomenon of excessively long training time and insignificant network optimization effects.

[0151] During the testing phase of the information processing neural network model, the information to be processed can be provided to the computer. The computer loads the trained information processing neural network model and processes the information using this model, outputting results for the user's reference. Optionally, the user can use the processing results to determine whether further training or optimization of the information processing neural network model is needed.

[0152] Similar to training samples, the information to be processed can include images, text, audio, video, or combinations thereof. Information processing neural network models can be used for feature extraction, missing information prediction, information augmentation, and information mining.

[0153] Similarly, the actual information processing process (i.e., the process of using the information processing neural network model) is similar to the testing phase of the information processing neural network model, so it will not be described in detail here.

[0154] It should be noted that, Figure 7 The training and testing (or usage) phases of the information processing neural network model shown can be conducted independently. That is, the information processing neural network model is trained first, and then tested or used after training is complete. Furthermore, Figure 7 The training phase and the testing phase (or usage phase) of the information processing neural network model shown can also be performed alternately. For example, task processing can be performed simultaneously with training, and the non-task processing process is completely independent of the training process. Therefore, the method for training neural network models disclosed herein can be better applied to real-time training scenarios of neural network models.

[0155] Through testing and verification, the training method for the information processing neural network model disclosed herein enables individual training of each processing module within the model, allowing for parallel training of these modules. This effectively improves the training efficiency and reduces the training time of the neural network model. Compared to existing backpropagation-based neural network model training methods, the neural network model training method disclosed herein effectively avoids the collapse problem during neural network training.

[0156] For example, as indicated in related experiments, the data2vec2 model, which uses backpropagation for self-supervised training, often suffers from a collapse problem during training (e.g., the feature vectors obtained after processing all training samples by the neural network are similar and cannot reflect the characteristics of different training samples). In contrast, the method disclosed in this paper did not exhibit a collapse problem in multiple tests and verifications. That is, the neural network model training method of this paper has good stability.

[0157] For example, the information processing neural network model can be initially trained using the LS-100from960h dataset, and then retrained using the LS-10from100h dataset to test the performance of the proposed neural network model training method and the self-supervised training method based on backpropagation. Through testing and verification, the proposed neural network model training method significantly improves both training speed and accuracy compared to the self-supervised training method based on backpropagation.

[0158] The neural network training method disclosed herein can improve the accuracy and efficiency of feature extraction from samples. When the model trained based on this method is used to perform downstream information processing tasks, the accuracy and speed of task processing are also significantly improved.

[0159] Figure 8 This is a schematic diagram 800 illustrating the composition of an apparatus 800 for training a neural network model according to an embodiment of the present disclosure.

[0160] According to embodiments of the present disclosure, an apparatus 800 for training a neural network model may include an initialization module 810 and a parameter update module 820.

[0161] The initialization module 810 can be configured to initialize an information processing neural network model and a reference neural network model corresponding to the information processing neural network model, wherein the information processing neural network model includes multiple processing modules and the reference neural network model includes multiple reference modules.

[0162] According to embodiments of this disclosure, the plurality of processing modules can be L processing modules, the plurality of reference modules can be L reference modules, and the l-th processing module among the L processing modules and the l-th reference module among the L reference modules have the same structure, wherein L and l are positive integers, and l≤L.

[0163] The parameter update module 820 can be configured to update the parameters of the information processing neural network model and the reference neural network model through multiple iterations.

[0164] According to embodiments of this disclosure, in each iteration, the parameter update module 820 can determine the output results corresponding to the plurality of reference modules based on the training samples and the parameters of the plurality of reference modules; determine the output results corresponding to the plurality of processing modules based on the mask sample obtained after masking the training samples and the parameters of the plurality of processing modules; update the parameters of the plurality of processing modules based on the output results corresponding to the plurality of processing modules and the output results corresponding to the plurality of reference modules; and then update the parameters of the plurality of reference modules based on the updated parameters of the plurality of processing modules.

[0165] According to an embodiment of this disclosure, for the l-th processing module among the L processing modules, the parameters of the l-th processing module can be updated based on the output result of the l-th processing module and the output result of the reference module corresponding to the l-th processing module. The reference module corresponding to the l-th processing module includes the lm-th reference module to the (l+n)-th reference module, where m and n are integers and satisfy m≥0, n≥0, lm≥1, and (l+n≤L).

[0166] According to embodiments of this disclosure, during the parameter update process of the plurality of processing modules, the value of an energy function can be calculated based on the output results corresponding to the plurality of processing modules and the output results corresponding to the plurality of reference modules, and the parameters of the plurality of processing modules can be updated based on the value of the energy function, wherein the energy function is used to evaluate the accuracy of the output results of the plurality of processing modules.

[0167] The apparatus 800 for training a neural network model can be used for both supervised training and self-supervised training of the information processing neural network model.

[0168] It should be understood that Figure 8 The apparatus 800 shown for training neural network models can achieve, for example, for training neural network models. Figures 3A-3B The various methods for training neural network models are described.

[0169] Figure 9 This is a schematic diagram illustrating the composition of an apparatus 900 for information processing based on a neural network model according to an embodiment of the present disclosure.

[0170] According to embodiments of the present disclosure, an apparatus 900 for information processing based on a neural network model may include an information acquisition module 910 and an information processing module 920.

[0171] The information acquisition module 910 can be configured to acquire information to be processed, wherein the information to be processed includes at least one of image information, text information, audio information, and video information.

[0172] The neural network model 920 for generating interactive information can be configured to process the information to be processed based on the information processing neural network model to obtain the result of processing the information to be processed.

[0173] It should be understood that Figure 9 The device 900 shown, which performs information processing based on a neural network model, can achieve, for example, [the following is a description of a specific application / function]. Figure 6 The various information processing methods based on neural network models described herein. The information processing neural network model can be, for example,... Figures 3A-3B The method described is used to train 300.

[0174] The device 900 for information processing based on a neural network model can be located in Figure 1 The server 110 shown can also be located on Figure 1 On terminal 120 shown.

[0175] In general, the various exemplary embodiments of this disclosure can be implemented in hardware or dedicated circuitry, software, firmware, logic, or any combination thereof. Some aspects can be implemented in hardware, while others can be implemented in firmware or software that can be executed by a controller, microprocessor, or other computing device. When aspects of embodiments of this disclosure are illustrated or described as block diagrams, flowcharts, or using some other graphical representation, it will be understood that the blocks, apparatuses, systems, techniques, or methods described herein can be implemented as non-limiting examples in hardware, software, firmware, dedicated circuitry or logic, general-purpose hardware or controllers or other computing devices, or some combination thereof.

[0176] For example, the method or apparatus according to embodiments of this disclosure can also be used by means of Figure 10 The architecture of the computing device 3000 shown is used for implementation. For example... Figure 10 As shown, the computing device 3000 may include a bus 3010, one or more CPUs 3020, a read-only memory (ROM) 3030, a random access memory (RAM) 3040, a communication port 3050 connected to a network, an input / output component 3060, a hard disk 3070, etc. The storage devices in the computing device 3000, such as the ROM 3030 or the hard disk 3070, may store various data or files used for processing and / or communication of the methods provided in this disclosure, as well as program instructions executed by the CPU. The computing device 3000 may also include a user interface 3080. Of course, Figure 10 The architecture shown is merely exemplary and can be omitted as needed when implementing different devices. Figure 10 One or more components in the computing device shown.

[0177] According to another aspect of this disclosure, a computer-readable storage medium is also provided. Computer-readable instructions are stored on the computer storage medium. When executed by a processor, the computer-readable instructions can perform methods according to embodiments of this disclosure described with reference to the above-drawn figures. The computer-readable storage medium in the embodiments of this disclosure may be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. Non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory may be random access memory (RAM) used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous interconnected dynamic random access memory (SLDRAM), and direct memory bus random access memory (DR RAM). It should be noted that the memory used in the methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0178] Embodiments of this disclosure also provide a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform a method according to an embodiment of this disclosure.

[0179] In summary, embodiments of this disclosure provide a method, apparatus, computer program product, and storage medium for training a neural network model. The method includes: initializing an information processing neural network model and a reference neural network model corresponding to the information processing neural network model, wherein the information processing neural network model includes multiple processing modules, and the reference neural network model includes multiple reference modules; updating the parameters of the information processing neural network model and the reference neural network model through multiple iterations, wherein in each iteration, based on training samples and the parameters of the multiple reference modules, the output results corresponding to the multiple reference modules are determined; based on a mask sample obtained after masking the training samples and the parameters of the multiple processing modules, the output results corresponding to the multiple processing modules are determined; based on the output results corresponding to the multiple processing modules and the output results corresponding to the multiple reference modules, the parameters of the multiple processing modules are updated; and based on the updated parameters of the multiple processing modules, the parameters of the multiple reference modules are updated.

[0180] Because the method for training neural network models disclosed herein can train each processing module in the information processing neural network model independently, and the processing modules can be trained in parallel, the training efficiency of the neural network model can be effectively improved. The method of training neural network models disclosed herein can train a processing module based solely on the output of the processing module and the output of the corresponding reference module. This process does not require explicitly defining the gradient of the loss function with respect to the parameters of other processing modules, thus reducing the difficulty of training the neural network model, effectively saving computer resources, and reducing the requirements for computer performance.

[0181] Furthermore, since each processing module in the information processing neural network model can be trained independently, and there is no need for the processing modules to share their respective network parameters, the method for training the neural network model disclosed herein has good confidentiality and can better protect the parameters of each processing module, preventing the parameters from being stolen. Therefore, the method for training the neural network model disclosed herein has significant advantages for application scenarios with high confidentiality requirements.

[0182] The method for training neural network models disclosed herein can effectively reduce the computational load on computers, fully utilize computer resources to achieve parallel training of multiple processing modules, thereby reducing the training time of neural network models. Because the method can train each processing module separately, it has high training efficiency and can be better applied to training scenarios for large-scale neural network models or real-time training scenarios for neural network models.

[0183] In the method for training neural network models disclosed herein, the training of each processing module can be performed by different servers. During the training process, there is no need for each server to transmit its own network parameters, which effectively reduces the amount of data that needs to be transmitted between servers, thereby reducing the requirements for server performance and the requirements for communication bandwidth during service.

[0184] Furthermore, compared with existing neural network model training methods based on backpropagation, the neural network model training method disclosed herein can stably train the neural network model and effectively avoid the collapse problem during the neural network training process.

[0185] In fact, the method of training each processing module in the information processing neural network model separately in this disclosure is closer to the human brain's information processing process (that is, each neuron processes information separately, and its information processing process only involves the input or output of adjacent neurons, without involving multiple neurons transmitting information back in sequence), and therefore is more capable of producing an intelligent machine that can react in a way similar to human intelligence.

[0186] Through testing and verification, the neural network model training method disclosed herein significantly improves both the training speed and the accuracy of information processing compared to the self-supervised training method based on backpropagation.

[0187] It should be noted that the flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing at least one executable instruction for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0188] This disclosure uses specific terms to describe embodiments of the present disclosure. Terms such as "first / second embodiment," "an embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic associated with at least one embodiment of the present disclosure. Therefore, it should be emphasized and noted that references to "an embodiment," "one embodiment," or "an alternative embodiment" in different locations throughout this specification do not necessarily refer to the same embodiment. Furthermore, certain features, structures, or characteristics in one or more embodiments of the present disclosure can be appropriately combined.

[0189] Unless otherwise defined, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. It should also be understood that terms such as those defined in a common dictionary shall be interpreted as having a meaning consistent with their meaning in the context of the relevant art, and not as having an idealized or highly formalized meaning, unless expressly defined herein.

[0190] The foregoing description is illustrative of the invention and should not be construed as limiting it. Although several exemplary embodiments of the invention have been described, those skilled in the art will readily understand that many modifications can be made to the exemplary embodiments without departing from the novel teachings and advantages of the invention. Therefore, all such modifications are intended to be included within the scope of the invention as defined in the claims. It should be understood that the foregoing description is illustrative of the invention and should not be construed as limiting it to the specific embodiments disclosed, and modifications to the disclosed embodiments and other embodiments are intended to be included within the scope of the appended claims. The invention is defined by the claims and their equivalents.

Claims

1. A method for training a neural network model, comprising: Initialize an information processing neural network model and a reference neural network model corresponding to the information processing neural network model, wherein the information processing neural network model includes multiple processing modules and the reference neural network model includes multiple reference modules; Through multiple iterations, the parameters of the information processing neural network model and the reference neural network model are updated, wherein, in each iteration, Based on the training samples and the parameters of the plurality of reference modules, the output results corresponding to the plurality of reference modules are determined respectively. The training samples include at least one of image training samples, text training samples, audio training samples, and video training samples. Based on the mask sample obtained after masking the training sample and the parameters of the plurality of processing modules, the output results corresponding to the plurality of processing modules are determined respectively. Based on the output results corresponding to the plurality of processing modules and the output results corresponding to the plurality of reference modules, the parameters of the plurality of processing modules are updated; and The parameters of the plurality of reference modules are updated based on the updated parameters of the plurality of processing modules.

2. The method as described in claim 1, wherein, Updating the parameters of the plurality of reference modules based on the updated parameters of the plurality of processing modules includes: The parameters of the plurality of reference modules are updated using the values ​​of the parameters of the plurality of processing modules in at least one preceding iteration.

3. The method as described in claim 2, wherein, Updating the parameters of the plurality of reference modules using the values ​​of the parameters of the plurality of processing modules in at least one preceding iteration includes: The parameters of the plurality of reference modules are updated using the exponential moving average of the parameters of the plurality of processing modules in at least one preceding iteration.

4. The method of claim 1, wherein, The plurality of processing modules are L processing modules, the plurality of reference modules are L reference modules, and the l-th processing module among the L processing modules and the l-th reference module among the L reference modules have the same structure, wherein L and l are positive integers, and l≤L.

5. The method of claim 4, wherein, Based on the output results corresponding to the plurality of processing modules and the output results corresponding to the plurality of reference modules, updating the parameters of the plurality of processing modules includes: For the l-th processing module among the L processing modules The parameters of the l-th processing module are updated based on the output of the l-th processing module and the output of the reference module corresponding to the l-th processing module. The reference modules corresponding to the l-th processing module include the lm-th reference module to the (l+n)-th reference module, where m and n are integers and satisfy m≥0, n≥0, lm≥1, and (l+n≤L).

6. The method of claim 4, wherein, Based on the output results corresponding to the plurality of processing modules and the output results corresponding to the plurality of reference modules, updating the parameters of the plurality of processing modules includes: The energy function is calculated based on the output results of the multiple processing modules and the output results of the multiple reference modules, and the parameters of the multiple processing modules are updated based on the value of the energy function. The energy function is used to evaluate the accuracy of the output results of the multiple processing modules.

7. The method of claim 6, wherein, The energy function includes a global energy function and a local energy function. The global energy function is used to evaluate the difference between the output of the Lth processing module and the output of the Lth reference module, and the local energy function is used to evaluate the difference between the output of the lth processing module and the output of the reference module corresponding to the lth processing module.

8. The method of claim 7, wherein, The local energy function includes: a first local energy function and a second local energy function. The calculation of the energy function value based on the output results of the multiple processing modules and the output results of the multiple reference modules includes: For the l-th processing module among the L processing modules The value of the first local energy function is determined based on the difference between the output of the l-th processing module and the output of the reference module corresponding to the l-th processing module; The expected output of the l-th processing module is determined based on the global energy function; and The value of the second local energy function is determined based on the difference between the output of the l-th processing module and the expected output of the l-th processing module.

9. The method of claim 8, wherein, Determining the expected output of the l-th processing module based on the global energy function includes: The reverse calculation difference of the output result of the l-th processing module is determined based on the value of the global energy function; and Based on the reverse calculation difference of the output result of the l-th processing module and the output result of the l-th processing module, the expected output result of the l-th processing module is determined.

10. The method of claim 9, wherein, The differences in the reverse calculation of the output result of the l-th processing module based on the value of the global energy function include: For the (l+k)th processing module from the Lth processing module to the lth processing module, Calculate the partial derivative of the output of the (l+k)th processing module with respect to the output of the (l+k-1)th processing module, where the output of the (l+k-1)th processing module is the input of the (l+k)th processing module; and The reverse calculation difference of the output result of the (l+k+1)th processing module is determined based on the partial derivative and the reverse calculation difference of the output result of the (l+k+1)th processing module, where k is an integer and satisfies k≥0 and l+k+1≤L.

11. The method of claim 8, wherein updating the parameters of the plurality of processing modules includes: The third local energy function is determined based on the first local energy function and the second local energy function corresponding to the l-th processing module, and The parameters of the l-th processing module are updated based on the third local energy function.

12. The method of claim 8, wherein updating the parameters of the plurality of processing modules includes: If the first local energy function corresponding to the l-th processing module has not converged, the parameters of the l-th processing module are updated based on the value of the first local energy function corresponding to the l-th processing module. as well as If the first local energy function corresponding to the l-th processing module converges, the parameters of the l-th processing module are updated based on the second local energy function corresponding to the l-th processing module.

13. The method of claim 1, wherein, Each of the plurality of processing modules, or each of the plurality of reference modules, is a sub-neural network model or a neural network layer. Each processing module or each reference module includes one or more of the following: convolutional neural network, attention-based neural network, recurrent neural network, recurrent neural network, feedforward neural network, generative adversarial neural network, and deep neural network.

14. The method of claim 1, wherein, The method is used to perform supervised training or self-supervised training on the information processing neural network model.

15. The method of claim 1, wherein, Masking the training samples includes at least one of masking the training samples with different sizes, different positions, or different shapes.

16. The method of claim 1 further comprises: If the updated information processing neural network model meets predetermined conditions, the training of the information processing neural network model is completed, and the trained information processing neural network model is obtained. as well as The trained information processing neural network model is further trained using information processing training samples corresponding to the information processing task, wherein the information processing task includes at least one of information extraction, information classification, information restoration, information style transfer, information enhancement, information mining, and information recognition.

17. A method for information processing based on a neural network model, comprising: Acquire information to be processed, wherein the information to be processed includes at least one of image information, text information, audio information, and video information. The information to be processed is processed based on an information processing neural network model to obtain the result of processing the information to be processed, wherein the information processing neural network model is trained by the method described in any one of claims 1-16.

18. An apparatus for training a neural network model, comprising: The initialization module is configured to initialize an information processing neural network model and a reference neural network model corresponding to the information processing neural network model, wherein the information processing neural network model includes multiple processing modules and the reference neural network model includes multiple reference modules; The parameter update module is configured to update the parameters of the information processing neural network model and the reference neural network model through multiple iterations, wherein, in each iteration, Based on the training samples and the parameters of the plurality of reference modules, the output results corresponding to the plurality of reference modules are determined respectively. The training samples include at least one of image training samples, text training samples, audio training samples, and video training samples. Based on the mask sample obtained after masking the training sample and the parameters of the plurality of processing modules, the output results corresponding to the plurality of processing modules are determined respectively. Based on the output results corresponding to the plurality of processing modules and the output results corresponding to the plurality of reference modules, the parameters of the plurality of processing modules are updated; and The parameters of the plurality of reference modules are updated based on the updated parameters of the plurality of processing modules.

19. A computer program product comprising computer software code, which, when executed by a processor, is used to implement the method as described in any one of claims 1-17.

20. A computer-readable storage medium having stored thereon computer-executable instructions, which, when executed by a processor, are used to implement the method as described in any one of claims 1-17.

Citation Information

Patent Citations

  • Method and device for generating neural network, computer equipment and storage medium

    CN114037056A

  • Method and apparatus with incremental learning moddel

    US20210312278A1