{'fraction_non_alphanumeric': 0.0439944554932803, 'fraction_numerical': 0.01569939130958838, 'mean_word_length': 4.583277254374159, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Learning Explicit Deep Representations from Deep Kernel Networks

Deep kernel learning aims at designing nonlinear combinations of multiple standard elementary kernels by training deep networks. This scheme has proven to be effective, but intractable when handling large-scale datasets especially when the depth of the trained networks increases; indeed, the complexity of evaluating these networks scales quadratically w.r.t. the size of training data and linearly w.r.t. the depth of the trained networks. In this paper, we address the issue of efficient computation in Deep Kernel Networks (DKNs) by designing effective maps in the underlying Reproducing Kernel Hilbert Spaces. Given a pretrained DKN, our method builds its associated Deep Map Network (DMN) whose inner product approximates the original network while being far more efficient. The design principle of our method is greedy and achieved layer-wise, by finding maps that approximate DKNs at different (input, intermediate and output) layers. This design also considers an extra fine-tuning step based on unsupervised learning, that further enhances the generalization ability of the trained DMNs. When plugged into SVMs, these DMNs turn out to be as accurate as the underlying DKNs while being at least an order of magnitude faster on large-scale datasets, as shown through extensive experiments on the challenging ImageCLEF and COREL5k benchmarks.


INTRODUCTION
K ERNEL design has been an active field of machine learning during the last two decades with many innovative kernel-based algorithms successfully applied to various tasks, including support vector machines (SVMs) for pattern classification and support vector regression for multivariate estimation [1], [2], [3], [4], [5], [6] as well as kernel-PCA for dimensionality reduction [7]. The success of these kernel-based algorithms is highly dependent on the choice of kernels; the latter are defined as symmetric and positive semi-definite functions that return similarity between data [8], [9]. Various kernels have been introduced in the literature [9] including standard elementary kernels (linear, polynomial, Gaussian, histogram intersection, etc.) as well as sophistical ones that model more complex relationships between data [3], [10], [11]. However, in practice, knowing a priori which ( or sophisticated) kernel is suitable for a given task is not obvious and research has recently been undertaken in order to train suitable kernels for different classification tasks (see for instance [12], [13], [14], [15], [16], [17], [18], [43]).
Among existing solutions, Multiple Kernel Learning (MKL) [12], [19], [20] has been popular; its principle consists in learning (sparse or convex) linear combinations of elementary kernels that maximize performances for a given classification task. Different MKL algorithms have been proposed in the literature, including constrained quadratic programming [12], second-order cone and semi-infinite linear programming [19], [21] as well as simpleMKL based on mixed-norm regularization [20]. In spite of their relative success these solutions hit two major limitations: on the one hand, the convexity of these simple linear MKL models may limit the space of possible (and also relevant) solutions. On the other hand, MKL solutions, relying on shallow kernel combinations, are less powerful (compared to their deep variants) in order to capture different levels of abstractions in the learned kernel similarity. Considering these two issues, nonlinear and deep architectures have been recently proposed and turned out to be more effective: for instance, hierarchical multiple kernel learning is proposed in [22] where elementary kernels are embedded into acyclic directed graphs while in [23], nonlinear combination of polynomial kernels are used. Following the spirit of deep convolutional neural networks [24], [25], [26], authors in [13] adopt kernel functions as a prior knowledge for regularization. In [27], Cho and Saul propose Arc-cosine kernels that mimic the computation of large neural nets which can be used in shallow as well as deep networks. In [28], a multi-layer nonlinear MKL framework is proposed, but it is restricted to only two layers; in this solution, an exponential activation function is applied to each intermediate and output kernel combination. In [29], Jiu and Sahbi extend this method to a deeper network of more than two layers using a semi-supervised setting that takes into account the topology of training and test data. In all the aforementioned MKL algorithms, the computational complexity of kernel (gram-matrix) evaluation is a major issue that limits the applicability of these methods; indeed, considering a dataset with N samples, this complexity reaches O(LN 2 ) with L being the depth of the deep kernel networks; this evaluation process is clearly intractable even on reasonable size datasets.
Existing solutions that reduce the computational complexity of evaluating these kernels consider instead explicit maps. In this respect, different solutions have been proposed in the literature including: the Nyström expansion [30] which generates low-rank kernel map approximations of original gram-matrices from uniformly sampled data without replacement 1 , and the random Fourier sampling (proposed by Rahimi an Recht [33] and extended to groupinvariant kernel method in [34]) which builds explicit features for stationary kernels using random sampling of the Fourier spectrum. The explicit feature maps for additive homogeneous kernels are also given in [35] and finite approximations are derived based on spectral analysis. Other works have been undertaken including random features [36] and convolutional kernel networks [37], which approximate maps of Gaussians using convolutional neural networks.
In this paper, we propose a novel method that reduces the computational complexity of DKN evaluation (and therefore SVM learning) on large datasets. We address the issue of kernel map approximation for any deep nonlinear combination of elementary kernels rather than one specific type of kernels as achieved in the aforementioned related work. Our solution relies on the positive semi-definiteness (p.s.d) of existing elementary kernels (linear, polynomial, etc.) and the closure properties of p.s.d with respect to different operations (including product, addition and exponentiation) in order to express DKN with DMN. In these closure properties, linear combinations of kernels correspond to concatenations of their respective maps, while products correspond to Kronecker tensor operations, etc. As some elementary kernels 2 used to feed the inputs of DKNs may have infinite dimensional or undefined maps, we consider new explicit maps that accurately approximate these elementary kernels. Considering these maps as inputs, this greedy process continues layer-wise in order to find all the maps of the subsequent (intermediate and output) layers. Note that the contribution presented in this paper is an extension of our preliminary work in [38], but it differs at least in two aspects: first, we consider an unsupervised training criterion that benefits from abundant unlabeled data in order to further decrease the approximation error of the trained DMN and thereby making its generalization power as high as the underlying DKN (and also better than existing elementary and shallow kernel combinations; as shown through experiments). Furthermore, with DMNs, one may employ efficient SVM learning algorithms based on stochastic gradient descent [39] on large-scale datasets, rather than usual training algorithms that rely on heavy gram-matrices and intractable quadratic programming problems. All these statements are corroborated through extensive experiments using two benchmarks: ImageCLEF Photo Annotation [40], [41] and COREL5k [42].
The rest of this paper is organized as follows: in Section 2 we first briefly remind DKNs, and then in Section 3 we introduce a novel method that builds their equivalent 1. Bounds, on Nyström approximation and sampling, are given in [31], [32] 2. such as Gaussian and Histogram Intersection.
DMNs. In Section 4, we describe an unsupervised setting of our DMN design while in Section 5, we present the experimental validation of our method on image annotation tasks using ImageCLEF and COREL5k benchmarks. Finally, we conclude the paper while providing possible extensions for a future work.

DEEP KERNEL NETWORKS AT A GLANCE
A deep kernel network [28], [29] is a multi-layered architecture that recursively defines nonlinear combinations of elementary kernels (linear, Gaussian, etc.). Let κ (l) p (·, ·) denote a kernel function assigned to unit p and layer l; κ (l) p is recursively defined as the output of a nonlinear activation function 3 (denoted g) applied to a weighted combination of (input or intermediate) kernels from the preceding layer (l − 1) as with {w (l−1) p,q } being weights connecting units at layers l and l − 1; see the blue dashed area in Fig. (1, left). This feed-forward kernel evaluation is achieved layer-wise till reaching the final output kernel. In this recursive definition, other activation functions g can be chosen (particularly for the intermediate layers) including the hyperbolic making the learning numerically more stable while also preserving the p.s.d of the final output kernel. For a given classification task, the weights {w (l−1) p,q } are trained discriminatively [28], [29] using a max margin SVM criterion which aims at minimizing a regularized hinge loss on top of the learned DKN. This results into an SVM optimization problem which is solved in its dual form by backpropagating the gradient of that form w.r.t. the output kernel using the chain rule [24], then the weights connecting layers in the DKN are updated using gradient descent. Variants of this optimization criterion, leveraging both labeled and unlabeled data (following a semi-supervised and laplacian setting) makes it possible to train better DKN as detailed in [29].

DEEP MAP NETWORKS
In this section, we introduce a novel method that finds for any given DKN, its associated DMN; the proposed method proceeds layer-wise by finding explicit maps that best fit the original kernels in the DKN. As shown later in experiments, this process delivers highly efficient DMNs, while being comparably accurate w.r.t. their underlying DKNs. Later in Section 4, we introduce an extension that further enhances the approximation quality of our DMN; starting from the initial weights of the DMN, we update these weights by minimizing the difference between inner products of the maps in the DMN and the original kernels in the DKN. The strength of this extension also resides in its unsupervised setting which makes it possible to learn from abundant unlabeled sets.
Considering all the elementary (input) kernels in the p (x, x ) can therefore be written as an inner product of kernel maps as φ l p (x), φ l p (x ) , with φ l p : X → H being a mapping from the input space X to a high dimensional space H. As the explicit form of φ l p is not necessarily explicit (known), our goal is to design an approximated mappingφ l p that guarantees κ . When these approximated mappings through different layers are known, the resulting DMN provides deep kernel representations from the input data.

Input layer maps
In order to fully benefit from DMNs, the maps of the elementary kernels, that feed these DMNs, should be explicitly known. As discussed earlier, different kernels have different maps; for linear and polynomial, their maps are straightforward and can be easily defined. However, for other more powerful and discriminating kernels, such as the Gaussian and the histogram intersection (HI), their maps are either infinite dimensional or unknown. In this subsection, the definitions of exact and approximate explicit maps are shown for different kernels (including polynomial and HI).
Exact polynomial kernel map. An n-degree polynomial kernel defined as κ (1) p (x, x ) = x, x n can be expressed as κ (1) p (x, x ) = x ⊗ n x, x ⊗ n x , with ⊗ n standing for the Kronecker tensor product applied n times. Hence, it is easy to see that the exact explicit map for an n-degree polynomial kernel is φ Approximate HI kernel map. The approximate explicit maps of HI can be obtained using vector quantization. Given two vectors x and x of dimension s, the HI on x, x is defined as κ where k( x ∈ X }. In the above definition, ψ(.) is a "decimal-to-unary" map; for instance, 1 is mapped to 1, 2 is mapped to 11, 3 to 111, and so on. In the following, ψ(x d ) is rewritten as a vector of Q dimensions, and its first k(x d ) dimensions are set to 1 and the remaining are set to 0.

Proposition 1.
Given any x, x in X , for sufficiently large Q, the inner product φ (1) p (x ) approximates the histogram intersection kernel κ is the approximate kernel map and ψ(x d ) stands for the transpose of ψ(x d ).
Proof. ∀i, j ∈ {1, . . . , m}, Approximate Gaussian kernel map. As the explicit map of the Gaussian kernel is infinite dimensional, we consider instead an approximate explicit map of that kernel using eigen decomposition (ED) as shown in Eqs. (7), (6) with l = 1 (see Section 3.2). This ED is not restricted to the Gaussian kernel and can also be extended to other kernels whose exact explicit maps are difficult to obtain.

Intermediate/output layer maps
Given the explicit map of each elementary kernel at the input layer, our goal is to design the maps of the subsequent layers. Since the map of each layer depends on its preceding layers, this goal is achieved layer-wise using a greedy process. As intermediate/output kernels in the DKN are defined as linear combinations of kernels in the preceding (input or intermediate) layers followed by nonlinear activations, we mainly focus on how to approximate the maps of these activation functions in the DMN; in this section, we assume that weights {w (l) p,q } connecting different layers are already known resulting from the initial setting of the DKN (see again Section 2).
be a subset of N samples of X , and let K l p be a gram-matrix whose entries are defined on S. Let U (l) p = αΛ −1/2 with α, Λ being respectively the matrices of eigenvectors and eigenvalues obtained by solving Considering . 2 as the 2 (matrix) norm andK l p as the gram-matrix associated to { φ (l) and then the following property is satisfied Proof. Let's proceed layer-wise by induction; for l = 1 (and following section 3.1), the initial kernel maps {φ the second equality results from the hypothesis of induction. By plugging (10) into (7), we obtain and equivalentlyK l which also results from Eq. (6) and the orthogonality of eigenvectors in α.
Note that for any samples x, x taken out of S (but with similar distribution as S), it is clear (as also observed in our

Network design
We incrementally expand each layer l in the DKN into three sub-layers in the underlying DMN in order to design the mapφ

ENHANCING DMN PARAMETERS
So far the design principle of our method (shown in Section 3.3 and Fig. 1) seeks to find explicit maps whose inner products approximate the original kernel values. This is achieved by expanding each layer in the DKN into three sub-layers in the DMN with parameters fixed to {φ l,c p (x i )} i and U (l) p . In spite of being efficient and also effective w.r.t. the DKN (see experiments), the resulting DMN can be further improved when re-training and fine-tuning these parameters as shown subsequently.
The purpose of the proposed unsupervised algorithm is to further reduce the approximation error between the kernel values from DKN and the inner product of kernel maps from DMN. Let S ⊂ X be a subset drawn from the same distribution as S and define P as a subset of pairs taken from S × S . Our goal is to optimize maps of DMN using the following unsupervised criterion 4. As the goal, in this paper, is to build approximate deep kernel maps for a given (fixed) deep kernel network, the weights w between different layers remain fixed (as shown in Eq. (8)). However, they can also be jointly learned using gradient descent, but this is out of the main scope of this paper. here κ (L) 1 (x, x ) corresponds to the kernel value obtained using the DKN andφ 1 (x ) are the underlying (unknown) kernel maps; initially, only {φ (1) p (x),φ (1) p (x )} (x,x )∈P are known according to the procedure shown in Section 3.1.
Considering the initial setting of DMN parameters (i.e., {φ l,c p (x i )} i and U (l) p ), the learning process of this DMN relies on backpropagation [24]. The latter finds the best parameters by minimizing the objective function (E) following an "end-to-end" framework where the gradients of E are given using the chain rule; we firstly compute the gradients of the loss function E w.r.t. final kernel maps, then we backpropagate them through the DMN in order to obtain the gradients w.r.t. the parameters of DMN, finally we average them over training pairs to obtain the descent direction and update DMN parameters.
Starting from the derivative of E w.r.t.φ we obtain the gradients w.r.t. different layers l = L, . . . , 1 and units p = 1, . . . , n l as shown in the following section.

Error backpropagation
As the construction of DMN is achieved layer-wise (see again Section 3.3), we show below the backpropagation procedure for a module (shown in Fig. 1, right). Given the here [.] i stands for the ith row of a matrix. Considering κ (l) where g (·) is the derivative of the nonlinear activation function; for instance, g (·) = 1 − tanh(·) 2 for the tangent hyperbolic and g (·) = g(·) for the exponential. By accumulating the derivatives from each term f Finally, we get the derivatives w.r.t.φ where Frag( ∂Ê φ l,c p (x) ) q stands for the fragment of derivatives corresponding to the kernel maps of the unit q at layer (l−1) in the DKN.
The gradients of the loss function E w.r.t. U p (x )) through DMN to obtain (φ  p ) x ; ∆φ l,c p (xi) ← 1 2 (∆φ l,c p (xi))x + (∆φ l,c p (xi)) x ; Update these parameters by gradient descents; U Error backpropagation is achieved layer-wise from the final to the input layer; the increments of {φ l,c p (x i )} N i=1 and U (l) p are obtained by Eq. (20) and Eq. (19). Gradient descent with a step η (see experiments) is performed to update the parameters of DMN. The whole learning procedure is shown in Algorithm 1.
As described earlier, an initial DMN is firstly set using the training set S, then sample pairs in P are randomly selected from S to further enhance the parameters of the new (fine-tuned) DMN. As a result, the fine-tuned DMN enables us to obtain a better approximation of the original DKN on large datasets while being highly efficient as shown through the following experiments in image annotation.

EXPERIMENTS
In this section, we compare the performance of the proposed DMN w.r.t. its underlying DKN in three aspects: i) discrimination power, ii) relative approximation error between DMN and DKN and iii) also efficiency. The targeted task is image annotation (e.g., [41], [44]); given a picture, the goal is to predict a list of keywords that best describes the visual content of that image. We consider two challenging and widely used benchmarks: ImageCLEF [40] and COREL5k [42] (see details below). For both sets, we learnhighly competitive -3-layer DKNs using the setting in [29] and we plug these DKNs into SVMs in order to achieve image classification and annotation.
The discrimination power of the learned DMN and DKN networks is measured following the protocol defined by challenge organizers and data providers (see [40] for Image-CLEF and [42] for COREL5k; see also extra details below). The relative approximation error (RE) of a given DMN w.r.t. its underlying DKN is measured (on a given set T ⊂ X ) as In the remainder of this section, we show different evaluation measures (discrimination power, RE and efficiency) on ImageCLEF and COREL5k benchmarks; note that efficiency was measured on a Mac OS with Intel Core i5 processors.

