Diagnosing Ensemble Few-Shot Classifiers

by   Weikai Yang, et al.

The base learners and labeled samples (shots) in an ensemble few-shot classifier greatly affect the model performance. When the performance is not satisfactory, it is usually difficult to understand the underlying causes and make improvements. To tackle this issue, we propose a visual analysis method, FSLDiagnotor. Given a set of base learners and a collection of samples with a few shots, we consider two problems: 1) finding a subset of base learners that well predict the sample collections; and 2) replacing the low-quality shots with more representative ones to adequately represent the sample collections. We formulate both problems as sparse subset selection and develop two selection algorithms to recommend appropriate learners and shots, respectively. A matrix visualization and a scatterplot are combined to explain the recommended learners and shots in context and facilitate users in adjusting them. Based on the adjustment, the algorithm updates the recommendation results for another round of improvement. Two case studies are conducted to demonstrate that FSLDiagnotor helps build a few-shot classifier efficiently and increases the accuracy by 12


page 5

page 6

page 10

page 11

page 14


Few-shot Learning with LSSVM Base Learner and Transductive Modules

The performance of meta-learning approaches for few-shot learning genera...

MxML: Mixture of Meta-Learners for Few-Shot Classification

A meta-model is trained on a distribution of similar tasks such that it ...

The Success of AdaBoost and Its Application in Portfolio Management

We develop a novel approach to explain why AdaBoost is a successful clas...

Ensemble Learning Based Classification Algorithm Recommendation

Recommending appropriate algorithms to a classification problem is one o...

ProBoost: a Boosting Method for Probabilistic Classifiers

ProBoost, a new boosting algorithm for probabilistic classifiers, is pro...

Asymptotic Normality and Variance Estimation For Supervised Ensembles

Ensemble methods based on bootstrapping have improved the predictive acc...

Ensemble Teaching for Hybrid Label Propagation

Label propagation aims to iteratively diffuse the label information from...

1 Introduction

The few-shot classification aims to train a classifier to recognize unseen classes with only a few labeled samples (shots) in each class, which is of great significance both academically and practically [11, 54]. For example, at the early stage of the COVID-19 epidemic, the massive labeling of the CT scans requires a long process of clinical observation with the risk to patients’ lives. As such, few-shot classification is a viable choice for these scenarios. Many advances have been made to continuously improve the performance of few-shot classifiers by developing a variety of methods, such as ensemble learning, generative models, and meta-learning [54]. Because the ensemble few-shot classification can combine any few-shot classifiers (base learners) for better performance, it is the most widely used state-of-the-art method in practice. For example, three of the top five best-performing models in a CVPR challenge on few-shot learning [8] and four of the top five best-performing models in a Kaggle competition on few-shot learning [24] have used ensemble few-shot classifiers to boost performance successfully.

Previous studies have shown that the performance of the ensemble model is largely affected by the diversity and cooperation among the individual base learners [11] and the representativeness of the shots [32]. Accordingly, using all learners and shots may downgrade the performance. For example, if the performance of a learner is poor and its predictions are different from the majority, it will hurt the performance of the ensemble model. In addition, a shot wrongly representing some samples usually leads to the misclassification of these samples. Thus, it is desirable to select a subset of cooperative and diverse learners and identify a small set of representative shots, which is a long-standing challenge for the practical application of few-shot classification. Existing learning methods typically apply an ensemble model to all the given learners and shots [11, 43], which often fail to achieve the best performance. Improving the performance usually requires repeatedly selecting the learners and adjusting their weights. Without a comprehensive understanding of how the model and shots work together to reach the final predictions, this trial-and-error process is very time-consuming and expertise-demanding. Moreover, lacking the refinement of the shots, the performance improvement is limited [45, 40]. To improve the performance efficiently, users need an efficient way to analyze the performance-related log data (“analyze first”). The learners and shots with unusual behavior, such as the learner causing a large confidence drop or the shot with poor coverage, can be highlighted (“show the important”). After understanding the roles of learners/shots in the final predictions, they can then decide which ones to be added/removed for improving the performance (“interaction and feedback”). Based on the updated learners (shots), suitable shots (learners) are recommended for another round of analysis (“analyze again”). Such an iterative analysis process with human-in-the-loop fits well with the visual analytics mantra [27] and inspires us to develop a visual analysis tool, FSLDiagnotor, for tuning the selection of learners and shots.

The key behind FSLDiagnotor is its ability to efficiently identify and eliminate performance bottlenecks caused by the selected base learners and shots. Given a set of learners and a collection of samples with a few shots, we consider two problems: 1) finding a subset of diverse and cooperative learners that well predict the sample collections and 2) removing low-quality shots and recommending necessary new shots to adequately represent the sample collection. By studying the intrinsic characteristics of these two problems, we formulate them as sparse subset selection and develop two selection algorithms to recommend appropriate learners and shots. However, the recommendations are not always perfect and may contain one or a few low-quality learners/shots. For example, a learner that wrongly predicts some samples with high confidence can be recommended because it is mistaken as a well-performing learner for those samples. Such low-quality learners/shots are hard to be detected and corrected without human involvement. To facilitate such tasks, a matrix visualization and a scatterplot are combined to explain the prediction behavior of the recommended learners and the coverage of the shots in context. Based on the understanding of the behavior of the learners and shots, users can improve the selection of learners and enhance the shots for better performance.

We performed a quantitative evaluation to show that both the learner and shot selection algorithms can boost the performance of the few-shot classifier. We also conducted two case studies with two machine learning experts to demonstrate that our tool helps diagnose and improve the few-shot classifier more efficiently and increases the accuracy by 12% and 21%, respectively. The demo is available at


The main contributions of this work include:

  • The formulation of sparse subset selection that unifies the shot and learner selection into one framework.

  • An enhanced matrix visualization coordinated with a scatterplot to explain how the base learners and shots contribute to the final predictions.

  • A visual analysis pipeline that tightly integrates the subset selection algorithm with interactive visualization to facilitate the iterative improvement of the shots and base learners.

2 Related Work

2.1 Few-Shot Classification

The ensemble methods have been explored in the vein of few-shot classification to boost the performance [11, 43]. Dvornik et al.[11] encouraged the diversity and cooperation between learners for better performance. In addition to training the base learners, Qi et al.[43] adaptively assigned a weight to each learner for a strong few-shot classifier. While more and more sophisticated models have been developed, there is recent work pointing out the cruciality of high-quality features: using high-quality features is even more effective than employing a well-designed complex model [51]. Following such a philosophy, Dvornik et al.[12]

learned high-quality feature extractors to extract high-quality features for unlabeled samples. Due to the importance of the diversity-cooperation strategy and the features, our work combines the two. We leveraged deep learning models, such as a pre-trained ResNet model 

[19], to extract the features for each sample. Then a set of learners were built based on the extracted features. This saves training time and provides the flexibility to quickly obtain the base learners. Our method also recommends a subset of base learners and enhances the quality of shots to further improve the performance.

2.2 Visual Analysis for Improving Model Performance

Existing visual analysis work for improving model performance can be classified into two categories: model-driven methods and data-driven methods [23, 60].

Model-driven methods facilitate experts to better understand the inner workings of a machine learning model and discover the reason why a training process fails to achieve an acceptable performance. For example, CNNVis [31]

was developed to diagnose the potential issues of a convolutional neural network (CNN) by examining the learned features and activation of neurons. Alsallakh 

et al.[4]

utilized a confusion matrix to disclose the impact of class hierarchy on the features learned at each CNN layer. Kahng 

[26] developed ACTIVIS to facilitate the identification of specific training issues on an industry-scale deep learning model by illustrating how neurons are activated by the instances of interest. Later efforts focus on diagnosing other types of models, such as deep generative models [30], Deep Q-Networks [53], and sequential models [37, 50]. In addition to improving a single model, some efforts focus on analyzing ensemble models [33, 46, 62, 39]. For example, Schneider et al.[46] developed a visual analysis tool to explore the data and model spaces of the ensemble model and improve its performance by enabling a selection of the base learners. Our method supports the improvement on both the data and model.

In the same spirit of data-centric AI [45, 40], data-driven methods aim to improve the quality of training samples at the instance and label levels. At the instance level, Chen et al.[7] developed OoDAnalyzer, a visual analysis tool to analyze the out-of-distribution samples in the context of the training and test samples. Yang et al.[57] proposed DriftVis to detect and correct the distribution changes in a data stream. Ming et al.[38] developed ProtoSteer to explain the prediction of an input sample by using exemplary samples that have similar scores to this sample. Model developers can improve the model performance by revising the exemplary samples. More recently, Gou et al.[18] proposed to generate unseen test cases to improve model robustness. At the label level, Heimerl et al.[21]

utilized active learning to facilitate the task of interactive labeling for document classification. This idea of employing active learning to support interactive labeling has also been adopted by other visual analysis work 

