Semantic Masking for Transformer Model Compression
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional transformer-based language models are impractical for on-device training and inferencing in IoT and mobile devices due to their large size and high computational requirements, leading to long training times and resource inefficiencies.
Innovation Solution
The method involves performing semantic probing on a pre-trained model using textual utterances to select and reconstruct a subset of targeted hidden layers, generating a binary mask for the model, which reduces its size and training time while maintaining performance, enabling efficient usage in resource-constrained devices.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If transformer-based language models are used for natural language processing, then language understanding performance is improved, but model size and computational requirements increase significantly
Solution Approach 1:
The patent extracts and retains only the most important hidden layers from the pre-trained transformer model based on semantic probing performance scores. By selecting only the top-performing layers (e.g., layers with highest semantic probing scores) and discarding less important layers, the model size is significantly reduced while maintaining core language understanding capabilities. This extraction approach directly addresses the contradiction by keeping essential functionality while removing redundant components.
Solution Approach 2:
The patent segments the transformer model into individual hidden layers that can be independently evaluated and selected. Instead of treating the model as an indivisible unit, it divides the model into discrete layers, probes each layer's semantic performance, and then reconstructs the model using only the selected layers. This segmentation enables fine-grained optimization of model size versus performance trade-off.
2Reliability
If conventional transformer models are trained on-device in IoT and mobile devices, then language processing capability is improved, but training time and resource consumption increase
Solution Approach 1:
The patent performs preliminary semantic probing on a pre-trained model to identify and select the most important hidden layers before actual on-device training. By pre-determining which layers are most useful for language understanding through probing, the subsequent on-device training only needs to train the selected layers rather than the entire model, significantly reducing training time and computational resources required on constrained devices.
Solution Approach 2:
The patent extracts only the essential hidden layers that contribute most to language understanding performance and excludes less important layers from on-device training. This extraction reduces the number of parameters that need to be trained on-device, directly reducing training time and energy consumption while maintaining language processing capability.
3Reliability
If full pre-trained models are used for on-device inferencing, then language understanding accuracy is improved, but storage requirements and processing efficiency deteriorate
Solution Approach 1:
The patent extracts and retains only the most semantically important hidden layers for on-device inferencing based on probing results. By removing less important layers, the model size for deployment is significantly reduced, which decreases memory usage, reduces processing complexity, and improves energy efficiency while maintaining core language understanding accuracy through retention of critical layers.
Solution Approach 2:
The patent applies local quality by differentiating the importance of different model components. Instead of treating all layers uniformly, it identifies which specific hidden layers have high semantic probing scores and retains only those for deployment. This creates a non-uniform model structure where critical components are preserved and less critical components are removed, optimizing the balance between accuracy and processing efficiency.
Data Source
AI summary
A method includes performing, using at least one processor of an electronic device, semantic probing on a pre-trained model using one or more textual utterances. Performing the semantic probing includes processing each of the one or more textual utterances to determine a performance score for one or more targeted hidden layers of the pre-trained model. Performing the semantic probing also includes selecting a subset of the targeted hidden layers based on a comparison of the performance score to a predetermined threshold. The method also includes reconstructing, using the at least one processor, the pre-trained model based on the semantic probing to generate a reconstructed model.


