نحو مؤشر استهلاك الطاقة لنماذج التعلم العميق: تحليل مقارن للهياكل، وحدات معالجة الرسوميات، وأدوات القياس
Towards an Energy Consumption Index for Deep Learning Models: A Comparative Analysis of Architectures, GPUs, and Measurement Tools

شارك:
المجلة: Sensors، المجلد: 25، العدد: 3
DOI: https://doi.org/10.3390/s25030846
PMID: https://pubmed.ncbi.nlm.nih.gov/39943485
تاريخ النشر: 2025-01-30
المؤلف: Sergio Aquino-Brítez وآخرون
الموضوع الرئيسي: تطبيقات الشبكات العصبية المتقدمة

نظرة عامة

تتناول هذه الدراسة الطلب المتزايد عالميًا على الموارد الحاسوبية في الذكاء الاصطناعي (AI) والمخاوف المرتبطة باستهلاك الطاقة من خلال تقديم مؤشر كابا للطاقة (KEI). يقيم هذا المقياس الجديد كفاءة الطاقة لنماذج التعلم العميق (DL)، مقدماً إطار عمل موحد قابل للتطبيق على مختلف الهياكل. تركز الأبحاث بشكل أساسي على الشبكات العصبية التلافيفية، بما في ذلك النماذج الكلاسيكية مثل AlexNet وResNet18، بالإضافة إلى الهياكل الحديثة مثل Swin Transformer. تم قياس استهلاك الطاقة خلال مراحل التدريب والاستدلال باستخدام أدوات قائمة على المستشعرات مثل OpenZmeter وأدوات قائمة على البرمجيات مثل CarbonTracker وCodeCarbon، مما يكشف عن اختلافات كبيرة في كفاءة الطاقة عبر نماذج وGPUs مختلفة.

تشير النتائج إلى أن AlexNet وResNet18 تحقق قيم KEI متفوقة خلال التدريب، مما يبرز توازنها بين الكفاءة الحاسوبية والدقة، بينما يظهر EfficientNet-B3 أيضًا كفاءة طاقة قوية. في الاستدلال، تحافظ ResNet18 وEfficientNet-B3 على أداء مثالي مع تكاليف طاقة أقل. يتفوق GTX 1080 Ti على TITAN Xp في كفاءة الطاقة عبر جميع النماذج، مما يبرز تأثير تحسين الأجهزة. كما تلاحظ الدراسة وجود تناقضات بين أدوات قياس الطاقة القائمة على الأجهزة وتلك القائمة على البرمجيات، مما يبرز الحاجة إلى المعايرة لضمان تقييمات دقيقة. يجب أن توسع الأبحاث المستقبلية تطبيق KEI على نماذج DL ومجالات أخرى، ودمجها مع أنظمة مراقبة الطاقة في الوقت الحقيقي لتعزيز استدامة تدفقات العمل في الذكاء الاصطناعي وتعزيز مقاييس الطاقة الموحدة في تعلم الآلة.

مقدمة

تسلط مقدمة هذه الورقة البحثية الضوء على الزيادة الكبيرة في الطلب العالمي على الكهرباء منذ منتصف القرن العشرين، والتي يقودها بشكل أساسي استخدام الوقود الأحفوري، مما يزيد من انبعاثات غازات الدفيئة والتحديات البيئية. استجابةً لذلك، يهدف اتفاق باريس إلى التخفيف من هذه الانبعاثات وتشجيع التحول نحو مصادر الطاقة النظيفة. تعتبر التقدمات التكنولوجية في تكنولوجيا المعلومات والاتصالات (ICTs) محورية في تعزيز كفاءة الطاقة في القطاع الكهربائي، مما يسهل دمج الطاقة المتجددة وتحسين عمليات الشبكة الذكية. ومع ذلك، أدى ارتفاع تعلم الآلة (ML) ومعالجة البيانات في الوقت الحقيقي إلى زيادة الطلب على الموارد الحاسوبية، مما ساهم في ارتفاع استهلاك الطاقة، خاصة في مراكز البيانات التي تدعم عمليات الذكاء الاصطناعي.

