Diffusion Model Concept Removal by Neuron Pruning

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Diffusion models generate images with undesired concepts such as nudity, violence, copyrighted content, and biases, posing risks to artists' livelihoods and societal harm, and existing methods to mitigate these risks are computationally expensive or vulnerable to adversarial attacks.

Innovation Solution

A method to modify a pre-trained diffusion model by identifying and modifying specific weight neurons responsible for undesired concepts using text prompts, without retraining, by calculating importance scores and applying a binary mask to prune these neurons.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If diffusion models are trained on large-scale web-scraped datasets, then image generation capability is improved, but undesired content such as nudity, violence, and biases are introduced

Engineering Contradiction:
Improveimage generation capabilityVSAvoidundesired content
Core Design Contradiction:
ProductivityVSObject-affected harmful factors

Solution Approach 1:

The patent extracts and removes specific undesired concepts from the diffusion model by identifying and modifying the responsible neurons. Instead of retraining the entire model on filtered datasets, the method locates specific neurons that generate undesired content and selectively modifies them, thereby removing harmful factors while preserving the overall image generation capability.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies local quality by treating different parts of the model differently. Rather than uniformly filtering all training data or applying global constraints, the method identifies specific neurons responsible for undesired concepts and modifies only those local regions. This allows the model to maintain high-quality image generation in most areas while removing harmful content in specific localized regions.

Inventive Principle:
Principle #3Local quality

2Reliability

If concept editing methods are used to remove undesired prompts, then robustness to some attacks is improved, but vulnerability to adversarial attacks based on textual inversion increases

Engineering Contradiction:
Improverobustness to attacksVSAvoidvulnerability to adversarial attacks
Core Design Contradiction:
ReliabilityVSObject-affected harmful factors

Solution Approach 1:

The patent segments the concept removal process into distinct phases: identification of undesired concepts, localization of responsible neurons, and selective modification. By dividing the process and applying different techniques at each stage (including both neuron identification and weight modification), the method achieves more comprehensive protection against various adversarial attacks compared to single-method approaches.

Inventive Principle:
Principle #1Segmentation

3Object-affected harmful factors

If fine-tuning is applied to remove undesired content, then content safety is improved, but computational cost increases significantly

Engineering Contradiction:
Improvecontent safetyVSAvoidcomputational cost
Core Design Contradiction:
Object-affected harmful factorsVSUse of energy by moving object

Solution Approach 1:

The patent extracts only the essential components needed for concept removal - specifically the neurons responsible for undesired concepts - rather than performing comprehensive fine-tuning of the entire model. This extraction approach identifies and modifies only the critical elements that generate harmful content, dramatically reducing computational cost while maintaining content safety.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The patent applies partial action by performing concept removal on a selective basis rather than进行全面 fine-tuning. Instead of adjusting all model parameters, the method focuses only on the specific neurons that contribute to undesired content generation, applying just enough modification to achieve safety without the excessive computational burden of full fine-tuning.

Inventive Principle:
Principle #16Partial or excessive action

4Ease of manufacture

If token blacklisting or resteering is used for concept erasure, then implementation simplicity is improved, but effectiveness against adversarial attacks decreases

Engineering Contradiction:
Improveimplementation simplicityVSAvoideffectiveness against adversarial attacks
Core Design Contradiction:
Ease of manufactureVSReliability

Solution Approach 1:

The patent segments the defense mechanism into multiple layers: neuron identification based on activation patterns, weight modification of identified neurons, and optional aggregation across multiple concepts. This segmented approach maintains relative implementation simplicity while significantly improving effectiveness against adversarial attacks compared to single-layer token blacklisting methods.

Inventive Principle:
Principle #1Segmentation

Data Source

PatentEP4657323A1Method for removing undesired concepts from diffusion models
Publication Date: 2025.12.03 SAMSUNG ELECTRONICS CO LTD
  • EP4657323A1 patent drawingFigure 1
  • EP4657323A1 patent drawingFigure 2
  • EP4657323A1 patent drawingFigure 3

AI summary

Broadly speaking, embodiments of the present techniques provide a method for modifying a pre-trained diffusion model used for image generation to remove undesired concepts from being included in images generated by the model. Advantageously, the present techniques enable a pre-trained diffusion model to be modified for a user or set of users to remove certain undesired concepts from being included in images generated by the model. This may reduce the risk that the model generates images including undesirable concepts, such as nudity, violence, copyrighted images or styles, or bias (such as gender or racial bias).