Skip to main content

Unified Hyperbolic Spectral Retrieval (UHSR)

Unified Hyperbolic Spectral Retrieval (UHSR) is an advanced hybrid text retrieval model that seamlessly integrates lexical search (BM25) with semantic search (FAISS/Pinecone) while employing spectral re-ranking for interpretable and normalized relevance scores in the [0,1] range.

🚀 Key Features

  • 🔍 Hybrid Retrieval: Combines BM25 for lexical scoring and dense vector semantic similarity for contextual understanding.
  • 🎯 Multi-Metric Similarity: Supports cosine, euclidean, mahalanobis, manhattan, chebyshev, jaccard, and hamming similarity.
  • 🔬 Spectral Re-Ranking: Uses graph Laplacian & Fiedler vector to boost highly relevant candidates.
  • ⚡ AI-powered Reranking: Supports Hugging Face Cross-Encoders & OpenAI API-based Reranking.
  • 📈 Interpretable Scores: Final relevance scores are logistic-normalized in [0,1] for easy ranking.
  • 🚀 Scalable & Efficient: Works with FAISS (local) for fast retrieval and Pinecone (cloud-based) for large-scale vector search.

🛠️ How It Works

UHSR enhances traditional retrieval by blending BM25-based keyword matching with semantic vector representations using the following pipeline:

Step Description
1️⃣ Lexical Filtering Uses BM25 to rank documents by keyword relevance
2️⃣ Semantic Scoring Computes similarity using FAISS or Pinecone
3️⃣ Fusion Process Blends scores via logistic normalization & harmonic fusion
4️⃣ Spectral Re-Ranking Uses graph Laplacian analysis to boost central candidates
5️⃣ (Optional) AI Reranking Uses OpenAI API or Hugging Face Cross-Encoders

🌍 Supported Retrieval Methods

  • ✅ BM25 (Lexical Matching)
  • ✅ FAISS (Local Vector Search)
  • ✅ Pinecone (Cloud Vector Search)
  • ✅ Hugging Face Rerankers
  • ✅ OpenAI API-based Reranking

📌 Why UHSR?

  • Better Search Results: Combines exact keyword matching (BM25) with contextual embeddings (Semantic Search).
  • Faster & Scalable: Uses FAISS for local retrieval or Pinecone for cloud-based vector search.
  • Interpretable Ranking: Outputs normalized scores in [0,1], making it easy to interpret.
  • Multi-Metric Similarity: Supports cosine, euclidean, mahalanobis, manhattan, chebyshev, jaccard, and hamming.

🎯 Intended Use

UHSR is designed for:

  • Information Retrieval Research
  • Search Engines & Recommendation Systems
  • NLP Applications in AI & Machine Learning
  • Academic & Industry-scale Document Ranking

📂 Code & Documentation

For complete documentation, usage examples, and implementation details, visit the GitHub repository.

Learn More about this package on Medium.


🔥 Try UHSR today and revolutionize your search engine! 🚀

Metadata

Release files for uhsr 0.2.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uhsr 0.2.8
File Size Uploaded
uhsr-0.2.8.tar.gz 14.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for uhsr 0.2.8
File Interpreter ABI Platform
uhsr-0.2.8-py3-none-any.whl Python 3 none any Details

Total release size: 26.5 kB

Release files / uhsr-0.2.8.tar.gz

Download URL uhsr-0.2.8.tar.gz
Size 14.0 kB
Tags Source
SHA-256 checksum
How to use checksums
aa86e239d48196db4e1e8fc539956574bc4f658abd93caed5a071b45df9c788d
BLAKE2b-256 checksum
How to use checksums
1844b8ce9ba8a8ee6fbb9c54e35327ddb2d10886356589d3857ddf6d537ef3ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.4

Release files / uhsr-0.2.8-py3-none-any.whl

Download URL uhsr-0.2.8-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3eb68e81c6295dac80951dca9c1e55a15e12375aa729b03c7506235b828b4a2d
BLAKE2b-256 checksum
How to use checksums
bfbac779915b6ec33ffb441f3fca2bdb56350933038b7d46cc25a4d224ee2adc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.2.8 This release

2 release files

0.2.7

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page