A Deep Learning Based Resource Allocation Scheme in Vehicular Communication Systems
Abstract
In vehicular communications, intracell interference and the stringent latency requirement are challenging issues. In this paper, a joint spectrum reuse and power allocation problem is formulated for hybrid vehicletovehicle (V2V) and vehicletoinfrastructure (V2I) communications. Recognizing the high capacity and lowlatency requirements for V2I and V2V links, respectively, we aim to maximize the weighted sum of the capacities and latency requirement. By decomposing the original problem into a classification subproblem and a regression subproblem, a convolutional neural network (CNN) based approach is developed to obtain realtime decisions on spectrum reuse and power allocation. Numerical results further demonstrate that the proposed CNN can achieve similar performance as the Exhaustive method, while needs only 3.62% of its CPU runtime.
I Introduction
Recently, vehicletovehicle (V2V) communications have attracted increasing attention for its potential to improve road safety and traffic efficiency, and enable delaysensitive vehicular applications, where communications happen only between neighboring vehicles [1]. To improve the spectral efficiency in vehicular communications, V2V links have been designed to share the same radio resources of vehicletoinfrastructure (V2I) uplinks. Intracell interference control between V2V and V2I links hence becomes an important issue in V2V communications. To cope with the interference in vehicular communication systems, resource allocation strategies have been proposed in [2, 3, 4]. The throughput of V2I links was maximized with a minimum qualityofservice (QoS) guarantee by performing spectrum sharing and power allocation for V2V and V2I links [2, 3].
On the other hand, to support delaysensitive and high reliable information exchange, especially in the context of Ultra Reliable Low Latency Communications (URLLC) in future fifthgeneration (5G) mobile communication system, latency is a particularly crucial requirement for V2V connections. To this end, many works have focused on the lowlatency vehicular communications [5, 6, 7]. However, the works [5, 6, 7] neglected the QoS requirements of V2I links, thus are inapplicable to the scenario where V2V and V2I coexist. Consider a hybrid V2V and V2I communication scenario, [8] maximized the information rate of V2I links utilizing the Lagrange dual decomposition and binary search, with a considerable complexity.
Most of the previous works [2, 3, 4, 5, 6, 7, 8] derived the resource allocation schemes as the solutions of optimization problems, where iterative algorithms are applied. In iterative schemes, a large number of iterations need to be carried out before convergence is achieved. The high computational cost prevents implementing these algorithms in realtime for practical uses. As a key technique in artificial intelligence, deep learning has been widely used in image processing and voice processing [9, 10]. It has also been recently developed to solve traditional problems in wireless communications. Deep neural networks (DNNs) can be used to solve complex nonlinear nonconvex problems without building complicated mathematical models. For example, [11] proposed a DNNbased algorithm to approximate a traditional iterative algorithm (i.e., WMMSE [12]) for realtime wireless resource management.
In this paper, we propose a convolutional neural network (CNN) based resource allocation approach for hybrid V2I and V2V communications. The main contributions of this work can be summarized as follows.

Considering a hybrid V2I and V2V communication scenario, we formulate the resource allocation task as a joint spectrum reuse and power allocation problem. Recognizing the stringent latency requirement for V2V links, we maximize the weighted sum of the capacities and latency requirement for vehicular communications.

Different from [11], [13], which either solve a regression problem or a classification problem for resource allocation by deep learning, the proposed CNN, for the first time, decomposes the original problem of vehicular communications into a classification subproblem and a regression subproblem, to infer the optimal decisions on joint spectrum reuse and power allocation.