[2, 6, 22, 41].Most of the later research along this line has focused on detecting and correcting noisy labels in training samples. Liu et al.[32] introduced LabelInspect to improve the crowdsourced annotations by utilizing the mutual reinforcement relationships between the workers’ behavior and the uncertainty of the annotated results. Xiang et al.[56] developed a visual analysis tool to correct label errors in a large set of training samples based on user-selected trust items. More recently, Jia et al.[25] applied active learning to zero-shot classification. They interactively built a class attribute matrix for improving the performance of classifiers.

Although the aforementioned methods have shown the capability of improving the model performance to some extent, there are few efforts that tightly combine model-driven methods with data-driven methods to improve performance. The combination is particularly needed in few-shot learning since both the data and model greatly influence the performance. Thus, we develop FSLDiagnotor to improve both shots and learners.

3 Background


Fig. 1: The prediction process of the ensemble few-shot classifier: (a) each base learner extracts the features of the shots and samples; (b) label distributions of the samples () are calculated based on the similarity between the features and then averaged with weights to obtain the final label distribution .
Fig. 2: FSLDiagnotor overview. Given the base learners and samples with a few shots, the sparse subset selection module recommends base learners and shots for building the ensemble few-shot classifier. The visualization module then explains how the learners and shots affect the final predictions, which facilitates users to improve them for interactively tuning the model.

Few-shot classification aims to learn a good classifier for unseen classes with a few shots. Specifically, for the samples from these unseen classes, only the labels of shots (e.g., 1–5 shots per class) are provided. The shot set is denoted as . Here, is the label of shot

. It is represented by a one-hot vector where the value of the corresponding class index is 1, and the others are 0s. The goal is to build a model to predict the label distribution

of a sample of the unseen classes based on . The label distribution is a

-dimensional probability vector.

is the number of classes, and the value of the -th dimension indicates the probability of the sample belonging to the -th class.

Ensemble few-shot classification combines a set of base learners for achieving better performance. Fig. 1 illustrates the process of predicting the label distribution of a sample based on three given shots and two learners. For sample , each learner generates a label distribution . These label distributions are then averaged with weight to obtain the final label distribution :


is set to by default and can be adjusted in our tool. It can be seen that the prediction results of the ensemble model are determined by the base learners and shots. Thus users require a tool to help them examine the quality of base learners and shots and tune them for better performance.

4 Design of FSLDiagnotor

4.1 Requirement Analysis

We collaborated with three machine learning experts (E1, E2, E3) to design FSLDiagnotor. E1 is a postdoc researcher with an interest in data selection and few-shot learning. E2 and E3 are two Ph.D. students with a focus on few-shot learning. They are not the co-authors of this work. The following three requirements are identified based on existing literature and three 60-minute participatory design sessions with the experts.

R1: Tuning the selection of learners and their ensemble weights. Previous work has indicated that the diversity and cooperation among the base learners are very important for improving the performance of the ensemble model [11]. The experts also raised concerns regarding the current trial-and-error process for tuning the model when the accuracy is not acceptable. They usually need to repeatedly examine the log data to understand the diversity and cooperation among learners, and manually adjust their selection and ensemble weights. This is very time-consuming. To facilitate the tuning process, the experts expressed the need to quickly understand the prediction behavior of base learners on different levels, including the overall difference compared with the ensemble model and the detailed difference on different classes.

R2: Improving the quality of the shots. The representativeness of the shots is essential for few-shot classification [32]. As there are only a few labeled samples, mislabeled or confusing shots, such as the overlapped ones between two categories, decrease the model performance greatly. Removing such low-quality shots and adding necessary new ones improve the coverage of the shots and overall performance. When diagnosing an ensemble few-shot classifier, the experts need to understand the coverage of each shot and find the samples that are not well covered by the shots. In addition, the experts required a tool that can automatically recommend low-quality shots to be removed and candidate samples to be added to the shot set, so that they can only examine a small subset and then quickly decide which ones to remove/add.

R3: Being agnostic to the model architectures of learners. Existing methods for ensemble few-shot classification build the base learners based on a given model architecture [11, 43]. This is not flexible as a fixed model architecture cannot satisfy the performance requirements of different applications. Thus, the experts need the flexibility to choose an appropriate architecture for a given task. To directly employ different model architectures, such as a pre-trained ResNet model [19] or a newly developed few-shot learning model, the ensemble model should be agnostic to the model architectures that are used to build the base learners.

4.2 System Overview

Motivated by the requirements, we have developed FSLDiagnotor to interactively select high-quality base learners and shots. As shown in Fig. 2, it consists of two modules: sparse subset selection and visualization. Given a set of base learners, shots, and unlabeled samples, the sparse subset selection module automatically recommends a subset of learners and a few shots. With these recommendations, an ensemble few-shot classifier is built. Next, the matrix visualization in the visualization module illustrates the performance of the learners and helps adjust their ensemble weights adaptively to improve the performance (R1). Users can also examine the coverage of the shots in the scatterplot and replace the low-quality shots with the high-quality ones (R2). The two modules work together to support an iterative tuning process until the desired performance is achieved. During the process, users can directly adjust the selection of the base learners without considering their model architectures (R3

). This is achieved by building them directly on the features extracted by these models. As such, the ensemble model focuses only on feature-level integration.

With this characteristic, users can directly use pre-trained models and newly developed few-shot models to extract features. This saves the training time and facilitates building the ensemble model flexibly.

5 Sparse Subset Selection

To build a high-quality few-shot classifier, FSLDiagnotor supports two tasks: 1) selecting a subset of diverse and cooperative base learners; 2) enhancing the representativeness of shots by replacing the low-quality ones with the high-quality ones. Because both tasks aim to find a small representative subset from a large data collection, we formulate them as distance-based sparse subset selection [14]. In this section, we first give an overview of the subset selection algorithm, then present how it can be extended to base learner selection and shot enhancement with task-related distances, and finally give the time complexity analysis. The quantitative result is shown in Sec. 7.1.

5.1 Algorithm Overview

Fig. 3 illustrates the basic idea of the algorithm. Given two sets and ( and can be identical or different), the sparse subset selection algorithm aims to find a subset of that can well represent set . This is achieved by minimizing the following function that balances the representation quality and the size of the subset:


The first term is the cost of representing with (representation cost), and the second term is the sparsity term to penalize a large subset. In the first term,

is a binary variable indicating whether

is represented by , is the distance between and , and the constraint guarantees that is represented by only an element in . In the second term, if is selected in the subset, and is the size of the subset. controls the trade-off between the two terms.

The proposed formulation is NP-hard [47]. To solve it efficiently, we relax the discrete 0-1 integer to and convert the sparse subset selection into a continuous optimization problem. As in Elhamifar et al.[14], we adopt the alternating direction method of multipliers framework to optimize Eq. (2).

(a) Input(b) Selection result

Fig. 3: An example of sparse subset selection.

5.2 Base Learner Selection

Base learner selection aims to find a small subset of diverse and cooperative base learners to better predict the input samples (fitness). Here, refers to the set of base learners , and is the set of samples . As sparse subset selection encourages diversity among the selected learners, we then extend it by considering fitness and cooperation. Accordingly, Eq. (2) is rewritten as:


where the first term is the representation cost, the second term is the sparsity term that prefers the learners with higher fitness, and the third term is the cooperation term. and control the trade-off among the three terms. Following Elhamifar et al.[14], , is the maximum distance between learners.

In the first term, to calculate the representation cost, we need to define the distance between a base learner and a sample. A straightforward way is based on the prediction accuracy. However, we cannot evaluate the accuracy without ground-truth labels. Instead, we use the prediction confidence to measure the distance because samples with high prediction confidence tend to be classified correctly [64]. The prediction confidence of learner on is defined as the difference between the largest and the second-largest probabilities in the predicted label distribution , which is denoted as . The distance between the learner and the sample is then defined by because we prefer the base learners with larger confidence .

In the second term, to encourage the selection of base learners with higher fitness, we emphasize the ones that better predict the given shots. A widely used measure, likelihood, is employed to estimate the fitness value. Accordingly, we add

for each learner , which is defined as its negative log-likelihood on the shots.

In the third term, to encourage the cooperation between two learners, and , we penalize the difference between their predictions. Let and be the label distribution of sample predicted by and , respectively. Following the previous work of Dvornik et al.[11], the prediction difference is measured by the symmetric KL-divergence between their predictions: . is if the two learners make the same predictions.

(a) Learner view(b) Sample view

Fig. 4: FSLDiagnotor: (a) learner view compares base learners (rows) with the ensemble model, including the overall difference (circles in the first column) and detailed difference (stacked bars in the other columns); (b) sample view visualizes the shots and unlabeled samples in context. The image content and label distributions of the samples of interest are displayed below.

5.3 Shot Selection

Shot selection aims to find a very small set of shots that better represents all the samples. Here, both and refer to the sample set . Rather than treating the samples equally in the sparsity term of Eq. (2), we tend to select the low-confidence samples with higher representativeness since selecting them as shots can help the model distinguish more low-confidence samples [58]. Moreover, we try to preserve the given shots to reduce the analysis burden and labeling efforts. Accordingly, Eq. (2) is rewritten as:


