Knowledge Distillation via Pairwise Activation Similarity Matrices

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing knowledge distillation methods face challenges in effectively capturing and transferring the knowledge from a teacher network to a student network, particularly in preserving pairwise similarities in activation patterns, which is crucial for resource-efficient deep learning applications like mobile robots and self-driving vehicles.

Innovation Solution

A novel knowledge distillation method that generates pairwise similarity matrices for both teacher and student networks based on activation maps, minimizing a loss function that encourages similar or dissimilar activations in the student network corresponding to those in the teacher network, allowing the student to preserve activation similarities without mimicking the teacher's representation space.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional knowledge distillation methods are used to train student networks, then the student network can learn from teacher network predictions, but the pairwise similarities in activation patterns are not effectively preserved

Engineering Contradiction:
Improveknowledge transfer effectivenessVSAvoidactivation pattern similarity
Core Design Contradiction:
ReliabilityVSLoss of information

Solution Approach 1:

The patent introduces pairwise similarity matrices as an intermediary representation that captures the relationships between different input samples' activation patterns. This mediator transfers the structural information about activation similarities from teacher to student network, complementing the direct prediction-based knowledge transfer.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent adds a new dimension to knowledge distillation by computing pairwise similarities between activation vectors of different samples. This transforms the knowledge transfer from comparing single sample predictions to comparing relationship structures across multiple samples, preserving activation pattern similarities.

Inventive Principle:
Principle #17Another dimension (Dimensionality change)

2Reliability

If deeper, wider, and more complex neural networks are used to solve real-world problems, then problem-solving capability improves, but computational cost increases

Engineering Contradiction:
Improveproblem-solving capabilityVSAvoidcomputational cost
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent creates a simplified copy (student network) of the complex teacher network, transferring essential knowledge patterns rather than copying the entire complex structure. This allows the student network to achieve comparable performance with reduced computational requirements.

Inventive Principle:
Principle #26Copying

Solution Approach 2:

The patent changes the training parameters and objective functions of the student network by incorporating similarity-based loss terms that guide the student to replicate not just predictions but also the activation pattern relationships, enabling efficient inference with smaller networks.

Inventive Principle:
Principle #35Parameter changes

3Use of energy by moving object

If network compression methods like weight pruning and quantization are used, then resource efficiency improves, but specialized software or hardware support is required

Engineering Contradiction:
Improveresource efficiencyVSAvoidsoftware/hardware requirements
Core Design Contradiction:
Use of energy by moving objectVSDevice complexity

Solution Approach 1:

The patent uses a different approach from traditional compression methods by training a new student network from scratch with distillation loss, rather than modifying the existing teacher network structure through pruning or quantization. This avoids the need for specialized hardware support while achieving resource efficiency.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

Data Source

PatentUS11636337B2System and method for knowledge distillation between neural networks
Publication Date: 2023.04.25 ROYAL BANK OF CANADA
  • US11636337B2 patent drawing
  • US11636337B2 patent drawing
  • US11636337B2 patent drawing

AI summary

Systems and methods for knowledge distillation provide supervised training of a student network with a teacher network, including inputting a batch to the teacher network, inputting the batch to the student network, generating a teacher activation map at a layer of the teacher network, generating a student activation map at a layer of the student network corresponding to the layer of the teacher network, generating a pairwise teacher similarity matrix based on the teacher activation map, generating a pairwise student similarity matrix based on the student activation map, and minimizing a knowledge distillation loss defined as a difference between the pairwise teacher similarity matrix and the pairwise student similarity matrix.