# ConceptVAE: Self-Supervised Fine-Grained Concept Disentanglement from 2D Echocardiographies
## 5 Quantitative Model Analysis
### Region-Based Instance Retrieval  
Region-based instance retrieval involves searching a database of images for similar samples using only localized descriptors, such as pathologies or anomalies. These methods can aid in clinical diagnosis, medical research, trainee education, and support other tasks by quickly identifying patients with similar anomalies, even when a diagnosis is not yet established [36; 42]. SSL methods are the most prevalent and effective, using the embeddings of a pre-trained model to cluster images and retrieve those most similar to a query image using nearest neighbors search [43]. To use ConceptVAE for this task, we generate image region descriptors by concatenating the \(5\times 5\) concept probability vectors from a \(5\times 5\) sub-grid centered around a selected query point. The sub-grid provides context for the query point. Using an input image of size (256, 320), the concept grid has an output stride of 16, resulting in a size of (16, 20) concepts. From each test image, we extract an array of (14, 18) key points (i.e., all points with a complete \(5\times 5\) neighborhood). Since the model was trained with 16 concepts and the descriptor uses a \(5\times 5\) grid, each descriptor is a vector of size 400. For the baseline model, a similar searching mechanism was used, but the region descriptor was the feature vector of a \(1\times 1\) feature map grid location. A single grid location is sufficient for this model, since its feature representation is computed in a continuous manner, without discrete variables, with a sufficiently large field of view. For instance retrieval, nearest-neighbor matching based on the Euclidean distance between descriptors can be employed. Initially, we conduct a qualitative analysis by randomly sampling images from the test set and manually selecting specific query points to analyze the results. The descriptors corresponding to these selected query points were then used to search the database and retrieve samples with regions similar to the query points. Figure 5 showcases six randomly sampled examples, which illustrate that the retrieved image regions align well with the query semantics. For example, the retrieved regions share the same cardiac chamber and view as the query points. Moreover, the anatomical structures around the matched locations are visually similar to those in the query points. For the retrieval task, the search is based solely on the concept descriptors This approach ensures that the retrieval process focuses on the semantic content rather than stylistic variations. To quantitatively analyse this task, we use an independent test set of 450 images, totalling 113,400 region descriptors (\(14\cdot 18\cdot 450\)). Performing nearest neighbor search on this space is very fast. The set includes four echocardiographic views (apical 2-, 3-, and 4-chamber views, and a short-axis view), with frames captured at end-diastole (ED) and end-systole (ES). For the apical views, LV contour annotations were available, from which we extracted five key landmark points: left and right annulus, apex, mid-septum, and mid-free-wall. We exploit these annotations to setup a retrieval tasks for these landmark points. In total, there were 150 ED apical frames, each with five locations used as query points. The search pool consisted of all 225 ES frames from all views, including the short-axis view. A retrieval is considered a match if it corresponds to the ES image of the ED query and if the retrieved location is adjacent to the annotated landmark point. We present the results in Table 1, which shows the Mean Average Precision (mAP) metrics for both models, computed using the top-5 search results.