where the first term is the representation cost of the shots, and the second term is the sparsity term with preference on the previous shots. controls the number of recommended shots. If we want to recommend shots, we then set , where is the maximum distance between samples.

In the first term, the distance between samples and is calculated by averaging the cosine distances between their features extracted by the selected base learners.

In the second term, to encourage the selection of the low-confidence samples and given shots, we add a confidence coefficient and a stability coefficient for . The confidence coefficient favors the selection of low-confidence samples with higher representativeness. Accordingly, is set to its average prediction confidence of the selected learners. A sample with lower confidence results in a lower penalty in the sparsity term and then tends to be selected. The stability coefficient aims to preserve the given high-quality shots. Accordingly, is set to if is a given shot. Otherwise, is set to .

5.4 Time Complexity Analysis

The time complexity of sparse subset selection is  [14]. As the number of learners is not large, the running time of the learner selection is usually acceptable. However, the number of samples is relatively large, and thus, the shot selection algorithm is rather slow in computation. For example, it takes around 7 seconds to recommend shots from 1,000 samples. To tackle this issue, we first randomly sample a subset of samples and then recommend learners and shots based on the subset. The effectiveness of this sampling strategy is evaluated in Sec. 7.1.3.

6 FSLDiagnotor Visualization

Although the sparse subset selection algorithm recommends a set of base learners and a few high-quality shots, the automatic recommendation results are not always perfect. For example, using likelihood to measure the quality of base learners is sometimes not accurate since the number of shots is very limited. In addition, an ambiguous shot wrongly representing some samples usually leads to more misclassification and thus the low representativeness of the shots. To better explain the recommendation results and facilitate the interactive tuning of the recommended learners and shots, we design a visualization-based explanatory environment. It consists of two components: 1) a learner view (Fig. 4(a)) to compare each base learner with the ensemble model in terms of prediction behavior (R1); and 2) a sample view (Fig. 4(b)) to present the shots and unlabeled samples in context (R2). The two coordinated views enable users to easily adjust the shots and the learners without considering the architectures of the learners (R3).

6.1 Learner View

Due to the familiarity of users with the matrix visualization and its intuitiveness [10], we employ it to compare a base learner with the ensemble model and different learners (Fig. 4(a)). Users can tune the selection of learners or adjust their ensemble weights based on the comparative analysis.

(a) Matrix with zoomable cells(b) Encoding

Fig. 5: The alternative design of the learner view. Both rows and columns represent base learners. A darker cell indicates a larger prediction difference between the two learners.

Visual design. Our first design focuses on the pairwise comparison between base learners, including the agreements and differences between the predictions of two learners. We design a matrix with zoomable cells (Fig. 5(a)) to present the pairwise comparison results where rows and columns represent learners. A sequential color scheme from white to black is used to encode the total number of samples that are predicted differently by the two learners. Users can click on a cell of interest and zoom into it for the details of prediction behavior, which is depicted by a coxcomb chart. In this chart, each sector represents a class that samples are predicted to be of. A sector consists of three clockwise sub-sectors in the same hue (Fig. 5(b)), which represents the samples predicted to be of the same class by learner only, by both learners and , and by learner only, respectively, where is represented by the row, and is represented by the column. The total number of samples that are predicted to be of this class is encoded by the radius of the sector. The experts agree that the comparison between two learners is helpful. They like the design of three sub-sectors that illustrate the agreement and difference between two learners. However, they are more interested in comparing a base learner with the ensemble model instead of comparing two learners (issue 1). The pairwise comparison fails to explain the role of a base learner in the ensemble predictions. Another concern is that this design does not support the comparison across different base learners on a specific class (issue 2), which is important for diagnosis.

To tackle these issues, we augment the matrix visualization to emphasize the comparison between the base learners and the ensemble model (issue 1) and enable class-level comparison (issue 2). In the matrix visualization (Fig. 6(a)), each row represents a base learner. The first column encodes the number of samples predicted differently between a base learner and the ensemble model (issue 1) with a sequential color scheme. The darker the cell is, the larger the difference is. The remaining columns present the comparison between a base learner and the ensemble model (issue 1) in terms of each class (issue 2). Instead of using the coxcomb chart in the first design, we employ a common visual metaphor, the stacked bar, to represent the agreement and difference between the predictions. As shown in Fig. 6(b), the length of the stacked bar encodes the total number of the samples predicted to be of a certain class by the base learner and/or the ensemble model. The hue of the stacked bar encodes the class. As the experts are more familiar with the stacked bars, they can quickly identify the differences between each learner and the ensemble model under different classes. Fig. 6A is an example where base learner “BL-” mostly agrees with the predictions made by the ensemble model on class “.” However, there are many samples that are only recognized by “BL-.” As a result, the first bar is much longer than the third bar. This indicates that “BL-over-predicts on class “.” Similarly, we find that “BL-under-predicts on class “” (Fig. 6B).

(a) Matrix with zoomable cells(b) EncodingAB

Fig. 6: The design of the learner view. Rows represent base learners, columns represent classes, and cells disclose the agreements and differences between the predictions of the base learners and ensemble model.

The experts give positive feedback to the new design during our interviews. Later, two experts express the need to investigate the prediction confidence of the samples. After a thorough discussion, we use a histogram to convey the number of samples that are predicted by the learner/ensemble model with four different confidence bins (Fig. 6(b)). However, if one bar is not shown in a confidence bin due to the zero value, it is inconvenient for users to identify which one is not displayed (Fig. 7(a)). A straightforward solution is to preserve a minimum height for each bar (Fig. 7(b)). However, such a thin bar (Fig. 7B) is difficult to be distinguished from other bars with very small values (Fig. 7A). Another option is to place the thin bar on the -axis to avoid such misunderstanding (Fig. 7(c)). After using it, the experts point out that it may be misunderstood as a negative value (Fig. 7C). To tackle this issue, we add a default thin darker bar for each item on the -axis (Fig. 7(d)).

(a) Initial design(b) Add thin bars for zero values(c) Move thin bars to -axis(d) Add darker thin barsABC

Fig. 7: Four designs for comparing the prediction confidence of samples: (a)-(c) alternative designs; (d) our design.

Visualization scalability. Although the matrix visualization helps users efficiently examine the predictions of learners, it suffers the scalability issue when the number of learners/classes increases. To tackle this, we cluster similar learners (or classes) using agglomerative clustering [49]. The key of the clustering method is to calculate the distance between learners (or classes). The distance between learners is measured by the symmetric KL-divergence of their predictions. The distance between classes is calculated as the Euclidean distance in the feature space. Since each class can be characterized by its shots, one common way to represent the class is by averaging the shot features (shot-based feature). However, it can be inaccurate due to the scarcity of shots. To compensate for this, we consider the word embedding of the class label (label-based feature), which is extracted by GloVe [42], a widely used word embedding model. We then obtain a more robust feature representation by concatenating the shot- and label-based features. Several interactions are provided to explore the clusters. For example, users can expand a cluster by double-clicking the associated rectangle and adjust the clustering result by dragging-and-dropping the rectangles. The clusters of less interest can be hidden to minimize distraction by clicking .

6.2 Sample View


Fig. 8: The coverage of two shots: (a) a high-quality shot with many similar samples; (b) a low-quality shot with few similar samples.

Visual design. The sample view (Fig. 4(b)) enables users to examine the shots in the context of samples and tune their selection. For each sample, we first concatenate the features extracted by the base learners. Next, to achieve better class separation [34], we employ t-SNE to project the samples onto 2D space and utilize a scatterplot to visualize the projections. In the scatterplot, stars and circles are used to represent shots and unlabeled samples, respectively. Samples are colored according to their classes, and those with a confidence less than are colored gray. For each shot, we utilize a clutter-aware label-layout algorithm [36] to place the image content close to the shot and reduce the overlap with other scatter points. When users select the samples of interest, the image content and label distributions are displayed at the bottom of the view (Fig. 4(b)). The label distributions are represented by colored bars, where the color encodes the class, and the length encodes the prediction probability. Users can click the checkbox on the right side to add it as a shot or remove it from the shot set.

The sample view also illustrates the influence of the base learners and shots in the ensemble model. The influence of a learner is measured by the prediction confidence change of the ensemble model with/without the learner. If the confidence of a sample increases by or more after adding the selected learner, the sample will be automatically marked with an upward arrow . If the confidence decreases by or more, the sample will be marked with a downward arrow . We also use a gray density map as a guidance to highlight the regions where a larger increase/drop in confidence happens (Fig. 9B). Such regions indicate the conflicted predictions between the selected learner and ensemble model and need to be further checked. The influence of a shot is characterized by its coverage, which contains its associated unlabeled samples with high similarity. The associated unlabeled samples with higher similarity are encoded by darker class colors. Fig. 8 shows the coverage of two shots. The first one is a high-quality shot of digit “1” since it influences a large number of neighboring samples that are correctly predicted with high confidence (Fig. 8(a)). In contrast, the second one is a low-quality shot of digit “3” because it only covers a few samples predicted with low confidence (Fig. 8(b)).

