Domain-Specific Model Compression

By introducing weighted parameters and regularizing the pre-trained language model and removing unimportant candidate operations, the problem of high computing resources of deep learning models is solved, and efficient application in resource-constrained environments is achieved.

CN114424216BActive Publication Date: 2025-09-12INTERNATIONAL BUSINESS MACHINE CORPORATION
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202080065323.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2019-10-10
Filing Date
2020-10-01
Publication Date
2025-09-12
Estimated Expiration
2040-10-01

AI Technical Summary

Technical Problem

Existing deep learning models require high computing resources during the inference process and are difficult to be effectively applied in resource-constrained environments.

Method used

By introducing additional weighted parameters to the pre-trained language model and performing L1 or L2 regularization, candidate operations with little impact on the model output are removed, and the model is compressed to reduce computing resource requirements.

Benefits of technology

While maintaining model accuracy, the demand for computing resources is significantly reduced, making it suitable for resource-constrained environments such as edge clouds and local services.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114424216B_ABST
    Figure CN114424216B_ABST
Patent Text Reader

Abstract

Domain-specific model compression, by providing weighted parameters for candidate operations of a neural network, applying the weighted parameters to output vectors of the candidate operations, performing regularization of combinations of the weighted parameter-output vectors, compressing the neural network model according to a result of the regularization, and providing the neural network model after compression.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure generally relates to compression of machine learning models. Specifically, the present disclosure relates to reducing machine learning model computational requirements through domain-specific model compression. Background Art

[0002] Artificial intelligence models, such as convolutional neural networks (CNNs), are well-known. These models provide the ability to identify patterns in incoming data and then respond in a predictable manner. These models are trained using datasets similar to the data they will be used to process. After training, the model processes the incoming data based on the model's training, producing output.

[0003] The trained model may be too complex. Regularization can be used to reduce the complexity of the trained model. Regularization changes the cost function of the model and adds a penalty term to the cost function, which penalizes complex model terms, resulting in a trained model with lower complexity.

[0004] Use Ridge or L2 regularization to generalize overfitting regression models, reduce model complexity, and improve the model's ability to handle data outside the training dataset. Ridge regularization adds a penalty term associated with the square of the coefficients to the cost function to reduce model complexity and the resulting overfitting of the model.

[0005] Lasso (Least Absolute Shrinkage and Selection Operator) or L1 regularization adds a term associated with the absolute value of the coefficients to the cost function to remove less important or influential features from the function.

[0006] Therefore, there is a need in the art to solve the above problems. Summary of the Invention

[0007] Viewed from a first aspect, the present invention provides a computer-implemented method for domain-specific model compression, the method comprising: providing, by one or more computer processors, weighted parameters for candidate operations of a neural network model; applying, by the one or more computer processors, the weighted parameters to output vectors of the candidate operations; performing, by the one or more computer processors, regularization of applying the weighted parameters to the output vectors; compressing, by the one or more computer processors, the neural network model based on a result of the regularization; and providing, by the one or more computer processors, the neural network model after compression.

[0008] From another aspect, the present invention provides a computer system for domain-specific model compression, the computer system comprising: one or more computer processors; one or more computer-readable storage devices; and program instructions stored on the one or more computer-readable storage devices for execution by the one or more computer processors, the stored program instructions comprising: program instructions for providing weighting parameters for candidate operations of a neural network model; program instructions for applying the weighting parameters to output vectors of the candidate operations; program instructions for performing regularization of applying the weighting parameters to the output vectors; program instructions for compressing the neural network model based on a result of the regularization; and program instructions for providing the neural network model after compression.

[0009] Viewed from another aspect, the invention provides a computer program product for domain-specific model compression, the computer program product comprising a computer-readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit to perform a method for performing the steps of the invention.

[0010] Viewed from another aspect, the invention provides a computer program stored on a computer readable medium and loadable into the internal memory of a digital computer, comprising software code portions for performing the steps of the invention when the program is run on the computer.

[0011] From another aspect, the present invention provides a computer program product for domain-specific model compression, the computer program product comprising one or more computer-readable storage devices and program instructions stored on the one or more computer-readable storage devices, the stored program instructions comprising: program instructions for providing weighting parameters for candidate operations of a neural network model; program instructions for applying the weighting parameters to output vectors of the candidate operations; program instructions for performing regularization of applying the weighting parameters to the output vectors; program instructions for compressing the neural network model based on a result of the regularization; and program instructions for providing the neural network model after compression.

