We define a class-imbalanced FSL task as a \(K_{min}\) -\(K_{max}\) -shot \(N\) -way \(\mathcal {I}\) -distribution task.
Similarly to the standard FSL task, a model is given a small support set, \(\mathcal {S} \sim \mathcal {D}\)  and a query set, \(\mathcal {Q} \sim \mathcal {D}\) , containing a different set of samples drawn from the same \(N\)  classes. However, in the imbalance case, the support set contains between \(K_{min}\)  to \(K_{max}\)  (inclusive) number of samples per class distributed according to the imbalance \(\mathcal {I}\) -distribution, where \(\mathcal {I} \in \lbrace linear,step,random\rbrace \)  [1]}. Similarly, the query set can contain \(M_{min}\)  to \(M_{max}\)  samples per class distributed according to the \(\mathcal {I}\) -distribution. In our experiments, we keep a balanced query set (\(M = M_{min} = M_{max}\) ) for fair evaluation.This is a standard procedure used in the class-imbalance literature [1]}, which reduces the number of variables and allows isolating the effect of imbalance. In Appendix REF , we further explore the effect of the imbalanced query set, but find that query set imbalance during meta-training has comparable performance on the imbalanced support set evaluation task. For brevity, but without loss of generality, we define imbalance \(\mathcal {I}\) -distribution in relation to the support set (see Figure REF ) as:
