Table of Contents
Fetching ...

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.

Semantica: Decentralized Search using a LLM-Guided Semantic Tree Overlay

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 for construction and 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.

Paper Structure

This paper contains 21 sections, 2 equations, 8 figures, 2 tables, 3 algorithms.

Figures (8)

  • Figure 1: User similarity in the AOL4PS data set.
  • Figure 2: Example diagram showcasing how the clustering algorithm will construct the tree. The clustering implemented for this figure is a rudimentary one for presentation purposes.
  • Figure 3: Tree example diagram. The green nodes represent split-nodes and the blue/purple numbered nodes represent the leaves.
  • Figure 4: Effect of expansion rounds on closest-neighbor recall for different $\Delta$ values.
  • Figure 5: Number of clones per user for $\Delta = 0.001$.
  • ...and 3 more figures