MosAIc: Finding Artistic Connections across Culture with Conditional Image Retrieval

Mark Hamilton, Stephanie Fu, Mindren Lu, Johnny Bui, Darius Bopp, Zhenbang Chen, Felix Tran, Margaret Wang, Marina Rogers, Lei Zhang, Chris Hoder, William T. FreemanNeurIPS 2020

Presented at NeurIPS 2020, MosAIc is a system designed to explore the "connective tissue" of human art history. By leveraging a technique called Conditional Image Retrieval (CIR), the system can identify unexpected visual parallels across vast distances of time and geography—such as a 1980 BC Egyptian paddling boat that bears an uncanny resemblance to an 18th-century Chinese "Immortal Raft."

Standard Image Retrieval (IR) systems are typically "unconditional." A user provides a query image, and the system searches the entire database for the closest matches in a high-dimensional feature space. However, in specialized domains like art history, users often need to restrict searches to specific categories, such as a particular medium, culture, or artist.

Executing these filtered searches efficiently is notoriously difficult. Simple "query-then-filter" approaches are slow and often fail if the top global matches don't happen to include the target subset. Conversely, building dedicated indices for every possible combination of filters is computationally impossible due to the exponential number of potential subsets.

Methods: Adaptive Tree Pruning

To address this, the authors formalize the Conditional K-Nearest Neighbor (CKNN) problem and introduce an efficient solution: Adaptive Tree Pruning.

Overview of Conditional Image Retrieval (CIR) in the MosAIc system.

Most modern IR systems use tree-based structures (like Ball Trees) to partition data. MosAIc enhances this with an inverted index that maps metadata labels (e.g., "Ceramic" or "French") to specific nodes in the search tree. Before a search begins, the system uses this index to "prune" the tree, marking only the branches that contain points satisfying the user's condition. This allows the search algorithm to bypass irrelevant data entirely, making filtered searches nearly as fast as unconditional ones.

Key Insights and Applications

Beyond simple retrieval, the CIR framework enables several novel applications:

  • Visual Analogies: The system excels at finding cross-cultural "rhymes"—artistic motifs that recur across millennia, suggesting a shared human visual language.
  • The "Blind Spot" Detector: The authors introduced Relative Conditioner Density (RCD) to evaluate generative models. By comparing how real data and GAN-generated data are distributed across the nodes of a CKNN tree, they can pinpoint specific regions where a GAN fails. For instance, they discovered a Progressive GAN trained on faces almost never generated brimmed hats, despite their presence in the training set.
  • Non-Parametric Style Transfer: CIR can be viewed as a form of style transfer. Instead of generating a new image, the system retrieves an existing one that shares the "content" of the query but the "style" of the conditioned subset.

Results and Performance

Testing on datasets from The Met and Rijksmuseum (over 500,000 artworks), the authors demonstrated that their pruning approach achieves query times approaching the theoretical speed limit of a dedicated index. Furthermore, the additional index required for conditioning is remarkably lightweight—only about 6.4 MB for a 16 GB dataset.

While tree-based methods face challenges with extremely high-dimensional "noisy" data, MosAIc successfully adapts database optimization concepts like "predicate push-down" to the world of geometric search. Future work may involve adapting this conditional logic to graph-based IR structures like HNSW to further push the boundaries of speed and scale.

Explore the collection: You can interact with the system at aka.ms/mosaic.

Summary updated

BibTeX
@inproceedings{hamilton2020mosaic,
  author = {Mark Hamilton and Stephanie Fu and Mindren Lu and Johnny Bui and Darius Bopp and Zhenbang Chen and Felix Tran and Margaret Wang and Marina Rogers and Lei Zhang and Chris Hoder and William T. Freeman},
  title = {{MosAIc: Finding Artistic Connections across Culture with Conditional Image Retrieval}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2020},
  url = {https://openreview.net/forum?id=Omai38FxkS},
}
Figure