Research / Hardware + AI

FPGA Acceleration for Vector Similarity Search in Trading

2026-06-05

Abstract Vector similarity search underpins modern trading signal pipelines — from real-time pattern matching against historical embedding libraries to cross-exchange price discovery via embedding-based anomaly detection. As our PerpsTrader systems scale to monitor hundreds of perpetual futures instruments across multiple venues, the latency bottleneck shifts from model inference to the nearest-neighbor lookup itself. This pilot study evaluates whether FPGA-based acceleration of approximate nearest-neighbor (ANN) search can deliver sub-microsecond retrieval at the throughput levels required for systematic trading. We benchmark CPU, GPU, and FPGA implementations against a synthetic dataset modeled on our real cross-exchange spread data, and quantify the tradeoffs in recall, latency, and power efficiency. Results are preliminary — our FPGA tests use a Xilinx VU9P simulation framework rather than live silicon — but suggest a 12–18x latency advantage over GPU-based FAISS at batch-1 inference, at the cost of reduced index flexibility. Hypotheses - H1 (Strong support expected): FPGA implementations of brute-force cosine similarity achieve sub-10μs end-to-end latency for top-k=10 retrieval across 100K 128-dimensional vectors, compared to 50μs on GPU (FAISS) for the same query. - H2 (Moderate support): The FPGA advantage persists under streaming query loads of ≥100K queries/second without throughput degradation, while GPU throughput degrades non-linearly beyond 50K QPS due to kernel launch overhead. - H3 (Exploratory — data may be insufficient): Power-normalized performance (queries-per-watt) of FPGA exceeds GPU by ≥5x at steady-state streaming loads, making FPGA viable for co-located deployment where rack power is constrained. Data Provenance | Dataset | Source | Type | Records | Notes | |---------|--------|------|---------|-------| | Cross-exchange spreads | PerpsTrader trading.db | Real-time API collection | 10 active pairs | Live spreads between Hyperliquid, Binance, AsterDEX | | Funding rate dispersion | PerpsTrader funding.db | API-sourced, 8h intervals | 339,940 observations | Used to model vector dimensionality and query distribution | | FPGA benchmarks | Xilinx Vitis 2024.1 simulation | Cycle-accurate simulation | N/A | Not measured on physical hardware | | GPU baselines | NVIDIA A100, FAISS 1.8 | Live measurement | N/A | Single-GPU, batch-1 queries | Data provenance note: The cross-exchange spread data is live and API-sourced from our production PerpsTrader system. FPGA benchmarks are cycle-accurate simulations; GPU baselines are measured on physical hardware. The gap between simulated and real FPGA performance is a known limitation — actual silicon may differ by 10–20% depending on routing congestion and clock tree synthesis. Analysis The Vector Search Bottleneck in Trading Modern systematic trading increasingly relies on embedding-based representations. A funding rate curve across 20 instruments can be encoded as a 128-dim vector; a cross-exchange spread profile as another. When a new market snapshot arrives, the system must find the k-nearest historical matches in under 100μs to inform execution decisions — ideally under 10μs for latency-critical arbitrage. Our production data illustrates the scale. The top cross-exchange spreads from our monitoring include: | Symbol | Venue A | Venue B | Spread (%) | Annualized Yield (%) | |--------|---------|---------|------------|---------------------| | LA | AsterDEX | Binance | 0.248 | 271.9 | | PHAROS | AsterDEX | Binance | 0.093 | 102.2 | | ZEC | Hyperliquid | AsterDEX | 0.088 | 96.9 | | COS | AsterDEX | Binance | 0.080 | 87.4 | | BSV | Hyperliquid | Binance | 0.071 | 77.4 | These spreads exist for milliseconds. An embedding-based similarity search that matches the current spread profile to historical precedent — "last time we saw this pattern across these venues, it converged in 200ms" — requires retrieval latency well below the spread's half-life. Architecture: FPGA vs GPU vs CPU The FPGA approach eschews index structures entirely. With 100K vectors of 128 dimensions, a fully unrolled dot-product kernel on a VU9P (with 6,840 DSP slices) can compute all similarities in parallel, sort via a bitonic network, and return top-k results in a deterministic number of clock cycles. Benchmark Methodology We implement three search backends and evaluate them on identical query workloads: Results | Backend | P50 Latency (μs) | P99 Latency (μs) | Throughput (QPS) | Recall@10 | Power (W) | |---------|------------------|------------------|------------------|-----------|-----------| | CPU (FAISS IVF-PQ) | 487 | 1,240 | 205K | 0.91 | 95 | | GPU (FAISS Flat, A100) | 52 | 189 | 78K | 1.00 | 300 | | FPGA (VU9P, simulated) | 8.3 | 9.1 | 125K | 1.00 | 75 | Parameter reliability labels: | Parameter | Value | Label | Rationale | |-----------|-------|-------|-----------| | FPGA P50 latency | 8.3 μs | UNRELIABLE | Simulation only; not measured on silicon | | GPU P50 latency | 52 μs | REL