Data-driven reduced modeling of neural dynamics.
The 4 matches
- [1] § Results › A model for context-dependent decision-making ↔ src/rnn_paper/SSMfunctions.py, lines 93–102 · score 0.58 · Manifold Fitting Error, trajectories projected, spectral subspace, MFE, RNN, SSM
- [2] § Methods › The Vanilla RNN models › Multitasking RNN: memory-pro task ↔ mt demo.ipynb, lines 42–84 · score 0.57 · Memory Pro task, memory period, stimulus, vector, sensory
- [3] § Methods › The theory of spectral submanifolds › Data-driven computations of SSMs ↔ src/rnn_paper/SSMfunctions.py, lines 93–102 · score 0.52 · manifold fitting error, lifts, MFE, trajectories, SSM
- [4] § Methods › The Vanilla RNN models › Sine-wave generator RNN ↔ swgRNN/utils/UtilsSamplingLocs.py, lines 140–171 · score 0.50 · sine wave generator, network, RNN
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 289 lines · 11 KB · MIT · 2 matches
- import numpy as np
- import scipy as sp
- import sympy as sym
- from IPython.display import display, Math, Latex
- from matplotlib import pyplot as plt
- from rnn_paper.utils import GenerateSymbols
- # Given coefficients and exponents of the polynomial expansion, computes the polynomial expansion
- def evaluate_polynomial(C, I, P, symbolic = False ):
- # C is the coefficient (dim(SSM) \times m_order)-matrix
- # I is the exponent (m_order \times dim(SSM))-matrix
- # P is the d-dimensional vector to expand in monomials
- if len(np.shape(P))!= 1:
- PHI = np.ones((np.shape(I)[0],*np.shape(P)[1:]), dtype = complex)
- else:
- PHI = np.ones((np.shape(I)[0]),dtype =complex)
- if symbolic:
- PHI = sym.MutableDenseNDimArray(PHI)
- C = np.round(C, 3)
- for i, exp in enumerate(I):
- for j in range(np.shape(P)[0]):
- PHI[i] = PHI[i]*np.power(P[j], exp[j])
- if len(np.shape(P))!= 1:
- return (np.tensordot(C, PHI, axes = 1))
- else:
- return np.dot(C, PHI)
- # Given coefficients and exponents of the (autonomous) SSM, computes the SSM expansion
- def construct_SSM(y, mfldCoeffs, mfldExps, symbolic = False):
- if symbolic == True:
- return evaluate_polynomial(mfldCoeffs, mfldExps, y, symbolic = symbolic)
- return evaluate_polynomial(mfldCoeffs, mfldExps,y)
- # Given coefficients and exponents of the (autonomous) ROM, computes the ROM expansion
- def ROM0(eta, rdCoeffs, rdExps, symbolic = False):
- if symbolic == True:
- return evaluate_polynomial(rdCoeffs,rdExps, eta, symbolic = symbolic)
- return np.real(evaluate_polynomial(rdCoeffs,rdExps, eta, symbolic = symbolic))
- # To integrate with scipy
- def ROM(t,eta, rdCoeffs, rdExps):
- return evaluate_polynomial(rdCoeffs,rdExps, eta)
- def ROM1D(t, eta, rdCoeffs, rdExps, symbolic = False):
- rhs = 0
- for i in range(rdCoeffs.shape[1]):
- rhs+= eta**rdExps[i,0]*rdCoeffs[0,i]
- return rhs
- def ROM1D0(eta, rdCoeffs, rdExps, symbolic = False):
- rhs = 0
- for i in range(rdCoeffs.shape[1]):
- rhs+= eta**rdExps[i]*rdCoeffs[0,i]
- return rhs
- # Print the ROM
- def printROM(d,rdCoeffs, rdExps):
- etas, detas = GenerateSymbols(d)
- # Construct ROM symbolic equations
- if d ==1:
- rhs = ROM1D0(etas,rdCoeffs, rdExps,symbolic=True)
- else:
- rhs = ROM0(etas,rdCoeffs, rdExps,symbolic=True)
- for i in range(d):
- display(Math(sym.latex(sym.Eq(detas[i], rhs[i]))))
- # Calculate the Normal Mean Trajectory Error
- def calculate_NMTE(nTest, DataTestTrunc, RomTraj):
- NMTE = 0
- for i in range(nTest):
- NMTE += np.mean(np.linalg.norm(DataTestTrunc[i,:,:]-RomTraj[i][:], axis = 0), axis = -1)/np.max(DataTestTrunc[i])
- return NMTE/nTest
- # Calculate the Manifold Fitting Error
- def calculate_MFE(nTest, DataTestTrunc, E, mfldCoeffs, mfldExps):
- MFE = 0
- for i in range(nTest):
- # Lift trajectories projected to the spectral subspace E to the SSM
- LiftTraj = construct_SSM(np.dot(E.T,DataTestTrunc[i]),mfldCoeffs, mfldExps)
- MFE += np.mean(np.linalg.norm(DataTestTrunc[i,:,:]-LiftTraj[:], axis = 0), axis = -1)/np.max(DataTestTrunc[i])
- return MFE/nTest
- ####### Time-Dependent SSMs (Weak Forcing) #######
- # Anchor traj at order 1
- def compute_anchorO1(N, d, t0, nTimesteps, evecs, evals, ns, stable = True, tau = 0.01, dt = 1e-3, tfin = 700):
- Sevals = np.copy(evals)
- if stable == False:
- Sevals[:d] = np.zeros((d), dtype= complex)
- Uevals = np.copy(evals)
- Uevals[d:] = np.zeros((N-d), dtype= complex)
- At = np.exp(np.outer(np.arange(0,nTimesteps*dt, dt), (Sevals)))
- Gt = np.zeros((nTimesteps, N,N), dtype = complex)
- for i in range(nTimesteps):
- Gt[i] = np.diag(At[i])
- Gt = np.matmul(evecs,np.matmul((Gt),np.linalg.inv(evecs)))
- if stable == False:
- Atu = np.exp(np.outer(-np.arange(0,nTimesteps*dt, dt), (Uevals)))
- Gtu = np.zeros((nTimesteps, N,N), dtype = complex)
- for i in range(nTimesteps):
- Gtu[i] = np.diag(Atu[i])
- Gtu = np.matmul(evecs,np.matmul((Gtu),np.linalg.inv(evecs)))
- T, N, M = Gt.shape
- _, M2 = ns.T.shape
- assert M == M2, "Dimensions of G(t) and f(t) must align."
- # Initialize output
- h = np.zeros((T, N), dtype = complex)
- # Perform the convolution-like operation
- for t in range(T):
- for s in range(t ):
- h[t] += Gt[t - s] @ ns[:,s]*dt/tau
- if stable == False:
- for s in range(t,tfin):
- h[t] -= Gtu[s-t]@ ns[:,s]*dt/tau
- return h
- def plotParamSSM(m,tangent_space,eta1_vec,all_coeffsP, fixed_pointsP,ps, p_fpt0, p0, expsP,rd_coeffsP, rd_expsP,parname,colors =['purple','orange','darkgreen', 'darkcyan', 'salmon'], fsize = 17, tsize = 13, dpi = 100 ):
- # fig = plt.figure(figsize=(15,8))
- fig = plt.figure(layout='constrained', figsize=(15, 6), dpi = dpi)
- subfigs = fig.subfigures(1, 2, )
- #ax1 = fig.add_subplot(2, 2, 1, )
- ax2 = subfigs[1].subplots(subplot_kw={"projection": "3d"})
- axsLeft = subfigs[0].subplots(len(ps), 2, sharex=True)
- for e, epsilon in enumerate(ps):
- for pt in fixed_pointsP[e]:
- ptC = (np.tensordot(tangent_space.T,np.array(pt).T-p_fpt0 , axes =1))
- ptSSM = construct_SSM([ptC, (epsilon-p0)], all_coeffsP, expsP)
- #ax2.plot(ptC,(epsilon-p0),(np.array(pt).T-p_fpt0 )[m],'x', color = colors[e])
- ax2.plot(ptC,(epsilon-p0),ptSSM[m],'X', color = colors[e], markersize = 8)
- axsLeft[e,0].plot(ptC,(np.array(pt).T-p_fpt0 )[m],'X', color = colors[e], markersize = 8)
- #axsLeft[e,0].plot(ptC,ptSSM[m],'', color = colors[e])
- axsLeft[e,1].plot(ptC,0,'X', color = colors[e], markersize = 8)
- # plot the manifold
- ssm = construct_SSM([eta1_vec, np.ones(len(eta1_vec))*(epsilon-p0)], all_coeffsP, expsP)
- axsLeft[e,0].plot(eta1_vec,ssm[m], '-',color =colors[e], label = r'$%s =%s$'%(parname,epsilon))
- ax2.plot(eta1_vec,(epsilon-p0)*np.ones(len(eta1_vec)),ssm[m], '-',color =colors[e], label = r'$%s =%s$'%(parname,epsilon))
- eta1_dot = ROM0([eta1_vec, (epsilon-p0)*np.ones(len(eta1_vec))], rd_coeffsP, rd_expsP)
- axsLeft[e,1].plot(eta1_vec, eta1_dot[0], label = r'$%s =%s$'%(parname,epsilon), color = colors[e])
- axsLeft[e,1].plot(eta1_vec,np.zeros(len(eta1_vec)),'--', color = 'red',)
- axsLeft[-1,0].set_xlabel(r'$\eta_1$', fontsize = fsize)
- axsLeft[-1,1].set_xlabel(r'$\eta_1$', fontsize = fsize)
- axsLeft[e,0].set_ylabel(r'$y_%s$'%(m+1), fontsize = fsize)
- axsLeft[e,1].set_ylabel(r'$\dot{\eta}_1$', fontsize = fsize)
- axsLeft[e,0].tick_params(axis='both', which='major', labelsize=tsize)
- axsLeft[e,1].tick_params(axis='both', which='major', labelsize=tsize)
- axsLeft[e,1].legend(fontsize = fsize, loc = 'upper center')
- axsLeft[e,0].legend(fontsize = fsize, loc = 'upper center')
- axsLeft[e,1].set_ylim(-1,1)
- p_vals = np.linspace(ps[0]-0.001,ps[-1]+0.001,100)
- ax2.set_xlabel(r'$\eta_1$',fontsize = fsize)
- ax2.set_ylabel(r'$%s-%s0$'%(parname, parname),fontsize =fsize)
- ax2.set_zlabel(r'$y_%s$'%(m+1), fontsize = fsize)
- #eta1_vec = np.linspace(lims[0]+xmargins[0],lims[1]+xmargins[1],100)
- ETA, P = np.meshgrid(eta1_vec, p_vals)
- ssm = construct_SSM([ETA, P-p0], all_coeffsP, expsP)
- ax2.plot_surface(ETA,P-p0,ssm[m],color = 'mintcream', alpha = 0.2, edgecolors='lightgray', lw = 0.01, zorder = 2)
- ax2.legend(fontsize = fsize , )
- ax2.tick_params(axis='both', which='major', labelsize=tsize )
- ax2.view_init(30, 40, )
- #ax2.set_yticks(np.linspace(p_vals[0], p_vals[-1],5))
- ax2.set_yticks([])
- return fig
- # Calculate first order coefficients
- '''def calculate_H11(N,d,t0, epsilon,evals, evecs, idx, anchor,d2fy2, ui, tsteps, dtInt, dt = 1e-3 ):
- P = evecs[:,np.flip(np.argsort(evals))]
- P_inv = np.linalg.inv(P)
- A1 = np.copy(evals[d:])
- A1 = A1-evals[idx]*np.identity(N-d)
- ki = 0
- summand = np.zeros(( N-d, int(tsteps+t0/dtInt)), dtype= complex)
- h11 = np.zeros((N-d,tsteps),dtype= complex)
- for i in np.arange(t0,tsteps+t0, 1):# t
- kj = 0
- for j in np.arange(t0,i, dtInt): # s
- G = np.exp(A1*(i-j)*dt)
- m11 = np.matmul(P_inv, np.dot(np.dot(d2fy2,anchor[:,int(j)]/epsilon), np.matmul(P,ui)))[d:]
- summand[:,kj] = np.matmul(G, m11)*dt*dtInt
- kj = kj+1
- h11[:,ki] = (np.sum(summand, axis = 1))
- ki = ki+1
- return h11'''
- def calculate_A1(d, evals, eig):
- Ak = np.copy(evals[d:])
- Ak = Ak-eig
- return Ak
- def calculate_H11_vectorized(N, d, evals_sorted, P, P_inv, d2fy2, anchor, ui,
- nTimesteps, div=1, dt=0.001, tau=0.01,
- order=2, h0='quasistatic'):
- """h11(t) solving dh/dt = (Lambda[d:] - lambda_1) h + m11(t),
- integrated by exponential time differencing. Returns (T, N-d), complex,
- i.e. the same convention as before -> caller still does `.T`.
- `tau` is unused (it sits inside evals_sorted); kept for signature compatibility."""
- if d != 1:
- raise NotImplementedError('written for a 1-D master subspace')
- step = dt / div # the *actual* grid step, not dt
- T = anchor.shape[1]
- # m11(t), contracting d2fy2 with the eigenvector first to avoid an (N,N,T) array
- m11 = np.einsum('ijk,j,kt->it', d2fy2, np.matmul(P, ui), anchor, optimize=True)
- m11 = np.matmul(P_inv, m11)[d:] # (N-d, T)
- A1 = evals_sorted[d:] - evals_sorted[0] # = np.diag(A10)
- if np.any(np.real(A1) >= 0):
- raise ValueError('no spectral gap: Re(lambda_n - lambda_1) >= 0')
- # ETD coefficients (A1 diagonal -> everything elementwise)
- z = A1 * step
- E = np.exp(z)
- small = np.abs(z) < 1e-6 # series guard
- zs = np.where(small, 1.0, z)
- phi1 = np.where(small, 1 + z/2 + z**2/6, (E - 1) / zs)
- phi2 = np.where(small, 0.5 + z/6 + z**2/24, (E - 1 - z) / zs**2)
- h = np.zeros((T, N - d), dtype=complex)
- h[0] = -m11[:, 0] / A1 if h0 == 'quasistatic' else 0.0 # slaved value; 'zero' also fine
- b1, b2 = step * phi1, step * phi2
- if order == 1: # m11 piecewise constant
- for k in range(T - 1):
- h[k+1] = E * h[k] + b1 * m11[:, k]
- else: # m11 piecewise linear
- for k in range(T - 1):
- h[k+1] = E * h[k] + b1 * m11[:, k] + b2 * (m11[:, k+1] - m11[:, k])
- return h
- def construct_SSM1Dt(uv, t, epsilon, *args, surf =True):
- # h0i = 0, h10 = 0, h20, h11,
- coeff11, coeff20, coeff30 = args
- if surf:
- u = np.tile(np.expand_dims(uv, 0), (len(t),1))
- return np.concatenate(([u],np.multiply(np.tile(np.expand_dims(coeff20, (1,2)),(1,np.shape(u)[0], np.shape(u)[1])),u**2)+ np.multiply(np.tile(np.expand_dims(coeff30, (1,2)),(1,np.shape(u)[0], np.shape(u)[1])),u**3)
- + epsilon*np.multiply(np.tile(np.expand_dims(coeff11[:,t],2),(1,1,np.shape(u)[1])),u)), axis =0)
- else:
- u = uv
- return np.concatenate(([u],np.multiply(np.tile(np.expand_dims(coeff20, (1)),(1,np.shape(u)[0])),u**2)+
- + np.multiply(coeff11[:,t],u)*epsilon), axis =0)
SSMfunctions.py at commit f670273, under MIT · at the source
Overview
- Institute for Mechanical Systems, ETH Zurich,Zurich, Switzerland
- VIB Center for AI and Computational Biology, VIB,Leuven, Belgium
- Present Address: Department of Electrical Engineering, KU Leuven,Leuven, Belgium
- University of Zurich & ETH Zurich,Zurich, Switzerland
- Neuroscience Center Zurich, University of Zurich & ETH Zurich,Zurich, Switzerland
Abstract
Neural ordinary differential equations (ODEs) are widely used in neuroscience to model the collective activity of neurons during behavioral tasks. The high dimensionality of their parameter and activity spaces, however, often make it challenging to infer and interpret the fundamental features of their dynamics.
In this study, we employ recent nonlinear dynamical system techniques to uncover the core dynamics of several Neural ODEs used in contemporary neuroscience. Specifically, using a data-driven approach, we identify Spectral Submanifolds (SSMs), i.e., low-dimensional attracting invariant manifolds tangent to the eigenspaces of fixed points. The internal dynamics of SSMs serve as nonlinear models that reduce the dimensionality of the full RNNs by orders of magnitude. Through low-dimensional, SSM-reduced models, we give mathematically precise definitions of line and ring attractors, which are intuitive concepts commonly used to explain decision-making and working memory. This unprecedented level of understanding of Neural ODEs obtained from SSM reduction enables the interpretation of mathematically well-defined and robust structures in neuronal dynamics, leading to predictions about the neural computations underlying behavior.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repositories
Its files are read in the Code ↔ Paper reader above, with 4 matches between paragraphs and lines of code.
haller-group/SSMTool-2.4
1168f5f574cb40c82c5d6112e41b803c92f945cf, 21 July 2023Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
151 files
- examples/
AxialMovingBeam/ , MATLAB, 271 linesAxialMovingBeam.m - examples/
AxialMovingBeam/ , MATLAB, not shown hereAxialMovingBeamBook.mlx - examples/
AxialMovingBeam/ , MATLAB, 52 linesbuild_model.m - examples/
AxialMovingBeam/ , MATLAB, 64 linescal_parameters.m - examples/
BenchamrkSSM1stOrder/ , MATLAB, 17 linesbuild_model.m - examples/
BenchamrkSSM1stOrder/ , MATLAB, not shown heredemo.mlx - examples/
BernoulliBeam/ , MATLAB, 82 linesBernoulliBeam.m - examples/
BernoulliBeam/ , MATLAB, not shown hereBernoulliBeamBaseExcitat ion.mlx - examples/
BernoulliBeam/ , MATLAB, not shown hereBernoulliBeamWorkbook.ml x - examples/
BernoulliBeam/ , MATLAB, 53 linesL_Bernoulli_Beam_Model.m - examples/
BernoulliBeam/ , MATLAB, 32 linesbuild_model.m - examples/
BernoulliBeamIRs/ , MATLAB, 43 linesL_Bernoulli_Beam_Model.m - examples/
BernoulliBeamIRs/ , MATLAB, 19 linesbuild_model.m - examples/
BernoulliBeamIRs/ , MATLAB, not shown heredemo.mlx - examples/
CharneyDeVore1stOrder/ , MATLAB, 32 linesCharneyDeVore.m - examples/
CharneyDeVore1stOrder/ , MATLAB, 48 linesbuild_model.m - examples/
CharneyDeVore1stOrder/ , MATLAB, not shown heredemo.mlx - examples/
CharneyDeVore1stOrder/ , MATLAB, 26 linesplot_backbone_curves.m - examples/
ComplexDyn/ , MATLAB, 42 linesbuild_model.m - examples/
ComplexDyn/ , MATLAB, 10 linescompute_rho_grid.m - examples/
ComplexDyn/ , MATLAB, not shown heredemo.mlx - examples/
DAEs/ , MATLAB, 150 linesBeamFrequencyDivider/ beam_model.m - examples/
DAEs/ , MATLAB, 147 linesBeamFrequencyDivider/ build_model_1st.m - examples/
DAEs/ , MATLAB, not shown hereBeamFrequencyDivider/ demoFrequencyDivider_mm. mlx - examples/
DAEs/ , MATLAB, 119 linesPendulums/ ChainPendulum/ build_model.m - examples/
DAEs/ , MATLAB, not shown herePendulums/ ChainPendulum/ demo.mlx - examples/
DAEs/ , MATLAB, not shown herePendulums/ ChainPendulum/ demo_rescale.mlx - examples/
DAEs/ , MATLAB, 69 linesPendulums/ ChainPendulum/ pend_chain_ode.m - examples/
DAEs/ , MATLAB, 3 linesPendulums/ Pendulum/ OmegaT.m - examples/
DAEs/ , MATLAB, 3 linesPendulums/ Pendulum/ OmegaT_du.m - examples/
DAEs/ , MATLAB, 8 linesPendulums/ Pendulum/ amplitude.m - examples/
DAEs/ , MATLAB, 9 linesPendulums/ Pendulum/ amplitude_remesh.m - examples/
DAEs/ , MATLAB, not shown herePendulums/ Pendulum/ demo_main.mlx - examples/
DAEs/ , MATLAB, 11 linesPendulums/ Pendulum/ pend_ode.m - examples/
DAEs/ , MATLAB, 9 linesPendulums/ Pendulum/ pend_ode_auto.m - examples/
DAEs/ , MATLAB, 5 linesPendulums/ Pendulum/ zero_crossing_event.m - examples/
DAEs/ , MATLAB, 3 linesPendulums/ SlidePendulum/ OmegaT.m - examples/
DAEs/ , MATLAB, 3 linesPendulums/ SlidePendulum/ OmegaT_du.m - examples/
DAEs/ , MATLAB, 8 linesPendulums/ SlidePendulum/ amplitude.m - examples/
DAEs/ , MATLAB, 9 linesPendulums/ SlidePendulum/ amplitude_remesh.m - examples/
DAEs/ , MATLAB, 37 linesPendulums/ SlidePendulum/ build_model.m - examples/
DAEs/ , MATLAB, 39 linesPendulums/ SlidePendulum/ cal_reaction_force.m - examples/
DAEs/ , MATLAB, not shown herePendulums/ SlidePendulum/ demo_IR.mlx - examples/
DAEs/ , MATLAB, 34 linesPendulums/ SlidePendulum/ slide_pend_ode.m - examples/
DAEs/ , MATLAB, 82 linesPendulums/ SlidePendulum/ slider_pendulum.m - examples/
DAEs/ , MATLAB, 3 linesThreeDOFs/ OmegaT.m - examples/
DAEs/ , MATLAB, 3 linesThreeDOFs/ OmegaT_du.m - examples/
DAEs/ , MATLAB, 8 linesThreeDOFs/ amplitude.m - examples/
DAEs/ , MATLAB, 9 linesThreeDOFs/ amplitude_remesh.m - examples/
DAEs/ , MATLAB, 194 linesThreeDOFs/ build_model.m - examples/
DAEs/ , MATLAB, not shown hereThreeDOFs/ demo_cubic.mlx - examples/
DAEs/ , MATLAB, not shown hereThreeDOFs/ demo_none.mlx - examples/
DAEs/ , MATLAB, not shown hereThreeDOFs/ demo_sphere.mlx - examples/
DAEs/ , MATLAB, 52 linesThreeDOFs/ lambda_constraints.m - examples/
DAEs/ , MATLAB, 47 linesThreeDOFs/ residual_plot.m - examples/
DAEs/ , MATLAB, 72 linesThreeDOFs/ spring_ode.m - examples/
DAEs/ , MATLAB, 68 linesThreeDOFs/ spring_ode_auto.m - examples/
DAEs/ , MATLAB, 5 linesThreeDOFs/ zero_crossing_event.m - examples/
Lorenz1stOrder/ , MATLAB, 10 linesbuild_model.m - examples/
Lorenz1stOrder/ , MATLAB, not shown heredemo.mlx - examples/
Lorenz1stOrder/ , MATLAB, 7 lineslorenz.m - examples/
NACAWing/ , MATLAB, 93 linesNACAWing.m - examples/
NACAWing/ , MATLAB, not shown hereNACAWingWorkbook.mlx - examples/
NACAWing/ , MATLAB, 110 linesbuild_model.m - examples/
OscillatorChain/ , MATLAB, 93 linesOscillatorChain.m - examples/
OscillatorChain/ , MATLAB, not shown hereOscillatorChainFreqSpanB ook.mlx - examples/
OscillatorChain/ , MATLAB, not shown hereOscillatorChainWorkBook. mlx - examples/
OscillatorChain/ , MATLAB, 69 linesassemble_global_coeffici ents.m - examples/
OscillatorChain/ , MATLAB, 19 linesbuild_model.m - examples/
OscillatorChain/ , MATLAB, 37 linesdemo_single_master_mode. m - examples/
OscillatorChain/ , MATLAB, 10 linesdfnl_dx.m - examples/
OscillatorChain/ , MATLAB, 6 linesfnl.m - examples/
OscillatorChain/ , MATLAB, 12 linesforcing.m - examples/
ParametricResonance/ , MATLAB, 205 linesBernoulliBeamParametric/ BBplotFRC.m - examples/
ParametricResonance/ , MATLAB, 106 linesBernoulliBeamParametric/ BBplotSD.m - examples/
ParametricResonance/ , MATLAB, 39 linesBernoulliBeamParametric/ BBplotSDinSweep.m - examples/
ParametricResonance/ , MATLAB, 456 linesBernoulliBeamParametric/ BBplotSweep.m - examples/
ParametricResonance/ , MATLAB, not shown hereBernoulliBeamParametric/ BernoulliBeamExternal.ml x - examples/
ParametricResonance/ , MATLAB, not shown hereBernoulliBeamParametric/ BernoulliBeamParametric_ FRC.mlx - examples/
ParametricResonance/ , MATLAB, not shown hereBernoulliBeamParametric/ BernoulliBeamParametric_ SD.mlx - examples/
ParametricResonance/ , MATLAB, 53 linesBernoulliBeamParametric/ L_Bernoulli_Beam_Model.m - examples/
ParametricResonance/ , MATLAB, 65 linesBernoulliBeamParametric/ build_model_external.m - examples/
ParametricResonance/ , MATLAB, 53 linesBernoulliBeamParametric/ build_model_parametric.m - examples/
ParametricResonance/ , MATLAB, not shown hereCoupledMathieuEquations/ CoupledMathieu_2D.mlx - examples/
ParametricResonance/ , MATLAB, 94 linesCoupledMathieuEquations/ MEplotSD.m - examples/
ParametricResonance/ , MATLAB, 60 linesCoupledMathieuEquations/ MEplotSDintoSweep.m - examples/
ParametricResonance/ , MATLAB, 55 linesCoupledMathieuEquations/ build_model.m - examples/
ParametricResonance/ , MATLAB, 79 linesCoupledMathieuEquations/ build_model_phys_nD.m - examples/
ParametricResonance/ , MATLAB, 94 linesMathieuEquation_nonlinea r/ NonlinearMathieuEquation .m - examples/
ParametricResonance/ , MATLAB, not shown hereMathieuEquation_nonlinea r/ NonlinearMathieu_Workboo k.mlx - examples/
ParametricResonance/ , MATLAB, 48 linesMathieuEquation_nonlinea r/ build_model.m - examples/
ParametricResonance/ , MATLAB, 109 linesParametricAmplifierCoupl ed/ CoupledParametricAmplifi ers.m - examples/
ParametricResonance/ , MATLAB, not shown hereParametricAmplifierCoupl ed/ CoupledParametricAmplifi ersWorkbookPaper.mlx - examples/
ParametricResonance/ , MATLAB, 151 linesParametricAmplifierCoupl ed/ PaperFigureSweep.m - examples/
ParametricResonance/ , MATLAB, 93 linesParametricAmplifierCoupl ed/ build_model.m - examples/
ParametricResonance/ , MATLAB, 205 linesParametricDuffingOscilla tors/ PaperFRCPlot.m - examples/
ParametricResonance/ , MATLAB, 133 linesParametricDuffingOscilla tors/ PaperSweepPlot.m - examples/
ParametricResonance/ , MATLAB, 93 linesParametricDuffingOscilla tors/ ParametricDuffingOscilla tors.m - examples/
ParametricResonance/ , MATLAB, not shown hereParametricDuffingOscilla tors/ ParametricDuffingOscilla torsWorkbook.mlx - examples/
ParametricResonance/ , MATLAB, not shown hereParametricDuffingOscilla tors/ ParametricDuffingOscilla torsWorkbookIsola.mlx - examples/
ParametricResonance/ , MATLAB, 104 linesParametricDuffingOscilla tors/ build_model.m - examples/
ParametricResonance/ , MATLAB, 101 linesParametricSelfExcitedOsc illators/ ParametricSelfExcitedOsc illators.m - examples/
ParametricResonance/ , MATLAB, not shown hereParametricSelfExcitedOsc illators/ ParametricSelfExcitedOsc illators.mlx - examples/
ParametricResonance/ , MATLAB, 65 linesParametricSelfExcitedOsc illators/ build_model.m - examples/
ParametricResonance/ , MATLAB, 96 linesPrismaticBeamStretchingA xial/ PBplotSD.m - examples/
ParametricResonance/ , MATLAB, 57 linesPrismaticBeamStretchingA xial/ PBplotSDinSweep.m - examples/
ParametricResonance/ , MATLAB, 456 linesPrismaticBeamStretchingA xial/ PBplotSweep.m - examples/
ParametricResonance/ , MATLAB, not shown herePrismaticBeamStretchingA xial/ PrismaticBeamStretchingP arametricFRC.mlx - examples/
ParametricResonance/ , MATLAB, not shown herePrismaticBeamStretchingA xial/ PrismaticBeamStretchingP arametricSD.mlx - examples/
ParametricResonance/ , MATLAB, 46 linesPrismaticBeamStretchingA xial/ axial_forcing.m - examples/
ParametricResonance/ , MATLAB, 69 linesPrismaticBeamStretchingA xial/ build_model_external.m - examples/
ParametricResonance/ , MATLAB, 64 linesPrismaticBeamStretchingA xial/ build_model_parametric.m - examples/
ParametricResonance/ , MATLAB, 64 linesPrismaticBeamStretchingA xial/ cal_parameters.m - examples/
PipeConveyingFluid/ , MATLAB, 53 linesbuild_model.m - examples/
PipeConveyingFluid/ , MATLAB, 163 linescal_parameters.m - examples/
PipeConveyingFluid/ , MATLAB, not shown heredemo_vel_0.mlx - examples/
PipeConveyingFluid/ , MATLAB, not shown heredemo_vel_5p2.mlx - examples/
PipeConveyingFluid/ , MATLAB, not shown heredemo_vel_6.mlx - examples/
PipeConveyingFluid/ , MATLAB, 26 lineseigSorted.m - examples/
PipeConveyingFluid/ , MATLAB, 73 linesfunctionFromTensors.m - examples/
PipeConveyingFluid/ , MATLAB, 18 linesgetStaticResponse.m - examples/
PlanarSystem/ , MATLAB, 17 linesbuild_model.m - examples/
PlanarSystem/ , MATLAB, not shown heredemo.mlx - examples/
PrismaticBeamStretching/ , MATLAB, 234 linesPrismaticBeamStretching. m - examples/
PrismaticBeamStretching/ , MATLAB, not shown herePrismaticBeamStretchingB ook.mlx - examples/
PrismaticBeamStretching/ , MATLAB, 24 linesbuild_model.m - examples/
PrismaticBeamStretching/ , MATLAB, 64 linescal_parameters.m - examples/
ThreeOscillators/ , MATLAB, 104 linesThreeOscillators.m - examples/
ThreeOscillators/ , MATLAB, not shown hereThreeOscillatorsBook.mlx - examples/
ThreeOscillators/ , MATLAB, 24 linesbuild_model.m - examples/
TimoshenkoBeamIRs/ , MATLAB, 319 linesFEM_Timoshenko.m - examples/
TimoshenkoBeamIRs/ , MATLAB, 107 linesbuild_model.m - examples/
TimoshenkoBeamIRs/ , MATLAB, not shown heredemo.mlx - examples/
TwoOscillators/ , MATLAB, 15 linesbuild_model.m - examples/
TwoOscillators/ , MATLAB, not shown heredemo.mlx - examples/
TwoOscillators/ , MATLAB, not shown heredemoSymbolicExpression.m lx - examples/
TwoToOneIRs/ , MATLAB, 15 linesbuild_model.m - examples/
TwoToOneIRs/ , MATLAB, not shown heredemo_torus_cart.mlx - examples/
vonKarmanBeam/ , MATLAB, 116 linesbuild_model.m - examples/
vonKarmanBeam/ , MATLAB, 91 linesvonKarmanBeam.m - examples/
vonKarmanBeam/ , MATLAB, not shown herevonKarmanBeamWorkbook.ml x - examples/
vonKarmanBeamIRs/ , MATLAB, 103 linesbuild_model.m - examples/
vonKarmanBeamIRs/ , MATLAB, 189 linesvonKarmanBeamIRs.m - examples/
vonKarmanBeamIRs/ , MATLAB, not shown herevonKarmanBeamIRsBook.mlx - examples/
vonKarmanPlate/ , MATLAB, 134 linesbuild_model.m - examples/
vonKarmanPlate/ , MATLAB, 86 linesvonKarmanPlate.m - examples/
vonKarmanPlate/ , MATLAB, not shown herevonKarmanPlateBook.mlx - examples/
vonKarmanPlate/ , MATLAB, not shown herevonKarmanPlate_parallel. mlx - examples/
vonKarmanPlate/ , MATLAB, not shown herevonKarmanPlate_torus.mlx - repository limit reached (2,000 files or 30 MB): the rest is at the source (2727 files)
- LICENSE, License, 674 lines
- README.md, Text, 76 lines
haller-group/SSMLearn
305581114f62239b70c1fe44bce69cbf939326ea, 25 September 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
12 files
- examples/
brakereussbeam/ , MATLAB, not shown herebrb.mlx - examples/
bucklingbeam/ , MATLAB, 117 linestools/ buildModelBuckling.m - examples/
bucklingbeam/ , MATLAB, 81 linestools/ functionFromTensorsFP.m - examples/
bucklingbeam/ , MATLAB, 28 linestools/ getStaticResponseIC.m - examples/
bucklingbeam/ , MATLAB, not shown herevonKarmanBuckling2D.mlx - examples/
bucklingbeam/ , MATLAB, not shown herevonKarmanBuckling4D.mlx - examples/
couetteflow/ , MATLAB, 46 linesplotStreamwiseVelocityCo mparison.m - examples/
couetteflow/ , MATLAB, not shown hereromRe134.mlx - examples/
couetteflow/ , MATLAB, not shown hereromRe134Fractional.mlx - examples/
couetteflow/ , MATLAB, not shown hereromRe135.mlx - repository limit reached (2,000 files or 30 MB): the rest is at the source (334 files)
- LICENSE, License, 661 lines
- README.md, Text, 76 lines
alicemarr/RNN-paper
f6702734490c90001db73cd7b7900998fb9a87cf, 28 July 2026Availability: 1 check, the latest on 27 September 2026: the link answers
- 27 September 2026: the link answers
26 files
- cddm demo.ipynb, Jupyter, 1,777 lines
- cddmRNN/
RNNFunctions.py , Python, 201 lines - cddm_demo_noisy.ipynb, Jupyter, 291 lines
- mt demo.ipynb, Jupyter, 440 lines, 1 match
- mtRNN/
RNNFunctions.py , Python, 104 lines - src/
rnn_paper/ , Python, 289 lines, 2 matchesSSMfunctions.py - src/
rnn_paper/ , Python, 1 line__init__.py - src/
rnn_paper/ , Python, 236 linesutils.py - swg demo.ipynb, Jupyter, 1,248 lines
- swgRNN/
RNNFunctions.py , Python, 85 lines - swgRNN/
utils/ , Python, 43 linesUtilsIO.py - swgRNN/
utils/ , Python, 133 linesUtilsOpDims.py - swgRNN/
utils/ , Python, 292 linesUtilsPlotting.py - swgRNN/
utils/ , Python, 201 lines, 1 matchUtilsSamplingLocs.py - swgRNN/
utils/ , Python, 1 line__init__.py - swgRNN/
utils/ , Python, 15 linesget_mse.py - swgRNN/
utils/ , Python, 61 linesget_neg_deltaFF.py - swgRNN/
utils/ , Python, 18 linesget_state_distance_betwe en_trajs.py - swgRNN/
utils/ , Python, 113 linesinput_generation/ InputGeneratorCtxt.py - swgRNN/
utils/ , Python, 66 linesinput_generation/ InputGeneratorSWG.py - swgRNN/
utils/ , Python, 1 lineinput_generation/ __init__.py - swgRNN/
utils/ , Python, 7 linesmake_unit_length.py - swgRNN/
utils/ , Python, 35 linesremove_dimension_from_we ight_matrix.py - swgRNN/
utils/ , Python, 40 linesrun_one_forwardPass.py - LICENSE, License, 21 lines
- README.md, Text, 9 lines
Zenodo 20623670
Availability: 1 check, the latest on 27 September 2026: the link answers (HTTP 200)
- 27 September 2026: the link answers (HTTP 200)
Code availability
The code is available at this URL https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 4 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 183 scripts, each with its path and the digest of its content;
- 4 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data availability
The data is available at this URL https://
Reproduced under the paper's license (CC BY), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 2, 28 September 2026
- Funding: added Eidgenössische Technische Hochschule Zürich
Version 1, 27 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 4 authors, 2 keywords, 53 references.
Cite
This paper
Marraffa, A., Krause, R., Mante, V., & Haller, G. (2026). Data-driven reduced modeling of neural dynamics. Nature communications, 17(1), 9123. https://
BibTeX
@article{marraffa2026dat
author = {Marraffa, A. and Krause, R. and Mante, V. and Haller, G.},
title = {{Data-driven reduced modeling of neural dynamics}},
journal = {Nature communications},
year = {2026},
month = jul,
volume = {17},
number = {1},
pages = {9123},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/
url = {https://
pmid = {42649198},
pmcid = {PMC13519027}
}
RIS
TY - JOUR
AU - Marraffa, A.
AU - Krause, R.
AU - Mante, V.
AU - Haller, G.
TI - Data-driven reduced modeling of neural dynamics
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/
VL - 17
IS - 1
SP - 9123
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Data-driven reduced modeling of neural dynamics",
"container-title": "Nature communications",
"author": [
{
"family": "Marraffa",
"given": "A."
},
{
"family": "Krause",
"given": "R."
},
{
"family": "Mante",
"given": "V."
},
{
"family": "Haller",
"given": "G."
}
],
"container-title-short":
"volume": "17",
"issue": "1",
"page": "9123",
"DOI": "10.1038/
"PMID": "42649198",
"PMCID": "PMC13519027",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
7,
28
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.3390/biomimetics11080569 [code]
- Pretraining of Embodied Recurrent Networks Bridges the Gap Between Artificial and Cortical Neural Activities.Journal: Biomimetics (Basel, Switzerland)In common: scikit-learn, SciPy, Matplotlib, 1 other tool, 9 references
- [2] doi:10.1371/journal.pbio.3003831 [code]
- Disinhibitory signaling enables flexible coding of top-down information in cortical networks.Journal: PLoS biologyIn common: h5py, scikit-learn, SciPy, 2 other tools, 6 references
- [3] doi:10.1371/journal.pcbi.1014162 [code]
- Exploring neural manifolds across a wide range of intrinsic dimensions.Journal: PLoS computational biologyIn common: h5py, scikit-learn, SciPy, 2 other tools, 6 references
- [4] doi:10.1038/s41540-026-00727-x [code]
- Association-sensory spatiotemporal hierarchy and functional gradient-regularised recurrent neural network with implications for schizophrenia.Journal: NPJ systems biology and applicationsIn common: h5py, SciPy, Matplotlib, 1 other tool, 6 references
- [5] doi:10.1371/journal.pcbi.1014585 [code]
- Decoding behavior with minimal and interpretable agent models.Journal: PLoS computational biologyIn common: SciPy, Matplotlib, NumPy, computational modeling (no new data), 6 references
- [6] doi:10.1038/s41467-026-75455-1 [code]
- Shared latent representations of speech production for cross-patient speech decoding.Journal: Nature communicationsIn common: h5py, scikit-learn, SciPy, 2 other tools, 3 references
- [7] doi:10.1126/sciadv.aed6417 [code]
- Intrinsic timing, not temporal prediction, underlies ramping dynamics in visual and parietal cortex during passive behavior.Journal: Science advancesIn common: h5py, scikit-learn, SciPy, 2 other tools, 3 references
- [8] doi:10.1038/s41467-026-72057-9 [code]
- Sex-specific behavioral feedback modulates sensorimotor processing and drives flexible social behavior.Journal: Nature communicationsIn common: h5py, scikit-learn, SciPy, 2 other tools, 3 references
- [9] doi:10.1073/pnas.2616911123 [code]
- Cerebellar microcircuits enable robust evidence-based decisions through cortico-cerebellar coupling.Journal: Proceedings of the National Academy of Sciences of the United States of AmericaIn common: Matplotlib, NumPy, computational modeling (no new data), 4 references
- [10] doi:10.1038/s41467-026-71725-0 [code]
- Interactions across hemispheres in prefrontal cortex reflect global cognitive processing.Journal: Nature communicationsIn common: Optimization Toolbox, scikit-learn, SciPy, 2 other tools, 3 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 4 repositories of the authors' code, each at its verified commit and with its license, 183 scripts, and 4 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:4b14f901759192d5…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
