Per-Core Gradient Clipping to Limit ML Model Memorization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Machine learning models unintentionally memorize training instances, leading to privacy and data security concerns and making it difficult to determine generalization, with existing solutions like per-example gradient clipping increasing training time and computational resources.

Innovation Solution

Implement per-core gradient clipping by averaging gradients across compute cores and applying a clipping bound to mitigate memorization without significantly impacting training duration or resources.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If per-example gradient clipping is applied to mitigate memorization, then privacy and data security are improved, but training time and computational resources increase

Engineering Contradiction:
Improveprivacy and data securityVSAvoidtraining time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent divides the gradient clipping operation into two levels: per-example gradient clipping (applied to individual training examples) and per-core gradient clipping (applied to gradients aggregated across multiple compute cores). This segmentation allows the system to mitigate memorization risks while reducing computational overhead by performing clipping at the core level rather than materializing all per-example gradients

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts and applies gradient clipping at the compute core level, removing the need to materialize and process all per-example gradients individually. By taking out the clipping operation and applying it to aggregated gradients at the core level, the system maintains privacy protection while significantly reducing training time and computational resource consumption

Inventive Principle:
Principle #2Taking out (Extraction)

2Reliability

If per-example gradient clipping is applied to mitigate memorization, then privacy and data security are improved, but computational resources consumed increase

Engineering Contradiction:
Improvedata securityVSAvoidcomputational resources
Core Design Contradiction:
ReliabilityVSUse of energy by moving object

Solution Approach 1:

The patent segments the gradient clipping process into per-example and per-core levels, allowing computational resources to be conserved by performing clipping operations at the aggregated core level rather than on every individual example gradient

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts the essential clipping function and applies it at the compute core level, eliminating the need to materialize and process all per-example gradients. This extraction reduces computational resource consumption while maintaining the security benefits of gradient clipping

Inventive Principle:
Principle #2Taking out (Extraction)

3Productivity

If per-core gradient clipping is implemented, then training efficiency is maintained, but gradient aggregation complexity increases

Engineering Contradiction:
Improvetraining efficiencyVSAvoidgradient aggregation complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent segments gradient aggregation into per-example gradients (computed individually) and per-core gradients (aggregated across examples). This segmentation maintains training efficiency by allowing parallel computation while managing complexity through structured aggregation at the core level

Inventive Principle:
Principle #1Segmentation

Data Source

PatentUS20250238722A1Per-core gradient clipping in multi-core training of machine learning (ML) model(s)
Publication Date: 2025.07.24 GOOGLE LLC
  • US20250238722A1 patent drawing
  • US20250238722A1 patent drawing
  • US20250238722A1 patent drawing

AI summary

Implementations described herein are directed to techniques for eliminating and/or mitigating memorization by machine learning (ML) model(s). Processor(s) can obtain a plurality of training instances to be utilized in training a ML model, identify a plurality of compute cores (e.g., TPUs, GPUs, CPUs, FPGAs, ASICs, etc.), and generate a corresponding per-core gradient at each of the plurality of compute cores. Further, the processor(s) can update the ML model based on the corresponding per-core gradients. In generating the corresponding per-core gradient at a given compute core, the processor(s) can generate corresponding gradients based on a subset of the training instances, determine, based on the corresponding gradients, a corresponding mean gradient, and clip, based on a clipping bound, the corresponding mean gradient for the given compute core to generate the corresponding per-core gradient.