Extensive numerical experiments are conducted to demonstrate that the proposed CNN can achieve similar performance as the Exhaustive method, while substantially reduce the computational time. The low complexity makes the proposed approach well suited for highspeed mobile scenes in vehicular communication.
Ii System Model
Consider a hybrid V2I and V2V transmission scenario as shown in Fig. 1, where the vehicles are in the coverage of a single BS. vehicles are communicating with the BS through V2I links, denoted as cellular user equipment (CUEs), while pairs of vehicles are exchanging data directly through V2V links, denoted as vehicular user equipment (VUEs). For illustration purpose, we denote , , and as the vehicle sets for CUEs, VUE transmitters, and VUE receivers, respectively. Moreover, we assume that each vehicle plays one of the following roles: i) CUEs; ii) VUE transmitters; iii) VUE receivers; or iv) idle vehicles.
To improve the communication reliability and the spectrum utilization, we assume that the uplink spectrum resources allocated orthogonally to the CUEs can be reused by the VUEs. To avoid introducing severe interference to cellular links, we assume that the spectrum resources of a CUE can only be reused by one VUE, and one VUE can only access the spectrum of one CUE. The channel power gain, h, between the th CUE and the BS can be expressed as
(1) 
where is the smallscale fast fading power component, assumed to be exponentially distributed with unit mean; is the largescale fading power component consisting of pathloss and shadowing. The channel power gain between the th VUE transmitter and the th VUE receiver, the interference channel power gain between the th VUE transmitter and the BS, and the interference channel power gain between the th CUE and the th VUE receiver are similarly defined.
Let and denote the received signaltointerferenceplusnoiseratios (SINRs) at the BS and the th VUE receiver, respectively. They can be given as
(2) 
(3) 
where and denote the transmit power of the th CUE and the th VUE transmitter, respectively; is the noise power, and is the status of the spectrum resource reuses. in (2) denotes the received interference at the BS from the th VUE transmitter, and in (3) denotes the received interference at the th VUE receiver from the th CUE. Here, means that the th VUE transmitter reuses the spectrum resource allocated to the th CUE, and otherwise.
Let and denote the ergodic capacities of the th CUE and the th VUE transmitter, which are calculated by the longterm average over the fast fading [2], as given by
(4) 
(5) 
where is the expectation taken over the fast fading distribution.
V2V links are often used to transmit urgent information to avoid collisions between vehicles. Hence, the communication latency is considered as one of the most important requirements for V2V links. In this paper, we denote and as the average packet size and the tolerable transmission latency, respectively. The target transmit rate of VUEs is then given by . To describe the latency requirement of the V2V links, we pick the smallest ergodic capacity among VUEs, and calculate the probability when the capacity of this VUE is larger than over fast fading. Then the latency requirement can be expressed as
(6) 
Additionally, we set a minimum capacity requirement for the CUEs to guarantee a minimum predetermined QoS. Our objective is to maximize the weighted sum of the ergodic capacities of the V2I and V2V links, and the latency requirement of the V2V links, by making optimal decisions on the spectrum reuse and power allocation . The resource allocation problem can be formulated as
(7a)  
s.t.  (7b)  
(7c)  
(7d)  
(7e)  
(7f)  
(7g)  
(7h) 
where and are the weight factors, is the minimum required capacity for each V2I link. and are the maximum transmit powers of the V2I links and V2V links, respectively. (7c) represents the minimum capacity constraint to ensure the QoS of the V2I links. Constraints (7d) and (7e) make sure that the transmit powers of the CUEs and VUEs cannot exceed the maximum transmit powers. And Constraints (7f) and (7g) represent that the spectrum of one V2I link can only be reused by one VUE, and one VUE can only access the spectrum of a single V2I link.
The proposed formulation above not only realizes maximizing the weighted sum of the ergodic capacities of the V2I and V2V links in the vehicle communication system, but also guarantees the lowlatency requirement of the V2V links. Unfortunately, this is a highly nonlinear nonconvex optimization problem, which is in general very difficult to solve. Introducing the emerging deep learning technique, here we propose a CNN based approach to solve this problem.
Iii Deep Learning for Resource Allocation
In this section, we first introduce the data generation phase, and then describe the proposed network structure and the chosen loss functions.
Iiia Data Generation
The setting of the hybrid V2I and V2V transmission network can be found in Section IV. Given pregenerated channel gains and predetermined parameters , and , we generate the corresponding spectrum resource reuse state and the allocated powers for each channel realization by running an exhaustive method. The Exhaustive method iteratively calculates and compares the objective in (7a) for all possible schemes and chooses one of the scheme that maximizes the objective as the optimal solution. By doing so, the Exhaustive method sets a benchmark for the proposed CNNbased approach with a high computational cost. By repeating the above process for multiple times, we generate the entire training data set .
Different from existing works which either solve a regression problem [11], or a classification problem [9] for resource allocation by deep learning, our proposed CNN architecture decomposes the original problem (7) into a multilabel classification subproblem for spectrum reuse selection, and a regression subproblem for power allocation, and then outputs the joint optimal decisions.
Collect in a matrix, . The different values of , each of which associated with one solution of spectrum reuse, are classified into different classes. Each class is indexed by a onehot encoded vector as its label, say . Here, is the index number of all classes.
IiiB Proposed Network Architecture
As shown in Fig. 2, the proposed CNN architecture consists of one input layer, multiple hidden layers, and one output layer.

