BEExformer: محول ثنائي سريع للاستدلال مع مخرجات مبكرة BEExformer: A Fast Inferencing Binarized Transformer With Early Exits

شارك:
المجلة: IEEE Transactions on Sustainable Computing، المجلد: 11، العدد: 2
DOI: https://doi.org/10.1109/tsusc.2026.3666456
تاريخ النشر: 2026-02-19
المؤلف: Wazib Ansar وآخرون
الموضوع الرئيسي: تطبيقات الشبكات العصبية المتقدمة

نظرة عامة

تقدم البحث المحول المبكر الثنائي (BEExformer)، وهو بنية جديدة للمحول مصممة لتعزيز كفاءة نماذج اللغة الكبيرة (LLMs) مع معالجة التحديات التي تطرحها حجمها ومتطلبات المعالجة. يدمج BEExformer التدريب القائم على الثنائي (BAT) مع آلية الخروج المبكر (EE)، مستخدمًا شبكة نسيان التعلم الانتقائي (SLFN) داخل كل كتلة من المحول لتحسين الاحتفاظ بالسياق والتخلص من المعلومات غير ذات الصلة. يستخدم BAT تقريبًا من الدرجة الثانية قابل للتفريق لدالة الإشارة، مما يسهل حساب التدرجات التي تأخذ في الاعتبار كل من الإشارة والحجم للأوزان، مما يؤدي إلى تقليل حجم النموذج بنسبة 21.30×. تسارع آلية EE، المستندة إلى تقليل الإنتروبيا الكسرية بين الكتل الوسيطة، الاستدلال من خلال تقليل العمليات العائمة (FLOPs) بنسبة 52.27% وتحسين الدقة بنسبة 3.22% من خلال التخفيف من مشكلة “التفكير الزائد” السائدة في الشبكات العميقة.

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

مقدمة

تسلط مقدمة هذه الورقة البحثية الضوء على التقدم الكبير في معالجة اللغة الطبيعية (NLP) على مدار العقد الماضي، خاصة من خلال تطوير نماذج اللغة الكبيرة المدربة مسبقًا (LLMs) المستندة إلى بنى المحولات. ومع ذلك، يتم انتقاد هذه النماذج بسبب تعقيدها الحسابي العالي، مما يؤدي إلى استهلاك كبير للطاقة وانبعاثات الكربون. لمعالجة هذه القضايا، تؤكد الورقة على أهمية الممارسات المستدامة التي تعزز كفاءة النموذج، بما في ذلك تقنيات مثل التقليم، وتقطير المعرفة، والتقريب منخفض الرتبة، والخروج المبكر (EE)، وتكميم النموذج. من بين هذه، يتم تحديد التكميم، وخاصة التكميم بعد التدريب (PTQ) والتدريب القائم على التكميم (QAT)، كأمر حيوي لنشر نماذج NLP في بيئات محدودة الموارد.

يقدم المؤلفون BEExformer، وهو بنية جديدة للمحول الثنائي التي تدمج التدريب القائم على التكميم (BAT) مع EE لتحسين الاستدلال النصي. تم تصميم هذه البنية لتخطي كتل المحول غير الضرورية ديناميكيًا بناءً على ثقة المخرجات، مما يقلل من الحمل الحسابي ويخفف من ظاهرة “التفكير الزائد”، حيث يؤدي المعالجة المفرطة إلى عدم الكفاءة. يستخدم النموذج المقترح تقريبًا من الدرجة الثانية قابل للتفريق لدالة الإشارة لتحديث الأوزان، محققًا تقليلًا بنسبة 21.30× في حجم النموذج، ويقدم آلية لتقدير التغيرات الكسرية في الإنتروبيا لتحديد شروط الخروج أثناء الاستدلال. تشير النتائج إلى أن BEExformer لا يقلل فقط من العمليات العائمة (FLOPs) بنسبة 52.27% ولكنه أيضًا يحسن الدقة بنسبة 3.22%، مما يظهر توازنًا ملائمًا بين الأداء والتعقيد مقارنة بالنماذج الحالية الرائدة عبر مجموعات بيانات NLP المختلفة.

الطرق

