
# PANORAMA: Fast-Track Nearest Neighbors

This repository contains the implementation of PANORAMA, a machine learning-driven approach for accelerating Approximate Nearest-Neighbor Search (ANNS) through data-adaptive learned orthogonal transforms and accretive distance bound refinement.

## Overview

PANORAMA addresses the verification bottleneck in modern ANNS systems, where up to 99% of query time is spent computing distances during the final refinement phase. Our approach uses learned orthogonal transforms that compact over 90% of signal energy into the first half of dimensions, enabling early candidate pruning with partial distance computations.

Key features:
- **2-30x end-to-end speedup** with no recall loss across diverse datasets
- **Universal integration** with existing ANNS methods (IVFPQ, HNSW, MRPT, Annoy, IVFFlat)
- **Data-adaptive transforms** using Cayley parameterization on the Stiefel manifold
- **Theoretical guarantees** with complexity analysis and robustness to out-of-distribution queries

## Repository Structure

```
panorama/
├── faiss/          # Modified IVFPQ, IVFFlat, L2Flat, HNSW implementations
├── annoy/          # Modified Annoy implementation
├── mrpt/           # Modified MRPT implementation
├── transforms/     # Learned Cayley orthogonal transforms
└── benches/        # Benchmarking infrastructure
```