Visualization scalability. The scatterplot inevitably suffers from the scalability issue when the number of samples grows [35]. To address this issue, we build a hierarchy by utilizing the random sampling strategy in a bottom-up manner [56]. Random sampling is employed because it can well preserve the overall data distribution [61]. When navigating the hierarchy, the sampled data at the current level are visualized using scatter points, and the others using a density map.

6.3 Incremental Improvement of Learners/Shots

Fig. 9: “BL-tiered6” causes a confidence drop in B, and C shows some samples in B are only predicted to be of “1” by “BL-tiered6.”

To facilitate the diagnosis of the ensemble few-shot classifier, FSLDiagnotor provides a few interactions to assist in 1) improving the selection of base learners; 2) adjusting the ensemble weights of base learners; 3) enhancing the quality of shots; 4) mutually improving the learners and shots if either of them is adjusted. Here, recommendation-related interactions (e.g., recommend shots) and the weight adjustment are examples of semantic interactions [15], which enable smooth communication between the user and the analytical model without direct manipulation of the model.

Improving the selection of base learners. FSLDiagnotor allows to remove low-quality learners and add high-quality ones. To decide which one is of low/high quality, we allow users to 1) explore the influence of the learners on the ensemble model to identify the key samples that are predicted differently by them; and then 2) examine the prediction difference between the learners and the ensemble model on these samples. For example, Fig. 9 shows that there is a larger difference between “BL-tiered6” and the ensemble model (Fig. 9A). Users can click “BL-tiered6” to examine its influence and find that it causes a large confidence drop in a region (Fig. 9B). After selecting samples in this region using the lasso, these samples are highlighted on the associated bars with a solid filling style . From these bars, it can be seen that some samples are only predicted to be of “1” by “BL-tiered6” (Fig. 9C). By clicking the associated bar (Fig. 9C), these samples are highlighted in the sample view for further examination. If the selected learner makes many wrong predictions on these samples, users can remove it.

Adjusting the ensemble weights of base learners. The ensemble weight is important for the model performance. Although automatic weight adjustment is an efficient way to achieve this, it requires some extra validation samples with labels [63]. Since these validation samples are not available in few-shot applications, FSLDiagnotor supports a semi-automatic adjustment of the ensemble weight of a learner to emphasize/de-emphasize it. For example, after examining a set of selected samples () that are predicted differently by the selected learner and the ensemble model, users can click to increase its weight if its predictions are mostly correct, or click to decrease its weight otherwise. Since the exact weight is hard to decide, our tool automatically calculates the weight based on the prediction behavior of this learner and the ensemble model. Specifically, , the final prediction of the ensemble model should be consistent with , i.e., 1) the prediction of the learner if users increase its weight or 2) the prediction of the ensemble model without the learner if users decrease its weight. Moreover, , where is the set of unselected samples, the final prediction should be as same as possible to the previous prediction . Based on the two considerations, the weight is decided by maximizing:


The first term and the second term measure the prediction consistency on and , respectively. is the indicator function. It equals 1 if the prediction is consistent, and 0 otherwise.

Steering the selection of shots to enhance the quality. FSLDiagnotor allows users to interactively enhance the quality of shots by removing the low-quality ones and adding necessary new ones in a steerable way. For example, users can identify the regions lacking shots and then label some of them. As shown in Fig. 10B, digits “0” (blue) are mostly misclassified to be of “8” (pink) since there are no shots of digit “0” in this region. To improve the shot coverage in this region, users can manually add a few shots of “0” or click “Recommend Shot” to ask the tool to automatically recommend the candidate shots. In addition, if one class is predicted with low confidence, users can examine the associated samples to figure out the potential reason. Accordingly, users can click the bars in the matrix cell to examine the associated samples in the sample view.

Mutually tuning the learners and shots. In ensemble few-shot classification, learners and shots work together for the final predictions. Generally, the change of learners influences the coverage of shots and vice versa. Thus, if the learner set or the ensemble weights are changed, the shots should also be updated to adapt to the corresponding change. To this end, users click “Recommend Shot.” Then the shot selection algorithm is used to automatically recommend the shots. On the other hand, if the shots are changed, users can click “Recommend Learner” to obtain a better combination of learners by the learner selection algorithm. Such a process of mutual refinement saves users’ time and efforts.

7 Evaluation

We conducted three experiments to evaluate the effectiveness of our subset selection algorithm. We also demonstrated the usability of FSLDiagnotor through two case studies. In the evaluation, we used the datasets with ground-truth labels to simulate the labeling process of users and calculate the accuracy.

7.1 Quantitative Evaluation on Subset Selection

7.1.1 Datasets and Setups

Datasets. We evaluated the learner and shot selection algorithms with four widely used datasets: mini-ImageNet [52], tiered-ImageNet [44]



, and CIFAR-FS 

[3]. Mini

-ImageNet consists of 80 seen classes and 20 unseen classes, each of which contains 600 images.


-ImageNet contains 779,165 images of 608 classes (448 seen and 160 unseen classes). The seen classes of these two datasets were used for training base learners, while the unseen classes were used to evaluate the performance of the model.

MNIST has 20,000 images of 10 unseen classes, and the images are augmented by inverting color. CIFAR-FS has 12,000 images of 20 unseen classes.

Base learners. We used 24 base learners in the ensemble model. Sixteen of them are trained from scratch using ResNet-12 backbone [19], where 8 of them are trained on different subsets of the seen classes of the mini-ImageNet dataset, and the other 8 are trained on those of the tiered-ImageNet dataset. The remaining 8 base learners are pre-trained on external datasets, e.g., natural images in ImageNet [9], handwritten characters in Omniglot [28]. We directly used the model parameters taken from publicly available implementations provided by Dvornik et al.[12].

Evaluation criteria. We evaluated the performance in terms of classification accuracy, which is averaged over 100 trials.

7.1.2 Effectiveness Evaluation of Sparse Subset Selection

In this experiment, we evaluated whether the learner and shot selection algorithms can boost the few-shot classification accuracy on four datasets. Due to the limited number of shots, the randomness of few-shot classification is relatively high. To reduce the effect of such randomness, more trials are needed [51]. To perform the evaluation efficiently, we used less samples for each class by following the common practice in few-shot learning [5]. In particular, for mini-ImageNet and tiered-ImageNet, each task is a 5-class classification containing 5 randomly selected unseen classes, and each class contains 5 shots. For MNIST and CIFAR-FS, we used all the unseen classes (10 and 20, respectively) in the tasks. To simulate real-world applications, we do not guarantee that each class has the same number of shots. Instead, we randomly select 30 and 60 samples as shots (each class has 3 shots on average) from these two datasets, respectively. Each class of the four datasets contains 15 unlabeled samples. The baseline is obtained by using all the base learners and initial random shots in the ensemble model. Our method employs both the recommended base learners and recommended shots. For a fair comparison, the number of the recommended shots is set to be the same as that of the initial shots. The average number of the recommended learners over 100 trials is shown in Table I. We compared our method, two ablations that only use either recommended learners (Rec. Learners) or shots (Rec. Shots), the state-of-the-art method, TIM [5], and the baseline.

Model mini tiered MNIST CIFAR-FS
Baseline 0.873 0.849 0.476 0.447
TIM [5] 0.874 0.898 - -
Rec. Shots 0.877 0.862 0.611 0.517
Rec. Learners 0.880 (3.9) 0.868 (3.6) 0.481 (4.3) 0.480 (5.2)
Our method 0.896 (3.9) 0.908 (3.6) 0.615 (4.3) 0.541 (5.2)
TABLE I: Classification accuracy on four datasets. The average numbers of recommended learners are given in parentheses.

As shown in Table I, using either recommended learners or shots alone can boost the performance on all datasets, and combining them together can further improve the performance. By comparing the recommended learners/shots with the initial ones, we found that the low-quality learners/shots, such as a learner that has poor performance and predicts differently from the majority, were removed. Some high-quality learners/shots, such as a shot that well represents the unlabeled samples but does not appear in initial shots, were added. This is the main reason why the developed subset selection algorithms can boost the performance.

7.1.3 Balance between Effectiveness and Efficiency

SR 1% 2% 3% 4% 5% 6% 7% 10% 100%
mini 0.838 0.865 0.874 0.882 0.886 0.889 0.891 0.891 0.893
tiered 0.851 0.875 0.887 0.895 0.899 0.901 0.901 0.902 0.907
MNIST 0.591 0.592 0.597 0.601 0.598 0.599 0.603 0.602 0.609
CIFAR-FS 0.526 0.531 0.542 0.548 0.550 0.551 0.547 0.554 0.554
TABLE II: The accuracy using different sampling ratios (SR).

