Semantic Model Compression via Hash Search and Distillation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Current pre-trained semantic models are overly large and complex, making them difficult to deploy in production environments, and existing compression techniques like model distillation and quantitative clipping are insufficient for improving processing speed.

Innovation Solution

A method that uses a hash search method to determine semantic result information for input vectors in an initial improved model, followed by training with a model distillation method to obtain a more efficient improved model, replacing complex iterative calculations with hash search and vector transformation processes, and using a teacher network to guide the learning of a student network for enhanced performance.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If pre-trained semantic models are used, then semantic processing capability is improved, but model size and calculation complexity increase

Engineering Contradiction:
Improvesemantic processing capabilityVSAvoidmodel size and calculation complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent segments the model into a teacher network and a student network. The teacher network contains the pre-trained semantic model with large parameters, while the student network is a simplified version with fewer parameters. Through knowledge distillation, the student network learns from the teacher network to achieve similar semantic processing capability with reduced complexity, resolving the contradiction between capability and model size.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent creates a copy of the pre-trained semantic model in the form of the student network. This student network is trained to replicate the essential semantic processing functions of the teacher network through knowledge distillation, achieving a simplified copy that maintains functionality while reducing computational complexity and model size.

Inventive Principle:
Principle #26Copying

2Productivity

If model distillation technique is used to compress models, then processing speed is improved, but compression ratio and parameter reduction are insufficient

Engineering Contradiction:
Improveprocessing speedVSAvoidparameter compression ratio
Core Design Contradiction:
ProductivityVSQuantity of substance

Solution Approach 1:

The patent changes the parameter scale of the model by training the student network with fewer parameters than the teacher network. Through knowledge distillation, the student network optimizes its parameters to achieve high compression ratio while maintaining processing speed. This parameter transformation enables both high productivity and significant quantity reduction.

Inventive Principle:
Principle #35Parameter changes

3Device complexity

If hash search method is used to determine semantic result information, then calculation complexity is reduced, but model training requirements increase

Engineering Contradiction:
Improvecalculation complexityVSAvoidmodel training requirements
Core Design Contradiction:
Device complexityVSEase of manufacture

Solution Approach 1:

The patent applies preliminary action by pre-training the teacher network with the pre-trained semantic model before deploying the student network. The teacher network performs the complex semantic processing in advance, and the student network learns from these pre-computed results through knowledge distillation. This preliminary training phase reduces the calculation complexity during actual inference while managing training requirements through structured two-stage training.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS11775766B2Method and apparatus for improving model based on pre-trained semantic model
Publication Date: 2023.10.03 BEIJING BAIDU NETCOM SCI & TECH CO LTD
  • US11775766B2 patent drawing
  • US11775766B2 patent drawing
  • US11775766B2 patent drawing

AI summary

Embodiments of a method and an apparatus for improving a model based on a pre-trained semantic model are provided. The method may include: based on the pre-trained semantic model, obtaining an initial improved model, where semantic result information of an input vector is determined in the initial improved model based on a hash search method; and based on a model distillation method, training the initial improved model to obtain an improved model. Some embodiments can obtain the semantic result information of the input vector by performing the hash search method on the input vector, replace the original complex iterative calculation process of a semantic model, and obtain the improved model with few model parameters and high compression ratio.