Input layer: The input data of the CNN are the channel gains .

Hidden layers: The hidden layers are composed of three convolution layers and three Fully Connected (FC) layers with the activation function, Rectified Linear Unit (RelU). In this paper, we consider a CNN as the training network for the reason that a CNN always outperforms other neural networks (e.g., a FC DNN) in feature extraction and highly accurate classification. It can exploit the spatial features in channel gains and reduce the number of weights compared to a FC DNN, such that realtime decisions on resource allocation can be made for practical uses.

Output layer: Three outputs are to be obtained from this layer. The first output is the class index of matrix indicating spectrum reuse, which is the solution of a multilabel classification subproblem. We select softmax as the activation function. The other two outputs are the transmit powers of the V2I and V2V links, and , respectively. They are the outputs of a regression subproblem with the activation function, RelU.
We use the training data set to optimize the weights of the CNN. The CNN is trained to regenerate the decisions on spectrum reuse and power allocation derived from the Exhaustive method, given channel gains .
IiiC Loss Function
As the proposed CNN aims to solve different subproblems (i.e., classification and regression), different loss functions are considered adapting to different features of the subproblems.

Mean Squared Error (MSE): The loss function, MSE, is a reflection of the model’s fitting degree to the training data. It can be described as
(8) where is the number of batch size, is the predicted power vector of CUEs (or VUEs) output by the CNN, and is the allocated power in the training set. The intuitive meaning of this loss function is quite clear: the greater the Euclidean distance between the predicted value and the true value , the greater the loss, and vice versa.

Categorical Crossentropy: This is the loss function for the multilabel classification subproblem, as given by
(9) where is the predicted class index of spectrum reuse output by the CNN, and is the target class index of spectrum reuse.
Therefore, the CNN is trained to minimize the following total loss function:
(10) 
where and are the weights for the loss functions of the transmit powers and , respectively.
Iv Simulation Results
Iva Simulation Parameter
In the data generation phase, we consider a single cell urban scenario with the V2V case based on the Manhattan grid layout [14]. As shown in Fig. 3, the building size is 413 m 30 m with 3 m reserved for sidewalk along the building. It is assumed that there are 2 lanes in each direction and the lane width is set as 3.5 m. The vehicles are dropped on the roads randomly following the spatial Poisson process. Table I gives the channel models for the V2I and V2V links, and Table II lists the rest parameters used in our simulation.
Parameter  V2I Link  V2V Link  

Pathloss model 



Shadowing distribution  Lognormal  Lognormal  
Shadowing std deviation  8 dB  3 dB  
Fast fading  Rayleigh fading  Rayleigh fading 
Parameter  value 