[0012] Aspects of the present invention disclose methods, systems, and computer-readable media associated with domain-specific model compression by providing weighting parameters for candidate operations of a neural network, applying the weighting parameters to output vectors of the candidate operations, performing regularization of the weighted parameter-output vector combination, compressing the neural network model based on the results of the regularization, and providing the neural network model after compression. BRIEF DESCRIPTION OF THE DRAWINGS

[0013] The present invention will now be described, by way of example only, with reference to preferred embodiments, as shown in the accompanying drawings:

[0014] Figure 1A schematic diagram of a system according to an embodiment of the present invention is provided.

[0015] Figure 2 A flow chart depicting a sequence of operations according to an embodiment of the present invention is provided.

[0016] Figure 3 A cloud computing environment according to an embodiment of the present invention is depicted.

[0017] Figure 4 An abstract model layer according to an embodiment of the present invention is shown. DETAILED DESCRIPTION

[0018] Pre-trained language models have been found to be applicable to tasks beyond their original scope. Models such as Bidirectional Encoder Representations from Transformers (BERT) and Generative Pre-training (GPT) models have expanded their use beyond the tasks for which they were originally proposed. These models often require significant computational resources to train in reasonable times. Even after training, the computational resources required to perform inference using these models can be substantial to achieve the desired operations per second.

[0019] The intent classification accuracy of deep learning models can be improved by adding a pretrained language model to the deep learning model. This addition is non-trivial, as the model can contain millions of parameters and be computationally intensive. Compressing the ensemble model and reducing computational cost would improve performance while providing a low-cost option. A method is needed to compress task-specific deep learning models to reduce the required computational resources and cost.

[0020] In an embodiment, the method starts with a pre-trained language model. In this embodiment, the pre-trained model can be BERT, GPT, ELMo or other language models. The model can be a TRANSFORMER-based model, a recursive neural network (RNN) or a model based on a convolutional neural network (CNN) with a repeated pattern in the model network. In an embodiment, the model is pre-trained to process a specific domain, such as a specific language or subject area, sports, finance, general news, scientific news, etc. In this embodiment, the model can also be pre-trained to complete definition tasks such as language translation, natural language processing, question answering, text classification, etc. (Note: the terms "BERT", "GPT", "ELMo" and "TRNASFORMER" can be subject to trademark rights in various jurisdictions around the world, and are only used herein with reference to products or services appropriately named by the mark, so that such trademark rights can exist).

[0021] In an embodiment, the method introduces an additional weight parameter w for each path or candidate operation of the pre-trained model. iIn an embodiment using the BERT model, additional weighting parameters are introduced for each attention head in each layer of the model. The model multiplies the output vector of each layer of the model by the new weighting parameters. In an embodiment, the initial value of the new weighting parameters is set to 1. Multiplying these parameters on the output vector has no effect on the model.

[0022] In an embodiment, the method uses a modified model including new weighting parameters to process a collection of unlabeled data that has not been classified or categorized with labels that explain or otherwise segment the data. In this embodiment, the method performs regularization on the new weighting coefficients. In this embodiment, the regularization is L1 or L2 regularization based on the weighting factors.

[0023] L1 regularization modifies the cost function of the model. In an embodiment, the method includes a new weighting parameter w i The cost function is modified by adding a term with the absolute value of . In this embodiment, optimizing the modified cost function will identify candidate operations that represent less important features of the processing model. In this embodiment, the value of the weighting parameter drops to zero when the model processes unlabeled data. In an embodiment, removing less important candidate operations in this way forces the remaining operations to capture the information represented by these less important candidate operations. In this embodiment, the number of non-zero candidate operations is reduced while preserving the overall information content of the model.

[0024] In an embodiment, L1 regularization is used, and the user specifies the proportion of zero-valued candidate operations that the regularization should produce and the desired model accuracy. In this embodiment, the user can also specify a small non-zero weight parameter value to include in the proportion of candidate operations produced by the regularization. In this embodiment, the method balances speed with the accuracy of the regularized model. In this embodiment, model speed is affected because candidate operations with zero weights are no longer calculated. In this embodiment, the method produces a proportion of zero-valued candidate operations for the model, where increasing the number of zero-valued candidate operations reduces accuracy and reducing the number of zero-valued candidate operations reduces speed of the model.