In our implementation, the random sampling strategy is employed to reduce the time cost for tasks with tens of thousands of samples or more. Here, we conducted this experiment to 1) investigate whether this sampling strategy can reduce the time cost while achieving comparable performance to that of running the algorithm on all the samples, and 2) determine the smallest sampling ratio needed to meet this requirement. We adopted different sampling ratios (1%, 2%, 3%, 4%, 5%, 6%, 7%, 10%, 100%) for recommending learners/shots, and calculated the accuracy on all the samples except shots.

Table II shows that the accuracy increases with the number of samples when the sampling ratio is lower than . However, when the sampling ratio is greater than , the pace of the increase begins to slow down. Based on this observation, we drew the conclusion that using a small subset of samples can achieve comparable accuracy to that of using the full samples. Furthermore, the sampling ratio of 5% is a good balance between efficiency and accuracy.

7.1.4 Analysis on Diversity and Cooperation

The goal of this experiment is to evaluate the diversity and cooperation between learners. We use the Jaccard Index to measure the diversity between learners, which is widely used to measure the difference between two sets 

[13]. Let and be the set of high-confidence samples () predicted by two learners and , respectively. The diversity is defined as . A smaller value indicates that the two learners are more diverse. We use the symmetric KL-divergence to measure the cooperation between learners, which is introduced in Sec. 5.2. A smaller value indicates that the two learners are more cooperative. The diversity/cooperation of a set of learners is defined as the average of all pairwise diversity/cooperation between two learners. Table III shows that on all the datasets, our method recommends a set of more diverse and cooperative learners.

Diversity Cooperation
All Rec. Diff All Rec. Diff
mini 0.124 0.063 49.2% 0.959 0.204 78.7%
tiered 0.138 0.082 40.6% 0.942 0.336 64.3%
MNIST 0.449 0.208 53.7% 1.045 0.531 49.2%
CIFAR-FS 0.321 0.264 17.8% 2.311 0.961 58.4%
TABLE III: Comparison of the diversity and cooperation between all learners and recommended learners. The smaller values indicate that the recommended learners are more diverse and cooperative.

7.2 Case Studies

In the case studies, we used the same 24 base learners employed in the quantitative evaluation. To demonstrate the generalization of our approach to new tasks, we used the MNIST and CIFAR-FS datasets because there are no base learners pre-trained on them. Based on the experiment results in Sec. 7.1, we select a trial with higher accuracy for each dataset. The experts started from the setting of recommending learners because it does not need any human involvement. When performing the case studies, we followed the pair analytics protocol [1], where the expert guided the exploration, and we interacted with the tool. This protocol helps the experts focus more on the analysis of the model.

7.2.1 MNIST Dataset

In this case study, we collaborated with expert E1 to understand and diagnose a model built on the MNIST Dataset [29]. She is interested in knowing how FSLDiagnotor supports the selection of base learners and the enhancement of the shots, thus improving the accuracy of the model. The experiment in Sec. 7.1.3 indicates that a sampling ratio of 5% can better balance performance and efficiency. Thus, E1 sampled samples.

Overview. E1 first observed that four base learners were recommended by FSLDiagnotor (Fig. 4(a)). She then examined the selected base learners and noticed that “BL-tiered6” made many different predictions from the ensemble model (Fig. 4A). This needed further investigation to figure out the reason. In the sample view, she observed that the samples were separated into two groups, with the upper ones being samples of black digits with a white background (e.g., Fig. 4C, D), and the lower ones being samples of white digits with a black background (e.g., Fig. 4E, F). Most of the regions were covered by the given shots well (e.g., Fig. 4C, E). However, there were a few regions not covered by the shots (Fig. 4D, F), where some samples (in gray) were predicted with low confidence. Using the 4 recommended base learners (R1), the accuracy was 0.513. The accuracy was calculated offline before and after the corresponding operations to verify the effectiveness of the improvement with our tool.

Learner-based improvement. E1 started the analysis from the base learners. E1 first examined the selected base learners for potential improvement. Since “BL-tiered6” made more different predictions from the ensemble model, she clicked on this learner to examine on which samples it made different predictions. These samples were highlighted in the sample view. Three gray density area also appeared in the sample view, indicating a larger drop in prediction confidence (Fig. 10A, B, C). She decided to examine these three regions one by one.

Fig. 10: Analyzing “BL-tiered6.” With it in the ensemble model, three regions (A, B, C) have a larger drop in prediction confidence.

E1 began the analysis with region A, where most samples were black digits “3” and “5.” She noticed that the ensemble model misclassified most samples of “3” to be of “5” or “8,” and some samples of “5” to be of “8.” Checking the shots near this region, she found that there was no shot of digit “3” and only one shot of digit “5.” She decided to add more shots by selecting the samples in this region and clicking “Recommend shot.” Samples of “3” and “5” were recommended, which met her expectation. She added one shot for “3” and one shot for “5” (R2). Then E1 switched to region B. To her surprise, the region contained the samples of black digit “0,” but both the learners and the ensemble model misclassified them to be of “8” (Fig. 10D). The reason was that there were no shots of black digit “0” (Fig. 11(a)), so the nearest shots of a black digit “8” influenced the predictions of these samples. These misclassifications can be corrected by adding more shots of black digit “0.” Since the samples of “0” in this region looked quite similar, she directly labeled one of them as a shot (R2). E1 further examined region C, where most samples were white digits “4.” The learner view showed that most of the base learners, as well as the ensemble model, made the correct predictions (Fig. 10F). However, “BL-tiered6” misclassified some of them to be of “1” (Fig. 10E). She noticed that “BL-tiered6” over-predicts on “1” compared with other base learners (Fig. 4B). She clicked the bar and found that many samples of white digits “7” were also predicted to be of “1” by “BL-tiered6.” She then concluded that “BL-tiered6” was confused about how to classify the white digits “1,” “4,” and “7,” which caused the drop in the prediction confidence (Fig. 10C). Due to the poor performance of “BL-tiered6” in region C, she decided to remove it (R1). After these adjustments, the model was updated. The accuracy was improved from 0.513 to 0.582. E1 was satisfied that 1) the added shots well covered those two regions (Fig. 10A’, B’); 2) removing “BL-tiered6” increased the confidence of the samples in region C from 0.453 to 0.525.

(a) Given shots(b) Add new shots(c) Enhance the given shots(d) Recommend shots in round 1(e) Recommend shots in round 2

Fig. 11: Enhancing the quality of the given shots (a) by going through steps (b)-(e). The samples with green borders are recommended to be removed.
Fig. 12: “BL-tiered2” lowers the prediction confidence in region B. These samples are of “6” but mis-predicted to be of “8” by the ensemble model. In contrast, “BL-tiered2” and “BL-omniglot” make more correct predictions on them.

Shot-based improvement. To adapt to the change of the base learners, she used our tool to automatically detect low-quality shots and recommend high-quality ones. Inspired by the query strategy in active learning [48], E1 decided to add a few shots (3-5 shots) in each recommendation. The recommended shots to be added/removed were displayed at the bottom of the sample view. She found two low-quality shots with poor coverage (e.g., Fig. 8(b)) were detected and removed them (the samples in Fig. 11(c) with a green border) by clicking the checkbox. For the shots to be added, E1 found that a white digit “8” and two white digits “9” were recommended, which did not appear in the given shots (Fig. 11(a)). To supplement the shot set that does not contain any white “8” and “9,” she selected one from each class, respectively (samples in Fig. 11(c) without border). E1 updated the model with the new shot set, increasing the accuracy from 0.582 to 0.622. E1 repeated the recommendation operation again and selected five more shots (Fig. 11(d)), the accuracy was improved to 0.664.

Mutually tuning between the base learners and shots. To further improve the performance, she switched back to the learner view to see if there were any changes after updating the shots. After examining the three selected learners one by one, she found that “BL-tiered2” (Fig. 12A) lowered the prediction confidence of some samples in a small cluster. This cluster contained some samples with black digits “6” (Fig. 12B). While “BL-tiered2” and “BL-omniglot” classified them correctly (Fig. 12C), the ensemble model misclassified some of them to be of “8” (Fig. 12D). The distribution of confidence showed that these two learners were more confident than the ensemble model (Fig. 12F, G). As “BL-tiered2” was already selected in the ensemble model, E1 clicked to increase the weight of “BL-tiered2.” She also added “BL-omniglot” to the ensemble model. She commented that Omniglot [28] was a dataset containing different handwritten characters and was similar to MNIST. She considered that a learner trained on this dataset would be beneficial to the current task. In addition, it increased the diversity among the learners as its predictions differed much from the ensemble model (Fig. 12E). After increasing the weight of “BL-tiered2” and adding “BL-omniglot” into the ensemble model (R1), the accuracy was improved from 0.664 to 0.680. E1 then added three more shots (Fig. 11(e)) to adapt to the learner change (R2), and the accuracy increased to 0.707.

