Lightweight multi-task 1D convolutional neural network for decoding simulated wireless LC spectra. The model jointly estimates normalized sensor-region concentration and classifies the operating phase (early, active release, or post-release diffusion).
Evidence boundary: this repository contains COMSOL-FE-informed synthetic feasibility data, not experimental wireless measurements, in-vivo validation, or a clinically validated decoder. Experimental calibration is required before practical or biological claims.
- 9 input channels sampled at 64 frequency points
- 8,981 trainable parameters
- device-grouped train/validation/test splits
- held-out-device MAE: 0.00238 µM
- held-out-device macro-F1: 0.963
- explicit out-of-distribution stress test
- checkpoint loading uses PyTorch's restricted
weights_only=Truemode
.
├── artifacts/ # Curated model, metrics, and result figure
├── data/ # Synthetic dataset and provenance manifest
├── src/wireless_lc_1dcnn/ # Model, training, and inference code
├── tests/ # Shape, artifact, and safe-loading checks
├── CITATION.cff
├── SECURITY.md
└── pyproject.toml
The original model was trained under Python 3.10 and PyTorch 2.5.1. Because that PyTorch release now has published security advisories, new installations require PyTorch 2.13 or later. Create an isolated environment before installation:
conda create -n wireless-lc-1dcnn python=3.10 -y
conda activate wireless-lc-1dcnn
python -m pip install --upgrade pip
python -m pip install -e ".[dev]"For a CUDA-enabled PyTorch build, follow the official PyTorch installation selector for your CUDA version and install a supported PyTorch 2.13+ build before installing this project. Do not downgrade to the historical training version merely to reproduce the environment.
python -m pytest
python -m wireless_lc_1dcnn.inference --sample-index 0The bundled dataset is synthetic and split by virtual device. No device appears in more than one split.
python -m wireless_lc_1dcnn.train --device auto --no-live --no-holdTraining writes generated files to outputs/, which is intentionally excluded from version control. Promote only reviewed artifacts into artifacts/.
The network returns:
concentration: normalized concentration estimate,C/Cmaxstate_logits: logits for the three operating phasesattention: frequency-axis attention weights
This repository contains no credentials, personal paths, unpublished documents, or raw COMSOL project files. Treat model files from third parties as untrusted. The included loader rejects general pickle deserialization and validates checkpoint structure before loading. See SECURITY.md.
- Random seed:
20260818 - Full equivalent-circuit sweep: 11.5–15.5 MHz, 1,001 points
- Network input: 64 sampled frequency points
- Dataset: 3,750 samples from 150 virtual devices
- Validation scope and class counts are recorded in
data/dataset_manifest.json
The full frequency sweep is generated by an equivalent circuit informed by finite-element parameters; it is not 1,001 separate 3-D COMSOL solves.
The source code is released under the MIT License. The license permits reuse, modification, and redistribution with preservation of the copyright and license notice. Citation of the accompanying research is requested for academic use.