Skip to main content

neuro-sparse-deconvolved-predictive-network

Sparse Deconvolved Predictive Network methodology for neural dynamics modeling. Combines sparse coding, deconvolution of hemodynamic/synaptic responses, and predictive temporal modeling for extracting neural dynamics from observed signals. Applies to fMRI/EEG/Ca2+ imaging analysis, neural encoding, brain decoding.

Ir a la instalación

Datos de origen

Repositorio
hiyenwong/ai_collection
Última actividad en el origen
4 de junio de 2026 a las 13:32
Idioma detectado de SKILL.md
inglés
Estrellas
2
Forks
0

Opciones de instalación

De forma predeterminada está seleccionado el prompt que primero revisa el origen. Puedes cambiar a un comando directo o descargar una copia local.

Revisa los archivos de origen

Lee SKILL.md y los archivos complementarios que muestra SkillsMP antes de decidir si quieres instalarlo.

Mostrando SKILL.md

SKILL.md
Instrucciones de origen · Vista previa de solo lectura
name
neuro-sparse-deconvolved-predictive-network
category
neuroscience
description
Sparse Deconvolved Predictive Network methodology for neural dynamics modeling. Combines sparse coding, deconvolution of hemodynamic/synaptic responses, and predictive temporal modeling for extracting neural dynamics from observed signals. Applies to fMRI/EEG/Ca2+ imaging analysis, neural encoding, brain decoding.
trigger
sparse deconvolved, predictive network, neural dynamics extraction, hemodynamic deconvolution, sparse coding neural, predictive temporal modeling, neural encoding decoding
version
1.0.0
created
2026-04-18T00:00:00.000Z
source
arxiv:2506.01234
## Sparse Deconvolved Predictive Network Methodology ### Core Concept Sparse Deconvolved Predictive Networks address the challenge of recovering latent neural dynamics from observed signals that have been convolved with response functions (hemodynamic response in fMRI, synaptic filtering in electrophysiology). The approach combines sparse coding for neural activity representation, deconvolution to remove observation distortions, and predictive temporal models to capture dynamics. ### Theoretical Foundation #### 1. Observation Model The observed signal y(t) is a convolution of neural activity x(t) with a response kernel h(t): y(t) = (h * x)(t) + noise Goal: recover x(t) from y(t) given known or estimated h(t). #### 2. Sparse Coding Prior Neural activity is assumed sparse in some basis: x = D · α, where ||α||₀ << n D is a learned dictionary, α is the sparse code. #### 3. Predictive Temporal Model Sparse codes evolve according to a dynamical system: α(t+1) = f(α(t), u(t)) + ε where u(t) are external inputs and f is a learned transition function. ### Implementation #### Deconvolution with Sparse Prior ```python import numpy as np from scipy.signal import fftconvolve class SparseDeconvolvedPredictiveNetwork: def __init__(self, n_components, response_kernel, lambda_sparse=0.1): self.n_components = n_components self.response_kernel = response_kernel self.lambda_sparse = lambda_sparse self.dictionary = None self.transition_weights = None def deconvolve_sparse(self, observed, max_iter=100): """Recover sparse neural activity from convolved observations""" n = len(observed) # Initialize with Wiener deconvolution H = np.fft.fft(self.response_kernel, n) Y = np.fft.fft(observed) snr = 10 X_wiener = Y * np.conj(H) / (np.abs(H)**2 + 1/snr) neural_init = np.real(np.fft.ifft(X_wiener)) # Iterative sparse refinement neural = neural_init.copy() for _ in range(max_iter): # Compute residual predicted = fftconvolve(neural, self.response_kernel, mode='same') residual = observed - predicted # Sparse update (soft thresholding) gradient = fftconvolve(residual, self.response_kernel[::-1], mode='same') neural = neural + 0.1 * gradient neural = np.sign(neural) * np.maximum(0, np.abs(neural) - self.lambda_sparse) return neural def learn_dictionary(self, neural_signals, n_atoms=64): """Learn sparse dictionary from deconvolved signals""" from sklearn.decomposition import MiniBatchDictionaryLearning patches = self._extract_patches(neural_signals, patch_size=32) mdl = MiniBatchDictionaryLearning( n_components=n_atoms, alpha=self.lambda_sparse, transform_algorithm='lasso_lars' ) self.dictionary = mdl.fit(patches).components_ return self.dictionary def predict_dynamics(self, neural_history, horizon=10): """Predict future neural dynamics using learned transition model""" if self.transition_weights is None: self._learn_transition(neural_history) predictions = [] current = neural_history[-1] for _ in range(horizon): next_state = self.transition_weights @ current predictions.append(next_state) current = next_state return np.array(predictions) def _learn_transition(self, neural_history): """Learn linear transition model from history""" X = neural_history[:-1] Y = neural_history[1:] self.transition_weights = np.linalg.lstsq(X, Y, rcond=None)[0].T def _extract_patches(self, signal, patch_size): patches = [] for i in range(len(signal) - patch_size + 1): patches.append(signal[i:i+patch_size]) return np.array(patches) ``` #### Full Pipeline ```python def full_pipeline(observed_signal, response_kernel, n_components=64): """Complete sparse deconvolved predictive network pipeline""" model = SparseDeconvolvedPredictiveNetwork( n_components=n_components, response_kernel=response_kernel ) # Step 1: Deconvolve neural_activity = model.deconvolve_sparse(observed_signal) # Step 2: Learn sparse dictionary dictionary = model.learn_dictionary(neural_activity) # Step 3: Predict future dynamics predictions = model.predict_dynamics(neural_activity, horizon=100) return neural_activity, dictionary, predictions ``` ### Key Insights 1. **Deconvolution Quality Determines Performance**: Accurate response kernel estimation is critical. Use data-driven kernel estimation when canonical kernels are insufficient. 2. **Sparsity Level Selection**: Cross-validate the sparsity parameter. Over-sparsification loses temporal structure; under-sparsification includes noise. 3. **Multi-Scale Analysis**: Apply deconvolution at multiple temporal scales to capture both fast neural events and slow modulatory processes. 4. **Causal vs Non-Causal Kernels**: Hemodynamic responses are causal (no future influence). Ensure deconvolution respects causality. ### Pitfalls 1. **Kernel Mismatch**: Using an incorrect response kernel produces systematic artifacts. Validate kernel estimates with independent data. 2. **Edge Effects**: Deconvolution produces artifacts at signal boundaries. Use padding or discard edge samples. 3. **Non-Negativity Violation**: Neural activity should be non-negative. Enforce non-negativity constraints in the sparse coding step. 4. **Temporal Autocorrelation**: Residual autocorrelation indicates incomplete deconvolution. Check residuals for whiteness. ### Validation Methods 1. **Ground Truth Simulation**: Generate synthetic data with known neural activity and response kernel, verify recovery accuracy. 2. **Cross-Validation**: Split data into training/test sets, validate prediction accuracy on held-out data. 3. **Biological Plausibility**: Check that recovered neural activity respects known physiological constraints (firing rates, refractory periods). 4. **Comparison with Alternative Methods**: Compare against Wiener deconvolution, Richardson-Lucy, and total variation regularized deconvolution.
Ver en GitHub