Summary. E1 removed 2 low-quality shots and added 13 shots in total. The final accuracy was 0.707. To achieve comparable performance, the random selection strategy requires 68 more shots and the automatic shot selection algorithm requires 28 more shots. E1 was satisfied with the ability of FSLDiagnotor in helping her identify misclassified regions and verify the recommended learners and shots for such a simple classification task.

7.2.2 CIFAR-FS Dataset

Fig. 13: The initial class clusters and their prediction confidence.

This case study demonstrates the capability of our tool in boosting performance on a natural image dataset, CIFAR-FS [3]. In this case study, we collaborated with E2. As the task involved more classes and contained only 12,000 samples, E2 increased the sampling ratio to and obtained samples.

Overview. To improve readability, 20 classes were grouped into 10 clusters. Most clusters looked reasonable. For example, “baby,” “man,” “woman” were in the same cluster, and “bicycle” and “truck” were in another (Fig. 13). However, E2 found that “plain,” “bed,” “table,” “phone” formed a cluster while “wardrobe” formed another one. The sample view (Fig. 14(a)) showed that “bed” (Fig. 14A), “table” (Fig. 14A), and “wardrobe” (Fig. 14B) were closed to each other, and “plain” (Fig. 14C) was away from them. So he dragged “wardrobe” into the cluster and moved “plain” out as another cluster. Seven base learners were recommended, including five ones trained on tiered-ImageNet and two ones trained on mini-ImageNet. With the recommended learners, the accuracy of the ensemble was 0.497.

Diagnosing the clusters with poor performance. He first examined the cluster with the lowest confidence (0.172), which only contained the class “fox” (Fig. 13). Twelve samples were predicted to be of “fox.” However, some of them were images with leopards (Fig. 14B2, B3). In this class, there was only one shot (Fig. 14B1). Both the learners and ensemble model have low confidence on the predictions. E2 commented that one shot was insufficient to distinguish “fox” from “leopard.” So he added 4 shots for “fox” and 2 shots for “leopard” (R2) and then updated the model. The confidence increased to 0.288, and the accuracy reached 0.503.


Fig. 14:

Analysis of the CIFAR-FS dataset: (a) the sample view; (b) lack of shots for “fox;” (c) an outlier shot of “snail;” (d) poor diversity of the shots of “snail;” (e) the prediction behavior of two learners for “snail.”

Next, he moved to cluster “snail&worm” with a lower confidence of 0.257. After zooming in the cluster, he found that the confidence of “snail” was only 0.228, and many samples of “pepper” (Fig. 14C2, C3) were predicted to be of “snail.” E2 examined the sample view and found a shot of “snail” that contained a red object (Fig. 14C1). He speculated that this shot disturbed the classification. After removing it (R2), the confidence reached 0.294. Then he examined the learner view and noticed the shorter length of the stacked bar charts for “snail” (Fig. 14(e)). This indicated that only a few samples were predicted to be of “snail.” To figure out why, he examined the base learners and found that “BL-tiered5” over-predicted on “snail.” The over-predicted samples were snails on non-green backgrounds (Fig. 14D2, D3) instead of the green background in the shots (Fig. 14D1). He labeled three such samples to augment the diversity of the shots of “snail” (R2). Moreover, he found that some samples of “snail” and “worm” were mixed and hard to be classified (Fig. 14D). He used FSLDiagnotor to recommend two more shots for each of these two classes and updated the model (R2). The confidence increased to 0.378, and the accuracy was 0.530.

He continued to diagnose cluster “baby&man&woman” (confidence: 0.314) in a similar way, and the accuracy reached 0.541 after labeling 2 shots for “man” and 2 shots for “woman” (R2). After removing the outlier shots in the largest cluster “bed&table&phone&wardrobe” and adding six shots for “bed” and “table” (R2), the accuracy reached 0.561.

Improving base learners and shots. The aforementioned diagnosis added/removed some shots. To adapt to these changes, E2 used FSLDiagnotor to recommend the learners and removed “BL-mini7” and “BL-tiered5” (R1). The accuracy remained to be 0.561. To adapt to the change of the base learners, 14 more shots were also recommended (R2), and the accuracy increased to 0.594.

Summary. E2 successfully improved the accuracy from 0.474 to 0.594 with only 37 extra shots. To achieve comparable performance, the random selection strategy requires 115 extra shots, and the automatic shot selection algorithm requires 75 extra shots. He was satisfied that FSLDiagnotor helped find a variety of quality issues of shots more efficiently. “I do not realize that the shot like Fig. 14C1 hurts performance until I see those misclassified samples.” He further pointed out that it was usually difficult to provide representative shots exhaustively. The exploratory environment of the tool helps find the missing shots.

8 Expert Feedback and Discussion

To evaluate the usefulness of FSLDiagnotor, we conducted six semi-structured interviews with the three collaborated experts (E1, E2, E3) and three newly invited ones (E4, E5, E6). The three new experts are Ph.D. students who have worked in the field of machine learning for 5, 3, and 2 years, respectively. In each interview, we spent 5 minutes introducing the design of our tool. Then the experts played with the tool to get familiar with it. For example, they tried to improve the performance by adjusting the selection of learners and/or enhancing the quality of shots. Finally, we presented our case studies and gathered their feedback. Each interview lasted approximately 45-65 minutes. All experts were generally positive about the usability of FSLDiagnotor. They also pointed out a few limitations, which shed light on future work.

8.1 Usability

Facilitating the performance improvement. Encouragingly, our experts agreed that FSLDiagnotor was useful for improving model performance. E1 liked the shot quality enhancement module. “Generally, some initial shots are probably of low-quality. I would like to remove the low-quality ones and annotate a few more shots for better performance. The tool recommends high-quality shot candidates for labeling, which reduces my workload.” E5 was impressed by the promising accuracy improvement from 0.513 to 0.582 with only three shots added in the MNIST case. In addition, the experts indicated that FSLDiagnotor not only provided an effective way to address the scenarios where only a few shots were available, but also an efficient mechanism to label a set of diverse shots that can better represent the unlabeled samples.

Being easy to use and reducing analysis efforts. The experts agreed that the visual design was familiar and easy to understand. E2 commented, “The stacked bar chart is very intuitive and clearly explains the prediction agreement and difference between the learner and ensemble model.” E4 believed that our tool could be used by practitioners easily, “They are familiar with bar charts and scatterplots, so according to my experience, 15-30 minutes should be enough for them to get familiar with this tool.” E3 shared his experience of improving the performance, “An effective way to improve the performance is to label more shots in the regions that contain many samples with low confidence. Such regions are highlighted with gray density and easy to identify. With the recommendation function, I only examine the recommended samples from these regions and label the appropriate ones.” The experts also commented that although extra analysis of the learners and samples was needed, the efforts were small because of the visual guidance and semantic interactions. Thus, their overall analysis efforts were reduced.

8.2 Limitations

Generalization. In addition to classification tasks, the experts also expressed the need to apply our tool to handle object detection and segmentation. After discussion, we found that the only change was induced by the IoU (Intersection over Union) measure employed in these tasks, which represents the area ratio of the intersection to the union of two shapes. Unlike the binary variable used in the classification task to indicate whether a sample belongs to a class or not, the IoU score is a value between 0 and 1. An interesting problem worth studying is how to effectively convey the distribution of the IoU scores in the learner view. In addition, the experts expressed their need to analyze non-ensemble few-shot models, such as generative models and meta-learning  [54]. The subset selection algorithm and the sample view could be directly used to enhance the quality of shots and make adjustments. However, the learner view needs to be re-designed to adapt to the analysis of a single model. We leave this as future work.

Algorithm scalability. The shot recommendation is frequently performed to improve the performance in the analysis process. The experts usually select a region for the detailed examination, which contains at most thousands of samples. For such cases, the subset selection algorithm can recommend shots in real-time. However, when first providing the overview in the pre-processing stage, the recommendations are from the whole dataset. It may still introduce the scalability issue into this offline process when the dataset consists of tens of thousands of samples or more. For example, it takes around hours to recommend shots from samples. It is worth studying how to reduce the pre-processing time. For example, we can study how to use progressive visual analytics techniques [16, 17] to recommend necessary shots progressively.

8.3 Lesson Learned

Using simple and familiar visualization. During the interviews, the experts appreciated the simple and familiar visual designs used in our tool. A simple and intuitive visualization requires less time to learn and allows them to focus more on their analysis tasks. For example, E2 commented, “The learner view can be regarded as a variant of the confusion matrix, with which I am very familiar. Thus, I can go directly to analyze the root cause of low performance, which saves my time and efforts.” The experts also pointed out that the visualization could be used in other tasks. For example, all the experts commented that they would like to use this tool to analyze a generic ensemble model, which they commonly used in various tasks. The experts also indicated that the learner view can be directly used to compare datasets from different perspectives.

