{"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-2607-18149","title":"Differentiable Logic Gate Networks for Low-Latency EEG Classification on Edge Devices","arxiv_id":"2607.18149","date":"2026-07-20","proceeding":null,"authors":["Shyamal Y. Dharia","Stephen D. Smith","Camilo E. Valderrama"],"abstract":"Real-time EEG classification on edge devices is bottlenecked by the floating-point arithmetic of conventional neural networks. We investigated Differentiable Logic Gate Networks (Diff-Logic) as a hardware-native alternative that compiles models into pure Boolean circuits executable via bitwise CPU operations. Through rigorous iso-parameter experiments across four EEG datasets spanning two classification tasks, binary dementia detection and 3-class emotion recognition, we compared Diff-Logic against matched-capacity Multi-Layer Perceptron (MLP) and Binarized Neural Network (BNN) baselines at four complexity tiers (50k-500k parameters). On dementia screening, Diff-Logic achieved 80.2% Macro F1, outperforming the MLP baseline by 6.8%. On emotion recognition, the MLP retained a moderate performance advantage but incurred a 2.3$\\times$ higher latency and 14$\\times$ larger model size when deployed on a power-constrained (7W) Nvidia Jetson Orin Nano CPU (Single-core). Critically, Diff-Logic inference time remained nearly constant across a 10$\\times$ increase in model scale, achieving a peak speedup of 2.9$\\times$ over MLPs at the largest complexity tier. Our results establish logic-based neural architectures as a practical paradigm for resource-constrained brain-computer interfaces, achieving competitive or superior performance while natively satisfying the latency and memory constraints of portable edge deployment. Code is available on GitHub: https://github.com/Shyamal-Dharia/eeg-difflogic","url_abs":"https://arxiv.org/abs/2607.18149","url_pdf":"https://arxiv.org/pdf/2607.18149","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":{"atlas_url":"https://app.syntology.ai/?focus=2607.18149","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2607.18149"}},"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":[{"mentioned_in_github":null,"is_official":null,"provenance":"deterministic:regex_extraction","mentioned_in_paper":null,"url":"https://github.com/Shyamal-Dharia/eeg-difflogic","reach":null}],"summary":{"ran":17},"by_repo_kind":{"found_in_text":{"samples":17,"ran":17,"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":17,"samples":[{"code_sha256_prefix":"a3234c4b4cd4b652","entry":"BNN_ALZ","repo":"Shyamal-Dharia/eeg-difflogic","repo_kind":"found_in_text","path":"src/models_bnn.py","file_url":"https://github.com/Shyamal-Dharia/eeg-difflogic/blob/HEAD/src/models_bnn.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a3234c4b4cd4b652"}},{"code_sha256_prefix":"2ee879c744732c2d","entry":"BNN_ALZ_50k","repo":"Shyamal-Dharia/eeg-difflogic","repo_kind":"found_in_text","path":"src/models_bnn.py","file_url":"https://github.com/Shyamal-Dharia/eeg-difflogic/blob/HEAD/src/models_bnn.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2ee879c744732c2d"}},{"code_sha256_prefix":"33d7711600abb959","entry":"BNN_SEED","repo":"Shyamal-Dharia/eeg-difflogic","repo_kind":"found_in_text","path":"src/models_bnn.py","file_url":"https://github.com/Shyamal-Dharia/eeg-difflogic/blob/HEAD/src/models_bnn.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"33d7711600abb959"}},{"code_sha256_prefix":"50c2393cc7fca347","entry":"MLPBaseline_ALZ","repo":"Shyamal-Dharia/eeg-difflogic","repo_kind":"found_in_text","path":"src/models_baseline.py","file_url":"https://github.com/Shyamal-Dharia/eeg-difflogic/blob/HEAD/src/models_baseline.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"50c2393cc7fca347"}},{"code_sha256_prefix":"2ee81d444a15ecf2","entry":"MLPBaseline_ALZ_50k","repo":"Shyamal-Dharia/eeg-difflogic","repo_kind":"found_in_text","path":"src/models_baseline.py","file_url":"https://github.com/Shyamal-Dharia/eeg-difflogic/blob/HEAD/src/models_baseline.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2ee81d444a15ecf2"}},{"code_sha256_prefix":"b5a72f45babb0fe6","entry":"MLPBaseline_SEED","repo":"Shyamal-Dharia/eeg-difflogic","repo_kind":"found_in_text","path":"src/models_baseline.py","file_url":"https://github.com/Shyamal-Dharia/eeg-difflogic/blob/HEAD/src/models_baseline.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b5a72f45babb0fe6"}},{"code_sha256_prefix":"db0f134767fa050d","entry":"binarize_with_train_minmax","repo":"Shyamal-Dharia/eeg-difflogic","repo_kind":"found_in_text","path":"src/helper.py","file_url":"https://github.com/Shyamal-Dharia/eeg-difflogic/blob/HEAD/src/helper.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"db0f134767fa050d"}},{"code_sha256_prefix":"08a2654ceb28b893","entry":"count_parameters","repo":"Shyamal-Dharia/eeg-difflogic","repo_kind":"found_in_text","path":"src/models_alz.py","file_url":"https://github.com/Shyamal-Dharia/eeg-difflogic/blob/HEAD/src/models_alz.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"08a2654ceb28b893"}},{"code_sha256_prefix":"67b3a0d4f3dca37e","entry":"count_params","repo":"Shyamal-Dharia/eeg-difflogic","repo_kind":"found_in_text","path":"src/jetson_benchmarking.py","file_url":"https://github.com/Shyamal-Dharia/eeg-difflogic/blob/HEAD/src/jetson_benchmarking.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"67b3a0d4f3dca37e"}},{"code_sha256_prefix":"012ab5baba1a9418","entry":"create_trial_level_folds","repo":"Shyamal-Dharia/eeg-difflogic","repo_kind":"found_in_text","path":"src/helper_seed.py","file_url":"https://github.com/Shyamal-Dharia/eeg-difflogic/blob/HEAD/src/helper_seed.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"012ab5baba1a9418"}},{"code_sha256_prefix":"8471c0f00b188cd1","entry":"create_window_level_folds_simple","repo":"Shyamal-Dharia/eeg-difflogic","repo_kind":"found_in_text","path":"src/helper_seed.py","file_url":"https://github.com/Shyamal-Dharia/eeg-difflogic/blob/HEAD/src/helper_seed.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8471c0f00b188cd1"}},{"code_sha256_prefix":"2b458dd810d0fc44","entry":"get_class_weights","repo":"Shyamal-Dharia/eeg-difflogic","repo_kind":"found_in_text","path":"src/train_parallel.py","file_url":"https://github.com/Shyamal-Dharia/eeg-difflogic/blob/HEAD/src/train_parallel.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2b458dd810d0fc44"}},{"code_sha256_prefix":"47d0a8f0bc29303b","entry":"get_file_size_kb","repo":"Shyamal-Dharia/eeg-difflogic","repo_kind":"found_in_text","path":"src/jetson_benchmarking.py","file_url":"https://github.com/Shyamal-Dharia/eeg-difflogic/blob/HEAD/src/jetson_benchmarking.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"47d0a8f0bc29303b"}},{"code_sha256_prefix":"f6778edc84b47e8b","entry":"is_model_done","repo":"Shyamal-Dharia/eeg-difflogic","repo_kind":"found_in_text","path":"src/train_parallel.py","file_url":"https://github.com/Shyamal-Dharia/eeg-difflogic/blob/HEAD/src/train_parallel.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f6778edc84b47e8b"}},{"code_sha256_prefix":"2ad6251ce7b1a934","entry":"load_data","repo":"Shyamal-Dharia/eeg-difflogic","repo_kind":"found_in_text","path":"src/helper.py","file_url":"https://github.com/Shyamal-Dharia/eeg-difflogic/blob/HEAD/src/helper.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2ad6251ce7b1a934"}},{"code_sha256_prefix":"b5e0fc48b9640c2b","entry":"load_data_asmr","repo":"Shyamal-Dharia/eeg-difflogic","repo_kind":"found_in_text","path":"src/helper.py","file_url":"https://github.com/Shyamal-Dharia/eeg-difflogic/blob/HEAD/src/helper.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b5e0fc48b9640c2b"}},{"code_sha256_prefix":"ed9513075beeabd8","entry":"load_seed_data_structured","repo":"Shyamal-Dharia/eeg-difflogic","repo_kind":"found_in_text","path":"src/helper_seed.py","file_url":"https://github.com/Shyamal-Dharia/eeg-difflogic/blob/HEAD/src/helper_seed.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ed9513075beeabd8"}}]},"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":null}