🌟 CloudCheck: Award-Winning Cloud-Native Solution for AI-Generated Image Detection with Federated Learning🌟
Introduction 🌍
I'm thrilled to share with you the groundbreaking work behind CloudCheck, a cloud-native solution my team and I developed for detecting AI-generated images, which won the prestigious Dell Cloud Native Award in Cloud and Distributed Computing in November 2024! 🎉 Awarded by Dell Technologies in collaboration with the Singapore Institute of Technology, this honor recognizes excellence in applying cloud-native technologies to solve real-world problems.
CloudCheck is not just another AI project; it’s a high-performance, scalable system designed to identify and distinguish between real and AI-generated images with incredible accuracy. Built with state-of-the-art cloud technologies, microservices, machine learning, and Federated Learning, CloudCheck takes on one of the most pressing challenges in digital content today: ensuring authenticity in an age where AI-generated media is increasingly indistinguishable from reality. 🤖📸
Architecture and Technology Overview 🏛️
CloudCheck is designed to handle high-traffic environments, process vast amounts of data, and deliver real-time predictions with low-latency interactions. The system is built on a cloud-native infrastructure using Docker containers, Kubernetes for orchestration, and AWS RDS for managing data securely and reliably.
At the heart of CloudCheck’s functionality is a Convolutional Neural Network (CNN), expertly trained to recognize AI-generated images. However, unlike traditional machine learning approaches, CloudCheck integrates Federated Learning to train the model in a privacy-preserving way across distributed environments without sharing sensitive data. This means CloudCheck can update and improve its AI models based on decentralized data, significantly enhancing privacy and data security, while also enabling scalability.
The Federated Learning framework allows multiple edge devices to collaboratively train the model on local data without exposing raw data to centralized servers. This approach not only ensures the model's effectiveness across diverse datasets but also respects user privacy, making it ideal for applications in secure digital content verification. 🌐🔐
At the core of CloudCheck’s architecture are microservices, where each service is dedicated to handling a specific task. These services communicate seamlessly via REST API and gRPC, ensuring rapid and efficient communication. Kubernetes orchestrates these services, enabling efficient scaling and resource utilization to handle heavy workloads during peak demand. This setup ensures that CloudCheck can process large amounts of data with low-latency communication and provide real-time image verification even under high traffic conditions. 💻⚡
Microservices 🔗
Microservice 1: Frontend
The Frontend microservice serves as the user interface for CloudCheck, enabling users to interact with the system through a dynamic, secure web portal. Built using TypeScript, it ensures a smooth user experience through client-side rendering (CSR). The frontend allows users to upload images for verification and provide feedback, which contributes to the continuous improvement of the AI model.
Key features:
User Interaction: Users can upload images, view results, and give feedback.
Model Retraining: Using TensorFlow.js, users can participate in model retraining directly in their browser, with updated model weights sent to the federated learning service.
Authentication: User registration and login provide a secure and personalized experience.
Microservice 2: Authentication
Security is critical for managing user access. The Authentication microservice ensures that only registered users can access CloudCheck’s image processing capabilities. This microservice is powered by Node.js and utilizes Prisma (an ORM tool) to interact with the backend database hosted on AWS RDS.
Key features:
User Authentication: Ensures only authorized users can use the system.
Database Management: Uses Prisma for efficient and secure data handling.
Microservice 3: Envoy
The Envoy microservice acts as a high-performance proxy and load balancer, routing requests between services and ensuring efficient traffic distribution. With Envoy at the center, CloudCheck can handle large volumes of concurrent requests without service interruptions.
Key features:
Traffic Management: Routes requests between microservices and balances loads.
Security: Supports mutual TLS (mTLS) and advanced security measures to protect data.
Dynamic Scaling: Integrates with Kubernetes service discovery for real-time scaling.
Microservice 4: Global Inference Model
The Global Inference Model is the backbone of CloudCheck’s ability to classify images as authentic or AI-generated. It leverages a MobileNetV3 Small neural network, fine-tuned using a dataset of 13,000 labeled images. The model is continuously refined through federated learning and feedback from users.
Key features:
Image Classification: Uses the trained model to classify images.
Model Management: Supports endpoints for retrieving and updating model data (e.g., model weights).
Concurrency Control: Implements MUTEX locks to manage simultaneous updates and ensure model consistency.
Microservice 5: Federated Learning
Federated Learning enables CloudCheck to improve its model without centralizing user data. Through TensorFlow.js, users can locally retrain the model on their devices, and the updated weights are aggregated and used to refine the global model.
Key features:
Privacy-Preserving Learning: Model updates are performed on user devices, preserving privacy.
Efficient Aggregation: Updates are only sent once a certain threshold is reached, reducing overhead.
Continuous Model Improvement: Supports continuous training and delivery (CT/CD) for seamless model updates.
Microservice 6: AWS RDS
AWS RDS stores and manages the system’s user data, including authentication credentials and feedback on image classifications. It communicates with other services via gRPC to ensure fast and secure data retrieval.
Key features:
Database Management: Manages user data and authentication information.
gRPC Integration: Ensures efficient, low-latency communication with other system components.
Core Cloud Technologies ☁️
CloudCheck leverages a robust cloud technology stack to ensure optimal performance, scalability, and reliability, essential for handling the dynamic demands of AI-based image verification:
Docker Containers
The platform adheres to the Single Responsibility Principle by using Docker containers, where each container is dedicated to a single function. This modular design simplifies maintenance and facilitates independent scaling and updates. By isolating functionalities, it ensures that updates or changes to one service do not impact others, promoting system stability and resilience.
Kubernetes
Kubernetes is integral to CloudCheck's infrastructure, managing container orchestration, load balancing, and horizontal scaling. It dynamically adjusts the number of running instances based on traffic and CPU utilization, ensuring consistent performance even during peak demand. Kubernetes' horizontal pod scaling (HPA) is configured for critical services like the frontend, federated learning, and global model services.
Horizontal Pod Scaling
HPA allows the system to scale from a default of two pods per deployment to up to five pods during increased demand, measured by CPU usage. This scaling mechanism prevents downtime and enhances user experience by maintaining service availability and responsiveness. Additionally, Kubernetes’ self-healing capabilities ensure resilience by automatically restarting failed pods, maintaining operational continuity without manual intervention.
Resource Management
To prevent resource contention and ensure that all services operate smoothly, hardware limits are configured on deployments, particularly for resource-intensive services like federated learning. These limits prevent any single service from monopolizing resources, thereby safeguarding the performance of other critical components in the system.
Model Training and Updates 🔄
The model training process is a cornerstone of CloudCheck, ensuring its accuracy and relevance in identifying real and AI-generated images. Leveraging CNN-based methods, the model was trained on an extensive dataset, providing it with the capability to classify content effectively. After training, the model is deployed in a global model inference container, where it performs real-time predictions on new images.
To address the challenge of keeping the model current as new data emerges (such as user disputes or updated content), a robust CI/CD pipeline was developed. This pipeline streamlines the process of replacing outdated models with newer versions. It employs mutex locks to guarantee that updates are executed sequentially, safeguarding data integrity and ensuring the system remains stable during the transition.
Model Evaluation & Performance Metrics 📊
The performance of the model was meticulously evaluated to ensure its reliability and effectiveness. Using a confusion matrix, the model’s accuracy in distinguishing between real and AI-generated images was measured at an impressive 90.42%. This high accuracy indicates that for every 10 images processed, only 1 is misclassified.
Key performance metrics were used to provide a comprehensive assessment:
True Fake: 38.31% of the dataset (correctly identified fake instances)
False Fake: 5.54% of the dataset (incorrectly identified fake instances)
True Real: 52.12% of the dataset (correctly identified real instances)
False Real: 4.04% of the dataset (incorrectly identified real instances)
These metrics, including precision, recall, and specificity, underscore the model’s robustness and its readiness for real-world applications. The results validate CloudCheck's effectiveness, paving the way for its widespread adoption as a reliable tool for image verification.
Future Enhancements 🚀
While CloudCheck is already a robust solution, we are looking forward to expanding its capabilities:
Expanding the Dataset: Increasing the size and diversity of the training dataset will improve the model’s accuracy.
Video Detection: As AI-generated videos become more common, expanding the system’s capabilities to handle video content will be essential.
Federated Learning: Enhancing privacy by allowing users to train the model locally and update the global model without sharing sensitive data.
Recognition and Impact 🏆
CloudCheck exemplifies the seamless integration of cloud-native architecture, machine learning, and modern communication technologies to tackle critical challenges in image verification. By leveraging Docker, Kubernetes, and gRPC, CloudCheck showcases a scalable, efficient, and secure system, highlighting innovative problem-solving in AI-generated content verification.
Winning the Dell Cloud Native Award in November 2024 was a significant milestone for us. The recognition highlights our ability to design and implement cutting-edge cloud-native solutions that address real-world problems. CloudCheck not only demonstrated our technical skills in cloud computing, machine learning, and microservices but also our ability to tackle pressing challenges related to the rise of synthetic media.
The Dell Cloud Native Award, associated with the Singapore Institute of Technology, further validates the impact and importance of cloud-native solutions in today’s technological landscape. It reflects the potential for cloud-based technologies to revolutionize industries, and we are proud to have been recognized for contributing to this field.
I would like to extend my heartfelt gratitude to my dedicated team behind CloudCheck, whose hard work and innovation made this success possible:
Tay Jeung Hong
BSc(Hons) Computing Science
2301036@sit.singaporetech.edu.sg
Lim Liang Fan
BSc(Hons) Computing Science
2300937@sit.singaporetech.edu.sg
Ng Jia Wei
BSc(Hons) Computing Science
2301008@sit.singaporetech.edu.sg
Suresh Kumar Balavignesh
BSc(Hons) Computing Science
2301110@sit.singaporetech.edu.sg
Goh Jia Rui Gary
BSc(Hons) Computing Science
2300954@sit.singaporetech.edu.sg
- Dell Cloud Native Award, Nov 2024
Issued by Dell Technologies, associated with Singapore Institute of Technology.