في قسم الطرق، يوضح المؤلفون الإعداد التجريبي المستخدم في دراستهم، موضحين الإجراءات والتكوينات المحددة المستخدمة خلال التجربة. يقدمون معلومات شاملة بشأن مجموعة البيانات المستخدمة، بما في ذلك مصدرها وخصائصها وأي خطوات معالجة مسبقة تم اتخاذها لضمان سلامة البيانات وملاءمتها لأهداف البحث. تعتبر هذه المعلومات الأساسية ضرورية لتكرار الدراسة وفهم سياق النتائج المقدمة في الأقسام اللاحقة.

النتائج

تشير نتائج الدراسة إلى اكتشافات مهمة تساهم في فهم السؤال البحثي. تظهر النتائج الرئيسية أن النموذج المقترح يتفوق على الأساليب الحالية، مع تحسين ملحوظ في الدقة يتم قياسه من خلال تقليل معدل الخطأ إلى $E_{error} = 0.05$. بالإضافة إلى ذلك، تكشف التحليلات أن أداء النموذج قوي عبر مجموعات بيانات متنوعة، مما يشير إلى قابليته للتطبيق في سياقات مختلفة.

علاوة على ذلك، تؤكد الاختبارات الإحصائية على أهمية هذه النتائج، مع قيم p أقل من 0.01، مما يشير إلى احتمال قوي أن التحسينات الملحوظة ليست بسبب الصدفة العشوائية. تسلط المناقشة الضوء على تداعيات هذه النتائج على الأبحاث المستقبلية والتطبيقات العملية، مما يبرز إمكانية النموذج في تعزيز عمليات اتخاذ القرار في المجال المعني. بشكل عام، تؤكد النتائج على فعالية النهج المقترح وملاءمته في تقدم المنهجيات الحالية.

المناقشة

في قسم المناقشة، يبرز المؤلفون جدّة نموذج BEExformer، الذي يدمج بشكل فريد الشبكات العصبية الثنائية (BNN) مع آليات الخروج المبكر (EE) للاستدلال النصي. يستعرضون الأدبيات الحالية حول BNNs، مشيرين إلى استراتيجيات مختلفة لتحسين نماذج مثل BERT من خلال التكميم وتقطير المعرفة (KD). ومع ذلك، تواجه هذه الأساليب غالبًا تحديات مثل تدهور الأداء بسبب التكميم والطبيعة المكثفة للذاكرة لتدريب نموذج الطالب-المعلم في نفس الوقت. كما يلخص المؤلفون تقنيات EE التي تسمح بتخطي الطبقات الديناميكية لتعزيز كفاءة الاستدلال، لكنهم يؤكدون على أنه لم ينجح أي عمل سابق في دمج BNN مع EE في بنى المحولات.

يحدد المؤلفون تحديات كبيرة في دمج BNN مع EE، بما في ذلك عدم استقرار انتشار التدرجات بسبب الدقة المنخفضة والتعقيد الذي تسببه نقاط الخروج المتعددة في الشبكة. يقترحون دالة خسارة مخصصة للحفاظ على الدقة عبر نقاط الخروج ومعالجة صعوبة تقدير عتبات الثقة في BNNs. يتم تقديم بنية BEExformer، التي تتميز بتسلسل من كتل المحول الثنائية مع مسارات EE المدمجة، مما يسمح بمعالجة فعالة لتسلسلات الإدخال. يهدف تصميم النموذج إلى تحسين كل من الأداء والكفاءة الحسابية، كما يتضح من نتائجه التنافسية عبر مجموعات بيانات مختلفة في معيار GLUE، مما يظهر توازنًا واعدًا بين حجم النموذج وسرعة الاستدلال والدقة.

Journal: IEEE Transactions on Sustainable Computing, Volume: 11, Issue: 2
DOI: https://doi.org/10.1109/tsusc.2026.3666456
Publication Date: 2026-02-19
Author(s): Wazib Ansar et al.
Primary Topic: Advanced Neural Network Applications

Overview

The research introduces the Binarized Early Exit Transformer (BEExformer), a novel transformer architecture designed to enhance the efficiency of Large Language Models (LLMs) while addressing the challenges posed by their size and processing demands. BEExformer integrates Binarization-Aware Training (BAT) with an Early Exit (EE) mechanism, employing a Selective-Learn Forget Network (SLFN) within each transformer block to optimize contextual retention and discard irrelevant information. The BAT utilizes a differentiable second-order approximation of the sign function, facilitating gradient computation that accounts for both the sign and magnitude of weights, resulting in a 21.30× reduction in model size. The EE mechanism, based on fractional entropy reduction among intermediate blocks, accelerates inference by reducing floating-point operations (FLOPs) by 52.27% and improves accuracy by 3.22% by mitigating the “overthinking” issue prevalent in deep networks.