Carrier frequency  2 GHZ 
Bandwidth  10 MHZ 
BS antenna height  25 m 
Vehicle antenna height  1.5 m 
Absolute vehicle speed  30 km/h 
Number of VUE pairs  5 
Number of CUEs  5 
Minimum capacity of CUEs  0.5 bps/HZ 
Maximum transmit power of CUEs  23 dBm 
Maximum transmit power of VUEs  23 dBm 
minimum transmit power of CUEs  10 dBm 
minimum transmit power of VUEs  10 dBm 
Noise power  114 dBm 
Average packet size  6400 bits 
Maximum latency  100 ms 
To better evaluate the performance of the proposed CNNbased approach, we compare it with five other schemes: 1) Benchmark by using the Exhaustive method, which serves as an ideal reference; 2) DNN by using a FC DNN, with the parameters specified in Table III; 3) RandomPower by randomly generating the power allocation following a uniform distribution; 4) MaxPower by allocating the maximum transmit power for vehicles; and 5) MinPower by allocating the minimum transmit power for vehicles. The latter three schemes serve as heuristic baselines.
Parameter  DNN  CNN 

Layer1  Dense 64ReLU  Conv2D 5x8x16ReLU 
Layer2  Dense 128ReLU  Conv2D 5x8x32ReLU 
Layer3  Dense 128ReLU  Conv2D 5x8x64ReLU 
Layer4    Dense 1x1x256ReLU 
Layer5    Dense 1x1x256ReLU 
Layer6    Dense 1x1x128ReLU 
batch size  128  128 
epochs  500  100 
0.1  0.1  
0.1  0.1 
IvB Results Analysis
Fig. 4 shows the cumulative distributed function (CDF) of the weighted sum of the ergodic capacity and latency requirement (i.e., the objective in (7)) achieved by different approaches. We can see that the proposed CNN approach with 25000 training data outperforms the other schemes with the performance closest to the ideal benchmark method. This is due to the fact that the proposed CNN is expert in extracting the spatial features in channel gains, so as to infer the decisions on resource allocation with a high accuracy.
The superiority of the proposed CNN is further demonstrated by Fig. 5. Fig. 5 shows the error rate of different algorithms compared to Benchmark. Let denote the error rate. It can be calculated through
(11) 
where is the objective value in (7) achieved by Benchmark, and is the objective value achieved by the other approaches. We can see that, the error rate of CNN with 25000 training data is smaller than the other approaches. The error rates of 83% testing data of CNN and 62% testing data of DNN are within 10%, while the error rates of the other three algorithms are larger than 20%.
Fig. 6 and Fig. 7 plot the CDF of the objective value and error rate of CNN and DNN with different size of training data, respectively. It can be concluded from the figures that, the CNNbased approach works better than DNN, and a neural network trained with more training data has the performance closer to Benchmark.
Table IV lists the CPU runtime of Benchmark, CNN (with 25000 or 15000 training data), and DNN (with 25000 or 15000 training data). We can see that without compromising much on the performance, CNN with 25000 training data has a CPU runtime only 3.62% of that with Benchmark. The runtime of CNN is slightly bigger than that of DNN, since we introduce more parameters in CNN for better performance. It is also obvious that more training data results in a larger runtime. This allows us to balance between the runtime and resultant performance.
Algorithm  Benchmark 






Time (s)  25.66  0.93  0.91  0.18  0.17  
  3.62%  3.54%  0.70%  0.66% 
