Report
Report
Reddy Gaurav
I hereby declare that except where specific reference is made to the work of others,
the contents of this dissertation are original and have not been submitted in whole
or in part for consideration for any other degree or qualification in this or any
other university. This dissertation is my own work and contains nothing that is the
outcome of work done in collaboration with others except as specified in the text
and Acknowledgements.
Reddy Gaurav
Roll: 2101167,
Department of Computer Science and Engineering,
Indian Institute of Information Technology Guwahati.
Acknowledgements
1 Introduction 1
1.1 Objective . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2 3
2.1 Dataset Pre processing . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2 Transformation Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2.1 Transform Pipeline . . . . . . . . . . . . . . . . . . . . . . . . . 3
2.2.2 Data Augmentation . . . . . . . . . . . . . . . . . . . . . . . . 4
2.3 Model Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.4 Model Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.5 Training Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.5.1 Dataset Preparation . . . . . . . . . . . . . . . . . . . . . . . . 5
2.6 Training . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.7 Training the Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.7.1 Training Hyperparameters . . . . . . . . . . . . . . . . . . . . 5
2.7.2 Training Strategy . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.7.3 Performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3 Evaluation 7
3.1 Evaluation Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2 Evaluation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2.1 Baseline Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . 7
3.2.2 Post-Impair Step Evaluation . . . . . . . . . . . . . . . . . . . . 7
3.2.3 Post-Repair Step Evaluation . . . . . . . . . . . . . . . . . . . . 8
3.3 Analysis and Observations . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.3.1 Forgetting Effectiveness . . . . . . . . . . . . . . . . . . . . . . 8
3.3.2 Retention Robustness . . . . . . . . . . . . . . . . . . . . . . . 9
3.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Chapter 1
Introduction
1.1 Objective
The objective of this project is to develop and implement an efficient machine
unlearning framework that allows a trained machine learning model to selectively
"forget" specific data while preserving its performance on the remaining dataset.
This approach seeks to address the growing need for privacy compliance, such as
1
1.1 Objective
adhering to data deletion requests mandated by regulations like GDPR. Using noise
injection and subsequent impairment and repair steps, the project aims to create a
systematic method that can modify model knowledge without requiring complete
retraining. This method aims to offer a practical, resource-efficient solution for
organizations needing to maintain model compliance and adaptability in response
to dynamic data privacy requirements.
2
Chapter 2
This section discusses prior work in neural network-based classification tasks, specif-
ically using fully connected layers for image recognition on datasets like MNIST. It
highlights PyTorch’s contributions to simplifying deep learning implementations.
3
2.3 Model Architecture
• Random Rotation: Images are randomly rotated within a small range (e.g.,
±10◦ ). This helps the model generalize to digit orientations not seen in the
original dataset.
Layer Definition
The model includes three fully connected layers: fc1, fc2, and fc3. Each layer
transforms input dimensions to the next, ensuring appropriate intermediate repre-
sentations.
Activation Functions
ReLU activations are applied to hidden layers for non-linear transformations, while
the final output uses softmax for classification probabilities.
4
2.5 Training Process
• Training Set: Images from the train folder are transformed using the follow-
ing techniques:
• Test Set: Similar transformations are applied for consistency in data represen-
tation.
2.6 Training
• Optimizer: Adam
5
2.7 Training the Model
• The model is trained for 40 epochs, with the learning rate dynamically adjusted
based on validation loss using ReduceLROnPlateau.
2.7.3 Performance
• Training loss decreased significantly across epochs, indicating effective learn-
ing.
6
Chapter 3
Evaluation
• Loss: Quantifies the difference between the predicted and actual labels using
cross-entropy loss.
These results indicate strong baseline performance, forming the benchmark for
subsequent evaluations.
7
3.3 Analysis and Observations
• Forgotten Classes:
– Accuracy: 63.47%.
– Loss: 9.182.
• Retained Classes:
– Accuracy: 68.18%.
– Loss: 0.930.
The impaired model shows a significant reduction in performance for the forgotten
classes, indicating partial unlearning. The retained classes maintain stable accuracy,
demonstrating minimal negative impact.
• Forgotten Classes:
– Accuracy: 0.0%.
– Loss: 10.907.
• Retained Classes:
– Accuracy: 70.95%.
– Loss: 0.827.
The forgotten classes are completely unlearned, achieving the desired goal of 0%
accuracy. The retained class performance improves slightly after repair, with a
decrease in loss and an increase in accuracy.
8
3.4 Conclusion
• High loss for forgotten classes (10.907) post-repair indicates the model’s inabil-
ity to predict these classes.
• Reduced loss for retained classes (from 0.930 to 0.827) shows enhanced model
stability.
3.4 Conclusion
The evaluation demonstrates the effectiveness of the machine unlearning pipeline:
• The impair step partially removes knowledge of the forgotten classes with
minimal impact on the retained classes.
• The repair step ensures complete forgetting of the specified classes while
improving robustness and performance on the retained classes.
The approach is efficient and achieves the unlearning objectives, making it suitable
for applications requiring privacy or adaptability in machine learning models.