{"id":18110702,"url":"https://github.com/coganlab/cross_patient_speech_decoding","last_synced_at":"2026-02-24T21:33:05.740Z","repository":{"id":130535449,"uuid":"608659371","full_name":"coganlab/cross_patient_speech_decoding","owner":"coganlab","description":"Modification of RNNs for seq2seq phoneme decoding","archived":false,"fork":false,"pushed_at":"2025-01-15T20:30:35.000Z","size":216468,"stargazers_count":1,"open_issues_count":9,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-01-15T21:53:24.577Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coganlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-02T13:33:33.000Z","updated_at":"2024-12-19T19:25:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"df4379ee-781b-464a-b356-e0e547822a3f","html_url":"https://github.com/coganlab/cross_patient_speech_decoding","commit_stats":{"total_commits":660,"total_committers":2,"mean_commits":330.0,"dds":"0.0015151515151514694","last_synced_commit":"7cf0d6ca1a89b8e265fa1849a01e6f5c99b78c05"},"previous_names":["coganlab/cross_pt_speech_decoding"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coganlab%2Fcross_patient_speech_decoding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coganlab%2Fcross_patient_speech_decoding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coganlab%2Fcross_patient_speech_decoding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coganlab%2Fcross_patient_speech_decoding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coganlab","download_url":"https://codeload.github.com/coganlab/cross_patient_speech_decoding/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238478900,"owners_count":19479225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-01T00:11:09.556Z","updated_at":"2025-10-27T10:30:43.276Z","avatar_url":"https://github.com/coganlab.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Shared latent representations of speech production for cross-patient speech decoding\n\n![](figures/overview_fig.png)\n\n## Overview\n\nThis repository contains code used in analyses and creation of figures for the paper \"Shared latent representations of speech production for cross-patient speech decoding\". \n\nWe use an approach based on canonical correlation analysis (CCA) to learn an alignment between latent neural representations of speech production recorded with micro-electrocorticography (μECoG) arrays from multiple patients. We show that patient-specific neural data can be aligned to a shared cross-patient latent space, enabling the training of cross-patient speech decoding models that outperform patient-specific models.\n\nFor more details, please check out our preprint! [Spalding et al. 2025, bioRxiv](https://www.biorxiv.org/content/10.1101/2025.08.21.671516v2)\n\n## Requirements\n\nAll analyses were performed in Python $\\geq$ 3.10. Packages used can be found in the `environment.yml` and `requirements.txt` files. \n\n## Usage\n\nAnalyses and code for all main figures in the paper (excluding figure 1, which is primarily illustrative) can be found in `aligned_decoding/figure_analyses/fig_X.ipynb` as notebooks stepping through anaylses performed in each figure. Analyses and code for relevant supplementary figures is also included in `aligned_decoding/figure_analyses/supp/supp_fig_X.ipynb`.\n\nAditional directories within `aligned_decoding/` contain `.py` files with functionality relevant to various analyses:\n- `aligned_decoding/alignment/`: Classes and utility funcitons for various alignment methods, including CCA, multiview CCA (MCCA), and joint PCA.\n- `aligned_decoding/decoders/`: Wrapper classes to enable easy cross-patient decoding with *scikit-learn*-style decoders.\n- `aligned_decoding/decomposition/`: Dimensionality reduction methods, including a wrapper to perform dimensionality reduction while properly reshaping data with more than two dimensions.\n- `aligned_decoding/nn_models/`: Classes and utility functions defining *PyTorch Lightning* modules for training sequence-to-sequence recurrent neural networks with both patient-specific and cross-patient inputs.\n- `aligned_decoding/processing_utils/`: Utility functions for processing neural data, including data saving and subsampling.\n- `aligned_decoding/scripts/`: Scripts for running various decoding analyses (e.g. SVM-based, RNN-based, subsampled w.r.t. spatial characteristics, etc.) structured to be called by upstream compute-cluster job scripts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoganlab%2Fcross_patient_speech_decoding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoganlab%2Fcross_patient_speech_decoding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoganlab%2Fcross_patient_speech_decoding/lists"}