Employing steerable visualization. During the development of FSLDiagnotor, we find that steerable visualization is an effective method to address the scalability issue when handling large-scale data. The core of steerable visualization is to steer the computational efforts to the regions of interest [55]. In FSLDiagnotor, since recommending shots may take a long time, users first identify the regions that lack shots and then steer more computational efforts to recommend shots in those regions. Such steerable shot selection supports the exploration tasks where only a small subset of samples are of interest, such as finding diverse and well-performing learners from a large collection to build an ensemble model.

Providing semantic interactions. In many sensemaking processes, users need to adjust the adopted analytical model to form hypotheses and derive conclusions. Most existing interaction techniques rely on users’ expertise to adjust analytical models, such as modifying parameters and adding constraints. This requires users to be familiar with the working mechanism of the analytical model and thus limits the usage of the developed visual analysis tool/method. With semantic interactions, users can easily steer the model without expertise in it. Traditional interactions are well studied and several taxonomies are built [59, 20]. However, semantic interaction research is quite new and more work is needed to form a taxonomy. In FSLDiagnotor, we provide a few concrete examples of semantic interactions. We hope these examples can help inspire more research in this direction and build a solid taxonomy for semantic interactions.

9 Conclusion

We have presented a visual analysis tool, FSLDiagnotor, to assist in visually diagnosing an ensemble few-shot classifier for better performance. FSLDiagnotor integrates the sparse subset selection method with an enhanced matrix visualization and a scatterplot to understand the inner workings of the base learners and the coverage of the shots. With such a comprehensive understanding, users can build a better ensemble few-shot learning model by interactively and efficiently improving the selection of base learners and shots. A quantitative evaluation demonstrates the effectiveness of the developed subset selection method in selecting appropriate base learners and enhancing the quality of the shots. Two case studies are conducted to demonstrate the usefulness of our tool in diagnosing the few-shot classifier and improving its performance.


