Semantica: Decentralized Search using a LLM-Guided Semantic Tree Overlay
Petru Neague, Quinten Stokkink, Naman Goel, Johan Pouwelse
TL;DR
Semantica tackles decentralized semantic search by leveraging pre-trained LLM embeddings to build a hierarchical embedding-tree overlay that clusters peers by semantic content. It introduces dynamic tree construction with leaf splits and soft cloning, followed by expansion rounds to refine neighbor connections, and a chain-hop query mechanism to route searches efficiently. Empirical results on AOL4PS demonstrate substantial gains in nearest-peer recall and document retrieval accuracy over baselines and diffusion-based approaches, with complexities $O(N \log N)$ for construction and $O(\ell)$ messages per query. The framework shows strong potential for scalable, privacy-conscious information discovery in large, dynamic networks, and provides deployment guidance for fully decentralized operation.
Abstract
Centralized search engines are key for the Internet, but lead to undesirable concentration of power. Decentralized alternatives fail to offer equal document retrieval accuracy and speed. Nevertheless, Semantic Overlay Networks can come close to the performance of centralized solutions when the semantics of documents are properly captured. This work uses embeddings from Large Language Models to capture semantics and fulfill the promise of Semantic Overlay Networks. Our proposed algorithm, called Semantica, constructs a prefix tree (trie) utilizing document embeddings calculated by a language model. Users connect to each other based on the embeddings of their documents, ensuring that semantically similar users are directly linked. Thereby, this construction makes it more likely for user searches to be answered by the users that they are directly connected to, or by the users they are close to in the network connection graph. The implementation of our algorithm also accommodates the semantic diversity of individual users by spawning "clone" user identifiers in the tree. Our experiments use emulation with a real-world workload to show Semantica's ability to identify and connect to similar users quickly. Semantica finds up to ten times more semantically similar users than current state-of-the-art approaches. At the same time, Semantica can retrieve more than two times the number of relevant documents given the same network load. We also make our code publicly available to facilitate further research in the area.
