# Characterizing Perception Deep Learning Algorithms and Applications for Vehicular Edge Computing
## 4 Analysis and Key Insights
### Layer-Wise Characterization  
Building on the insights gained from memory profiling, we can delve into the layer-specific analysis of our machine learning methods. Both YOLO and Faster R-CNN utilize several common layers, including convolutional layers, activation layers, and operations such as max-pooling. Figure 5 illustrates the differences in layer performance under normal operation versus resource-constrained conditions, highlighting how memory contention disproportionately affects specific layers within the architecture. Given the shared building blocks, we conduct a layer-by-layer workload profiling for both scenarios. The layers that experience significant impacts are depicted in Figure 6 for YOLO and Figure 7 for Faster R-CNN. A detailed analysis of the gathered data reveals that the layers that are most affected are primarily located at the beginning of the architecture  
Figure 4: Performance of perception deep learning applications single-stage (**Left**) and two-stage (**Right**) on low-end vehicular edge devices with memory contention. Figure 5: Fine-grained layer-wise performance of single-stage perception DL application for both no contention and under/oversubsibilized contention. for both models, \(\omega\) and \(\theta\). Table 1 summarizes the layers that are most impacted in YOLO, while Table 2 details the affected layers in Faster R-CNN. Starting with Figure 6(left), we observe that two layers--Layer 1 and Layer 6--are significantly impacted by memory contention. Both layers are convolutional layers with a theoretical computational load of 3.407 GFLOPs. Despite this seemingly substantial load, similar loads are distributed across various other layers in the architecture. Notably, Layer 1 exhibits a remarkable 27.65 times increase in execution time, while Layer 6 demonstrates a 29.49 times increase compared to the non-contention scenario. These findings provide valuable insights into the areas most affected by resource constraints within the YOLO architecture, highlighting the critical layers that may benefit from targeted optimization efforts. However, in Figure 6(right), after removing the two heavily impacted layers from Figure 6(left), we identify other layers that also show notable increases in latency. In our profiling results, Layers 9 and 20 reveal an unusual degree of increase when compared to both their theoretical GFLOP values and the non-contention latency. Specifically, Layer 9, which functions as a routing layer with a near-zero GFLOP, experiences a staggering latency \begin{table}
\begin{tabular}{l c c c} \hline \hline
**YOLO Layer** & **Normal** & **Contention** & **Percentage Increase** \\ \hline
0 Convolution & 0.2705 s & 0.4792 s & 77\% \\
1 Convolution & 0.5176 s & 14.311 s & 2665\% \\
6 Convolution & 0.5046 s & 14.879 s & 2849\% \\
9 Routing & 0.0108 s & 0.1249 s & 1053\% \\
10 Convolution & 0.2669 s & 0.5167 s & 93\% \\
11 Convolution & 0.4157 s & 0.7581 s & 82\% \\
16 Convolution & 0.2113 s & 0.2816 s & 33\% \\
20 Shortcut & 0.0015 s & 0.0057 s & 271\% \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Performance of single-stage perception deep learning network layers with and without memory contention. \begin{table}
\begin{tabular}{l c c c} \hline \hline
**Faster R-CNN Layer** & **Normal** & **Contention** & **Percentage Increase** \\ \hline
3 Relu Activation & 1.8892 s & 22.1668 s & 1173.34\% \\
5 Convolution & 0.5995 s & 3.4108 s & 468.9\% \\
7 Convolution & 1.1588 s & 28.272 s & 2339.77\% \\
12 Convolution & 0.9201 s & 6.551 s & 12.96\% \\
14 Convolution & 0.9158 s & 9.6611 s & 954.93\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Performance of two-stage perception deep learning network layers with and without memory contention. Figure 6: Impacts of memory contention on single-stage perception DL network layer on vehicular edge. increase of over 1053%. Similarly, Layer 20, a shortcut layer with an almost negligible GFLOP of 0.001, demonstrates a latency increase of 271%.