[0025] In an embodiment, the method removes the weighting parameters w with zero value after the regularization is completed. i The pre-trained model is modified by combining all candidate operations of . In this embodiment, the modified model is compressed, uses fewer resources, and achieves acceptable accuracy in its domain and task.

[0026] In an embodiment, the method uses L2 regularization to compress the model. In this embodiment, the method again adds new weighting parameters to the candidate operations of the model. In this embodiment, the method modifies the cost function of the model by adding a penalty term associated with the square of the weighting parameter rather than the absolute value of the parameter. In this embodiment, regularization is performed to optimize the modified cost function. In this embodiment, the user specifies a threshold level for the weighting parameter and a desired proportion of candidate operations below the threshold, as well as a desired model accuracy. The method uses unlabeled data for regularization until a combination of the desired proportion of candidate operations with weighting parameter values ​​below the threshold and the desired accuracy is obtained.

[0027] In an embodiment, the method also extends the regularization of the model with additional weighting parameters by adding one or more additional task terms to the model's cost function. Adding these terms to the cost function produces a model that can achieve regularization and compression of the original task in the original domain as well as the added task. In this embodiment, after the additional task and regularization terms are added to the model's cost function, the modified model processes labeled data - data characterized according to one or more of its attributes. For example, a single target model for language modeling can be extended to include text classification for the intent detection task by adding a weighted text classification term to the model's cost function and using a modified version of the model to process labeled text classification for intent data.

[0028] In an embodiment, the method provides a compressed model for direct use or integration with another model related to the same domain. In this embodiment, the integration of the compressed model adds additional task features to the original model in the domain, such as machine translation, natural language processing, question answering, text classification, etc. In this embodiment, due to the compression of the model according to the present invention, the compressed and integrated model is provided for use as a cloud service, edge cloud service, and independent local service provision.

[0029] Figure 1 A schematic diagram of exemplary network resources associated with practicing the disclosed invention is provided. The present invention may be implemented in a processor of any disclosed element that processes an instruction stream. As shown, a networked client device 110 is wirelessly connected to a server subsystem 102. A client device 104 is wirelessly connected to the server subsystem 102 via a network 114. The client devices 104 and 110 include a model compression program (not shown) and sufficient computing resources (processor, memory, network communication hardware) to execute the program. Figure 1 As shown, server subsystem 102 includes server computer 150 . Figure 1 A block diagram of components of a server computer 150 within a networked computer system 1000 is depicted in accordance with an embodiment of the present invention. It should be understood that Figure 1This merely provides an illustration of one implementation and does not imply any limitation with respect to the environments in which different embodiments may be implemented. Many modifications to the described environments are possible.

[0030] The server computer 150 may include a processor 154, memory 158, persistent storage 170, a communications unit 152, an input / output (I / O) interface 156, and a communications fabric 140. The communications fabric 140 provides communication between a cache 162, memory 158, persistent storage 170, the communications unit 152, and the input / output (I / O) interface 156. The communications fabric 140 may be implemented using any architecture designed to transfer data and / or control information between a processor (e.g., a microprocessor, a communications and network processor, etc.), system memory, peripheral devices, and any other hardware components within the system. For example, the communications fabric 140 may be implemented using one or more buses.

[0031] Memory 158 and persistent storage 170 are computer-readable storage media. In this embodiment, memory 158 includes random access memory (RAM) 160. In general, memory 158 may include any suitable volatile or non-volatile computer-readable storage media. Cache 162 is a fast memory that enhances the performance of processor 154 by storing recently accessed data from memory 158 and data near recently accessed data.

[0032] Program instructions and data (e.g., model compression program 175) used to practice embodiments of the present invention are stored in persistent storage 170 for execution and / or access by one or more corresponding processors 154 of server computer 150 through cache 162. In this embodiment, persistent storage 170 comprises a magnetic hard drive. As an alternative to or in addition to a magnetic hard drive, persistent storage 170 may comprise a solid-state hard drive, a semiconductor memory device, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), flash memory, or any other computer-readable storage medium capable of storing program instructions or digital information.

[0033] The media used by persistent storage 170 may also be removable. For example, a removable hard drive may be used for persistent storage 170. Other examples include optical and magnetic disks, thumb drives, and smart cards, which are inserted into a drive to transfer to another computer-readable storage medium that is also part of persistent storage 170.

