What is Mosaic in Machine Learning?

Mosaic is a novel method created by Microsoft and MIT researchers for detecting comparable pictures. Standard algorithms for finding comparable photos focus exclusively on pixel similarity when given a source image.

  • Based on numerous comparison dimensions, the Mosaic system can retrieve comparable pictures.

The Mosaic system is open to experimentation by data scientists, developers, and others. Users may choose a query image from a library of artwork and then search for matching photos based on culture or media.

Image Retrieval

It’s normal to limit the scope of a query in many Image Retrieval (IR) applications to a subset of pictures. In particular, similar art from different artists or returning comparable clothing from a certain brand. IR systems are currently finding it difficult to focus their attention on subsets of pictures on the fly, especially if the subset is considerably different from the query image.

One issue with present systems is that K-Nearest Neighbor (KNN) data structures, which are a key component of many IR systems, only enable searches across the full corpus.

Filtering “unconditional” query results, switching to brute force adaptively, or creating a new KNN data structure for each filter are all options for restricting returned pictures to a certain class or filter. The first method is utilized in various commercial image search systems, although it might be expensive if the filter is too exact or the query picture is too far away from good photos. Switching to adaptive brute force can help solve this problem, but it’s restricted by brute force search’s speed, and its performance will suffer if the target subset is too far away from the query point.

Finally, keeping a distinct KNN data structure for each conceivable subset of the data is expensive and can result in 2n data structures, where n is the total number of pictures. Tree-based data structures are a logical solution to boost CIR’s performance. Random Projection Trees, in particular, may prune themselves to adapt to subsets of data. By creating a tweak to current tree-based methods that allowed them to adapt the structure to any subset of their original data using an inverted index, they were able to swiftly adapt to any subset of their original data.


The goal of this research is not to develop the fastest KNN algorithm, but rather to offer a formally justified strategy for speeding up current tree-based KNN algorithms in the conditional scenario.

Due to phenomena such as the hubness problem, KNN retrieval prefers certain items much more than others. The mosaic technique does not change the KNN structure; instead, it prunes it later.

When conditioner sizes are tiny, this may not be the most efficient option, but it is orders of magnitude faster than regenerating the tree. Mosaic conditional KNN approaches are also reliant on the underlying unconditional KNN tree, which performs better on datasets with lower intrinsic dimensions.


Conditional Image Retrieval has been found to provide new techniques to locate aesthetically and semantically related pictures across corpora, according to researchers. They introduced a revolutionary method for uncovering hidden links in massive collections of art and developed Mosaic. It’s an immersive online tool that allows the public to experiment with the concept. On the FEI faces and two newly added datasets, CIR achieves non-parametric style transfer. They also established a limit on several nodes when focused on subsets of the training data and utilized this knowledge to construct a generic technique for applying tree-based KNN algorithms to conditional settings. Mosaic method outperforms baselines and speeds up conditional queries. CNN data structures can detect and quantify minor differences across high-dimensional distributions.