Data-driven reduced modeling of neural dynamics.
2 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 4 matches
- [1] § Results › A model for context-dependent decision-making ↔ src/rnn_paper/SSMfunctions.py, lines 93 to 102 · score 0.58 · Manifold Fitting Error, trajectories projected, spectral subspace, MFE, RNN, SSM · block
oscr:b:6AERGRS80W1TB-Y· Report a mismatch - [2] § Methods › The Vanilla RNN models › Multitasking RNN: memory-pro task ↔ mt demo.ipynb, lines 42 to 84 · score 0.57 · Memory Pro task, memory period, stimulus, vector, sensory · Report a mismatch
- [3] § Methods › The theory of spectral submanifolds › Data-driven computations of SSMs ↔ src/rnn_paper/SSMfunctions.py, lines 93 to 102 · score 0.52 · manifold fitting error, lifts, MFE, trajectories, SSM · block
oscr:b:6AERGRS80W1TB-Y· Report a mismatch - [4] § Methods › The Vanilla RNN models › Sine-wave generator RNN ↔ swgRNN/utils/UtilsSamplingLocs.py, lines 140 to 171 · score 0.50 · sine wave generator, network, RNN · block
oscr:b:JNX7AZVR6Q695-E· Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: 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, to read at its sourceAxialMovingBeamBook.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, to read at its sourcedemo.mlx - examples/
BernoulliBeam/ , MATLAB, 82 linesBernoulliBeam.m - examples/
BernoulliBeam/ , MATLAB, to read at its sourceBernoulliBeamBaseExcitat ion.mlx - examples/
BernoulliBeam/ , MATLAB, to read at its sourceBernoulliBeamWorkbook.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, to read at its sourcedemo.mlx - examples/
CharneyDeVore1stOrder/ , MATLAB, 32 linesCharneyDeVore.m - examples/
CharneyDeVore1stOrder/ , MATLAB, 48 linesbuild_model.m - examples/
CharneyDeVore1stOrder/ , MATLAB, to read at its sourcedemo.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, to read at its sourcedemo.mlx - examples/
DAEs/ , MATLAB, 150 linesBeamFrequencyDivider/ beam_model.m - examples/
DAEs/ , MATLAB, 147 linesBeamFrequencyDivider/ build_model_1st.m - examples/
DAEs/ , MATLAB, to read at its sourceBeamFrequencyDivider/ demoFrequencyDivider_mm. mlx - examples/
DAEs/ , MATLAB, 119 linesPendulums/ ChainPendulum/ build_model.m - examples/
DAEs/ , MATLAB, to read at its sourcePendulums/ ChainPendulum/ demo.mlx - examples/
DAEs/ , MATLAB, to read at its sourcePendulums/ 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, to read at its sourcePendulums/ 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, to read at its sourcePendulums/ 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, to read at its sourceThreeDOFs/ demo_cubic.mlx - examples/
DAEs/ , MATLAB, to read at its sourceThreeDOFs/ demo_none.mlx - examples/
DAEs/ , MATLAB, to read at its sourceThreeDOFs/ 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, to read at its sourcedemo.mlx - examples/
Lorenz1stOrder/ , MATLAB, 7 lineslorenz.m - examples/
NACAWing/ , MATLAB, 93 linesNACAWing.m - examples/
NACAWing/ , MATLAB, to read at its sourceNACAWingWorkbook.mlx - examples/
NACAWing/ , MATLAB, 110 linesbuild_model.m - examples/
OscillatorChain/ , MATLAB, 93 linesOscillatorChain.m - examples/
OscillatorChain/ , MATLAB, to read at its sourceOscillatorChainFreqSpanB ook.mlx - examples/
OscillatorChain/ , MATLAB, to read at its sourceOscillatorChainWorkBook. 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, to read at its sourceBernoulliBeamParametric/ BernoulliBeamExternal.ml x - examples/
ParametricResonance/ , MATLAB, to read at its sourceBernoulliBeamParametric/ BernoulliBeamParametric_ FRC.mlx - examples/
ParametricResonance/ , MATLAB, to read at its sourceBernoulliBeamParametric/ 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, to read at its sourceCoupledMathieuEquations/ 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, to read at its sourceMathieuEquation_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, to read at its sourceParametricAmplifierCoupl 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, to read at its sourceParametricDuffingOscilla tors/ ParametricDuffingOscilla torsWorkbook.mlx - examples/
ParametricResonance/ , MATLAB, to read at its sourceParametricDuffingOscilla 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, to read at its sourceParametricSelfExcitedOsc 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, to read at its sourcePrismaticBeamStretchingA xial/ PrismaticBeamStretchingP arametricFRC.mlx - examples/
ParametricResonance/ , MATLAB, to read at its sourcePrismaticBeamStretchingA 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, to read at its sourcedemo_vel_0.mlx - examples/
PipeConveyingFluid/ , MATLAB, to read at its sourcedemo_vel_5p2.mlx - examples/
PipeConveyingFluid/ , MATLAB, to read at its sourcedemo_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, to read at its sourcedemo.mlx - examples/
PrismaticBeamStretching/ , MATLAB, 234 linesPrismaticBeamStretching. m - examples/
PrismaticBeamStretching/ , MATLAB, to read at its sourcePrismaticBeamStretchingB 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, to read at its sourceThreeOscillatorsBook.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, to read at its sourcedemo.mlx - examples/
TwoOscillators/ , MATLAB, 15 linesbuild_model.m - examples/
TwoOscillators/ , MATLAB, to read at its sourcedemo.mlx - examples/
TwoOscillators/ , MATLAB, to read at its sourcedemoSymbolicExpression.m lx - examples/
TwoToOneIRs/ , MATLAB, 15 linesbuild_model.m - examples/
TwoToOneIRs/ , MATLAB, to read at its sourcedemo_torus_cart.mlx - examples/
vonKarmanBeam/ , MATLAB, 116 linesbuild_model.m - examples/
vonKarmanBeam/ , MATLAB, 91 linesvonKarmanBeam.m - examples/
vonKarmanBeam/ , MATLAB, to read at its sourcevonKarmanBeamWorkbook.ml x - examples/
vonKarmanBeamIRs/ , MATLAB, 103 linesbuild_model.m - examples/
vonKarmanBeamIRs/ , MATLAB, 189 linesvonKarmanBeamIRs.m - examples/
vonKarmanBeamIRs/ , MATLAB, to read at its sourcevonKarmanBeamIRsBook.mlx - examples/
vonKarmanPlate/ , MATLAB, 134 linesbuild_model.m - examples/
vonKarmanPlate/ , MATLAB, 86 linesvonKarmanPlate.m - examples/
vonKarmanPlate/ , MATLAB, to read at its sourcevonKarmanPlateBook.mlx - examples/
vonKarmanPlate/ , MATLAB, to read at its sourcevonKarmanPlate_parallel. mlx - examples/
vonKarmanPlate/ , MATLAB, to read at its sourcevonKarmanPlate_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, to read at its sourcebrb.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, to read at its sourcevonKarmanBuckling2D.mlx - examples/
bucklingbeam/ , MATLAB, to read at its sourcevonKarmanBuckling4D.mlx - examples/
couetteflow/ , MATLAB, 46 linesplotStreamwiseVelocityCo mparison.m - examples/
couetteflow/ , MATLAB, to read at its sourceromRe134.mlx - examples/
couetteflow/ , MATLAB, to read at its sourceromRe134Fractional.mlx - examples/
couetteflow/ , MATLAB, to read at its sourceromRe135.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.1126/sciadv.adl4743 [code]
- Inferring context-dependent computations through linear approximations of prefrontal cortex dynamics.Journal: Science advancesIn common: SciPy, 13 references, author V. Mante
- [2] doi:10.1371/journal.pcbi.1013081 [code]
- Balanced state of networks of winner-take-all units.Journal: PLoS computational biologyIn common: scikit-learn, SciPy, Matplotlib, 1 other tool, computational modeling (no new data), 13 references
- [3] doi:10.1371/journal.pcbi.1011852 [code]
- Trained recurrent neural networks develop phase-locked limit cycles in a working memory task.Journal: PLoS computational biologyIn common: scikit-learn, SciPy, Matplotlib, 1 other tool, none (in silico), computational modeling (no new data), 12 references
- [4] doi:10.1038/s41467-024-54688-y [code]
- Dynamic tracking of objects in the macaque dorsomedial frontal cortex.Journal: Nature communicationsIn common: h5py, scikit-learn, SciPy, 2 other tools, computational modeling (no new data), 10 references
- [5] doi:10.1038/s41586-024-08433-6 [code]
- Individual variability of neural computations underlying flexible decisions.Journal: NatureIn common: Optimization Toolbox, SciPy, Matplotlib, 1 other tool, computational modeling (no new data), 9 references
- [6] doi:10.1038/s41593-025-01869-7 [code]
- Latent circuit inference from heterogeneous neural responses during cognitive tasks.Journal: Nature neuroscienceIn common: SciPy, Matplotlib, NumPy, 11 references
- [7] doi:10.1101/2025.06.03.657632 [code]
- High-dimensional neuronal activity from low-dimensional latent dynamics: a solvable modelJournal: bioRxiv (preprint)In common: 12 references
- [8] doi:10.1038/s41592-024-02582-2 [code]
- MARBLE: interpretable representations of neural population dynamics using geometric deep learning.Journal: Nature methodsIn common: scikit-learn, SciPy, Matplotlib, 1 other tool, 10 references
- [9] doi:10.1371/journal.pcbi.1010784 [code]
- One dimensional approximations of neuronal dynamics reveal computational strategy.Journal: PLoS computational biologyIn common: Optimization Toolbox, 10 references
- [10] doi:10.7554/elife.93060 [code]
- Aligned and oblique dynamics in recurrent neural networks.Journal: eLifeIn common: scikit-learn, SciPy, Matplotlib, 1 other tool, 9 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:8aa548bb27f143f9…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1038/s41467-026-75924-7)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1038/s41467-026-75924-7.svg
:target: https://openscicode.org/badge/doi/10.1038/s41467-026-75924-7
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41467-026-75924-7"><img src="https://openscicode.org/badge/doi/10.1038/s41467-026-75924-7.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
- haller-group/SSMTool-2.4: README.md on GitHub
- haller-group/SSMLearn: README.md on GitHub
- alicemarr/RNN-paper: README.md on GitHub
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
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: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