[0034] In these examples, communications unit 152 provides communications with other data processing systems or devices, including resources of client computing devices 104 and 110. In these examples, communications unit 152 includes one or more network interface cards. Communications unit 152 may provide communications using one or both of physical and wireless communication links. Software distribution programs, as well as other programs and data used to implement the present invention, may be downloaded to persistent storage 170 of server computer 150 via communications unit 152.

[0035] The I / O interface 156 allows for input and output of data to and from other devices that may be connected to the server computer 150. For example, the I / O interface 156 can provide a connection to an external device 190 (e.g., a keyboard, a keypad, a touch screen, a microphone, a digital camera, and / or some other suitable input device). The external device 190 can also include a portable computer-readable storage medium, such as, for example, a thumb drive, a portable optical or magnetic disk, and a memory card. Software and data used to practice embodiments of the present invention (e.g., the model compression program 175 on the server computer 150) can be stored on such a portable computer-readable storage medium and can be loaded into the permanent storage 170 via the I / O interface 156. The I / O interface 156 is also connected to a display 180.

[0036] The display 180 provides a mechanism for displaying data to the user and may be, for example, a computer monitor. The display 180 may also be used as a touch screen, such as the display of a tablet computer.

[0037] Figure 2 A flowchart 200 is provided that illustrates exemplary activities associated with practicing the present disclosure. After the program begins, at 210, the program 175 adds weighting parameters or coefficients to candidate operations of the trained neural network. The neural network can be trained for machine translation, natural language processing, question answering, text classification, etc. The neural network can be a TRANSFORMER-based model, an RNN, a CNN, or any other neural network architecture with a repeating pattern associated with the candidate operations of the neural network. In an embodiment, the neural network includes a BERT model with 12 stages and 12 attention heads or candidate operations per stage.

[0038] In an embodiment, at 220, the program 175 converts the weighting parameter w i The output vectors of candidate operations applied to the trained neural network. In this embodiment, the method initially sets the weighting parameters to a value of 1.0. The application of these single-valued weighting parameters has no direct effect on the output of the model. In this embodiment, the method applies the weighting parameters to the output vectors of candidate operations at each level of the neural network model, for example, to the output vectors of the 12 levels of the BERT model.

[0039] In an embodiment, at 230, the program 175 performs regularization of the model. In this embodiment, the method is based on the weighting parameter w i Perform L1 or L2 model regularization. In this embodiment, the method uses unlabeled data as input to the model to perform regularization. Regularization identifies candidate operations that have little or no effect on the output of the layer and the overall model. As regularization proceeds, the coefficients of the identified candidates are gradually reduced from their initial value of 1. In an embodiment, the method uses L1 regularization while processing unlabeled data to identify candidate operations with zero-valued coefficients. In this embodiment, the method sets a threshold for the number of zero-weighted candidate operations that regularization should produce. In this embodiment, the method sets the threshold to maximize the number of zero-valued coefficient candidate operations identified by regularization without reducing model accuracy. Candidate operations with zero-valued coefficients typically have little effect on model output accuracy.

[0040] In an embodiment, the method uses L2 regularization to identify candidate operations that have low impact on the model output. In this embodiment, the method sets a threshold that defines low impact on the model, and the method sets a second threshold that defines the number of candidate operations below the low impact threshold that the regularization process should produce. In this embodiment, the method sets these thresholds to balance between maximizing the number of identified candidate operations and reducing model accuracy.

[0041] In an embodiment, at 240, program 175 compresses the model by removing the candidate operations identified in step 230. The method uses the threshold of step 230 to identify the maximum number of candidate operations that can be ignored without affecting the accuracy of the model. In this embodiment, the method removes these identified candidate operations from the model, compressing the size and computational complexity of the model and improving the speed of model execution. Appropriately setting the threshold ensures that the compressed model provides accurate results.

[0042] In an embodiment, at 250, program 175 provides a compressed model for use. The compressed model has fewer candidate operations than the original model, requiring less memory and CPU resources to store and run the model. In an embodiment, the compressed model is more portable in that it requires fewer system resources and can be used on a wider range of systems. For example, a model developed using extensive cloud resources can be compressed to the point where it can be utilized on edge clouds or local computing resources.

