الضغط الإحصائي لشبكة VGG19 لتصنيف صور خلايا الدم باستخدام BloodMNIST
كيف خفّضنا معاملات نموذج التعلم العميق في تصوير خلايا الدم مع الحفاظ على دقة بلغت 98.4٪.
في هذا المقال
مقدمة
أحدث الذكاء الاصطناعي تحولًا جذريًا في الحوسبة الحديثة، لكن قدرته على التنبؤ تأتي بتكلفة حسابية مرتفعة. وتشير نظرية التعلم الإحصائي الكلاسيكية إلى أن النماذج كثيرة المعاملات معرضة للإفراط في التعلّم. مع ذلك، قد يخرج التعلم العميق عن هذا التوقع عبر ظاهرة تُعرف باسم «الإفراط الحميد في التعلّم».
تضم بنى مثل VGG19 نحو 140 مليون معامل. وعند تكييفها لمهام طبية متخصصة، مثل تصنيف صور خلايا الدم في BloodMNIST، تمنح النموذج قدرة تمثيل كبيرة، لكنها تخلق اختلالًا إحصائيًا بين عدد المعاملات وحجم المهمة.
74.5% reduction in total parameters via structured surgery.
58.1% faster Wall-clock time on standard hardware (T4 GPU).
Significant reduction in serialized model size for edge deployment.
§1 منهجية البحث
نهدف إلى تقليل المخاطر التجريبية مع خفض عدد المعاملات $\mathcal{P}$ في الوقت نفسه. ويمكن صياغة ذلك بوصفه مسألة تحسين مقيّدة:
حيث تمثل $\kappa$ ميزانية المعاملات المستهدفة، وتمثل $\mathcal{L}$ دالة خسارة الانتروبيا المتقاطعة.
Hematological Dataset Exploration
Dataset N = 17,092 Samples
Statistical Bias Note
"The moderate class imbalance observed here necessitates the use of Macro-averaged F1 metrics. Accuracy alone would be biased toward the majority classes (Neutrophils and Eosinophils)."
Intensity Profile
§2 تحليل النموذج الأساسي
يمثل نموذج VGG19 غير المضغوط الحد الأعلى التجريبي للمقارنة. وبعد ضبطه باستخدام الانحدار المتدرج العشوائي، حقق دقة أعلى فئة بلغت 98.48٪، ومتوسط زمن استدلال قدره 231.3 مللي ثانية.
VGG19 Hierarchical Construction
Isometric decomposition visualizing the bottleneck transitions and parameter distribution.
Select an architectural block to inspect its hierarchical role and computational complexity.
§ 2.1 الحفاظ على الأداء التجريبي
اعتمد معيار الإيقاف لدينا على أدنى درجة F1 بين الفئات، لحماية الفئات الأقل تمثيلًا من أن تخفيها النتائج المرتفعة للفئات الشائعة.
PCA Redundancy Audit
Quantifying the intrinsic dimensionality of latent activation spaces.
Select a layer to visualize the variance decay and identify the representational 'elbow'.
§3 تنظيم L1 بطريقة Lasso
تفرض عقوبة معيار L1 تأثيرًا مستمرًا يجذب الأوزان الفردية نحو الصفر. ويسهم ذلك في تبسيط النموذج إحصائيًا، لكنه يخلق مفارقة عند التنفيذ على العتاد.
لتجنّب احتجاز الأوزان قرب الصفر أثناء التقليم، جمعنا بين الانحدار المتدرج العشوائي مع إعادة التشغيل الدافئة (SGDR) للاستكشاف العام، ومحسّن Adam للتقارب المحلي. وقد ساعد هذا النهج الدوري على استكشاف سطح الخطأ دون نسيان كارثي.
Training Dynamics & Phase Transition
Tracking the emergence of sparsity under increasing L1 pressure.
Weight Magnitude Audit
Analyzing the post-Lasso zero-attraction topology.
Parameters that can be numerically zeroed without significant loss impact.
Static occupancy despite numerical sparsity—demonstrating the Hardware Paradox.
Unstructured sparsity does not bypass SIMD multipliers. The tensor must undergo structural surgery to gain latency benefits.
§4 التقليم البنيوي باستخدام بوابات L0
لتحقيق تسريع فعلي، ننتقل من تناثر الأوزان إلى تقليم القنوات. ونستخدم بوابة غاوسية عشوائية، وهي تقريب قابل للاشتقاق يسحب حالات البوابة من توزيع مستمر أثناء التدريب.
للتحكم في معدل التقليم، استخدمنا متحكم PID لتعديل عقوبة التنظيم $\lambda$ ديناميكيًا. وقد منع ذلك انهيار التناثر الذي يظهر كثيرًا مع التنظيم الثابت، وساعد على استقرار الشبكة عندما بلغ ضغط التنظيم ذروته قرب الحقبة 13.
The Gaussian Stochastic Gate
Differentiable L0 relaxation: Visualizing the transition from continuous parameters to discrete hardware gates.
Each cell represents a convolutional channel. Stochastic sampling determines whether the "shutter" (gate) is physically open for inference.
Identity Map Inherited
The Gaussian gate acts as a continuous proxy for discrete L0 penalization. By adjusting the bias, we modulate the probability of channel survival.
§ 4.2 التسلسل الهرمي الكامن
يكشف التحليل البنيوي تدرجًا في بقاء القنوات عبر عمق شبكة VGG19. حافظت السمات البصرية الأولية، مثل الحواف والألوان، على معدلات بقاء مرتفعة تجاوزت 75٪. وسجلت منطقة الانتقال نحو 50٪، بينما أظهرت الطبقات الأعمق سعة زائدة كبيرة ومعدل بقاء يقارب 20٪.
The Survival Gradient
Visualizing the structural survival of VGG19 channels. Early layers (Blocks 1-2) are preserved for low-level feature extraction, while deep layers are aggressively pruned.
§ 4.3 التقليم البنيوي للموترات
Pruning Visualization
Discarding redundant channels physically to unlock hardware throughput.
§ 4.4 مقارنة سرعة الاستدلال
Throughput Benchmark
Simulating a clinical queue of 20 diagnostic batches. The L0 model achieves physical acceleration through tensor surgery, clearing the queue while the Baseline still processes.
§5 التحليل منخفض الرتبة باستخدام SVD
ضغطنا رأس التصنيف باستخدام تحليل القيم المفردة المبتور (SVD)، فقسّمنا المصفوفات الكبيرة إلى عمليات ضرب متتابعة أصغر.
Singular Value Decomposition
Decomposing high-density weight tensors into essential geometric primitives.
§ 5.1 قياس الحفاظ على دقة التشخيص
يمكن لإزالة الضوضاء عالية التردد في المعاملات باستخدام SVD أن تحسن دقة التصنيف، إذ يعمل التحليل كمرشح بنيوي للضوضاء.
Diagnostic Fidelity Sweep
Why SVD works: Clinical images contain massive spatial redundancy.
The previous section proved that weights are redundant. This section proves that the diagnostic data itselfis low-rank, allowing the network to discard high-frequency "noise" without losing the cell's nucleus structure.
Optimal Spectral Cutoff. High-frequency pixel noise is removed, but the diagnostic nucleus remains structurally intact.
Spectral Rank Profile
§6 المناقشة والتركيب الموحد
بالتطبيق وفق معيار أكايكي للمعلومات، وجدنا أن النماذج المضغوطة ليست أصغر فحسب، بل حققت درجات معلومات أفضل. سجل نموذج VGG19 الأساسي 2.79 × 10⁸، مقابل 4.32 × 10⁷ لنسخة SVD و7.11 × 10⁷ لنسخة تقليم L0.
Statistical Parsimony Audit
Evaluating model selection through Information-Theoretic criteria. Lower values indicate a more efficient trade-off between empirical fit and parameter complexity.
Metric Definitions
Penalize complexity to prevent overfitting. BIC imposes a stronger penalty based on sample size, favouring simpler models.
Minimum Description Length. Evaluates the statistical hypothesis by the length of its shortest possible description.
The massive reduction in AIC/BIC/MDL confirms that VGG19 is severely over-parameterized for the BloodMNIST task, captured here by the Parsimony Gap.
§ 6.1 جبهة كفاءة باريتو
حددنا جبهة باريتو متينة تحكم المفاضلة بين الحفاظ الصارم على دقة التشخيص ورفع الكفاءة الحسابية.
The Pareto Efficiency Frontier
Mapping the trade-off between predictive fidelity and resource constraints.
§ 6.2 تفاوت تدهور الأداء
لا يؤدي الانتقال من البنى الضخمة إلى النماذج المضغوطة إلى تدهور موحد للأداء. فقد ظلت فئات مميزة شكليًا، مثل الصفائح الدموية والخلايا الحمضية، متينة حتى مع التقليم الشديد. في المقابل، تركز معظم الخسارة التشخيصية في الفئات المتشابهة شكليًا، مثل الخلايا القاعدية والخلايا المحببة غير الناضجة، التي تحتاج إلى كواشف سمات عالية الأبعاد في الطبقات العميقة.
Heterogeneous Degradation Audit
Visualizing the relative performance drop across compression variants compared to the uncompressed baseline. Structurally distinctive classes remain stable, whereas morphologically ambiguous classes account for the majority of the degradation.
Select a matrix cell to view class-specific stability metrics.
The 85% Guardrail: No class fell below the predetermined clinical threshold, confirming that even the most aggressive surgery preserved the minimum features required for diagnostic reliability.
§ 6.3 البنية الموحدة للأخطاء
تقارن هذه النتائج سطح الخطأ بين تقنيات الضغط. يحافظ SVD على حدود القرار في النموذج الأساسي، بينما تضيف بوابات L0 حساسية انتقائية داخل المجموعات المتقاربة شكليًا.
Unified Error Topology Analysis
Visualizing the transition of classification boundaries under different compression constraints.
Boundary Sensitivity
Statistical Insight: The diagonal entries represent the true positives. Off-diagonal concentration in the middle rows confirms that morphological ambiguity is the primary bottleneck for both dense and sparse models.
§ 6.4 مسار الضغط المركب
تستخدم البنية النهائية للنموذج مسارًا موحدًا. ويمكن لخطوط النشر المستقبلية أن تجمع هذه الأساليب لتحقيق نسب ضغط يصعب بلوغها بأي طريقة منفردة.
Compounding Efficiency
Simulation of Pipeline Stacking
The Deployment Framework
A statistically-driven matrix for selecting the optimal compression strategy based on clinical and hardware constraints.
Primary Constraint Analysis
The Practitioner's Playbook
Summary of Research Recommendations
Match Method to Redundancy
Not all redundancy is created equal. Fully-connected layers exhibit high-rank linear redundancy, making them ideal for SVD. Convolutional layers, however, possess spatial filter redundancy that requires structured pruning.
Use SVD for dense layers; use L0 for convolutional bases.
Hardware Profiling Audit
System Audit & Reproducibility Specs