{"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/arxiv-2606-17249","title":"From Compression to Deployment: Real-Time and Energy-Efficient FastGRNN on Ultra-Constrained Microcontrollers","arxiv_id":"2606.17249","date":"2026-06-15","proceeding":null,"authors":["Emre Can Kizilates"],"abstract":"The dominant trajectory of modern machine learning has been to scale up: larger models, larger accelerators, larger memory budgets. Yet a multi-year global semiconductor supply constraint and the growing energy and carbon cost of always-online inference expose the fragility of this trajectory and motivate the opposite direction: refactoring AI and ML algorithms to fit the small, ubiquitous microcontrollers already in mass production in wearables, sensors, and edge appliances. We present an end-to-end open-source reproduction of FastGRNN, a compact gated recurrent cell, deployed on two bare-metal targets: the 8-bit Arduino (ATmega328P) and the 16-bit MSP430 (no hardware multiplier; 16 KB Flash; 512 B SRAM). Our compression pipeline combines low-rank weight factorization, iterative hard-thresholding sparsity, and per-tensor Q15 post-training quantization with explicit activation calibration. The deployed model occupies 566 bytes of weights and achieves macro F1 = 0.918 (seed 0; five-seed Q15 mean 0.853+-0.107) on the HAPT test set. It matches a PyTorch reference at 100% prediction agreement across 3,399 test windows (MCU seed 0; 99.91-100% C-equivalent across five seeds). Both platforms sustain real-time 50 Hz streaming inference (9.21 ms per sample on Arduino; 13 ms on MSP430), where a 256-entry sigmoid/tanh look-up table delivers a 30.5x speedup on the multiplier-less MSP430. Four contributions extend the original FastGRNN paper: (i) cross-platform bit-equivalent deterministic inference; (ii) characterization of recurrent warm-up latency (median 74 samples, 1.48 s; worst-case 125 samples, 2.50 s over 100 test windows); (iii) a deployable look-up-table recipe for multiplier-less embedded targets; and (iv) hardware energy characterization showing 17.7 mW active inference power, <0.09 mW idle power, and 96.7% energy reduction with the LUT.","url_abs":"https://arxiv.org/abs/2606.17249","url_pdf":"https://arxiv.org/pdf/2606.17249","source":{"archive":null,"snapshot":"2025-07-28","note":"not in the Papers with Code archive (frozen at the snapshot)","row_kind":"graph","title_abstract_authors_date":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)"},"code_links":[],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2606.17249","atlas_url":"https://app.syntology.ai/?focus=2606.17249","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2606.17249"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/emre1998/fastgrnn-har","reach":null}],"summary":{"ran":16,"unverified":1},"by_repo_kind":{"found_in_text":{"samples":17,"ran":16,"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":"4efeadb2e29309c1","entry":"arr","repo":"emre1998/fastgrnn-har","repo_kind":"found_in_text","path":"analyze_best_route.py","file_url":"https://github.com/emre1998/fastgrnn-har/blob/HEAD/analyze_best_route.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4efeadb2e29309c1"}},{"code_sha256_prefix":"0341425cb85fcd56","entry":"dense","repo":"emre1998/fastgrnn-har","repo_kind":"found_in_text","path":"analyze_ablation.py","file_url":"https://github.com/emre1998/fastgrnn-har/blob/HEAD/analyze_ablation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0341425cb85fcd56"}},{"code_sha256_prefix":"3b4ca8c62daf5f9f","entry":"fastgrnn_budget_seeds","repo":"emre1998/fastgrnn-har","repo_kind":"found_in_text","path":"analyze_bootstrap.py","file_url":"https://github.com/emre1998/fastgrnn-har/blob/HEAD/analyze_bootstrap.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3b4ca8c62daf5f9f"}},{"code_sha256_prefix":"488a82fc1daf0672","entry":"fastgrnn_step","repo":"emre1998/fastgrnn-har","repo_kind":"found_in_text","path":"fastgrnn_numpy.py","file_url":"https://github.com/emre1998/fastgrnn-har/blob/HEAD/fastgrnn_numpy.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"488a82fc1daf0672"}},{"code_sha256_prefix":"b4cf7c1fad47f312","entry":"fp32_of","repo":"emre1998/fastgrnn-har","repo_kind":"found_in_text","path":"analyze_deploy_budget.py","file_url":"https://github.com/emre1998/fastgrnn-har/blob/HEAD/analyze_deploy_budget.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b4cf7c1fad47f312"}},{"code_sha256_prefix":"23f107197e9436ff","entry":"load","repo":"emre1998/fastgrnn-har","repo_kind":"found_in_text","path":"analyze_deploy_budget.py","file_url":"https://github.com/emre1998/fastgrnn-har/blob/HEAD/analyze_deploy_budget.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"23f107197e9436ff"}},{"code_sha256_prefix":"5063afef902ba042","entry":"load_f1","repo":"emre1998/fastgrnn-har","repo_kind":"found_in_text","path":"analyze_ablation.py","file_url":"https://github.com/emre1998/fastgrnn-har/blob/HEAD/analyze_ablation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5063afef902ba042"}},{"code_sha256_prefix":"502d786e4b2355b6","entry":"make_loader","repo":"emre1998/fastgrnn-har","repo_kind":"found_in_text","path":"train_fastgrnn.py","file_url":"https://github.com/emre1998/fastgrnn-har/blob/HEAD/train_fastgrnn.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"502d786e4b2355b6"}},{"code_sha256_prefix":"57a18eb12b46f21f","entry":"pair","repo":"emre1998/fastgrnn-har","repo_kind":"found_in_text","path":"analyze_drift.py","file_url":"https://github.com/emre1998/fastgrnn-har/blob/HEAD/analyze_drift.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"57a18eb12b46f21f"}},{"code_sha256_prefix":"7be47579340ddc69","entry":"params_dense","repo":"emre1998/fastgrnn-har","repo_kind":"found_in_text","path":"analyze_footprint.py","file_url":"https://github.com/emre1998/fastgrnn-har/blob/HEAD/analyze_footprint.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"7be47579340ddc69"}},{"code_sha256_prefix":"86cf602e4a2a7bea","entry":"perclass","repo":"emre1998/fastgrnn-har","repo_kind":"found_in_text","path":"analyze_perclass.py","file_url":"https://github.com/emre1998/fastgrnn-har/blob/HEAD/analyze_perclass.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"86cf602e4a2a7bea"}},{"code_sha256_prefix":"e1054c18e8dbdcc6","entry":"run_sequence","repo":"emre1998/fastgrnn-har","repo_kind":"found_in_text","path":"fastgrnn_numpy.py","file_url":"https://github.com/emre1998/fastgrnn-har/blob/HEAD/fastgrnn_numpy.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e1054c18e8dbdcc6"}},{"code_sha256_prefix":"156855983d880ed5","entry":"sigmoid","repo":"emre1998/fastgrnn-har","repo_kind":"found_in_text","path":"fastgrnn_numpy.py","file_url":"https://github.com/emre1998/fastgrnn-har/blob/HEAD/fastgrnn_numpy.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"156855983d880ed5"}},{"code_sha256_prefix":"3952718869a58a08","entry":"sparse_fp32","repo":"emre1998/fastgrnn-har","repo_kind":"found_in_text","path":"analyze_ablation.py","file_url":"https://github.com/emre1998/fastgrnn-har/blob/HEAD/analyze_ablation.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3952718869a58a08"}},{"code_sha256_prefix":"0a60651079a87d84","entry":"sram_working_set","repo":"emre1998/fastgrnn-har","repo_kind":"found_in_text","path":"analyze_footprint.py","file_url":"https://github.com/emre1998/fastgrnn-har/blob/HEAD/analyze_footprint.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"0a60651079a87d84"}},{"code_sha256_prefix":"f333f0e394a1a6c6","entry":"tier1_seeds","repo":"emre1998/fastgrnn-har","repo_kind":"found_in_text","path":"analyze_bootstrap.py","file_url":"https://github.com/emre1998/fastgrnn-har/blob/HEAD/analyze_bootstrap.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f333f0e394a1a6c6"}},{"code_sha256_prefix":"2a1e46172a51de87","entry":"jload","repo":"emre1998/fastgrnn-har","repo_kind":"found_in_text","path":"analyze_bootstrap.py","file_url":"https://github.com/emre1998/fastgrnn-har/blob/HEAD/analyze_bootstrap.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"2a1e46172a51de87"}}]},"arxiv_metadata":{"licence":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license)","fields":["title","abstract","authors","date"],"primary_category":"cs.LG","source":"arxiv_2026.jsonl"},"syntology_extracted_results":{"kind":"leaderboard_placements","source":"Syntology's leaderboard-shaped extractor over the paper's own arXiv-HTML tables: a model pointed at a cell, the number was read from that cell and checked against the board's metric, dataset, split and scale, and an independent check accepted the entry; not reviewed by the paper's authors or the archive's editors","extractor_model":"global.anthropic.claude-sonnet-4-5-20250929-v1:0","verifier_model":null,"prompt_sha":"fa63d4bb9d755694","coverage":{"sentence":"Syntology has checked 6,885 of the 9,623 papers on this site that are newer than the archive; results from the others appear after they are checked.","papers_newer_than_archive":9623,"papers_checked":6885},"entries":[],"not_placed":{"boards":0,"rejected_by_independent_check":0,"refused_by_a_rule":0,"check_did_not_answer":0,"proposed_without_a_cell":0,"declined_by_site":0}}}