This work was supported by the National Key R&D Program of China under Grant 2020YFB2104100, the National Natural Science Foundation of China under grants U21A20469, 61936002, grants from the Institute Guo Qiang, THUIBCS, and BLBCI, and in part by Tsinghua-Kuaishou Institute of Future Media Data.


  • [1] R. Arias-Hernandez, L. T. Kaastra, T. M. Green, and B. Fisher (2011) Pair analytics: capturing reasoning processes in collaborative visual analytics. In Proceedings of the International Conference on System Sciences, pp. 1–10. Cited by: §7.2.
  • [2] M. Behrisch, F. Korkmaz, L. Shao, and T. Schreck (2014) Feedback-driven interactive exploration of large multidimensional data supported by visual classifier. In Proceedings of the IEEE Conference on Visual Analytics Science and Technology, pp. 43–52. Cited by: §2.2.
  • [3] L. Bertinetto, J. F. Henriques, P. Torr, and A. Vedaldi (2019) Meta-learning with differentiable closed-form solvers. In Proceedings of International Conference on Learning Representations, Cited by: §7.1.1, §7.2.2.
  • [4] A. Bilal, A. Jourabloo, M. Ye, X. Liu, and L. Ren (2018)

    Do convolutional neural networks learn class hierarchy?

    IEEE Transactions on Visualization and Computer Graphics 24 (1), pp. 152–162. Cited by: §2.2.
  • [5] M. Boudiaf, I. Ziko, J. Rony, J. Dolz, P. Piantanida, and I. Ben Ayed (2020) Information maximization for few-shot learning. In Proceedings of the Advances in Neural Information Processing Systems, pp. 2445–2457. Cited by: §7.1.2, TABLE I.
  • [6] P. Bruneau and B. Otjacques (2013) An interactive, example-based, visual clustering system. In Proceedings of the International Conference on Information Visualisation, pp. 168–173. Cited by: §2.2.
  • [7] C. Chen, J. Yuan, Y. Lu, Y. Liu, H. Su, S. Yuan, and S. Liu (2021) OoDAnalyzer: interactive analysis of out-of-distribution samples. IEEE Transactions on Visualization and Computer Graphics 27 (7), pp. 3335–3349. Cited by: §2.2.
  • [8] (2019) Cross-domain few-shot learning (CD-FSL) challenge. Note: https://www.learning-with-limited-labels.comLast accessed 2022-6-5 Cited by: §1.
  • [9] J. Deng, W. Dong, R. Socher, L. Li, K. Li, and L. Fei-Fei (2009) ImageNet: a large-scale hierarchical image database. In

    Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition

    pp. 248–255. Cited by: §7.1.1.
  • [10] K. Dinkla, M. A. Westenberg, and J. J. van Wijk (2012) Compressed adjacency matrices: untangling gene regulatory networks. IEEE Transactions on Visualization and Computer Graphics 18 (12), pp. 2457–2466. Cited by: §6.1.
  • [11] N. Dvornik, C. Schmid, and J. Mairal (2019) Diversity with cooperation: ensemble methods for few-shot classification. In Proceedings of the International Conference on Computer Vision, pp. 3723–3731. Cited by: §1, §1, §2.1, §4.1, §4.1, §5.2.
  • [12] N. Dvornik, C. Schmid, and J. Mairal (2020) Selecting relevant features from a multi-domain representation for few-shot classification. In Proceedings of the European Conference on Computer Vision, pp. 769–786. Cited by: §2.1, §7.1.1.
  • [13] N. J. v. Eck and L. Waltman (2009) How to normalize co-occurrence data? An analysis of some well-known similarity measures. Journal of the American Society for Information Science and Technology 60 (8), pp. 1635–1651. Cited by: §7.1.4.
  • [14] E. Elhamifar, G. Sapiro, and S. S. Sastry (2015) Dissimilarity-based sparse subset selection. IEEE Transactions on Pattern Analysis and Machine Intelligence 38 (11), pp. 2182–2197. Cited by: §5.1, §5.2, §5.4, §5.
  • [15] A. Endert (2016) Semantic interaction for visual analytics: inferring analytical reasoning for model steering. Synthesis Lectures on Visualization 4 (2), pp. 1–99. Cited by: §6.3.
  • [16] J. Fekete and R. Primet (2016-07) Progressive Analytics: A Computation Paradigm for Exploratory Data Analysis. Cited by: §8.2.
  • [17] J. Fekete (2015-10) ProgressiVis: a Toolkit for Steerable Progressive Analytics and Visualization. In 1st Workshop on Data Systems for Interactive Analysis, Chicago, United States, pp. 5. Cited by: §8.2.
  • [18] L. Gou, L. Zou, N. Li, M. Hofmann, A. K. Shekar, A. Wendt, and L. Ren (2021) VATLD: a visual analytics system to assess, understand and improve traffic light detection. IEEE Transactions on Visualization and Computer Graphics 27 (2), pp. 261–271. Cited by: §2.2.
  • [19] K. He, X. Zhang, S. Ren, and J. Sun (2016) Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 770–778. Cited by: §2.1, §4.1, §7.1.1.
  • [20] J. Heer and B. Shneiderman (2012) Interactive dynamics for visual analysis. Communications of the ACM 55 (4), pp. 45–54. Cited by: §8.3.
  • [21] F. Heimerl, S. Koch, H. Bosch, and T. Ertl (2012) Visual classifier training for text document retrieval. IEEE Transactions on Visualization and Computer Graphics 18 (12), pp. 2839–2848. Cited by: §2.2.
  • [22] B. Höferlin, R. Netzel, M. Höferlin, D. Weiskopf, and G. Heidemann (2012) Inter-active learning of ad-hoc classifiers for video visual analytics. In Proceedings of the IEEE Conference on Visual Analytics Science and Technology, pp. 23–32. Cited by: §2.2.
  • [23] F. Hohman, M. Kahng, R. Pienta, and D. H. Chau (2019) Visual analytics in deep learning: an interrogative survey for the next frontiers. IEEE Transactions on Visualization and Computer Graphics 25 (8), pp. 2674–2693. Cited by: §2.2.
  • [24] (2019) Humpback whale identification. Note: https://www.kaggle.com/c/humpback-whale-identification/overviewLast accessed 2022-6-5 Cited by: §1.
  • [25] S. Jia, Z. Li, N. Chen, and J. Zhang (2022) Towards visual explainable active learning for zero-shot classification. IEEE Transactions on Visualization and Computer Graphics 28 (1), pp. 791–801. Cited by: §2.2.
  • [26] M. Kahng, P. Y. Andrews, A. Kalro, and D. H. Chau (2018) ActiVis: visual exploration of industry-scale deep neural network models. IEEE Transactions on Visualization and Computer Graphics 24 (1), pp. 88–97. Cited by: §2.2.
  • [27] D. A. Keim, F. Mansmann, J. Schneidewind, J. Thomas, and H. Ziegler (2008) Visual analytics: scope and challenges. In Visual Data Mining, pp. 76–90. Cited by: §1.
  • [28] B. M. Lake, R. Salakhutdinov, and J. B. Tenenbaum (2015) Human-level concept learning through probabilistic program induction. Science 350 (6266), pp. 1332–1338. Cited by: §7.1.1, §7.2.1.
  • [29] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner (1998) Gradient-based learning applied to document recognition. Proceedings of the IEEE 86 (11), pp. 2278–2324. Cited by: §7.1.1, §7.2.1.
  • [30] M. Liu, J. Shi, K. Cao, J. Zhu, and S. Liu (2018) Analyzing the training processes of deep generative models. IEEE Transactions on Visualization and Computer Graphics 24 (1), pp. 77–87. Cited by: §2.2.
  • [31] M. Liu, J. Shi, Z. Li, C. Li, J. Zhu, and S. Liu (2017) Towards better analysis of deep convolutional neural networks. IEEE Transactions on Visualization and Computer Graphics 23 (1), pp. 91–100. Cited by: §2.2.
  • [32] S. Liu, C. Chen, Y. Lu, F. Ouyang, and B. Wang (2019) An interactive method to improve crowdsourced annotations. IEEE Transactions on Visualization and Computer Graphics 25 (1), pp. 235–245. Cited by: §1, §2.2, §4.1.
  • [33] S. Liu, J. Xiao, J. Liu, X. Wang, J. Wu, and J. Zhu (2018) Visual diagnosis of tree boosting methods. IEEE Transactions on Visualization and Computer Graphics 24 (1), pp. 163–173. Cited by: §2.2.
  • [34] S. Liu, D. Maljovec, B. Wang, P. Bremer, and V. Pascucci (2017)

    Visualizing high-dimensional data: advances in the past decade

    IEEE Transactions on Visualization and Computer Graphics 23 (3), pp. 1249–1268. Cited by: §6.2.
  • [35] A. Mayorga and M. Gleicher (2013) Splatterplots: overcoming overdraw in scatter plots. IEEE Transactions on Visualization and Computer Graphics 19 (9), pp. 1526–1538. Cited by: §6.2.
  • [36] Y. Meng, H. Zhang, M. Liu, and S. Liu (2015) Clutter-aware label layout. In Proceedings of the IEEE Pacific Visualization Symposium, pp. 207–214. Cited by: §6.2.
  • [37] Y. Ming, S. Cao, R. Zhang, Z. Li, Y. Chen, Y. Song, and H. Qu (2017)

    Understanding hidden memories of recurrent neural networks

    In Proceedings of the IEEE Conference on Visual Analytics Science and Technology, pp. 13–24. Cited by: §2.2.
  • [38] Y. Ming, P. Xu, F. Cheng, H. Qu, and L. Ren (2020) ProtoSteer: steering deep sequence model with prototypes. IEEE Transactions on Visualization and Computer Graphics 26 (1), pp. 238–248. Cited by: §2.2.
  • [39] M. P. Neto and F. V. Paulovich (2021)

    Explainable matrix - Visualization for global and local interpretability of random forest classification ensembles

    IEEE Transactions on Visualization and Computer Graphics 27 (2), pp. 1427–1437. Cited by: §2.2.
  • [40] A. Ng (2021) MLOps: from model-centric to data-centric AI. Cited by: §1, §2.2.
  • [41] J. G. S. Paiva, W. R. Schwartz, H. Pedrini, and R. Minghim (2015) An approach to supporting incremental visual data classification. IEEE Transactions on Visualization and Computer Graphics 21 (1), pp. 4–17. Cited by: §2.2.
  • [42] J. Pennington, R. Socher, and C. D. Manning (2014) GloVe: global vectors for word representation. In

    Proceedings of the Conference on Empirical Methods in Natural Language Processing

    pp. 1532–1543. Cited by: §6.1.
  • [43] M. Qi, J. Qin, X. Zhen, D. Huang, Y. Yang, and J. Luo (2020) Few-shot ensemble learning for video classification with slowfast memory networks. In Proceedings of the ACM International Conference on Multimedia, pp. 3007–3015. Cited by: §1, §2.1, §4.1.
  • [44] M. Ren, E. Triantafillou, S. Ravi, J. Snell, K. Swersky, J. B. Tenenbaum, H. Larochelle, and R. S. Zemel (2018) Meta-learning for semi-supervised few-shot classification. In Proceedings of the International Conference on Learning Representations, Cited by: §7.1.1.
  • [45] C. Renggli, L. Rimanic, N. M. Gurel, B. Karlas, W. Wu, and C. Zhang (2021) A data quality-driven view of MLOps. IEEE Data Engineering Bulletin 44 (1), pp. 11–23. Cited by: §1, §2.2.
  • [46] B. Schneider, D. Jackle, F. Stoffel, A. Diehl, J. Fuchs, and D. Keim (2021) Integrating data and model space in ensemble learning by visual analytics. IEEE Transactions on Big Data 7 (3), pp. 483–496. Cited by: §2.2.
  • [47] A. Schrijver (1998) Theory of linear and integer programming. John Wiley & Sons. Cited by: §5.1.
  • [48] B. Settles (2009) Active learning literature survey. Technical report University of Wisconsin-Madison. Cited by: §7.2.1.
  • [49] P. H. Sneath, R. R. Sokal, et al. (1973) Numerical taxonomy : the principles and practice of numerical classification. W.H. Freeman. Cited by: §6.1.
  • [50] H. Strobelt, S. Gehrmann, M. Behrisch, A. Perer, H. Pfister, and A. M. Rush (2019) Seq2seq-Vis: a visual debugging tool for sequence-to-sequence models. IEEE Transactions on Visualization and Computer Graphics 25 (1), pp. 353–363. Cited by: §2.2.
  • [51] Y. Tian, Y. Wang, D. Krishnan, J. B. Tenenbaum, and P. Isola (2020) Rethinking few-shot image classification: a good embedding is all you need?. In Proceedings of the European Conference on Computer Vision, pp. 266–282. Cited by: §2.1, §7.1.2.
  • [52] O. Vinyals, C. Blundell, T. Lillicrap, K. Kavukcuoglu, and D. Wierstra (2016) Matching networks for one shot learning. In Proceedings of the Advances in Neural Information Processing Systems, pp. 3637–3645. Cited by: §7.1.1.
  • [53] J. Wang, L. Gou, H. Shen, and H. Yang (2019) DQNViz: a visual analytics approach to understand deep Q-networks. IEEE Transactions on Visualization and Computer Graphics 25 (1), pp. 288–298. Cited by: §2.2.
  • [54] Y. Wang, Q. Yao, J. T. Kwok, and L. M. Ni (2020) Generalizing from a few examples: a survey on few-shot learning. ACM Computing Surveys 53 (3), pp. 1–34. Cited by: §1, §8.2.
  • [55] M. Williams and T. Munzner (2004) Steerable, progressive multidimensional scaling. In Proceedings of the IEEE Symposium on Information Visualization, pp. 57–64. Cited by: §8.3.
  • [56] S. Xiang, X. Ye, J. Xia, J. Wu, Y. Chen, and S. Liu (2019) Interactive correction of mislabeled training data. In Proceedings of the IEEE Conference on Visual Analytics Science and Technology, pp. 57–68. Cited by: §2.2, §6.2.
  • [57] W. Yang, Z. Li, M. Liu, Y. Lu, K. Cao, R. Maciejewski, and S. Liu (2020) Diagnosing concept drift with visual analytics. In Proceedings of the IEEE Conference on Visual Analytics Science and Technology, pp. 12–23. Cited by: §2.2.
  • [58] Y. Yang, Z. Ma, F. Nie, X. Chang, and A. G. Hauptmann (2015) Multi-class active learning by uncertainty sampling with diversity maximization. International Journal of Computer Vision 113 (2), pp. 113–127. Cited by: §5.3.
  • [59] J. S. Yi, Y. ah Kang, J. Stasko, and J. A. Jacko (2007) Toward a deeper understanding of the role of interaction in information visualization. IEEE Transactions on Visualization and Computer Graphics 13 (6), pp. 1224–1231. Cited by: §8.3.
  • [60] J. Yuan, C. Chen, W. Yang, M. Liu, J. Xia, and S. Liu (2021) A survey of visual analytics techniques for machine learning. Computational Visual Media 7 (1), pp. 3–36. Cited by: §2.2.
  • [61] J. Yuan, S. Xiang, J. Xia, L. Yu, and S. Liu (2021) Evaluation of sampling methods for scatterplots. IEEE Transactions on Visualization and Computer Graphics 27 (2), pp. 1720–1730. Cited by: §6.2.
  • [62] X. Zhao, Y. Wu, D. L. Lee, and W. Cui (2019) iForest: interpreting random forests via visual analytics. IEEE Transactions on Visualization and Computer Graphics 25 (1), pp. 407–416. Cited by: §2.2.
  • [63] Z. Zhou (2012) Ensemble methods: Foundations and algorithms. CRC press. Cited by: §6.3.
  • [64] X. Zhu and A. B. Goldberg (2009)

    Introduction to semi-supervised learning

    Morgan & Claypool Publishers. Cited by: §5.2.