# A Simple Convolutional Neural Network with Rule Extraction
## 1 Introduction  
Artificial neural networks learn by examining numerous examples many times. After training, it is very difficult to explain their decisions, because their knowledge is embedded within the values of the parameters and neuron activations, which are at first glance incomprehensible. Deep neural networks are at the root of the significant progress accomplished over the past five years in areas such as artificial vision, natural language processing and speech recognition. In addition, a number of studies have been conducted to clarify the potential of deep models, such as Convolutional Neural Networks (CNNs) in Sentiment Analysis (SA) [1, 2]. Nevertheless, the transparency of bio-inspired models is currently an open and important research topic, as in the long term, the acceptance of these models will depend on it. Furthermore, transparency is essential in relation to a recent European General Data Protection Regulation (GDPR), which also presents a right of explanation. Specifically, when an automated decision is taken by a system, one has the right to request a meaningful explanation. Neural networks being considered as black-boxes have been made transparent by techniques that were first applied to shallow Multi Layer Perceptrons (MLPs). A natural way to explain MLP responses is through the use of propositional rules [3]. [PERSON] et al. introduced a taxonomy describing the general characteristics of all rule extraction methods [4]. Later, a desire to make neural network ensembles transparent became apparent and several techniques were proposed. [PERSON] introduced the Discretized Interpretable Multi Layer Perceptron (DIMLP) to generate symbolic rules from bothsingle networks and ensembles [5; 6]. The key idea behind rule extraction in DIMLPs is the precise localization of axis-parallel discriminative hyperplanes [5; 6; 7; 8]. A brief explanation is provided in Section 3.2. Recently, many works involving deep neural networks have gained momentum. On one hand, many techniques aiming at explaining CNN decisions in image classification are based on visualization of areas that are mainly relevant for the outcome [9], but as stated by [PERSON] [10]: \"it does not explain anything except where the network is looking\". On the other hand, the purpose of several methods is to learn an interpretable model in the local region close to an input instance [11]. [PERSON] and [PERSON] presented a comprehensive overview of Explainable Artificial Intelligence (XAI), including neural networks [12]. In addition, a survey on black-box models with its \"explanators\" is proposed by [PERSON] et al. [13]. The state of the art highlights a lack of global methods aiming at extracting symbolic rules from CNNs. Local methods could represent good candidate techniques, in order to define a global algorithm that may aggregate all local models in an ensemble. Currently, the approach of generating rules from aggregated local models has not been tackled, since ensembles tend to be more opaque than single models. Note however that it could be carried out by the same technique used in [6]. In this article we propose a rule extraction technique for a CNN, typically used in Sentiment Analysis [2] with textual data. Our technique is not restricted to local regions, but it is global to all the samples of the input space. The layers of this network are: A two-dimensional input layer representing sentences by means of word embeddings [14]; a convolutional layer; a max-pooling layer; and finally a fully connected layer. After the training phase, the fully connected layer is replaced by a DIMLP [7] that makes it possible to generate propositional rules. The DIMLP subnetwork approximates the fully connected part of the original CNN to any desired precision. The antecedents of the extracted rules represent maximal responses of convolutional filters. By propagating the rules back to the input layer, it is possible to determine the discriminative combination of words in the decision-making process.