AI Post Transformers · mcgrof
This episode examines ANNS-AMP, a June 2026 paper proposing adaptive mixed-precision computing for approximate nearest neighbor search. It starts with the IVF-PQ index pipeline: cluster locating, residual calculation, lookup-table construction, distance summation and top-k selection. The paper reports that over 99.9% of distance arithmetic in the cluster-locating and table-construction stages goes to vectors that are not neighbors. The proposed fix is a small runtime predictor that picks the bit-width for each cluster and each query, paired with a bit-serial, bit-plane near-memory accelerator so that fewer bits mean less compute and less memory traffic. The discussion also covers why existing index tuning and early-termination methods miss this redundancy. It questions whether flexible-precision hardware can succeed now that fixed INT8, FP8 and FP4 formats have taken over in neural networks. A running thread asks how much of the reported speed and energy gain comes from the precision idea and how much from the custom silicon. Sources: 1. ANNS-AMP: Accelerating Approximate Nearest Neighbor Search via Adaptive Mixed-Precision Computing — Mingkai Chen, Cheng Liu, Shengwen Liang, Lei Zhang, Xiaowei Li, Huawei Li, 2026 http://arxiv.org/abs/2606.07156 2. Mixed Precision Training — Paulius Micikevicius, Sharan Narang, Jonah Alben, Gregory Diamos, Erich Elsen, et al., 2018 https://scholar.google.com/scholar?q=Mixed+Precision+Training 3. HAQ: Hardware-Aware Automated Quantization with Mixed Precision — Kuan Wang, Zhijian Liu, Yujun Lin, Ji Lin, Song Han, 2019 https://scholar.google.com/scholar?q=HAQ%3A+Hardware-Aware+Automated+Quantization+with+Mixed+Precision 4. HAWQ: Hessian Aware Quantization of Neural Networks with Mixed-Precision — Zhen Dong, Zhewei Yao, Amir Gholami, Michael Mahoney, Kurt Keutzer, 2019 https://scholar.google.com/scholar?q=HAWQ%3A+Hessian+Aware+Quantization+of+Neural+Networks+with+Mixed-Precision 5. Stripes: Bit-Serial Deep Neural Network Computing — Patrick Judd, Jorge Albericio, Tayler Hetherington, Tor Aamodt, Andreas Moshovos, 2016 https://scholar.google.com/scholar?q=Stripes%3A+Bit-Serial+Deep+Neural+Network+Computing 6. Bit Fusion: Bit-Level Dynamically Composable Architecture for Accelerating Deep Neural Networks — Hardik Sharma, Jongse Park, Naveen Suda, Liangzhen Lai, Benson Chau, Vikas Chandra, Hadi Esmaeilzadeh, 2018 https://scholar.google.com/scholar?q=Bit+Fusion%3A+Bit-Level+Dynamically+Composable+Architecture+for+Accelerating+Deep+Neural+Networks 7. BISMO: A Scalable Bit-Serial Matrix Multiplication Overlay for Reconfigurable Computing — Yaman Umuroglu, Lahiru Rasnayake, Magnus Sjalander, 2018 https://scholar.google.com/scholar?q=BISMO%3A+A+Scalable+Bit-Serial+Matrix+Multiplication+Overlay+for+Reconfigurable+Computing 8. Product Quantization for Nearest Neighbor Search — Hervé Jégou, Matthijs Douze, Cordelia Schmid, 2011 https://scholar.google.com/scholar?q=Product+Quantization+for+Nearest+Neighbor+Search 9....
0:01[Hal Turing] Alrighty! Thanks for tuning in! Hello AI world! I am your host, Hal Turing, and my co-host is Dr. Ada Shannon.
0:08[Hal Turing] Today we're looking at ANNS-AMP: Accelerating Approximate Nearest Neighbor Search via Adaptive Mixed-Precision Computing. The first author is Mingkai Chen, with Cheng Liu, Shengwen Liang, Lei Zhang, Xiaowei Li and Huawei Li. They're at the Institute of Computing Technology, Chinese Academy of Sciences, and the University of Chinese Academy of Sciences. It's an arXiv paper from June 2026. The question is whether a small runtime predictor can pick just enough numeric precision for each cluster of a vector index, and whether a bit-serial accelerator can turn that into real speed and energy savings.
0:52[Dr. Ada Shannon] The stake is that vector search sits underneath retrieval for LLMs and recommendation systems, and the paper says about 99.9% of its distance arithmetic is spent on vectors that are not neighbors. If you can spend fewer bits on that waste, retrieval gets cheaper. The catch is whether the savings come from the idea or from the custom silicon around it. We'll get there.
1:14[Hal Turing] Start with the basics. What is approximate nearest neighbor search?
1:18[Dr. Ada Shannon] You have a huge pile of embedding vectors and a query vector. You want the few vectors closest to it. Exact search compares against everything, which is too slow, so you accept a small chance of missing a true neighbor in exchange for speed. The neighbor set is tiny next to the corpus, which is why almost all the distance work is wasted.
1:37[Hal Turing] So how does the index avoid touching everything?
1:39[Dr. Ada Shannon] This paper uses the IVF-PQ style, as in Faiss. IVF means vectors are grouped into clusters, and a query probes only the nearest few, a setting called nprobe. PQ, product quantization, from Jégou, Douze and Schmid in 2011, compresses each vector. You split it into M pieces, and each piece becomes a one-byte code pointing into a small codebook. That's similar in spirit to weight quantization in networks, except there's no gradient. It's just k-means.
2:09[Hal Turing] Walk me through a query.
2:11[Dr. Ada Shannon] Five stages. Say the query is a 128-dimensional vector. First, cluster locating: compare the query to every cluster centroid and keep the closest few. Second, residual calculation: subtract each chosen centroid from the query. Third, lookup-table construction: for each of the M pieces, compute the distance from the query piece to every codebook entry. That table is the key object. Fourth, distance calculation: a database vector's distance is just the sum of M table lookups, with no arithmetic on the original vector. Fifth, top-k selection.
2:49[Hal Turing] And which stages hurt?
2:50[Dr. Ada Shannon] Cluster locating and table construction. Those are the two stages that do real distance arithmetic. The paper reports that over 99.9% of that work goes to non-neighbors in both. So that's where the redundancy is.
3:03[Hal Turing] People already try to skip wasted work, though. Why isn't that enough?
3:07[Dr. Ada Shannon] Three families, each with a gap. Index tuning, picking cluster counts and PQ settings offline, is static. It doesn't adapt to the query. Early termination stops a distance computation once the partial result is clearly worse than the current top-k threshold. That needs a top-k list, which is loose early in a search. And table construction doesn't rank candidates, it builds a table, so there's no threshold to compare against. The paper counts essentially nothing removed from that stage by those methods. JUNO, which uses ray-tracing hardware for grid-based pruning, runs into trouble in high dimensions.
3:43[Hal Turing] So the proposal is to keep computing, just coarsely.
3:46[Dr. Ada Shannon] Right. Adaptive mixed precision. Classic mixed precision, like Micikevicius's 2018 FP16 training, is static: a human or a rule picks the types. HAQ and HAWQ pick bit-widths per layer, but still offline. Here the bit-width is chosen per cluster, per query, at runtime. The reasoning is that ranking doesn't need exact distances. A cluster far from the query can be rejected with very few bits. A cluster near the cutoff needs more. The data starts as 8-bit integers, so low precision here means below 8.