تقترح الورقة تحليل استهلاك الطاقة خلال مراحل التدريب والاستدلال لنماذج التعلم العميق (DL)، بما في ذلك الشبكات العصبية التلافيفية (CNNs) وSwin Transformer، باستخدام كل من عدادات الطاقة القائمة على الأجهزة والبرمجيات للحصول على تقييم دقيق. تؤكد الأبحاث على الحاجة إلى مقاييس موحدة لتقييم كفاءة الطاقة وانبعاثات الكربون في تطبيقات ML، مع معالجة التحديات التي تطرحها تعقيد النماذج الحاسوبية والطلب المتزايد على الطاقة المرتبط بها. يهدف مؤشر كابا للطاقة المقترح إلى توفير معيار موحد لتقييم أداء النموذج واستدامته، مما يسهل المقارنات الموضوعية عبر هياكل مختلفة. تشمل المساهمات الرئيسية تطوير مؤشر موحد لاستهلاك الطاقة، ومنهجية مشتركة لقياس الطاقة بدقة، وتحليل تأثير الأجهزة غير المتجانسة على أداء نموذج DL.

الطرق

توضح قسم “الطرق” من الورقة البحثية مجموعة البيانات وإعداد التجارب المستخدمة لتقييم استهلاك الطاقة وأداء مختلف هياكل التعلم العميق (DL). مجموعة البيانات المستخدمة هي Imagenette، مقسمة إلى 70% للتدريب و30% للاختبار، مع تقسيم مجموعة التدريب إلى 80% للتدريب و20% للتحقق. تشمل الهياكل التي تم تقييمها AlexNet وVGG16 وResNet18 وEfficientNet-B3 وSwin-T وConvNeXt-T، التي تم اختيارها لملاءمتها في أبحاث DL المعاصرة. يتم تدريب كل هيكل لمدة تصل إلى 90 حقبة مع حجم دفعة يبلغ 64 ومعدل تعلم يبلغ 0.001، باستخدام TITAN Xp وGTX 1080 GPUs. يتم مراقبة استهلاك الطاقة باستخدام OpenZmeter وCarbontracker وCodeCarbon، التي توفر تقديرات لانبعاثات CO₂ بناءً على بيانات محددة من أندلوسيا، إسبانيا.

يتضمن إعداد التجربة خوارزمية مفصلة لتقييم الأداء والطاقة، مما يضمن صحة إحصائية من خلال تكرار كل تجربة 15 مرة. تبدأ عملية قياس الطاقة في بداية التدريب وتختتم بعد الاختبار، مع حساب وتقرير مقاييس الأداء. يتضمن تقييم الاستدلال اختبار كل نموذج مدرب على مجموعة بيانات من 10 فئات، تحتوي كل منها على 100 صورة، باستخدام نفس GPU كما في التدريب. تتيح هذه المنهجية الشاملة تحليلًا موضوعيًا لمتطلبات الطاقة المرتبطة بهياكل DL المختلفة.

النتائج

في هذا القسم، يتم تقديم نتائج تحليل مقارن لأدوات قياس استهلاك الطاقة، التي تشمل كل من عدادات الطاقة البرمجية والعتادية. يركز التقييم على دقتها وثباتها عبر بيئات الأجهزة المختلفة، باستخدام مجموعة متنوعة من GPUs. تقيم التجارب استهلاك الطاقة خلال كل من مراحل التدريب والاستدلال لنماذج التعلم العميق (DL) المختارة.

بالإضافة إلى ذلك، يتم تقييم مؤشر كابا للطاقة المقترح، الذي يربط بين مؤشر كابا الذي حققته نماذج DL مع استهلاك الطاقة المقاس بالكيلووات-ساعة (kWh). تخضع النتائج للتحقق الإحصائي في كل مرحلة ذات صلة لضمان قوة وموثوقية النتائج.

المناقشة