ImageCLEF benchmark
The ImageCLEF Photo Annotation benchmark [40] includes more than 250k (training, dev and test) images belonging to 95 different concepts. As ground truth is available (released) only on the dev set (with 1,000 images), we learn DKNs and SVMs [29] using only the dev set; the latter is split into two subsets: the first one used for DKN+SVM training while the other one for SVM testing. Given a concept and a test image, the decision about whether that concept is present in that test image depends on the score of a classifier; the latter corresponds to a "one-versus-all" SVM that returns a positive score if the concept is present in the test image and a negative score otherwise. The discrimination power of DKN and DMN (when combined with SVMs) is evaluated using the F-measure (defined as harmonic means of recalls and precisions) both at the concept and the image levels (resp. denoted MF-C and MF-S) as well as the Mean Average Precision (MAP) [40]; high values of these measures imply better performances. In order to feed the inputs of DKN, we consider a combination of 10 visual features (provided by the Image-CLEF challenge organizers) and 4 elementary kernels (i.e. linear, polynomial with 2 orders, Gaussian 5 and histogram intersection) and we train a three-layer DKN with 40 input and 80 hidden units in a supervised way following the scheme in [29]; the only difference w.r.t. [29] resides in the hyperbolic tangent activation function which is used to provide a better numerical stability and convergence when training DKN. Initial DMNs. Assuming the weights {w (l−1) p,q } of threelayer DKN known, we build its equivalent DMN (referred to as initial DMN) as shown in Section 3. In these experiments, we consider two random samplings of the subset S -from the dev set with |S| = 500 and |S| = 1000 -in order to build the initial DMN (see Section 3 and Eqs. (8), (7)). According to Table 1, we observe that the performance of the initial 5. with a scale hyper-parameter set to be average Euclidean distance between data samples and their neighbors.  DMN -with |S| = 500 -slightly degrades compared to its underlying DKN; indeed, MF-S and MF-C decrease by 1.3 and 2.6 pts respectively while MAP decreases by 6.0 pts. With |S| = 1000 performances of the initial DMN is clearly improved compared to the one with |S| = 500; we obtain a slight gain in MF-S and comparable performance in MF-C. We also provide a comparison of the discrimination power of initial DMN against shallow DKN (i.e two-layer DKN) using a supervised setting; Table 1 clearly shows the superiority of initial DMN (when |S| = 1000). The relative approximation error (RE) of the two initial DMNs (i.e., with |S| = 500 and |S| = 1000) are also shown in Table 2; we evaluate these REs on T with a cardinality ranging from 2,000 to 10,000 samples. From these results, we observe that REs are comparably low on small sets; indeed, with |T | = 2, 000, the obtained REs are equal to 0.94% when |S| = 500 and 0.95% when |S| = 1000. Higher REs are obtained on larger T and this clearly motivates the importance of fine-tuning in order to make REs (and thereby performances) of the learned DMN stable (and close to the underlying DKN). Fine-tuned DMNs. In order to fine-tune the parameters of DMN, we use the learning procedure presented in Section 4. We consider an unlabeled set S (with |S | ranging from 1,000 to 4,000) and we sample 100,000 pairs from S × S to minimize criterion (13) using gradient descent with a stepsize empirically set to 10 −6 , a mini-batch size equal to 200 and a max number of iterations set to 5,000 (see Fig. 2). As shown in Table 1, we observe that the discrimination     power of different DMNs remains stable (with a slight gain in MF-S when |S | = 3000) w.r.t. their underlying DKNs, and this naturally follows the noticeably small REs of the fine-tuned DMNs (see Table 2). The latter are further positively impacted when |S | becomes larger; for instance, when increasing |S | from 1,000 to 4,000, the RE decreases significantly (particularly when |T | = 10, 000). Moreover, and in contrast to the initial DMNs, the fine-tuned DMNs are less sensitive to |T | as shown through the observed REs which remain stable w.r.t. |T |. Finally, we measure the gain in efficiency obtained with DMNs against DKNs. From Fig. 3, we observe that DMN is (at least) an order of magnitude faster compared to its DKN; for instance, with 10,000 samples, DKN requires more than 15,000 seconds in order to compute kernel values while DMN requires less than 1,000 seconds. Table 3 also provides a comparison of efficiency and RE on much larger sets (resp. 50K and 100K) randomly sampled from the (unlabeled) training set of ImageCLEF; a significant improvement in efficiency is observed. In other words, the complexity of evaluating DMNs is linear while for DKN it is quadratic. These results clearly corroborate the fact that the proposed DMNs are as effective as DKNs while being highly efficient especially on large scale datasets.