[0043] It should be understood that although the present disclosure includes detailed descriptions about cloud computing, the implementation of the teachings set forth herein is not limited to cloud computing environments. Rather, embodiments of the present invention can be implemented in conjunction with any other type of computing environment now known or later developed.

[0044] Cloud computing is a service delivery model for enabling convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, network bandwidth, servers, processing, memory, storage, applications, virtual machines, and services) that can be quickly provisioned and released with minimal management effort or interaction with the service provider. The cloud model can include at least five characteristics, at least three service models, and at least four deployment models.

[0045] Features are as follows:

[0046] On-demand self-service: Cloud consumers can unilaterally and automatically provision computing capabilities, such as server time and network storage, as needed without manual interaction with the service provider.

[0047] Wide Area Network Access: Capabilities are available over the network and accessed through standard mechanisms that facilitate use by heterogeneous thin or thick client platforms (e.g., mobile phones, laptops, and PDAs).

[0048] Resource pooling: A provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, where different physical and virtual resources are dynamically allocated and reallocated based on demand. This is location-independent in the sense that consumers typically do not control or know the exact location of the provided resources, but are able to specify the location at a higher level of abstraction (e.g., country, state, or data center).

[0049] Rapid elasticity: In some cases, the ability to scale out quickly and in quickly can be provided quickly and elastically. To the consumer, the capacity available for provisioning often appears unlimited and can be purchased in any quantity at any time.

[0050] Metered Services: Cloud systems automatically control and optimize resource usage by leveraging metering capabilities at a level of abstraction appropriate to the type of service (e.g., storage, processing, bandwidth, and active user accounts). Resource usage can be monitored, controlled, and reported, providing transparency to both the provider and consumer of the utilized service.

[0051] The service model is as follows:

[0052] Software as a Service (SaaS): The ability provided to consumers is to use the provider's applications running on cloud infrastructure. Applications are accessed from a variety of client devices through a thin client interface such as a web browser (e.g., web-based email). Consumers do not manage or control the underlying cloud infrastructure, including networks, servers, operating systems, storage, or even individual application capabilities, with the possible exception of limited user-specific application configuration settings.

[0053] Platform as a Service (PaaS): The capability provided to consumers is to deploy consumer-created or acquired applications onto cloud infrastructure. These applications are built using programming languages ​​and tools supported by the provider. Consumers do not manage or control the underlying cloud infrastructure, including networks, servers, operating systems, or storage, but do have control over the deployed applications and possibly the configuration of the application hosting environment.

[0054] Infrastructure as a Service (IaaS): The capabilities provided to consumers are processing, storage, networking, and other basic computing resources on which consumers can deploy and run arbitrary software, including operating systems and applications. Consumers do not manage or control the underlying cloud infrastructure, but do have control over the operating system, storage, deployed applications, and possibly limited control over selected networking components (e.g., host firewalls).

[0055] The deployment model is as follows:

[0056] Private cloud: The cloud infrastructure is operated solely for the organization. It can be managed by the organization or a third party and can exist inside or outside the building.

[0057] Community cloud: Cloud infrastructure is shared by several organizations and supports a specific community with shared concerns (e.g., mission, security requirements, policies, and compliance considerations). It can be managed by the organization or a third party and can exist on-premises or off-premises.

[0058] Public cloud: Cloud infrastructure is available to the general public or large industrial groups and is owned by the organization that sells cloud services.

[0059] Hybrid cloud: A cloud infrastructure is a combination of two or more clouds (private, community, or public) that remain a unique entity but are bound together by standardized or proprietary technologies that enable data and application portability (e.g., cloud bursting for load balancing between clouds).

[0060] The cloud computing environment is service-oriented, with a focus on statelessness, low coupling, modularity, and semantic interoperability. At the core of cloud computing is the infrastructure consisting of a network of interconnected nodes.