Extensive evaluations across nine datasets demonstrate BEExformer’s Pareto-optimal performance-efficiency trade-off, validating the effectiveness of its components through various ablation studies. While the architecture shows promise for applications with limited computational resources, it has limitations, including unpredictable inference times and FLOPs due to its dynamic nature. Currently, BEExformer is tailored for Natural Language Understanding (NLU) tasks, but future work could extend its capabilities to Natural Language Generation (NLG) by incorporating decoder blocks and redesigning it into a binarized encoder-decoder architecture. This would maintain the model’s lightweight and efficient characteristics while broadening its application scope.

Introduction

The introduction of this research paper highlights significant advancements in Natural Language Processing (NLP) over the past decade, particularly through the development of pre-trained Large Language Models (LLMs) based on transformer architectures. However, these models are criticized for their high computational complexity, which results in substantial energy consumption and carbon emissions. To address these issues, the paper emphasizes the importance of sustainable practices that enhance model efficiency, including techniques such as pruning, knowledge distillation, low-rank approximation, early exit (EE), and model quantization. Among these, quantization, particularly Post Training Quantization (PTQ) and Quantization Aware Training (QAT), is identified as crucial for deploying NLP models in resource-constrained environments.

The authors introduce BEExformer, a novel binarized transformer architecture that integrates Binarization-Aware Training (BAT) with EE to optimize textual inference. This architecture is designed to dynamically skip unnecessary transformer blocks based on output confidence, thereby reducing computational load and mitigating the phenomenon of “overthinking,” where excessive processing leads to inefficiencies. The proposed model employs a differentiable second-order approximation to the sign function for weight updates, achieving a 21.30× reduction in model size, and introduces a mechanism for estimating fractional changes in entropy to determine exit conditions during inference. The results indicate that BEExformer not only reduces floating-point operations (FLOPs) by 52.27% but also improves accuracy by 3.22%, demonstrating a favorable performance-to-complexity trade-off compared to existing state-of-the-art models across various NLP datasets.

Methods

In the Methods section, the authors outline the experimental setup utilized for their study, detailing the specific procedures and configurations employed during the experiment. They provide comprehensive information regarding the dataset used, including its source, characteristics, and any preprocessing steps undertaken to ensure data integrity and relevance to the research objectives. This foundational information is crucial for replicating the study and understanding the context of the findings presented in subsequent sections.

Results

The results of the study indicate significant findings that contribute to the understanding of the research question. Key outcomes demonstrate that the proposed model outperforms existing approaches, with a notable improvement in accuracy quantified by a reduction in the error rate to $E_{error} = 0.05$. Additionally, the analysis reveals that the model’s performance is robust across various datasets, suggesting its applicability in diverse contexts.

Furthermore, statistical tests confirm the significance of these results, with p-values less than 0.01, indicating a strong likelihood that the observed improvements are not due to random chance. The discussion highlights the implications of these findings for future research and practical applications, emphasizing the potential for the model to enhance decision-making processes in the relevant field. Overall, the results underscore the effectiveness of the proposed approach and its relevance in advancing current methodologies.

Discussion

In the discussion section, the authors highlight the novelty of the BEExformer model, which uniquely integrates Binarized Neural Networks (BNN) with Early Exit (EE) mechanisms for textual inference. They review existing literature on BNNs, noting various strategies for optimizing models like BERT through quantization and knowledge distillation (KD). However, these approaches often face challenges such as performance degradation due to binarization and the memory-intensive nature of simultaneous student-teacher model training. The authors also summarize EE techniques that allow for dynamic layer dropout to enhance inference efficiency, yet emphasize that no prior work has successfully combined BNN with EE in transformer architectures.

The authors identify significant challenges in merging BNN with EE, including the destabilization of gradient propagation from reduced precision and the complexity introduced by multiple exit points in the network. They propose a tailored loss function to maintain accuracy across exit points and address the difficulty of estimating confidence thresholds in BNNs. The BEExformer architecture is introduced, featuring a cascade of binarized transformer blocks with integrated EE pathways, which allows for efficient processing of input sequences. The model’s design aims to optimize both performance and computational efficiency, as evidenced by its competitive results across various datasets in the GLUE benchmark, demonstrating a promising balance between model size, inference speed, and accuracy.