COREL5k benchmark
The COREL5k database introduced in [42] is another benchmark which is widely used for image annotation. In this database, 4,999 images are collected and a vocabulary of 200 keywords is used for annotation. This set is split into two parts; the first one includes 4,500 images for training and the second one 499 images for testing. As for ImageCLEF, the task is again to assign a list of keywords for each image in the test set.
Each image in COREL5k is described using 15 types of INRIA features [45] including: GIST features, 6 color histograms for RGB, HSV, LAB in two spatial layouts, 8 bag-of-features based on SIFT and robust hue descriptors in two spatial layouts. Following the standard protocol defined on COREL5k [42], each test image is annotated with up to 5 keywords and performances (discrimination power of image classification/annotation) are measured by the mean precision and recall over keywords (referred to as P and R respectively) as well as the number of keywords with nonzero recall value (denoted N + ); again, higher values of these measures imply better performances.    As in ImageCLEF (see section 5.1), we use 4 elementary kernels for each feature: linear, order two polynomial, RBF (with a scale parameter set to the average distance between data) and histogram intersection; in total, we use 60 different elementary kernels as inputs to the 3-layer DKN. We also use the same DKN architecture on COREL5k

Method
Learned context R P N+ Input. feat. wTKML [46] no yes 42 21 173 LDMKL [47] no  with a slight difference in the number of units in the hidden layers (equal to 120 instead of 80 in ImageCLEF). Again, the weights of DKN are learned using the semi-supervised learning procedure presented in [29] where the similarity between images is computed by the heat kernel (with a width set to the mean distance between neighbors). An ensemble of "one-versus-all" SVM classifiers is trained on top of DKN for each category. The average decision score from all the classifiers is taken as a final score for a given category. In order to avoid the severe imbalanced class distributions in SVM training, we adopt a sampling strategy that randomly selects a subset of negative samples whose cardinality is equal to the number of positive training samples. Hence, each classifier is learned using all the positive data and a random subset of negative data. The discrimination power of the learned DKNs+SVMs is shown in Table 4.
Initial and fine-tuned DMNs. Assuming the weights {w (l−1) p,q } of DKN known (learned), we build the initial DMN as shown in Section 3. We consider two random samplings of the subset S -from the training set with |S| = 500 and |S| = 700 -in order to build the initial DMN. We also use the learning procedure presented in Section 4 in order to fine-tune the parameter of the DMN. We consider an unlabeled set S which includes up to 4,999 samples (i.e. the whole COREL5K set); again we sample 100,000 pairs in order to minimize the criterion in Eq. (13) using gradient descent with a step-size empirically set to 10 −6 , a mini-batch size equal to 200 and a max number of iterations set to 5,000.
According to Table 4, we observe that the performances of the initial DMNs (R, P and N + ) again degrade compared to their underlying DKNs as a result of the high RE of these DMNs. This degradation in performances is also amplified by the scarceness of training data for SVM learning in COREL5k (in contrast to ImageCLEF) especially when the RE is relatively large (see Table. 5). However, the discrimination power is improved when more data are used to design these DMNs (i.e., with |S| = 700 and also |S| = 1200 in Table 6). Furthermore, fine-tuning DMNs reduces the RE as |S | increases, and makes RE stable even with a relatively large |T |, so RE (on COREL5k) behaves similarly compared to ImageCLEF. Finally, Fig. 4 shows a comparison of processing time between DMN and DKN. It is easy to see that when |T | is small, the processing times of DKN and DMN are comparable. However, when |T | reaches large values (e.g., |T | = 4999), DMN becomes an order of magnitude faster than its underlying DKN while maintaining a comparable accuracy.
Extra comparisons. We further compare the performance of DMNs against closely related kernel-based methods (namely wTKML [46] and LDMKL [47]) as well as convolutional neural networks (mainly CNN-R [48]). wTKML [46] learns explicit and transductive kernel maps using a priori knowledge taken from the semantic and geometric (statistical) dependencies between classes while LDMKL [47] combines Laplacian SVM with deep kernel networks using an "end-to-end" framework. CNN-R [48] combines deep features from Caffe-Net with word embedding features from Word2Vec; as introduced in the literature, these related methods leverage different sources of contexts and a priori knowledge while our method does not. In our experiments (see Table 6), we use four elementary kernels (linear, polynomial, RBF and HI) combined with different features as inputs to the designed DKN and DMN networks: "handcrafted features" including GIST and SIFT and "learned features" taken from ResNet [50] (pretrained on the ImageNet) which is a very deep architecture consisting of 152 layers; the 2048 dimensional features of the last pooling layer are used in our annotation task. Using all these elementary kernels and features, we first train a DKN in a supervised way according to [49], then we design and finetune its associated DMNs with |S| = 700 and |S | = 3000 (as done in Table. 4).
From the results shown in Table 6, first, we observe that the use of ResNet features as inputs to our DMN framework provides a clear gain compared to the use of handcrafted features. Second, fine-tuning DMNs brings a clear gain compared to the initial DMNs as well as ResNet. Our DKN (and its DMN variant) can even catch (and sometimes outperform) the aforementioned related work which again relies on different contextual clues, in contrast to our method. We believe that considering context will further enhance the performance of DKNs and their associated DMNs, but this is out of the main scope of this paper and will be investigated as a future work.
Finally, Fig. 5 shows examples of annotation results, on the test set, obtained using the learned DMNs and the underlying DKNs on ImageCLEF and COREL5k datasets. From these figures, DMNs behave similarly, w.r.t. DKNs, with an extra advantage of being computationally more efficient especially on COREL5k (as shown in Table 7); whereas the computational complexity of DKN evaluation scales linearly w.r.t. the number of support vectors (which is an order of magnitude larger on COREL5k w.r.t. ImageCLEF: 4,500 versus 500), the computational complexity of DMN evaluation grows slowly and remains globally stable w.r.t. the number of support vectors (which is again an order of magnitude larger on COREL5k). These results are also consistent with those already shown in Fig. 3

CONCLUSION
In this paper we introduced a novel method that transforms deep kernel networks into highly efficient deep map networks. The proposed method is greedy and proceeds layer-wise by expressing p.s.d kernels in different (input, intermediate, and output) layers of DKN as inner products involving explicit maps. These explicit maps are either exactly designed for some input kernels (including linear and polynomial) or tightly approximated for others (including intermediate and output kernels in DKN). We also introduced an unsupervised fine-tuning algorithm that benefits from large unlabeled sets in order to further enhance the generalization capacity of DMNs. Extensive experiments in image annotation, using the challenging ImageCLEF and COREL5k benchmarks, clearly demonstrate the effectiveness of DMNs and their high efficiency. Fig. 5: Examples of annotation results using DKNs and their "Fine-tuned" DMN variants on ImageCLEF (top) and COREL5k (bottom)."GT" stands for ground-truth keywords and the symbol "*" stands for the presence of a keyword in a given test image.