# Using Convolutional Neural Networks for Blocking Prediction in Elastic Optical Networks
## 3 Using CNNs to Predict EON Status  
Convolutional Neural Networks (CNNs) are machine learning models, well known for pattern detection and extraction, which are commonly used to predict the behavior of systems whose status changes over time [20]. This method has proven applicability in time-varying matrices such as video processing, as videos are a sequence of time-labeled pictures represented in the form of matrices. In this sense, CNN models can be applied in predicting the status of EONs. As mentioned in the previous section, the status of EONs can be represented by a matrix. The value of this matrix changes with changes in the status of the EON over time. A sequence of snapshots of the status of EONs can be combined to build a video-like sequence of matrices. In this research, we are following the modified KDD (Knowledge Discovery in Databases) methodology [21; 22; 23]. KDD entails a systematic exploratory investigation and modeling of large datasets. The methodology is depicted in Figure 5. This method is beneficial for identifying valid, useful, and intelligible patterns in large and complicated datasets. This research utilizes synthetic data created by the previously described network simulator to train and test the CNN model. We generate a relatively large set of consecutive snapshots of the simulated EON status; some of the snapshots become blocked, while some do not. Then, the data are randomly divided into two groups: the training set, and the test set. Next, the CNN model is trained and it is evaluated with the test data. Figure 4: Status matrix of an EON network represents the snapshot status of the network at a specific time. The length of this matrix is the number of links (42), while its height is the number of frequency slots (160). Figure 5: Process of Knowledge Discovery in Databases. Figure 6 shows a series of consecutive snapshots of the status matrix of an EON. At time t = n, a connection-blocking event occurs. We label the snapshots that are close to t = n as leading-to-blocking because connection blocking happens a few t.u. later. The number of these previous snapshots which are labeled as leading-to-blocking is dependent on the connections' average duration and the IAT. Assuming highly dynamic traffic (for example IAT = 1 t.u. and HT = 10 t.u. ), the spectral status of any network link can likely change in a few t.u. On the other hand, if traffic dynamics are smoother, the number of snapshots labeled by each class could be increased as the changes in the spectral status slow down. To ensure enough time for the network management system to react and prevent the blockage, it helps if the blockage is predicted as early as possible. In this research, for a preliminary analysis, we assume that an arbitrary t.u. of 13 is a reasonable amount of time for the correction and reaction of the network. This arbitrary number is chosen according to the size of the simulated network, to show and analyze the concept. Naturally, it should be adapted according to the real application network dynamic and how fast the network administrator can react. We pick the three snapshots corresponding to 13 t.u. before blocking events as a training data set for blocking prediction. We close by analyzing three snapshots (instead of only one) to provide the machine learning with more information that besides the status of the network can also analyze the trends and changes in the network and provide a better prediction. We choose the snapshots as not-leading-to-blocking so that at least 100 t.u. afterward, no blockage occurs. This number is also arbitrary and chosen according to the concept. If this number is too large, the difference between leading- and not-leading-to-blocking would be so significant that applying the machine learning model could not be very beneficial. The idea is that the machine learning model can continuously analyze the network and trigger an alarm if the blocking occurs within 13 t.u.