في هذا القسم، تناقش الأبحاث المنهجيات والهياكل المستخدمة في تقييم نماذج التعلم العميق (DL) باستخدام مجموعة بيانات Imagenette، التي تتكون من 13,394 صورة عبر 10 فئات. تركز الدراسة على مجموعة متنوعة من الشبكات العصبية التلافيفية (CNNs) والهياكل القائمة على المحولات، بما في ذلك AlexNet وVGG16 وResNet18 وEfficientNet-B3 وSwin-T وConvNeXt-T. يتميز كل هيكل بتصميمه الفريد ومساهماته في مجال رؤية الكمبيوتر، مع اهتمام خاص بعدد المعلمات وكفاءات التشغيل الخاصة بهم. على سبيل المثال، حقق AlexNet، الذي يحتوي على حوالي 61 مليون معلمة، معيارًا في تصنيف الصور، بينما قدم ResNet18 اتصالات متبقية لتسهيل تدريب الشبكات الأعمق.

تشمل مقاييس تقييم الأداء المستخدمة في هذا البحث مؤشر كابا، الذي يقيس الاتفاق بين التسميات المتوقعة والفعلية، ومؤشر كابا للطاقة (KEI)، الذي يربط أداء النموذج باستهلاك الطاقة خلال التدريب. يعتبر KEI مهمًا بشكل خاص لأنه يوفر رؤى حول كفاءة الطاقة لنماذج DL، مما يسمح بفهم أفضل للمفاضلات بين الأداء واستخدام الطاقة. بالإضافة إلى ذلك، يوضح القسم الأدوات المستخدمة لقياس استهلاك الطاقة، مثل OpenZmeter وCodeCarbon وCarbontracker، مع تسليط الضوء على قدراتها المختلفة وأهمية مراقبة الطاقة الدقيقة في تقييم الأثر البيئي لتدفقات العمل في التعلم العميق. تشير النتائج إلى أن استهلاك الطاقة يختلف عبر هياكل وGPUs مختلفة، حيث يستهلك TITAN Xp عمومًا طاقة أكثر من GTX 1080 Ti، مما يبرز الحاجة إلى استخدام الموارد بكفاءة في تطبيقات DL.

Journal: Sensors, Volume: 25, Issue: 3
DOI: https://doi.org/10.3390/s25030846
PMID: https://pubmed.ncbi.nlm.nih.gov/39943485
Publication Date: 2025-01-30
Author(s): Sergio Aquino-Brítez et al.
Primary Topic: Advanced Neural Network Applications

Overview

This study addresses the increasing global demand for computational resources in Artificial Intelligence (AI) and its associated energy consumption concerns by introducing the Kappa-Energy Index (KEI). This novel metric evaluates the energy efficiency of Deep Learning (DL) models, offering a standardized framework applicable to various architectures. The research primarily focuses on convolutional neural networks, including classical models like AlexNet and ResNet18, as well as modern architectures such as the Swin Transformer. Energy consumption during both training and inference phases was measured using sensor-based tools like OpenZmeter and software-based tools such as CarbonTracker and CodeCarbon, revealing significant variations in energy efficiency across different models and GPUs.

The findings indicate that AlexNet and ResNet18 achieve superior KEI values during training, highlighting their balance of computational efficiency and accuracy, while EfficientNet-B3 also demonstrates strong energy efficiency. In inference, ResNet18 and EfficientNet-B3 maintain optimal performance with lower energy costs. The GTX 1080 Ti outperforms the TITAN Xp in energy efficiency across all models, emphasizing the impact of hardware optimization. The study also notes discrepancies between hardware-based and software-based energy measurement tools, underscoring the need for calibration to ensure accurate assessments. Future research should expand the KEI application to other DL models and domains, integrating it with real-time energy monitoring systems to enhance the sustainability of AI workflows and promote standardized energy metrics in machine learning.

Introduction

The introduction of this research paper highlights the significant increase in global electricity demand since the mid-20th century, primarily driven by fossil fuel usage, which exacerbates greenhouse gas emissions and environmental challenges. In response, the Paris Agreement aims to mitigate these emissions and encourage a shift towards cleaner energy sources. Technological advancements in Information and Communication Technologies (ICTs) are pivotal in enhancing energy efficiency in the electrical sector, facilitating the integration of renewable energy and optimizing smart grid operations. However, the rise of Machine Learning (ML) and real-time data processing has led to increased computational resource demands, contributing to higher energy consumption, particularly in data centers that support AI processes.

