CLEAR: A Fully User-side Image Search System

Ryoma Sato

Introduction

Traditional image search systems rely on a "crawl-and-index" architecture that is resource-intensive and exclusionary. To build a similarity-based search engine for a platform like Flickr, a developer typically needs to crawl billions of images, maintain hundreds of gigabytes of storage, and manage a costly backend server. This barrier prevents individual users from creating personalized, privacy-preserving search tools.

CLEAR (CLiant-side sEARch) addresses this by shifting the entire search architecture to the user's browser. By leveraging existing text-search APIs as a proxy for a local index, CLEAR enables users to deploy custom search engines in seconds without any dedicated backend infrastructure.

Methodology

CLEAR is built upon the Tiara framework but optimizes it for real-time browser performance through several key innovations:

Adaptive Querying and the API-as-Index

Instead of searching a pre-built local database, CLEAR treats the Flickr text-search API as its primary index. When a user provides a source image, the system extracts features using MobileNetV2 via TensorFlow.js directly in the browser. It then predicts which text tags are most likely to return visually similar images from Flickr’s existing database.

The Greedy Strategy

While previous iterations used complex multi-armed bandit algorithms (like UCB) to balance exploration and exploitation, CLEAR adopts a greedy algorithm. This approach focuses on querying tags with the highest average scores immediately. By eliminating the need for large word-embedding files (such as 1GB GloVe models) and complex matrix inversions, the system remains lightweight and fast enough for standard web browsers.

Parallelization and Diversity

To mitigate the latency of external API calls, CLEAR issues ten queries simultaneously. It also introduces randomization into the Flickr API "date" parameters, ensuring that the system retrieves a diverse set of results rather than a static subset of the most recent uploads.

Evaluation

The system was evaluated using a subset of the Open Image Dataset (OID) v4, comprising 100,000 images. In this controlled environment, image labels served as searchable tags to simulate the Flickr ecosystem.

Performance Metrics

  • Speed: CLEAR achieved a processing time of approximately 0.03 seconds (excluding network latency), making it roughly 60 times faster than the Tiara baseline (1.83 seconds).
  • Quality: On an effectiveness scale, CLEAR scored 13.8, representing only a marginal decrease from Tiara’s 14.6. The retrieved images remained visually comparable in quality.
  • Infrastructure: CLEAR requires 0GB of backend storage, a significant reduction from the estimated 100GB required for a traditional crawled index of similar scope.

Discussion and Limitations

While CLEAR offers significant advantages in privacy and deployment speed, it is subject to certain constraints:

  1. Stochasticity: Due to randomized date sampling and live API dependencies, search results are not perfectly reproducible.
  2. Greedy Failure Modes: The algorithm can occasionally converge on overly specific tags (e.g., identifying a cat as a "snow leopard" and failing to explore broader "feline" tags), which can narrow the result set prematurely.
  3. API Constraints: The system is bound by the rate limits of the host platform (Flickr), which may restrict high-volume usage.

Conclusion

CLEAR demonstrates that high-quality image similarity search can be achieved without massive backend infrastructure. By repurposing existing text APIs and utilizing efficient client-side machine learning, CLEAR empowers users to create their own search tools that are private, customizable, and instantly deployable.

Summary updated

BibTeX
@inproceedings{sato2022clear,
  author = {Ryoma Sato},
  title = {{CLEAR: A Fully User-side Image Search System}},
  booktitle = {ACM International Conference on Information and Knowledge Management},
  year = {2022},
  doi = {10.1145/3511808.3557172},
}
Figure