# Metaheuristics Optimization with Deep Learning Enabled Automated Image Captioning System
## 3 The Proposed Model
### Feature Extraction: HybridNet Model  
In this work, the HybridNet model is utilized for generating visual features of the input images. Generally, classification requires intra-class, in-variant features, while reconstruction requires the preservation of each dataset. In order to overcome these shortcomings, HybridNet includes the unsupervised path (\(E_{u}\) and \(D_{u}\)) and the discriminative path (\(E_{c}\) and \(D_{c}\)). These two \(E_{u}\) and \(E_{c}\) encoders take an \(x\) input image and generate \(h_{c}\) and \(h_{u}\) representations, whereas decoders \(D_{c}\) and \(D_{u}\) take \(h_{c}\) and \(h_{u}\), respectively, as an input to generate \(\hat{x}\) and \(\hat{x}\) partial reconstructions. At last, the \(C\) classifier produces a class prediction by means of a discriminative feature: \(\hat{y}=C(h_{c})\). Although both paths may have analogous architecture, they have to perform complementary and different roles. The discriminative path needs to extract \(h_{c}\) discriminative feature that must be ultimately well crafted to effectively execute a classifier task and produce a \(\hat{x}_{c}\) partial reconstruction that should not be accurate; meanwhile, retaining each dataset is not a behavior that we want to inspire [21]. As a result, the role of unsupervised paths is complementary to the discriminative path through p in \(h_{u}\) the data lost in \(h_{c}\). Consequently, it produces \(\hat{x}\) complementary reconstruction, while, integrating \(\hat{x}\) and \(x\), the last reconstruction \(\hat{x}\) is closer to \(x\). The architecture of HybridNet is formulated by using the below expression:  
\[h_{c}=E_{c}(x)\;\hat{x}_{c}=D_{c}(h_{c})\;\hat{y}=C(h_{c})\]  
\[h_{u}=E_{u}(x)\;\hat{x}_{u}=D_{u}(h_{u})\;\hat{x}=\hat{x}_{c}+\hat{x}_{u}\]  
It should be noted that the ultimate role of reconstruction is to regularize for the discriminative encoding. The major contribution and challenge of the study is to establish a method to guarantee that both paths would actually perform in such way. The two major problems that we address are the discriminative path to emphasize discriminative features and the fact that we need these two paths to contribute and cooperate to the reconstruction. In fact, with this framework, we might create two paths that work individually: a reconstruction path \(\hat{x}=\hat{x}_{u}=D(E(x))\) and a classification path \(\hat{y}=C(E(x))\) and \(\hat{x}_{c}=0\). We resolve the issue by using the encoder and decoder architecture along with a proper training and loss function. The HybridNet model has two data paths,  
Figure 1: Block diagram of MODLE-AICT approach. with one generating a class prediction and both generating partial reconstruction that needs to be integrated. In these subsections, we resolve the problem of training this structural design proficiently. It encompasses terms for stability with \(\Omega_{stability}\); classification with \(\mathcal{L}_{cls}\); last reconstruction with \(\mathcal{L}_{rec}\); and intermediate reconstruction with \(\mathcal{L}_{rec-interb,l}\) (for layer \(l\) and branch \(b\)). Moreover, it is followed by a branch complementarity training model. All the terms are weighted through a \(\lambda\) variable, respectively:  
\[\mathcal{L}=\lambda_{c}\mathcal{L}_{cls}+\lambda_{r}\mathcal{L}_{rec}+\sum_{ be\{c,n\},l}\lambda_{rb,l}\mathcal{L}_{rec-interb,l}+\lambda_{s}\Omega_{stability} \tag{1}\]  
HybridNet architecture is trained on partially labelled data comprised of unlabeled images \(\mathcal{D}_{unsup}\ =\left\{x^{(k)}\right\}_{k=1.N_{u}}\) and labelled pairs \(\mathcal{D}_{\sup}\ =\left\{\left(x^{(k)},\ y^{(k)}\right)\right\}_{k=1.N_{u}}\). All the batches are comprised of \(n\) instances, separated into unlabeled images \(n_{u}\) from \(\mathcal{D}_{unsup}\) and labelled images \(n_{s}\) from \(\mathcal{D}_{\sup}\).