V Conclusion
In this paper, we investigated the joint spectrum sharing and power allocation problem for vehicle communication networks that support hybrid V2I and V2V communications. By introducing deep learning techniques, we proposed a CNNbased approach, which decomposed the original problem into a classification subproblem and a regression subproblem, and output the realtime decisions on spectrum reuse and power allocation with a low computational complexity. Extensive numerical experiments demonstrated that the proposed CNN achieved similar performance as the Exhaustive method, while needed only 3.62% of its CPU runtime.
Acknowledgment
This work was supported by the National Natural Science Foundation of China (NSFC) Grants under No. 61701293 and No. 61871262, the National Science and Technology Major Project Grants under No. 2018ZX03001009, the Huawei Innovation Research Program (HIRP), and research funds from Shanghai Institute for Advanced Communication and Data Science (SICS).
References
 [1] Muhammad Ikram Ashraf, Mehdi Bennis, Cristina Perfecto, and Walid Saad. Dynamic proximityaware resource allocation in vehicletovehicle (v2v) communications. In 2016 IEEE Globecom Workshops (GC Wkshps), pages 1–6. IEEE, 2016.
 [2] Le Liang, Geoffrey Ye Li, and Wei Xu. Resource allocation for d2denabled vehicular communications. IEEE Transactions on Communications, 65(7):3186–3197, 2017.
 [3] Wanlu Sun, Erik G Ström, Fredrik Brännström, Kin Cheong Sou, and Yutao Sui. Radio resource management for d2dbased v2v communication. IEEE Transactions on Vehicular Technology, 65(8):6636–6650, 2016.
 [4] Fakhar Abbas and Pingzhi Fan. A hybrid lowlatency d2d resource allocation scheme based on cellular v2x networks. In 2018 IEEE International Conference on Communications Workshops (ICC Workshops), pages 1–6. IEEE, 2018.
 [5] Wanlu Sun, Erik G Ström, Fredrik Brännström, Yutao Sui, and Kin Cheong Sou. D2dbased v2v communications with latency and reliability constraints. In 2014 IEEE Globecom Workshops (GC Wkshps), pages 1414–1419. IEEE, 2014.
 [6] Nan Yu, Jie Mei, Long Zhao, Kan Zheng, and Hui Zhao. Radio resource allocation for d2dbased v2v communications with lyapunov optimization. In 2017 IEEE/CIC International Conference on Communications in China (ICCC), pages 1–6. IEEE, 2017.
 [7] Fakhar Abbas, Pingzhi Fan, and Zahid Khan. A novel lowlatency v2v resource allocation scheme based on cellular v2x communications. IEEE Transactions on Intelligent Transportation Systems, 2018.
 [8] Jie Mei, Kan Zheng, Long Zhao, Yong Teng, and Xianbin Wang. A latency and reliability guaranteed resource allocation scheme for lte v2v communication systems. IEEE Transactions on Wireless Communications, 17(6):3850–3860, 2018.
 [9] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pages 1097–1105, 2012.
 [10] Shaoqing Ren, Kaiming He, Ross Girshick, and Jian Sun. Faster rcnn: Towards realtime object detection with region proposal networks. In Advances in neural information processing systems, pages 91–99, 2015.
 [11] Haoran Sun, Xiangyi Chen, Qingjiang Shi, Mingyi Hong, Xiao Fu, and Nikos D Sidiropoulos. Learning to optimize: Training deep neural networks for wireless resource management. In 2017 IEEE 18th International Workshop on Signal Processing Advances in Wireless Communications (SPAWC), pages 1–6. IEEE, 2017.
 [12] Qingjiang Shi, Meisam Razaviyayn, ZhiQuan Luo, and Chen He. An iteratively weighted mmse approach to distributed sumutility maximization for a mimo interfering broadcast channel. IEEE Transactions on Signal Processing, 59(9):4331–4340, 2011.
 [13] JunBo Wang, Junyuan Wang, Yongpeng Wu, JinYuan Wang, Huiling Zhu, Min Lin, and Jiangzhou Wang. A machine learning framework for resource allocation assisted by cloud computing. IEEE Network, 32(2):144–151, 2018.
 [14] 3GPP. Technical Specification Group Radio Access NetworkStudy on LTEbased V2X Services. Technical Specification (TS) 36.885, 3rd Generation Partnership Project (3GPP), 07 2016. Version 14.0.0.
 [15] Juha Meinilä, Pekka Kyösti, Tommi Jämsä, and Lassi Hentilä. Winner ii channel models. Radio Technologies and Concepts for IMTAdvanced, pages 39–92, 2009.