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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| uhsr-0.2.8.tar.gz | 14.0 kB | Without provenance | Details for uhsr-0.2.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| uhsr-0.2.8-py3-none-any.whl | Python 3 | none | any | Details for uhsr-0.2.8-py3-none-any.whl |
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
|
Security for uhsr 0.2.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.