[0061] Now refer to Figure 3, depicts an illustrative cloud computing environment 50. As shown, the cloud computing environment 50 includes one or more cloud computing nodes 10 with which a local computing device used by a cloud consumer can communicate, such as a personal digital assistant (PDA) or cellular phone 54A, a desktop computer 54B, a laptop computer 54C, and / or an automobile computer system 54N. The nodes 10 can communicate with each other. They can be physically or virtually grouped (not shown) in one or more networks, such as a private cloud, community cloud, public cloud, or hybrid cloud, or a combination thereof, as described above. This allows the cloud computing environment 50 to provide infrastructure, platform, and / or software as a service for which the cloud consumer does not need to maintain resources on a local computing device. It should be understood that Figure 3 The types of computing devices 54A-N shown in FIGURE 5 are intended for illustration only, and computing node 10 and cloud computing environment 50 may communicate with any type of computerized device over any type of network and / or network-addressable connection (eg, using a web browser).

[0062] Now refer to Figure 4 , showing the cloud computing environment 50 ( Figure 3 ) provides a set of functional abstraction layers. It should be understood in advance that Figure 4 The components, layers, and functions shown in are intended to be illustrative only, and embodiments of the present invention are not limited thereto. As depicted, the following layers and corresponding functions are provided:

[0063] The hardware and software layer 60 includes hardware and software components. Examples of hardware components include: host computers 61; servers based on RISC (Reduced Instruction Set Computer) architecture 62; servers 63; blade servers 64; storage devices 65; and network and networking components 66. In some embodiments, software components include network application server software 67 and database software 68.

[0064] Virtualization layer 70 provides an abstraction layer from which the following examples of virtual entities can be provided: virtual servers 71 ; virtual storage 72 ; virtual networks 73 , including virtual private networks; virtual applications and operating systems 74 ; and virtual clients 75 .

[0065] In one example, the management layer 80 may provide the functionality described below. Resource provisioning 81 provides for dynamic procurement of computing and other resources for performing tasks within a cloud computing environment. Metering and pricing 82 provides for cost tracking when utilizing resources in a cloud computing environment, as well as billing or invoicing for the consumption of those resources. In one example, these resources may include application software licenses. Security provides authentication for cloud consumers and tasks, as well as protection for data and other resources. A user portal 83 provides access to the cloud computing environment for consumers and system administrators. Service level management 84 provides for allocation and management of cloud computing resources so that required service levels are met. Service level agreement (SLA) planning and fulfillment 85 provides for pre-scheduling and procurement of cloud computing resources, where future demand is anticipated based on the SLA.

[0066] The workload layer 90 provides examples of functionality that can take advantage of a cloud computing environment. Examples of workloads and functionality that can be provided from this layer include: mapping and navigation 91; software development and lifecycle management 92; virtual classroom education delivery 93; data analysis processing 94; transaction processing 95; and model compression program 175.

[0067] The present invention may be a system, method, and / or computer program product at any possible level of technical detail integration. The present invention may be advantageously implemented in any system that processes an instruction stream, either singly or in parallel. The computer program product may include a computer-readable storage medium (or multiple media) having computer-readable program instructions thereon for causing a processor to perform various aspects of the present invention.

[0068] A computer-readable storage medium can be a tangible device that can retain and store instructions used by an instruction execution device. A computer-readable storage medium can be, for example, but not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. A non-exhaustive list of more specific examples of computer-readable storage media includes the following: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device such as a punch card or a raised structure in a groove on which instructions are recorded, and any suitable combination thereof. As used herein, a computer-readable storage medium should not be interpreted as a temporary signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (e.g., a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.

[0069] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to a corresponding computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions to be stored in a computer-readable storage medium within the corresponding computing / processing device.

[0070] The computer-readable program instructions for performing the operations of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, configuration data for an integrated circuit, or source code or object code written in any combination of one or more programming languages ​​(including object-oriented programming languages, such as Smalltalk, C++, etc.) and procedural programming languages ​​(such as "C" programming language or similar programming languages). The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, to perform various aspects of the present invention, an electronic circuit comprising, for example, a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA) may execute the computer-readable program instructions to personalize the electronic circuit by utilizing the state information of the computer-readable program instructions.

[0071] Various aspects of the present invention are described herein with reference to flowcharts and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the present invention. It will be understood that each block of the flowcharts and / or block diagrams and combinations of blocks in the flowcharts and / or block diagrams can be implemented by computer-readable program instructions.

[0072] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device create a device for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium, which can direct the computer, programmable data processing device, and / or other equipment to operate in a specific manner, so that the computer-readable storage medium having the instructions stored therein includes an article of manufacture, which includes instructions for implementing various aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0073] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus, or other device to produce a computer-implemented process, so that the instructions executed on the computer, other programmable apparatus, or other device implement the functions / actions specified in one or more boxes of the flowchart and / or block diagram.