The paper proposes an analysis of energy consumption during the training and inference phases of Deep Learning (DL) models, including Convolutional Neural Networks (CNNs) and the Swin Transformer, using both hardware and software energy meters for accurate assessment. The research emphasizes the need for standardized metrics to evaluate energy efficiency and carbon emissions in ML applications, addressing the challenges posed by the complexity of computational models and the growing energy demands associated with them. The proposed Kappa-Energy Index aims to provide a unified criterion for assessing model performance and sustainability, facilitating objective comparisons across different architectures. The main contributions include the development of a standardized energy consumption index, a combined methodology for accurate energy measurement, and an analysis of the impact of heterogeneous hardware on DL model performance.

Methods

The “Methods” section of the research paper outlines the dataset and experimental setup utilized for evaluating the energy consumption and performance of various deep learning (DL) architectures. The dataset employed is Imagenette, divided into 70% for training and 30% for testing, with the training set further split into 80% for training and 20% for validation. The architectures assessed include AlexNet, VGG16, ResNet18, EfficientNet-B3, Swin-T, and ConvNeXt-T, selected for their relevance in contemporary DL research. Each architecture is trained for up to 90 epochs with a batch size of 64 and a learning rate of 0.001, using TITAN Xp and GTX 1080 GPUs. Energy consumption is monitored using OpenZmeter, Carbontracker, and CodeCarbon, which provide CO₂ emission estimates based on data specific to Andalucía, Spain.

The experimental setup includes a detailed algorithm for performance and energy evaluation, ensuring statistical validity by repeating each experiment 15 times. The energy measurement process is initiated at the start of training and concluded after testing, with performance metrics computed and reported. The inference evaluation involves testing each trained model on a dataset of 10 classes, each containing 100 images, using the same GPU as during training. This comprehensive methodology allows for an objective analysis of the energy demands associated with different DL architectures.

Results

In this section, the results of a comparative analysis of energy consumption measurement tools, encompassing both software and hardware energy meters, are presented. The evaluation focuses on their precision and consistency across different hardware environments, specifically utilizing various GPUs. The experiments assess energy consumption during both the training and inference phases of selected deep learning (DL) models.

Additionally, the proposed Kappa-Energy Index is evaluated, which correlates the Kappa Index achieved by the DL models with their energy consumption measured in kilowatt-hours (kWh). The results undergo statistical validation at each relevant stage to ensure robustness and reliability of the findings.

Discussion

In this section, the research discusses the methodologies and architectures employed in evaluating deep learning (DL) models using the Imagenette dataset, which consists of 13,394 images across 10 classes. The study focuses on various convolutional neural networks (CNNs) and transformer-based architectures, including AlexNet, VGG16, ResNet18, EfficientNet-B3, Swin-T, and ConvNeXt-T. Each architecture is characterized by its unique design and contributions to the field of computer vision, with specific attention to their parameter counts and operational efficiencies. For instance, AlexNet, with approximately 61 million parameters, set a benchmark in image classification, while ResNet18 introduced residual connections to facilitate training deeper networks.

The performance evaluation metrics utilized in this research include the Kappa Index, which measures the agreement between predicted and actual labels, and the Kappa-Energy Index (KEI), which relates model performance to energy consumption during training. The KEI is particularly significant as it provides insights into the energy efficiency of DL models, allowing for a better understanding of the trade-offs between performance and energy use. Additionally, the section outlines the tools used for measuring energy consumption, such as OpenZmeter, CodeCarbon, and Carbontracker, highlighting their respective capabilities and the importance of accurate energy monitoring in assessing the environmental impact of deep learning workflows. The findings indicate that energy consumption varies across different architectures and GPUs, with the TITAN Xp generally consuming more energy than the GTX 1080 Ti, underscoring the need for efficient resource utilization in DL applications.