# MDPN: Multilevel Distribution Propagation Network for Few-Shot Image Classification
## 3 Proposed Method
### Graph-Based Multilevel Distribution Propagation  
In this section, we will introduce the GMDP module in detail. As shown in Figure 5, the GMDP module consists of \(l\) iterations, and each iteration consists of an object graph \(G_{l}^{object}=\left(V_{l}^{object},\,E_{l}^{object}\right)\), a fist-level distribution graph \(G_{l}^{dist_{1}}=\left(V_{l}^{dist_{1}},\,E_{l}^{dist_{1}}\right)\), and a second-level distribution graph \(G_{l}^{dist_{2}}=\left(V_{l}^{dist_{2}},\,E_{l}^{dist_{2}}\right)\), and a third-level \(G_{l}^{dist_{3}}=\left(V_{l}^{dist_{3}},\,E_{l}^{dist_{3}}\right)\), the subscript \(l\) means the \(l\)-th iterations. Firstly, the object feature \(V_{l}^{object}\) was extracted from images by the backbone:  
\[v_{0,\,i}^{object}=f_{emb}(x_{i}), \tag{1}\]  
where \(f_{emb}(x_{i})\) is the backbone. As nodes in \(G_{l}^{object}\), \(V_{l}^{object}\) is used to calculate the edge feature \(E_{l}^{object}\). Second, we fuse \(E_{l}^{object}\) and \(V_{l-1}^{dist}\), which is the nodes of \(G_{l-1}^{dist_{1}}\) to get \(V_{l}^{dist_{1}}\), which are the nodes of \(G_{l}^{dist_{1}}\). \(V_{l}^{dist_{1}}\) is initialized in the order of \(G_{l}^{object}\) and used to calculate the edge feature \(E_{l}^{dist_{1}}\), which represents the distribution of \(V_{l}^{dist_{1}}\), i.e., fist-level distribution; \(E_{l}^{dist_{1}}\) is then directly sent to construct the nodes \(V_{l}^{dist_{2}}\) in \(G_{l}^{dist_{2}}\). \(V_{l}^{dist_{2}}\) is initialized in the order of \(G_{l}^{dist_{1}}\) and is used to calculate \(E_{l}^{dist_{2}}\), which represents the distribution of \(V_{l}^{dist_{2}}\), i.e., second-level distribution; Similarly, \(E_{l}^{dist_{2}}\) are directly used to construct the nodes \(V_{l}^{dist_{3}}\) in \(G_{l}^{dist_{3}}\). \(V_{l}^{dist_{3}}\) is initialized in the order of \(G_{l}^{dist_{2}}\) and used to calculate \(E_{l}^{dist_{3}}\), which represents the distribution of node \(V_{l}^{dist_{3}}\), i.e., third-level distribution. Finally, these three levels of distribution \(E_{l}^{dist_{1}}\), \(E_{l}^{dist_{2}}\), and \(E_{l}^{dist_{3}}\) will be used to update the object feature \(V_{l}^{object}\) to produce a new node \(V_{l+1}^{object}\), which are the nodes of the object graph \(G_{l+1}^{object}\). This is one complete iteration. Figure 4: Instance-segmentation-based object localization (ISOL) module. \(V_{l}^{object}\), \(E_{l}^{object}\), \(V_{l}^{dist1}\), \(E_{l}^{dist_{1}}\), \(V_{l}^{dist_{2}}\), \(E_{l}^{dist_{2}}\), \(V_{l}^{dist_{3}}\), \(E_{l}^{dist_{3}}\) are defined as follows: \(V_{l}^{object}=\{v_{l,\ i}^{object}\}\), \(E_{l}^{object}=\{e_{l,\ ij}^{object}\}\), \(V_{l}^{dist_{1}}=\{v_{l,\ i}^{dist_{1}}\}\),\(E_{l}^{dist_{1}}=\{\ e_{l,\ ij}^{dist_{1}}\}\), \(V_{l}^{dist_{2}}=\{v_{l,\ i}^{dist_{2}}\}\), \(E_{l}^{dist_{2}}=\{\ e_{l,\ ij}^{dist_{2}}\}\), \(V_{l}^{dist_{3}}=\{v_{l,\ i}^{dist_{3}}\}\), \(E_{l}^{dist_{3}}=\{e_{l,\ ij}^{dist_{3}}\}\) where \(i\), \(j=1\),..., \(T\). \(T=N\times K+\overline{T}\) denotes the total number of samples in a training episode, \(N\times K\) denotes the number of support samples and \(\overline{T}\) denotes the number of query samples. **Object Propagation. ** Each edge in the object's graph stands for the object similarity. The edge \(e_{l,\ ij}^{object}\) in the object graph represents the distribution of the object features, and \(e_{0,\ ij}^{object}\) is updated as follows:  
\[e_{0,\ ij}^{object}=\left\{ \begin{array}{ll}f_{e_{0}^{object}}\bigg{(}\left( v_{0,\ i}^{object}-v_{0,\ j}^{object}\right)^{2}\bigg{)},&l=0,\\ f_{e_{l}^{object}}\bigg{(}\left(v_{l,\ i}^{object}-v_{l,\ j}^{object}\right)^{ 2}\bigg{)}.\ e_{l-1,\ ij}^{object},&l>0,\end{array} \right. \tag{2}\]  
where \(e_{0,\ ij}^{object}\in\mathbb{R}\). \(f_{e_{0}^{object}}:\mathbb{R}^{m}\rightarrow\mathbb{R}\) is an encoding network that transforms a distribution into a metric. \(f_{e_{0}^{object}}\) is made of two Conv-BN-ReLU [33,34] blocks and a sigmoid layer. Finally, a normalization operation is conducted on \(e_{l,\ ij}^{object}\). **O2D Aggregation.