[0074] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flow chart or block diagram can represent a module, segment or portion of an instruction, which includes one or more executable instructions for realizing a specified logical function. In some alternative implementations, the functions noted in the frame may not occur in the order noted in the figure. For example, the two frames shown in succession can actually be performed substantially simultaneously, or these frames can sometimes be performed in reverse order, depending on the functions involved. It will also be noted that each block of the block diagram and / or flow chart illustration and the combination of the blocks in the block diagram and / or flow chart illustration can be implemented by a dedicated hardware-based system that performs a specified function or action or performs a combination of dedicated hardware and computer instructions.

[0075] References in the specification to "one embodiment," "an embodiment," "an example embodiment," etc., indicate that the described embodiment may include a particular feature, structure, or characteristic, but every embodiment may not necessarily include the particular feature, structure, or characteristic. Furthermore, these phrases do not necessarily refer to the same embodiment. Furthermore, when a particular feature, structure, or characteristic is described in conjunction with an embodiment, it is considered within the knowledge of those skilled in the art to affect such feature, structure, or characteristic in conjunction with other embodiments, whether or not explicitly described.

[0076] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will also be understood that the terms "comprises" and / or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.

[0077] The descriptions of various embodiments of the present invention have been provided for illustrative purposes, but are not intended to be exhaustive or limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope of the invention. The terminology used herein is selected to best explain the principles of the embodiments, practical applications, or improvements over existing technologies in the marketplace, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A computer-implemented method for domain-specific model compression, the method comprising: providing, by one or more computer processors, weighted parameters for candidate operations of a neural network model for performing tasks of language translation, natural language processing, question answering, or text classification; applying, by the one or more computer processors, the weighting parameters to an output vector of the candidate operation; performing, by the one or more computer processors, regularization of applying the weighting parameters to the output vector; compressing the neural network model based on the regularization result by the one or more computer processors; and The neural network model is provided by the one or more computer processors after compression.

2. The computer-implemented method of claim 1 , further comprising training, by the one or more computer processors, the neural network using unlabeled domain data.

3. The computer-implemented method of any one of claims 1-2, further comprising training, by the one or more computer processors, the neural network with two objectives, one of the objectives comprising a domain classification task.

4. The computer-implemented method of any one of claims 1-2, further comprising training, by the one or more computer processors, the neural network using labeled domain data.

5. The computer-implemented method of any one of claims 1-2, further comprising reducing, by the one or more computer processors, a neural network model attention head weight value to zero.

6. The computer-implemented method of any one of claims 1 to 2, further comprising: training, by the one or more computer processors, the neural network with two objectives, one of the objectives comprising a domain classification task; as well as The neural network is trained by the one or more computer processors using the labeled data.

7. A computer system for domain-specific model compression, the computer system comprising: one or more computer processors; one or more computer-readable storage devices; as well as The program instructions stored on the one or more computer-readable storage devices are configured to be executed by the one or more computer processors, the stored program instructions comprising: Program instructions for providing weighting parameters for candidate operations of a neural network model, wherein the neural network model is used to perform tasks of language translation, natural language processing, question answering, or text classification; program instructions for applying the weighting parameters to an output vector of the candidate operation; program instructions for performing a regularization that applies the weighting parameters to the output vector; Program instructions for compressing the neural network model based on the results of the regularization; and Program instructions for providing the neural network model after compression.

8. The computer system of claim 7, further comprising program instructions for training the neural network using unlabeled domain data.

9. The computer system of any one of claims 7 to 8, further comprising program instructions for training the neural network with two objectives, one of which comprises a domain classification task.

10. The computer system of any one of claims 7 to 8, further comprising program instructions for training the neural network using labeled domain data.

11. The computer system of any one of claims 7 to 8, further comprising program instructions for reducing the neural network model attention head weight value to zero.

12. A A computer-readable storage medium readable by a processing circuit and storing instructions for execution by the processing circuit for performing the method according to any one of claims 1 to 7.

13. A computer program product comprising software code portions for performing the method according to any one of claims 1 to 7 when the computer program product is run on a computer.

Citation Information

Patent Citations

  • Neural network acceleration and embedding compression systems and methods with activation sparsification

    US20190392323A1