

\section{Ablation Study}
\label{sec:results}

In this section, we further validate the proposed method by analyzing the effect of omitting certain components/modules on model performance, and also investigate the challenging cross-domain generalization setting. Moreover, we provide quantitative evaluation on the benefit of the proposed attention strategy in a Prototypical baseline. 

\subsection{Improved Prototypical Baseline}
\input{tab/base}

\Table{base} summarizes the benefit of employing the proposed cross adaptation of embeddings in ProtoNet\cite{Snell2017PrototypicalNF}. We re-train the ProtoNet model with a non-parametric version of the proposed method \ie, no use of fully-connected layers $\mathbf{f}^{q}_{\theta}$, $\mathbf{f}^{k}_{\theta}$, $\mathbf{f}^{v}_{\theta}$ and $\mathbf{f}^{o}_{\theta}$. In particular, given the base representation after global average pooling, we directly apply \Eq{6} for both support-query and query-support adaptation, without ReLU or normalization layers. Results show that simply re-weighting features is beneficial, especially in the $5$-shot setting where larger gains were observed.

\subsection{Cross-Domain Few-Shot Classification}

\input{tab/cross}

In Table \ref{tab:3}, we evaluate on the challenging cross-domain setting of \textit{mini}ImageNet to CUB. Following the splits introduced by Chen \etal\cite{chen2019closer}, we trained our model on \textit{mini}ImageNet only \{base+val+test\}, and meta-test on CUB test split. We report significant improvements over related methods especially in the $1$-shot setting. Our intuition is that in the cross-domain setup, cross adaptation of features leads to better generalization by avoiding distracting features via attention.

\subsection{Effect of the Self-Attending Modules}
% \checkmark
\input{tab/effectmodules}
\input{fig/quality}
\input{fig/features}

Here, we evaluate the benefit of co-adapting features in a cross-relational way with the shared attention module $\text{MAB}_h$. \Table{effectmodules} shows the mean accuracy of decomposing our proposed method to assess the effect of omitting or including one of the components. When self-attention is employed on support samples only \ie, $\text{MAB}^{S}_h$, performance drops significantly, especially in the $1$-shot setting where results are below existing state-of-the-art baselines as opposed to a higher $5$-shot accuracy that may imply sensitivity to the number of samples for prototype generation. Interestingly, adaptation of queries ($\text{MAB}^{Q}_h$) alone shows consistent results, yet is marginally lower than the proposed method in the $5$-shot setting. 

Finally, we assess the benefit of using self-attention only similar to FEAT \cite{ye2020few}. However, our implementation applies support-support and query-query ($\text{MAB}^{*}_h$) only without any adaptation, nor do we employ regularization terms in the learning objective. Our findings suggest that self-attention alone does not improve over the baseline models such as ProtoNet (\Table{1}), and also suffers in the extreme $1$-shot setting.  

\subsection{Qualitative Results}

The effects of cross-adaptation of features via the attention scores per branch are shown in \Fig{qualityatt}. We randomly sampled a task on \textit{mini}ImageNet and varied the number of query images in the $5$-way $5$-shot setting \ie, $\{1,2,3\}$ queries with $5$ support images, respectively. For (a), the attention score of a single query will have no effect in adaptation, given its a single sample.  We observed that our method adds more weight to the most similar support samples, and lowered weights for samples with extremely varied background or color. Moreover in (b), due to the presence of multiple objects at a distance (support image w/ $0.08$), less weight was given. Interestingly, the model penalizes the query with a close-up of the \textit{wild dog}. We observed similar trends as query images increased, as in the case (c); querys with \textit{boxes} only were weighted equally, whereas the query with the dog was penalized. Given that our method does not explicity employ visual correspondence to re-weights features, this shows the viability and robustness of our method.   

In \Fig{feat}, we present a visualization of embeddings before and after adaptation. Generally, few-shot models trained episodically can not form accurate clusters of the existing classes due to limited samples in meta-training, unless explicitly enforced. We observed that after applying our strategy on base representations, features were more compact and embeddings were clustered relative to the true class. We owe this to our method adding attention pooled prototypes to the initial features, ensuring either query or support samples are more robust.   




