\input{fig/overview} 

\section{Related works}
\label{sec:related}

\paragraph{Few-Shot Classification} Several works have been proposed to address few-shot learning~\cite{vinyals2016matching,sung2018learning,Finn2017ModelAgnosticMF,Snell2017PrototypicalNF,ye2020few,liu2020universal,chen2021self,zhang2019variational,li2019few,bateni2020improved,hong2021reinforced}. Existing methods broadly fall into the following categories: model initialization based methods~\cite{Finn2017ModelAgnosticMF,finn2018probabilistic}, metric learning methods~\cite{vinyals2016matching,sung2018learning,Snell2017PrototypicalNF,triantafillou2019meta,bateni2020improved}, and hallucination based methods~\cite{gidaris2018dynamic,luo2021few, li2020adversarial}. The first aims to learn a good model initialization by learning to finetune, where classifiers for unseen classes can be quickly adapted with a small number of gradient steps. However, these approaches have been reported to fail when large domain shifts exist between base and unseen classes~\cite{chen2019closer}. 

On the other hand, metric learning methods address few-shot classification by learning to compare inputs by determining similarity during training. Here, predictions are often conditioned on distance metrics that include cosine similarity~\cite{vinyals2016matching}, euclidean distance to mean class representation~\cite{Snell2017PrototypicalNF}, and relation modules~\cite{sung2018learning}. Along this line of thought, recent approaches adopt a transfer-learning approach \cite{chen2019closer,dhillon2019baseline,gidaris2018dynamic,mangla2020charting,liu2020negative,liu2018learning,rodriguez2020embedding} where pre-training is employed with subsequent fine-tuning as a strong baseline for few-shot learning. Among these, our work falls under metric based approaches, and aims to improve transferability of features by co-adapting with a discriminative cross-attention module.   

%
\paragraph{Few-shot Learning with Attention} Generally, attention can be employed to reveal the structural layout considering local patch neighborhoods~\cite{shechtman2007matching} of an image, or highlight relevant features in set-based tasks by measuring similarities among inputs~\cite{vaswani2017attention,lee2019set,an2020few,kim2021bidirectional}. This technique has been extensively explored in literature for both 2D and 3D visual tasks~\cite{wang2018non,zoran2020towards,qiu2021geometric}. For example, CrossTransformer~\cite{Doersch2020CrossTransformersSF}, CAN~\cite{Hou2019CrossAN}, and RENet~\cite{kang2021relational} employ attention modules to project query and support features into the space of the other using spatial information. However, these methods incur several parameters over the backbone network and include additional objectives to regularize training.  

Other settings such as incremental few-shot learning also use attention to regularize unseen class features by attending to seen classes~\cite{Ren2019IncrementalFL}. FRN \cite{wertheimer2021few} formulate few-shot classification as a reconstruction problem following the work of Zhang \etal\cite{zhang2020deepemd}. In the context of multi-domain few-shot learning, Liu \etal\cite{liu2020universal} use self-attention to select appropriate representations across domain specific backbones. Also, the benefit of using the Transformer \cite{vaswani2017attention} model is further explored in FEAT \cite{ye2020few}, where self-attention is used as a set-to-set transformation to adapt support representations. Inspired by prior works, we focus on the single domain setting, and propose a hybrid set-to-prototype cross-attention strategy that re-weights support set features by all query embeddings (or vice versa) to produce co-adapted features. Concretely, our approach is conceptually inductive, but can also be considered transductive given the use of unlabelled query samples similar to prior works \cite{bateni2022enhancing,ziko2021transductive}.




