Code from the paper: Strock, A., Mistry, P.K., Menon, V. (2025). Personalized deep neural networks reveal mechanisms of math learning disabilities in children. Science Advances.
In this project we use artificial neural networks to model Mathematical Learning Disabilities (MLD) in children as resulting from an higher excitability level of neurons. We use the structure CORnet without any pre-training, and we train it to solve addition and subtraction visually presented.
Make a new environment and install packages from requirements.txt, e.g. pip install -r requirements.txt.
Clone external repositories.
mkdir common/packages
cd common/packages
git clone https://github.com/dicarlolab/CORnet
git clone https://github.com/schung039/neural_manifolds_replicaMFTsource environment.shsubmit8c dataset/addsub18_handwritten.pysubmit8c dataset/addsub18_font.pysubmit1c dataset/behavior_addsub18.pyTraining the model
submit1g "model/train.py --scale 1.0"Testing the model
submit1g "model/test.py --scale 1.0 --saveall --step $(seq -s ' ' 0 100 3800)"Representational similarity analysis
submit8c analysis/similarity_analysis/addsub_similarity.py --time 1-00:00:00Behavioral analysis
submit8c analysis/behavioral_analysis/numberline_entropy.pyManifold analysis
submit8c analysis/manifold_analysis/step_manifold.py --psteps $(seq -s ' ' 0 100 3800) --time 2-00:00:00 -p owners,normal --pmax 20 --mem 20G -c 32To obtain all Figures of manuscript:
bash paper/figure_all.shTo obtain Figure X of manuscript
python paper/figureX.pyTo obtain Figure SI X of manuscript
python paper/figureSX.py