{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/are-we-there-yet-product-quantization-and-its","title":"PQA: Exploring the Potential of Product Quantization in DNN Hardware Acceleration","arxiv_id":"2305.18334","date":"2023-05-25","proceeding":null,"authors":["Ahmed F. AbouElhamayed","Angela Cui","Javier Fernandez-Marques","Nicholas D. Lane","Mohamed S. Abdelfattah"],"abstract":"Conventional multiply-accumulate (MAC) operations have long dominated computation time for deep neural networks (DNNs), espcially convolutional neural networks (CNNs). Recently, product quantization (PQ) has been applied to these workloads, replacing MACs with memory lookups to pre-computed dot products. To better understand the efficiency tradeoffs of product-quantized DNNs (PQ-DNNs), we create a custom hardware accelerator to parallelize and accelerate nearest-neighbor search and dot-product lookups. Additionally, we perform an empirical study to investigate the efficiency--accuracy tradeoffs of different PQ parameterizations and training methods. We identify PQ configurations that improve performance-per-area for ResNet20 by up to 3.1$\\times$, even when compared to a highly optimized conventional DNN accelerator, with similar improvements on two additional compact DNNs. When comparing to recent PQ solutions, we outperform prior work by $4\\times$ in terms of performance-per-area with a 0.6% accuracy degradation. Finally, we reduce the bitwidth of PQ operations to investigate the impact on both hardware efficiency and accuracy. With only 2-6-bit precision on three compact DNNs, we were able to maintain DNN accuracy eliminating the need for DSPs.","url_abs":"https://arxiv.org/abs/2305.18334v2","url_pdf":"https://arxiv.org/pdf/2305.18334v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"are-we-there-yet-product-quantization-and-its","repo_url":"https://github.com/abdelfattah-lab/PQA","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"none","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"quantization","task_name":"Quantization"}],"methods":[{"method_slug":"speed","method_name":"SPEED"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2305.18334","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.18334"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/abdelfattah-lab/PQA","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":1,"unverified":10},"by_repo_kind":{"listed":{"samples":11,"ran":1,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"c7497cceeb28ffef","entry":"read_pickle","repo":"abdelfattah-lab/PQA","repo_kind":"listed","path":"analytical_model/mse_vs_latency.py","file_url":"https://github.com/abdelfattah-lab/PQA/blob/HEAD/analytical_model/mse_vs_latency.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c7497cceeb28ffef"}},{"code_sha256_prefix":"168f624d43ebbd3a","entry":"convert_to_heatmap_matrix","repo":"abdelfattah-lab/PQA","repo_kind":"listed","path":"analytical_model/utils/heatmap.py","file_url":"https://github.com/abdelfattah-lab/PQA/blob/HEAD/analytical_model/utils/heatmap.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"168f624d43ebbd3a"}},{"code_sha256_prefix":"c6008e7b113c67eb","entry":"generate_layer","repo":"abdelfattah-lab/PQA","repo_kind":"listed","path":"analytical_model/layer_params_dimensions_speedup_heatmap.py","file_url":"https://github.com/abdelfattah-lab/PQA/blob/HEAD/analytical_model/layer_params_dimensions_speedup_heatmap.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c6008e7b113c67eb"}},{"code_sha256_prefix":"f6368817c0e56f06","entry":"generate_networks","repo":"abdelfattah-lab/PQA","repo_kind":"listed","path":"analytical_model/layer_params_dimensions_speedup_heatmap.py","file_url":"https://github.com/abdelfattah-lab/PQA/blob/HEAD/analytical_model/layer_params_dimensions_speedup_heatmap.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f6368817c0e56f06"}},{"code_sha256_prefix":"405e2560392db019","entry":"get_x_from_cnt_draw","repo":"abdelfattah-lab/PQA","repo_kind":"listed","path":"analytical_model/speedup_vs_layer_params_different_hardware.py","file_url":"https://github.com/abdelfattah-lab/PQA/blob/HEAD/analytical_model/speedup_vs_layer_params_different_hardware.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"405e2560392db019"}},{"code_sha256_prefix":"4723272f6b0f68e3","entry":"get_y_from_cnt_draw","repo":"abdelfattah-lab/PQA","repo_kind":"listed","path":"analytical_model/speedup_vs_layer_params_different_hardware.py","file_url":"https://github.com/abdelfattah-lab/PQA/blob/HEAD/analytical_model/speedup_vs_layer_params_different_hardware.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4723272f6b0f68e3"}},{"code_sha256_prefix":"7c54b24192509763","entry":"map_layer","repo":"abdelfattah-lab/PQA","repo_kind":"listed","path":"analytical_model/speedup_vs_layer_params_different_hardware.py","file_url":"https://github.com/abdelfattah-lab/PQA/blob/HEAD/analytical_model/speedup_vs_layer_params_different_hardware.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7c54b24192509763"}},{"code_sha256_prefix":"0345716a406bb238","entry":"run_on_hardware","repo":"abdelfattah-lab/PQA","repo_kind":"listed","path":"analytical_model/mse_vs_latency.py","file_url":"https://github.com/abdelfattah-lab/PQA/blob/HEAD/analytical_model/mse_vs_latency.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0345716a406bb238"}},{"code_sha256_prefix":"758642da3310783f","entry":"simulate_layer_on_dla","repo":"abdelfattah-lab/PQA","repo_kind":"listed","path":"analytical_model/model.py","file_url":"https://github.com/abdelfattah-lab/PQA/blob/HEAD/analytical_model/model.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"758642da3310783f"}},{"code_sha256_prefix":"d547beb110ce56bb","entry":"simulate_layer_on_mobile_dla","repo":"abdelfattah-lab/PQA","repo_kind":"listed","path":"analytical_model/model.py","file_url":"https://github.com/abdelfattah-lab/PQA/blob/HEAD/analytical_model/model.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d547beb110ce56bb"}},{"code_sha256_prefix":"ee337d44ef3e25fc","entry":"simulate_layer_on_pq","repo":"abdelfattah-lab/PQA","repo_kind":"listed","path":"analytical_model/model.py","file_url":"https://github.com/abdelfattah-lab/PQA/blob/HEAD/analytical_model/model.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ee337d44ef3e25fc"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}