Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
Authors: Puli Wang
Yu Qi
Yueming Wang
Gang Pan
Venue: ICML 2025 poster (2025)
Keywords: Brain-Computer Interface
Neural Decoding
Flow Matching
Neural Alignment
Primary area: applications->neuroscience_cognitive_science
TL;DR: A novel neural alignment approach based on flow matching.

Abstract: The primary goal of brain-computer interfaces (BCIs) is to establish a direct linkage between neural activities and behavioral actions via neural decoders. Due to the nonstationary property of neural signals, BCIs trained on one day usually obtain degraded performance on other days, hindering the user experience. Existing studies attempted to address this problem by aligning neural signals across different days. However, these neural adaptation methods may exhibit  instability and poor performance when only a few trials are available for alignment, limiting their practicality in real-world BCI deployment. To achieve efficient and stable neural adaptation with few trials, we propose Flow-Based Distribution Alignment (FDA), a novel framework that utilizes flow matching to learn flexible neural representations with stable latent dynamics, thereby facilitating source-free domain alignment through likelihood maximization. The latent dynamics of FDA framework is theoretically proven to be stable using Lyapunov exponents, allowing for robust adaptation. Further experiments across multiple motor cortex datasets demonstrate the superior performance of FDA, achieving reliable results with fewer than five trials. Our FDA approach offers a novel and efficient solution for few-trial neural data adaptation, offering significant potential for improving the long-term viability of real-world BCI applications.

Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
Puli Wang" 12 Yu Qi
Yueming Wang" 12 Gang Pan" 12
Abstract
1. Introduction
The aim of Brain-computer Interfaces (BCIs) is to establish direct link between the brain and extemaa devices, present- ing great opportunities for improving neural rehabilitation in individuals with paralysis (Willett et al., 2021; 2023; Wu et al., 2016; Wang et al., 2023a). However, sustaining long-term tergtterm decoding performance in chronic implantation is challenging, resulting from behavioral variability (Truccolo et al., 2008), physiological changes (Athalye et al., 2017), and device degradation (Woeppel et al., 2021). The dynamic relationship between neural data and behavior necessitates recalibrating neural representations through adaptation to ensure perforrrfor behavioral decoding.
The primary goal of brain-computer interfaces (BCIs) is to establish direct linkage between neural activities and behavioral actions via neu- ral decoders. Due to the nonstationary property of neural signals, BCIs trained on one day usu- ally obtain degraded performance on other days, hindering the user experience. Existing studies attempted address this problem by aligning neural signals across different days. However, these neural adaptation methods may exhibit in- stability and poor performance when only a few trials are available for alignment, limiting their practicality in real-world BCI deployment. To achieve efficient and stable neural adaptation with few trials, we propose Flow-Based Distribution Alignment (FDA), novel framework that utilizes flow matching to learn flexible neural represen- tations with stable latent dynamics, thereby fa- cilitating source- free domain alignment through likelihood maximization. The latent dynamics of FDA framework is theoretically proven to be stable using Lyарunov exponents, allowing for ro- bust adaptation. Further experiments across multi- ple motor cortex datasets demonstrate the superior performance of FDA, achieving reliable results with fewer than five trials. Our FDA approach offers a novel and efficient solution for few-trial neural data adaptation, offering significant po- tential for improving the long-term viability of real-world BCI applications.
Existing work on neural adaptation (Dabagia et al., 2023) have focused on latent embeddings and aligned them for stable long-term neural decoding. For example, linear meth- ods, such as principal component analysis (PCA) (Degen- hart et al., 2020), are used for aligning interpretable latent factors. Non-linear methods based on low-dimensional la- tent spaces usually have explicit assumptions on the statis- tical properties of latent variables. NoMAD (Karpowicz et al., 2022) and the source-free aligmment (Vermani et al., 2024) based on seq- VAEs assume Gaussian posteriors for the closed-form distribution divergences.
However, these methods may lack stability and efficiency when only few trials are available for alignment in real- world BCI deployment, which requires minimal recalibra- tion (Karpowicz et al., 2024) over extended periods. For in- stance, empirical results for two typical methods are shown in Fig. (()). While they achieved reasonable performance with a substantial number of target trials (~ 100). they failed to maintain effective behavioral decoding with fewer than 5 target trials. This issue may be attributed to two main factors. First, some alignment techniques assume prior distributions for latent variables to simplify likelihood estimation (Kar- powicz et al., 2022; Wang et al., 2023b; Vermani et al., 2024). Nonetheless, this assumption may be invalid when target trials are limited. NoMAD relies on the closed-form KL-divergence of Gaussian distributions, which may lead to negative transfer (Pan & Yang. 2009) in few-trial see- narios, as shown in Fig. ((b)(Left). Second, training of certain alignment methods, such as Cycle-GAN (Ma et al., 2023), might be quite unstable with few trials as illustrated
'College of Computer Science and Technology, Zhejiang University "The State Key Lab of Brain-Machine Intelligence, Zhejiang University 'MOE Frontier Science Center for Brain Science and Brain-Machine Integration, Zhejiang University. Correspondence to: Yu Qi <qiyu@zju.cdu.cn>>> Gang Pan <gpan@zju.cdu.com
Proceedings of the 42nd International Conference Machine Learning. Vancouver, Canada. PMLR 267, 2025. Copyright 2025 by the author(s).

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
(a)
Average g2 Scores
0.5
& Manek, 2019), enabling robust adaptation.
0.4
Few-trial
Scenarios
Experimental Validation: We extensively validated our FDA method on several motor cortex datasets (Ma et al., 2023), achieving reliable decoding with fewer than five target trials.
0.3-
0.2
0.1-
NoMAD Cycle GAN
0.0
0.02
0.03
0.04
0.06 0.1
0.2
0.3
0.4
0.5
0.6
Aligning Ratio of Target Trials
2. Related Work
(b)
NoMAD
0.25
Cycle-GAN
0.4
Neural Representation Alignment To address the chal- lenge of variability in neural recordings, several ap- proaches (Duan al., 2023a;b; Qi al., 2019; Zhu et al., 2022) have been proposed to enable robust behav- ioral decoding, including unsupervised alignment of neu- ral representations (Dabagia et al., 2023). For example, ADAN (Farshchian et al., 2018) and Cycle-GAN (Ma et al., 2023) achieved neural alignment by employing adversarial learning techniques based on raw neural signals. Latent fea- tures such as low-dimensional neural manifolds (Jude et al., 2022; Karpowicz et al., 2022; Wang et al., 2023b; Vermani et al., 2024) were aligned across sessions. As an exam- ple, ERDiff (Wang et al., 2023b) uses diffusion models and aligns the target distribution with that extracted from VAEs, In addition, transformer-based models (Liu et al.. 2022; Ye et al., 2023; Azabou et al., 2023; Zhang et al., 2024; Wang et al., 2025) can achieve supervised neural alignment on tar- get downstream tasks via fine-tuning, following pre-training with self supervisd objectives such masked reconstruc- tion. In contrast, our FDA achieves representation learning entirely through diffusion models, with source-free free align- ment based solely on direct log-likelihood maximization. In cases with few target trials, alignment approaches that rely on one-to-one sample mapping tend to fall into subopti- mal solutions (Courty et al., 2017: Kerdoncuff et al., 2021). Unlike these methods, likelihood- sensitive to the number of target trials (Wang al., 2023b). Consequently, the FDA achieves efficient alignment in few- trial scenarios, a challenge that most existing unsupervised alignment has not effectively addressed.
0.00
g" Scares
-0.25
Training Instability
0.0
-0.50
Negative
Transfer
-0.75
-02
0
20
40
60
80
100
100
200
300
400
Fine-tuning Epochs
Training Epochs
Figure 1. (a) Average R2 across target sessions for NoMAD and Cycle-GAN with varying numbers target trials. (b) Represen- tative R² curves of NoMAD and Cycle-GAN on test target trials, with an aligning ratio of 0.02.
in Fig. ((b)Riight,, due to the discontinuity of divergence functions (Arjovsky et al., 2017).
This necessitates methods that enable few-trial adaptation to achieve stable neural representations, thereby sustain- ing high-performance behavioral decoding over time. To achieve efficient few-trial neural adaptation, we propose a novel Flow-Based Distribution Alignment (FDA) frame- work that leverages recent advances in flow matching (Lip- man et al., 2023). The FDA method learns stable neural representations with flexible distributions rather than prior stationary distributions. Our fow-based learning also ables source-free alignment through direct likelihood max- imization that is less sensitive to few-trial scenarios (Wang et al., 2023b). The latent dynamics of our flow-based trans- formations are theoretically proven to be stable, based on Lyapunov exponents. Extensive experiments on multiple motor cortex datasets confirm the superior performance of our FDA, achieving a 15% improvement in RR2 over exist- ing methods with fewer than 5 trials. Our FDA approach establishes an innovative framework for efficient and ro- bust adaptation in few-trial scenarios, potentially improving the long-term reliability of real-world BCIs (Dabagia et al., 2023; Fan et al., 2023; Karpowiez et al., 2024). The main contributions of this paper are summarized as follows:
alignment is less
Normalizing Flows Normalizing flows have been widely applied in distribution sampling due to their explicit like- lihood modeling. For example, flow matching (Liu et al., 2023a; Lipman et al., 2023; Ma et al., 2024) extends diffu- sion models with continuous normalizing flows for more flexible diffusion paths. Conditional flow matching (Liu et al., 2023b) further integrates conditional features to model conditional distributions. Additional related work is pro- vided in App. A.4. Unlike those typically used for learning neural dynamics (Kim et al., 2021), these normalizing flows are employed for distribution sampling, where only the fi- nal latent state is taken as the sample. Existing alignment methods (Gong et al., 2019; Liu et al., 2023a) based on normalizing flows typically start from the source distribu- tion and end with the target one. Based on conditional flow matching, we propose a more efficient strategy in few-trial
Flow-Based Distribution Alignment (FDA): Flow matching was first employed to enable efficient few- trial neural adaptation. Our proposed Flow-Based Dis- tribution Alignment (FDA) framework learns stable neural representations, allowing for source-free align- ment through likelihood maximization.
Stable Latent Dynamics: The FDA method is demon- strated to be stable using Lyapunov exponents. This stability is evident in the tendency of neural representa- tions to remain within an invariant bounded set (Kolter
2

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
scenarios, which have not been explored in the context of neural alignment.
As for fine-tuning, we perform unsupervised alignment of neural representation using few trials from Dr. Compared to some existing flow-based adaptation methods (Gong et al., 2019; Liu et al., 2023a), FDA allows for alignment with fewer target trials. Based on the explicit computation of log-likelihood using the Fokker-Plann Equation, we pro- pose a novel source-free alignment method through direct likelihood maximization.
3. Methodology
3.1. Problem Formulation
We define the problem of long-term behavioral decoding in few-trial scenarios based on the unsupervised domain adap- tation (Long et al., 2013). First, we define the domain D ((m1,))).... (4 )a)). where (z)( .,2,..., . rep- resents the raw neural signal sample from the (-th channel in one or more sessions. The short-term context window has length of w time points, much smaller than the length of tri- als, i.e., (T) E TR. The first context window of each trial begins at the initial time point, while the second window starts one step later. The temporal evolution of neural dy- namies is reflected in the shifting of short-term windows. y/ denotes the d-dimensional behavioral label corresponding to the w-th time step of z;, with yı E Rd. The behavioral label is assigned at the w-th time step to leverage previous time steps as contextual information.
3.2.1. FLOW-BASED REPRESENTATION LEARNING
During the pre-training phase, we propose novel frame- work based on flow matching conditioned on context win- dows. FDA offers several distinct benefits in obtaining neural representations. First, flow matching imposes fewer assumptions on the underlying statistics of latent variables, enabling more flexible modeling of distributions and re- solving the breakdown of prior assumptions in few-trial scenarios. Second, our theoretical analysis demonstrates that the latent dynamics of our dow-based transformations are stable (Angeli, 2002), which is further validated using Lyapunov exponents. This stability is manifested in the tendency of neural representations to stay within an invari- ant bounded set (Kolter & Manek, 2019), which allows for efficient and robust alignment for few trials.
Based on D, we define the source domain Ds, consist- ing of both signals and labels from one or more sessions: D3 {(f v ). ................................ (I )]. Similarly, the unla- beled target domain Dr consists of signals from a separate session: D, {-f ......
Conditional Feature Extraction We begin by extracting conditional features of from context windows 2.. For spike- based signals, a single channel usually records neuron-level activity (Buzsáki, 2004), where the short-term patterns are relatively limited for similar tasks (Izhikevich et al., 2004). Moreover, inter-channel relationships in spikes are gener- ally more stable compared to the temporal patterns, which often exhibit warping (Williams al., 2020). The above observations are validated, as demonstrated in Fig. 5(c).
where frr < ni, and typi- cally only contains signals of few trials. For convenience, we define x and y as the random variables representing neural signals x.S and their corresponding labels y in Ds. Samples 2² from Dr are represented as random variables x We aim to align the distribution of neural represen- tations from Dr with Ds with few target trials, reusing behavioral decoders trained on source behavioral labels y
-h ,...,,"hy
Based on these observations and inspired by (Liu et al., 2024), we use short-term temporal patterns of each channel as tokens, along with their inter-channel relationships for attention calculation. This approach can flexibly accommo- date changes in the number of channels, which is quite com- mon during neuron growth and apoptosis (Degenhart et al., 2020). Specifically, we feed the raw neural signal sequence xf = (1), . (m)), containing tokens from m chan- nels, into a transformer based network fa. (with parameters a) using the classical sinusoidal positional encoding. After processing through multi-head self att-nittenton modules and projection networks, we obtain conditional latent dynamics: of fa (x²², where of E k The detailed architecture is illustrated in App. A.1.
3.2. Overall framework
To obtain efficient and robust adaptation in few-trial see- narios, we propose a novel FDA framework that employs flow matching with stable latent dynamics and achieves source-free alignment through likelihood maximization. This framework consists of two phases: pre-training and fine-tuning, as illustrated in Fig. 2.
During the pre-training phase, we establish a continuous normalizing flow conditioned on context windows using Dg in a supervised manner. Initial noisy latent states flow toward the target neural representation for decoding, guided by short-term context windows from raw neural signals. There are no prior assumptions on the distribution of neural representations. The latent dynamics of our FDA are fur- ther verified to be stable. This stability is ensured by the Lipschitz continuity of activation functions in MLPs and by regularizing the drift coefficients of latent states, as detailed in Theorem 3.
Flow Matching to Neural Representation After extracting conditional features, we leverage flow matching conditioned on these features to leam the neural representations for de- coding. We model the conditional probability pr (z)) using probability flow ODEs (Song et al., 2021), where
3

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
Pre-train:
Pre-train:
Fine-tune:
Conditional Feature
Flow Matching to Neural
Rapid Adaptation with Few Target Trials
Extraction
Representation
(0)
z
(T)
z
ny
C
fa
1O,,
F
P1 P1 (1)lc
Input
Intem
V
V
dz(r)
dr vo(2(T).c,z)
z (1)
V
V
AN()
T Pi (1)lc")
DOUE tokens
Figure 2. Two phases of the overall FDA framework: pre-training, which involves conditional feature extraction and flow matching to neural representation, and fine-tuning, which enables rapid adaptation with few target trials.
(r) E R denotes the latent states at learning time point E [], where т is rescaled for more efficient training, capturing the evolution of 2 Here, e is the random vari- able representing conditional features c, (c = (xx)). Typically, the flows are built on the parameterized Φ to transform simple prior distribution po (e.g., multivariate Gaussian) into
Letm (o:, 0) can be defined as below:
Lemmla, 0) (0))
[ fa ). -29()))200)) (4)
where 20) ~N -1)= S and ||-II denotes the lg norm. Up only consists of multilayer perceptron (MLP) layers with residual connections, and its detailed architec- ture is provided in App. A.I. More intuitively, we provided a visualization of the flow matching process in Fig. 3. Our FDA learns latent variables from neural signals a coarse- to-fine manner, differing from conventional one-step ex- traction. The stable latent dynamics of the learning process ensure that latent factors with similar labels flow toward con- sistent neural representations, even when guided by shifted neural recordings. Empirical validation through zero-shot transfer performance in Table S8 further demonstrates the benefits of this stability.
complex one P1 Pr [ør].Po.
For adaptation to the supervised training on Ds. we set Po as a standard multivariate Gaussian distribution, i.e., =0) ~
(0, I). The target distribution pl, representing the desired neural representation for behavioral decoding, is defined by the random variable (1) n where E RR x is pre-defined with Xavier initialization and remains the same across sessions. This distribution is denoted
g(z)(1)), with 17' E Rdxk: as the generalized inverse of which serves weights of the linear decoder G and also satisfies n"n= = Ta- In the detailed implementation, the flow Φ of pr (z(2())) optimized following the objectives used by conditional flow matching. neural network vo (with parameters 0) is utilized parameterize the vector field of z (T), allowing for its evolution follows:
trajectories
Neural Representation
Noise
Day 0
v0(2 dz = fa),
s (0)
Guided by
(1)
(1)
dr
z (T)
Vo
(1)
Based on Eq. (1), the evolution of pr Sz (T) during learning process follows the Fokker-Planck Equation:
zT(o),
zJ
Guided c
Decoded similar trajectories under shifts
Öp, (2) - (p- (z)((())) (z ( (x),
Day (shifted)
dr
(2)
Po
7
Pr
Folkker Equation
Existing work (Liu et al., 2023b) indicates that the network Up can be optimized via matching the vector field provided by vo with a predefined vector field u(r). To enhance the efficiency in learning and distribution alignment of neural set the flow path over learning pro- cess as linear interpolation between the start z z0) and the end z (1): $ = (1-)
Figure 3. Intuitive visualization of our flow matching process. Our process transforms noisy variables z(0) into ideal neural rep- resentation z(1), guided by conditional features с derived from neural signals. Meanwhile, the corresponding distribution Po transformed into pl. To learn this process, we parameterize the velocity field vo of which determines the moving velocity and direction of z at a specific learning time point r.
representation,
(3)
Theoretical Analysis on Latent Dynamics Our flow-based neural representation learning forms a dynamic process, be- ginning with noisy latent states and ending with the desired
The corresponding vector field of Eq. (3) is =())= = (1) S (0). Based on these, the training objective function

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
neural representation. We further found that the latent dy- namics of this transformation process are stable (Angeli, 2002), which is ensured by two key factors. First, the veloc- ity field in flow matching is constructed using MLPs with Lipschitz-continuous activation functions. These functions ensure that latent state deviations remain stable under ex- ternal input constraints, as shown in Eq. (7) and Eq. (21). Second, the scale coefficient y5. which controls the shift of z in predicting the velocity field defined in Eq. (14), is regularized to ensure that the ratio of latent state devia- tions between successive time steps remains below 1. This results in a geometric sequence with ratio less than 1, caus- ing latent states to gradually converge to similar ones, as presented in Eq. (6) and Eq. (22).
2023b) finds challenging. Therefore, unlike ERDiff, which maximize the lower bound of log-likelihood, we propose direct log-likelihood maximization approach that achieves source-free unsupervised alignment with few trials.
Source-Free Alignment via Likelihood Maximization (FDA-MLA) A notable advantage of flow matching is its explicit modeling of likelihood. Meanwhile, distribution alignment based on minimizing Kullback-Leibler (KL) di- vergences can be seen as maximizing the likelihood in Dr (Kingma et al., 2019). Moreover, our FDA does not di- rectly rely on souree samples, making it suitable for privacy- sensitive data like neural recordings, enabling source-free unsupervised alignment.
Specifically, let the signal samples in Dr be denoted by the random variable x² with the corresponding conditional feature c = fx("x) and the latent embedding z (1) for decoding. In this context, aligning the final latent state of flow between Ds and Dr can be achieved by minimizing the KL divergence. This can be accomplished by fine-tuning the parameters a of conditional feature extractor fa:
Consider any two signal samples 2f and 2 from Ds. with corresponding conditional features of and c5. and their la- tent states z (T) and z (T). We then analyze the upper bound of the distance [r] 2 (+)] based on the Fuler sampling method. We summarize the verification in Theo- rem 3.1 below. Detailed proof can be found in App. A.2.
Theorem 3.1. Let the total number of sampling steps in Euler's method be T. At the n-th step, the time point is Tn = T. At this point, the distance between any two latent states =, (Tn) and z (Tn) corresponding to signal samples xa and xJ satisfies the following inequality:
min DKL (pI (1)lf( pi(Z" (1)==()))(((())))
max pı (2 (x)))a(x²))
(8)
Since minimizing KL divergences can be approximated as maximizing log- logeliiel functions, we can reformulate the above objective function as maximizing the likelihood based on pi (zT (x")), which reduces dependence on Ds. Furthermore, our pre-defined flow path is approximated as a straight line, the neural representation can be sampled using the one-step Fuler method. This also simplifies the computation of likelihood functions for target conditional probabilities.
(T)) - =z S
h2 (112f (0) - 25 ())...)) + he (lee.- - -cff-c
(5)
where h2 R20 x Z20 + R20 is decreasing function
with respect to given by:
22 (11=) (0) - 2 (0)]l. = (K,)' "(<,))(1=,5000 - (0=5(0)= (0)),, (6)
with 0- < K < 1. Moreover, he Ryo + Rzo satisfies
Taking one-step Fuler sampling as an example, the likeli- hood of this conditional probability can be explicitly ex- pressed via the change of variables formula (Chen et al., 2018) as:
ho (I1cs c9 ||) + co as |اद:- o9ll + co. The function
he (Ile.) oIll can be expressed as:
he (1o5 - cgl) = [(K,)") ((tk)))))))) K
nn-1
Kallwalllef -191, (7)
log PI (zJ (())ff(xx)) = log (z? (2o) (0)lfa
- -log det (uol(z (0). 0. (x
where Kg is the Lipschitz constant of activation functions in the network vo. and Wa represents the weights used for computing shift coefficients (Ma et al., 2024) in Ug.
(9)
OzT(())
Considering that lo (0)]f is independent of a, the objective function max, L (a) can be approximately rewritten as below through target neural signals a:f:
(z-
3.2.2. RAPID ADAPTATION WITH FEW TARGET TRIALS
During the fine-tuning phase, the pre-trained flow network Ug is fixed, while the conditional feature extractor fa is fine-tuned, aligning the distribution of neural representation z(1). The flow path is approximated as a straight line, al- lowing us to obtain the final latent states in a single step for decoding. This significantll simplifies the explicit compu- tation of likelihood functions, which ERDiff (Wang et al.,
nT Σ
log det (dva(z] (0), 0zf(()
max
(10)
where 21 = no(2) (x))))
5

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
More generally, alternative sampling methods can employ the unbiased Hutchinson-trace estimator (Hutchinson, 1989) to estimate the divergence in Eq. (2), facilitating effective alignment through likelihood maximization. Detailed com- putations are provided in App. A.3.
4. Experiments and Results
4.1. Experimental Setup
Datasets We employed three distinct datasets of extracellu- lar neural recordings from the primary motor cortex (MI) of non-human primates (Ma et al., 2023). Additional infor- mation about the datasets can be found in App. B.I.
Maximum Mean Discrepancy Alignment (FDA-MMM) For fair comparison with alignment methods using source data, we also employ strategy that minimizes MMD (Max- imum Mean Discrepancy) distances to align the represen- tation distributions of our flow-based learning. Takking one- step Euler sampling as an example, the objective function min, Lama( (a) for aligning final states z1)) based on Dr is as follows:
Center-Out Reaching (CO-C&CO-M) Monkeys C and M engaged in center-out reaching task, where each trial required them to move to one of eight randomized targets, earning a reward for successful reaching.
Random- Random-Target (RT-M). Monkey M performed a random- target task, reaching for three sequentially presented targets at random locations. Each trial started at the workspace center, with 2.0-second limit to reach each target.
min a
ng (1)
nr Σ +(
1
ar
(11)
Data Preprocess and Spilt We extracted trials from the go cue time' to the 'trial end'. The data was then times- tamped and smoothed for firing rates in 50 ms bins. Sessions containing approximately 200 trials, along with 2D cursor velocity labels, were used as Ds for pre-training, while a separate session without labels was used as Dr for fine- tuning. For few-trial alignment, evaluate the number of target trials from all recorded ones, typically setting to 0.02, 0.03, 0.04, and 0.06, with 0.02 corresponding to no more than 5 trials. Considering the increased randomness in few-trial selections, we pre-train our FDA using different random seeds and fine-tune on 25 different random selections of few trials. The decoded cursor velocity is evaluated using R² scores, with results averaged over different selections and five pre-training pro- cesses. Additional experimental details and slyeer-paamien settings can be found in App. B.2.
ngg
12
where (1) = r0(2,'00 (0), O, fa (xf)), and 2 (1) (0), fz()))). Here, H. represents the reproducing kernel Hilbert space (RKHS), and yp is the feature mapping function that space, and we utilize a Gaussian kernel to compute the inner product of features.
used the target ratio to
Algorithm 1 Flow-Based Dynamical Aligmment (FDA)
I: Input: source domain Dy; target domain Dr; alignment method align.m; pre-defined vy;
2: Output: conditional feature extractor fa: continuous normal-
izing flow network Up
3: Initialize fa. v0
4: Pre-training phase:
5: for iter to mpre-train do
6: Sample T. x² (0) ~ (O, 1). x²x2² = n
7: Update fa. by (o 0);
8: end for
4.2. Comparative Study
9: Fine-tuning phase:
10:
for iler = 1-110 to ye tune do
Baselines The following approaches were utilized as base- lines for comparative experiments, with further implementa- tion details provided in App. B.3.
11:
if aaliign.. is FDA-MMD: then
12:
Sample x5. x²
1). and x², x² (0)
.N(01)): I); Update fo by Lama(a);
LSSM(Hochreiterr, 1997): Unaligned LSTMs were used as baseline decoders to assess the challenges of alignment. GEBRA(SScheider al., 2023): CEBRA served as ad- vanced tool for discovering generalizable latent structures across datasets and subjects without alignment.
13:
else if align_m m is FDA-MLA: then
14:
Sample x". z² (0) ~ (N I): Update fa by Lana(a);;
15:
end if
16:
end for
17:
return fa, Up.
ERDiff Wang et al., 2023b): ERDiff employed diffusion models to reconstruct spatio-temporal structures and aligned them with latent dynamics derived from VAEs.
3.3. Overall Learning Algorithm
NoMAD(Karpowiez et al., 2022): NoMAD utilizied LFADS (Pandarinath et al., 2018) 8) capture neural pop- ulation dynamics and performed alignment.
The overall learning algorithm is illustrated in Algorithm During the pre-training phase, we perform supervised opti- mization of the conditional feature extractor fa and the flow network vo using Ds. with the objective function Leim(a, 0).
Cycle-GAN(Ma et al., 2023): Cycle-GAN directly aligned full fill-dimensional raw signals at each time step through an adversarial approach.
In the fine-tuning phase, the parameter 0 is fixed, and few trials from Dr are utilized to fine-tune a based on either Lama (a) or Lmma(a) as described in Sec. 3.2.2. Further training details are provided in App. B.2.
Considering that NoMAD and ERDiff are both generative models, we included an additional reconstruction term in our
6

---

FDA: Flow Matching for Frw-Trial Neural Adaptation with Stable Latent Dynamics
Table 1. Comparison of R2 values (in %) of baselines and FDA CO-M and RT-M datasets(r 0.02).
Data
Session
LSTM
CEBRA
ERDiAT
NeMAD
Cycle-GAN
FDA-MLA
FDA-MMD
Day
44
79.24 38
82.71
79.77
77 77.06_22.4 21
84.79.1..
84.79. 79.799000 20
Day
-18.633298.70
-21.52212.511
0. -0.14260.88
15.82+11.80
10.25
23. 23.79-8.77
45. 23 2.44
Day
63.85419.96
1.7747.08
47.41
43.49455.0
14.20+11.21
50.15+4..85
65.90+$.17
Day 15
-712.91 -712.914316.04
-33.24415.03
-49.80+19.80
20.2647.52
9.77
43.59+3.69
49.55 49.55+3341
CD-M
Day
88.57.38..6
21.10
15.20 .99
13.932
14.10
33.9817.39
27.34
Day 24
-9..52+
-10.25
-0.02+36.80
18. 18.43
-3 -3.14
48 48.56.+4.58
51 28 2.33
Day 253.88.1270.30
116.27
-3.24 31
28, 28.1914.44 4.43
15.30_4.99
91.7AL7.31
38.79140 14.12
Day 28
107.641124.44
-5.995110.54
-9.79240.00
32.68233
0.35 14.36
53 53.27
64. 87.8774 4..40
Day 206.99+117.46
64.32+15.75
32.77+21.90 99
63..33
16.92_2.99
36.16-9.221
41. 26. 2..70
Day 31
63.01-+400.0
$1.41+21.04
0.01
34.60+8.21
6.964
56.50433.92
57. 57.10+3..22 +-324
Day 417.39.125.63
40.10.11667
T.08
28.5214.60
6.18 13.31
40.4911569
44.66 44.41
Day 12.91+11.40
74.86+1..0
76.98 42.62
74.71+2.87
25.19
86. 66.95+1.59
86.95 +1.69
Day
63.15
65.97
-0.6210.03
58.72
32.38 2.33
71.83
74.32
Day -20.622322.44 46
21.3426.71
18.38425 62
25.87
21.35_3.33
55.05-22.65
1: 80
Day 39
86.31 24.31447..66
36.86425.62
8.36
-6.25-11.3 11.77
2. 22.6655.2
38. 28 26.1
40.44 47.311
RI-M
Day -8.364417.70
2.63-
-0.4640007
-3.51+12.01
+ 11.66
82.1648..95
85 85
Day 52
3.12411.68
30 30.5026.94
16.06-330.3
33.32416.90
10.29 10.29
43.35=24.00
44,99
Day 144. 188.64..55 118.64
43.50
42.33-4.84
9.82+17.63
19.22+13.62
20.70-1.85
49.60-2.58
50.03
Day 67
25.09 10911115 13.79
-22.98
10.074
25.65_1.59
42.06166.2
50. 29 1.007
Day -44.221 298.67
-110.99 995.
-38.82 1:29.41
-0.3320.02
127.12
-5.99 79
29.52 21
59. 19:19::4 07
Day 77
-3379421.04
-3.5226.53
31.60
-1.68-18 18.81
16.19-9.48
16.67 (7 =9.
Day -226.00+ 135.06
-17.01418.77
1.22=3.10
13.01+22.32
10.53=3.33
39. 39.29:46.88
38, 5.70
method for a fair comparison and observed results similar to FDA without that regularization, as shown in Fig. ((c) re). Thus, omitted the reconstruction term in the final version. Moreover, for fairesss, the pre-training of NoMAD and ERDiff involved joint training of their generative mod- els and behavioral decoders, while CEBRA was trained simultaneously on time and behavioral labels.
trials. LSTM and CEBRA (without alignment) often yielded negative scores, emphasizing the need of alignment. Cycle- GAN and NoMAD performed much worse than reported in their original papers due to the scarcity of target trials, as shown in Fig. S5, ERDiff often experienced early stopping caused by gradient explosions in few-trial scenarios with its latest release, leading to performance degradation. Though FDA-MLA performed worse than FDA-MMD overall, this difference is understandable given that it is source-free.
(a)
CO-M
RT-M
(b)
CO-M
RT-M
0,20
MANANO
We also performed comparisons with the two best baselines, NoMAD and Cycle-GAN As shown in Fig. 4(c), FDA achieved a higher average R² across different values of r, demonstrating its efficient adaptation in few-trial scenarios. When r increased to approximately 0.3 (~ 60 trials), FDA's performance became comparable to that of Cycle-GAN and NoMAD, as shown in Fig. S5. The overall performance of FDA across all sessions with few trials (r 0.02) is presented in Fig. S3, demonstrating its consistently effective adaptation. Moreover, as presented in Fig. 4(b), FDA-MMD outperformed NoMAD and Cycle-GAN when D3 contained two sessions. We also found that FDA can achieve better adaptation in few-trial scenarios with more sessions in Ds- Additional results can be found in App. C.1.2.
0.15
0.6
FBA
M 0,
0.10
0.5
0.05
0.3
0.00
0.2
-0.05
-0.10
CO-M
RT-M
0.55
0.55
0.45
0.45
8² Score
0.35
0.35
0.25
0.25
NoMAD
0.15
Cyde-Gax
0.05
TOAHLA
0.05
-0.05
0.05
0.03
0.04
0.06
0.02
0.04
0.06
Figure 4. (a) The maximum Lyapunov exponent (MLF) À on CO- M and RT-M datasets. Dots represent the average MLE across five random runs of pre- pre-training for each individual source session. Bar charts denote average MI.E across sessions. (b) Comparison of I² scores for cross-session decoding (r = 0.02) with two sessions in Ds. (c) Comparison of average R² scores across target sessions for basclines and FDA under varying r. Cross-session Performance Evaluation We first validated the cross sessi-n performance of FDA with few trials. We conducted experiments with Ds containing only one session. The average R² scores, using Day0 as the source session and a target ratio r of 0.02, are presented in Table (CCOM & RT-M) and App. C. C.1.2(CO-C). FLAAAMO FDA-MLA and FDA-MMD outperformed other methods across most sessions with few
Empirical Analysis on Latent Dynamies To analyze the stability of latent dynamics in our flow-based transfor- mations, we measured the maximum Lyapunov exponent (MLE) A of z (T) after pre-training on Dg. Notice that the value of was computed as described in (Wolf et al., 1985), with a non- non-positive À typically indicating dynami- cal stability. More detailed information on À are available in App. B.5. Since MLE operates sequential variables, we compared our À with those derived from sequential la- tent factors (ERDiff & NoMAD). The results are presented in Fig. 4(a) and App. C. Nearly all MLES achieved by FDA are non-positive (CO-M: 55/55, RT-M: 52/55), indi- cating greater stability compared to the selected baselines.
7

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
CO-MiDay311
(b)
CO-M(Day29)
CO-M[Day29)
CO.MITarget Ratio 0.02)
125.0
0.6
0.30
Score
122.5
0.A
0.25
F
0.02
120.0
0.02
0.2
0.20
IDA-g
F
0.04
117.5
0.04
FDM-NMM
115.0
10
15
20
0.25
10
15
20
10
15
20
Folva
rakeer
Folv
rike
RI-M(Day552
RI-MiDay522
RT-M(Day52)
0.55
0.50
150
RT-MiTarget Ratio
0.50
0.45
R2 P*Ccore
0.45
0.6
140
0.4-
& 0.35
0.40
135-
R
0.25
10
15
0.35
10 15
125
15
RBKA Robo
Rolon Fiss wuAAiE HIND
Plane hine
Figure 5. (a) S² for FDA-I, FDA-g. FDA-c, and FDA-MMD on CO-M (Day31) and RT-M (Day52) with r = 0.02. FDA-t extracted and aligned features solely using the transformer-basee fa without flows. FDA-g aligned z(1) using Cycle-GAN, and FDA-c aligned the distribution of e instead (1)). (b) R² (Left) and the corresponding negative log likelihood (NLL) (Right) on CO-M (Day29) and RT-M (Day52) by FDA-MLA with various target ratios r. (c) Comparison of average R² scores, achieved by FDA-a. FDA-m, FDA-v, FDA-p, FDA-re, FDA-MLA, and FDA-MMD. MMD. Dots represent R values for individual session(r = 0.02). Bar charts denote average I2 across sessions. We employed FDA-v and FDA-p as variants utilizing VP and GVP flow paths, respectively. FDA-a and FDA-m employ transformers with temporal correlation attention and MLPs as conditional extractors, respectively. FDA-re includes an additional reconstruction term to regularize the learned neural representations.
The three exceptions have MLES below 1e-3, which can be considered approximately stable. Therefore, we con- clude that the latent dynamics of our FDA method remain stable. Although ERDiff also employs a flow-based frame- work, its reliance on prior statistical assumptions and path implementation via transformers may compromise the sta- bility of latent dynamics. FDA resolve this issue through learning without specific statistical assumptions via condi- tional flow matching. Our path implementation with simple residual MI.ss also facilitates stability regularization, as demonstrated in Eq. (21). We further analyze the benefits of our representation learning based on stable latent dynamics via the zero-shot rross-session performance. As shown in Table S8, FDA achieved better performance than the best two baselines without alignment.
lation of respective components. The corresponding results for zero-shot and few-trial performance using MMD-based alignment on the CO-M and RT-M datasets are summarized in Table 2. Consistent with their reduced stability, FDA-al and FDA-sc demonstrated substantially degraded transfer performance. This result suggests that instability is the factor contributing to their poor transfer ability.
Computational Efficiency and Hyper- prpeer-prrametr Analy- sis We evaluated the computational efficiency of FDA com- pared to baselines under identical hardware configurations (NVIDIA GeForce RTX 3080 Ti, 12GB). The comparison was based on the number of parameters and training time per epoch in total, covering both pre-training and fine-tuning phases. As shown in Table $10 and Table S11, FDA re- quired less training time compared to ERDiff and NoMAD, owing to its efficient training objectives based on short-term context windows. Further analysis of FDA's inference time is presented in Table S12. The average inference time per window is approximately ms, demonstrating its suitability for real-time applications. Moreover, the sensitivity analysis of main hyper-parameters in FDA and the level of diversity in target trials is provided in App. C.3.
Table 2. Comparison of average Rt scores (%) across sessions for FDA-al, FDA-sc, and FDA-MMD on the CO-M and RT-M datasets
(r yr=00 0, 0.02).
Data
FDA-al
FDA-sc
FDA-MMD
RPM COM
0
9.34
-18.20+17.0
16.23 16.23
0.02
14.51116.37
13.35
45.59....15
0
1.23+4.70
1.7843.89
38.1 38.1548.21
0.02
16.99111775
20.46
42.081e.31
Evaluation on Simulated Neural Data We conducted further experiments to evaluate the recovery of ground- truth latent variables in synthetic data. Following method in (Kapoor et al., 2024), we used the Lorenz attractor as the latent dynamics. We simulated firing rates as an affine trans- formation of the 3D latent variables into 96-dimensional space, then sampled spike trains from Poisson distribution. As shown in Table 3, our FDA successfully recovered the
Additionally, we performed a more comprehensive study to further validate the benefits of stable latent dynamics. Since stability is maintained by activation functions and scale efficients, we ablated these two components (FDA-al and FDA-sc, respectively) to violate the assumptions of stability. As shown in Fig. S4, the distribution of MLEs for -D and FD reveals that both variants frequently exhibit positive values, indicating instability resulting from the ab-
8

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
latent dynamies from synthetic spiking data. The visualiza- tions of our decoded 3D trajectories presented in Fig. S7 confirmed that FDA effectively captured the neural dynam- ies.
flow-based learning framework. The corresponding results are provided in Fig. 5(c) and Fig. S9. For the design of flow paths, we utilized FDA-v and FDA-p as variants with VP and GVP paths (Ma et al., 2024), similar to those in ERDiff. We found that the performance degradation with nonlinear flow paths may result from a mismatch in latent dynamics between the ground truth and those generated by residual MLPs, as well as the use of one-step Euler sampling. For conditional feature extractors, we used FDA-a and FDA-m as variants, incorporating transformers based on temporal correlation attention and MLPs. We observed that these extractors may not provide effective conditional features, resulting in R degradation.
Table Average R² (6) for recovered latent variables from synthetic spiking data at varying mean firing rales.
Mcan Firing Rates
0.05
0.1
0.3
R2a
95.68 15.431
1.07
1..03
4.3. Ablation Study
Ablation Study on Different Alignment Strategies To evaluate the effectiveness of our alignment, we compared FDA with several variants. FDA-t extracted and aligned fea- tures solely using the transformer-based So without flows. FDA-g aligned (1) using Cycle-GAN, and FDA-c aligned the distribution of instead of (1)) As shown in Table 4, full FDA outperformed FDA-t, whose performance fell be- low that of baselines, indicating the advantage of flow-based frameworks. The degraded performance of FDA-g stemmed from training instability, similar to Cycle-GAN, as illus- trated in Fig. 5(a). FDA-c performed slightly worse than FDA-MMI, demonstrating the equivalence of aligning c and (() using MMD.
Note that baselines like NoMAD and ERDiff both incorpo- rate a reconstruction loss term for supervised neural repre- sentation. To eliminate potential information leakage from supervised training based solely on behavioral labels, we introduced additional reconstruction term to regularize our flow-based representation (FDA-re), achieving results com- parable to FDA-MMD. This further validates the advantages of our flow-based learning framework and its efficient adap- tation in few-trial scenarios.
5. Conclusions and Limitations
As presented in Fig. 5(a) and App. C.2.1, R curves of FDA-MMD and FDA-c demonstrated more efficient and robust adaptation in few-trial scenarios, smoothly reaching their peak within ~ 20 epochs during fine-tuning. For FDA- MLA, as shown in 5(b), both the negative likelliddoood (NLL) and target R² exhibited smooth convergence within 20 epochs across different r, demonstrating rapid and efficient alignment with few trials. Despite the observed decline in R² at higher r values in Fig. 5(b), general trend of increasing R² with larger tne-tuning sample sizes was observed across most sessions, as shown in Table $14 and Table $15. Furthermore, the superior performance on Day 52 (RT-M) compared to Days 29 and 31 (CO-M) can be attributed greater similarity between the source and target sessions. This is supported by the maximum mutual infor- mation (MI) between spiking recordings from individual channels, which is higher for RT-M (2e-3) than for CO-M (6e-4).
In this paper, we establish a novel neural alignment frame- work of FDA that first leverages flow matching to achieve efficient and robust adaptation in few-trial scenarios. Our FDA approach learns flexible neural representations with stable latent dynamics, thereby facilitating source-free do- main alignment through likelihood maximization. The latent dynamics of our FDA method were theoretically verified to be stable, allowing for the robust neural adaptation. Exten- sive experiments on motor cortex datasets demonstrate that FDA significantly enhances decoding performance for few trials. Our FDA method potentially improves the application of chronic real-world BCI deployments.
Discussions and Limitations This work has several limi- tations that warrant further investigation. First, the target sessions typically originate from the same subject, with substantial overlap in the recorded neuronal populations in this study. The effectiveness of FDA in scenarios such as cross-task cross-subject alignment requires additional validation. Scenarios where the observed neuronal subsets across sessions may not fully overlap are also worth further investigations. Second, future studies using clinical data from human subjects (Fan et al., 2023; Karpowicz et al., 2024) could further enhance the clinical and long-term ap- plications of BCIs. In addition to the comparison with NDT- 2 (Ye et al., 2024) presented in Table S9, the effectiveness of FDA in self-supervised learning on large-scale neural data warrants further investigation. Finally, our findings indicate that FDA may be applicable to a wider range of neural recording modalities, including Neuropixels.
Table 4. Comparison of average H²² scores (in %) over sessions on CO-M and RT-M datasets. FDA-t extracted and aligned features solely using transformer- fa without flows. FDA-g aligned (1) using CyN,e-GAN, and FDA-C aligned the distribution of c.
Data
Turget Rotio
FDA
FDN
FDA
DDA-MMD
92 075007
66.47
42.88
45.50 16
00-N
45-55.20
35.23+7745
1..00-.772
40.40-4555 54
58.0000 _en 16
on
48.3014115
66.99_86..10 in
$4.8614.1n
44.27
61.10g
0.16 me
4
42 an o0
42.06.6.a1
IFM
1.44
40.86g7-m m
43.77 26.00
30.301500 sa
3111115.17
40.01.7 oz
00.0020.00 on
an
3.60
59.78a7.42 42
48.31.4.2
47.23 wn
Ablation Study of Main Components Further ablation studies were conducted to validate the effectiveness of our

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
Impact Statement
Chen, R. T., Behrmann, J., Duvenaud, D. K., and Jacobsen,
J.-H. Residual flows for invertible generative modeling. Advances in Neural Information Processing Systems, 32, 2019.
This paper presents Flow-based Distribution Alignment (FDA). novel framework that leverages flow matching enable efficient and robust adaptation with few trials. Our FDA approach learns flexible neural representations with stable latent dynamics, offering valuable insights for real-world brain-computer interface (BCI) applications. As BCI technology advances, it holds the potential to enhance quality of life and foster inclusivity. To ensure broad and eq- uitable benefits, its development must guided by ethical principles such data privacy. Our paper focuses mainly on scientific research and has obvious negative social impact.
Courty, N., Flamary, R., Habrard, A., and Rakotomamonjy. A. Joint distribution optimal transportation for domain adaptation. Advances neural information processing systems, 30, 2017.
Dabagia, M.. Kording. K. P., and Dyer, E. L. Aligning latent representations of neural activity. Nature Biomedical Engineering, 744:3337-343, 2023.
Degenhart, A. D., Bishop, W. E., Oby, E. R., Kabara, C., Chase, S. M., Batista, A. P., and Yu, B. M. Stabi- lization of a brain-computer interface via the alignment of low-dimensional spaces of neural activity. Nature biomedical engineering, 4(7):672-685. 2020.
Acknowledgments
This work was supported by the STI 2030 Major Projects (2011202004433, the Natural Science Foundation of China (62276228), and the Zhejiang Provincial Natural Sci- ence Foundation (LR24F020002).
Dinh, L., Sohl- Diek-Dicstten, J., and Bengio, S. Density esti- mation using real nvp. In International Conference on Learning Representations, 2022.
References
Duan, T., Wang. Z., Doretto, G., Li, F., Tao, C., and Adjeroh, D. Distributionally robust cross subject eeg decoding. In ECAI 2023, pp. 575-582. IOS Press, 2023a.
Angeli, D. A Iyapunov approach to incremental stability properties. IEEE Transactions Automatic Control, 47 (3):410-4211 2002.
Duan, T., Wang, Z., Liu, S., Yin, Y., and Srihari, S. N. Uncer: A framework for uncertainty estimation and reduction in neural decoding of eeg signals. Neurocomputingg 538: 1262 10, 2023b.
Arjovsky. M., Chintala, S., and Bottou, L. Wasserstein gen- erative adversarial networks. In International conference on machine learning, pp. 214-223, PMLR, 2017.
Atanackovie, L., Zhang, X., Amos, B., Blanchette, M., Lee, L. J., Bengio, Y., Tong, A., and Neklyudov, Meta flow matching: Integrating vector fields on the wasser- stein manifold. In ICML 2024 Workshop on Geometry- grounded Representation Learning and Generative Mod- eling.
Fan, C., Hahn, N., Kamdar, F., Avansino, D., Wilson, G., Hochberg, L.., Shenoy, K. V., Henderson, J., and Willett, F. Plug-and-play stability for intracortical brain-computer interfaces: one-year demonstration of seamless brain- to-text communication. Advances in neural information processing systems, 37, 2023.
Athalye, V. R., Ganguly, K., Costa, R. M., and Carmena, J. M. Emergence of coordinated neural dynamics under- lies ncuroprosthetic learning and skillful control. Neuron, 93(4):955 970, 2017.
Farshchian, A., Gallego, J. A., Cohen, J. P., Bengio, Y.. Miller, I.. E., and Solla, S. A. Adversarial domain adapta- tion for stable brain-maching interfaces. In International Conference on Learning Representations, 2018.
Azabou, M., Arora, V., Ganesh, V., Mao, X., Nachimuthu, S., Mendelson, M., Richards, B., Perich, M., Lajoie, G., and Dyer, E. A unified, scalable framework for neural population decoding, Advances in Neural Information Processing Systems, 37, 2023.
Gong, R., Li, W., Chen, Y., and Gool, L. V. Dlow: Domain flow for adaptation and generalization. Proceedings of the IEEE/CVE conference on computer vision and pattern recognition, pp. 2477-2486, 2019.
Hochreiter, S. Long short-term memory. Neural Computa- tion MIT-Press, 1997.
Buzsáki, G. Large-scale recording of neuronal ensembles. Nature neuroscience, 7(5)444 451, 2004.
Hutchinson, M. F. A stochastic estimator of the trace of the influence matrix for laplacian smoothing splines. Com- munications Staristics-Simulattio and Computation, 1803) 1989.
Chen, R. T., Rubanova, Y., Bettencourt, J., and Duvenaud, D. K. Neural ordinary differential equations. Advances in neural information processing systems, 31, 2018.
10

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
Izhikevich, E. M., Gally, J. A., and Edelman, G. M. Spike- timing dynamics of neuronal groups. Cerebral cortex, 14 (8):933-944, 2004.
In The Eleventh International Conference on Learning Representations (ICL.R), 2023a.
Liu, X., Zhang, X., Ma, J., Peng, J., et al. Instaflow: One step is enough for high-quality diffusion- based text-to- image generation. In The Twelfth International Confer- ence on Learning Representations, 2023b.
Jude, J., Perich, M., Miller, L., and Hennig, M. Robust alignment of cross- session recordings of neural popula- tion activity by behaviour via unsupervised domain adap- tation. In International Conference on Machine Learning. PMLR, 2022.
Liu, Y., Hu, T., Zhang, H., Wu, H., Wang. S., Ma, L., and Long, M. itransformer: Inverted transformers effective for time series forecasting. In The Twelfth Inter- national Conference on Learning Representations, 2024.
pp.
Kapoor, J., Schulz, A., Vetter, J., Pei, F., Gao, R., and Macke, H. Latent diffusion for neural spiking data. Advances in Neural Information Processing Systems, 37: 118119-1188 2024.
Long, M., Wang, J., Ding, G., Sun, J., and Yu, P. S. Trans- fer feature learning with joint distribution adaptation. In Proceedings of the IEEE international conference on com- puter vision, pp. 2200-2207, 2013.
Karpowicz, B. M., Ali, Y. H.. Wimalasena, L.. N., Sedler, A. R., Keshtkaran, M. R., Bodkin, K., Ma, X., Miller, L. E., and Pandarinath, C. Stabilizing brain-computer interfaces through alignment of latent dynamics. BioRxiv, pp. 2022002222222 04, 2022.
Ma, N., Goldstein, M., Albergo, M. S., Boffi, N. M., Vanden- Eijnden, E., and Xie, S. Sit: Exploring flow and diffusion- based generative models with scalable interpolant trans- formers. In European Conference on Computer Vision pp. 23-40. Springer, 2024.
Karpowicz, M., Ye, J., Fan, C., Tostado-Marcos, P., Riz- zoglio, F., Washington, C., Scodeler, T.,, de Lucena, D., Nason-Tooaazzewsle S. R., Mender, M. J., et al. Few- shot algorithms for consistent neural decoding (falcon) benchmark. bioRxiv, pp. 2024-09, 2024.
Ma, X., Rizzoglio, F., Bodkin, K. L.,, Perreault, E., Miller, L. E., and Kennedy, A. Using adversarial networks to extend brain computer interface decoding accuracy over time. elife, 12:e84296, 2023.
Kerdoneuff, T., Emonet, R., and Sebban, M. Metric learning in optimal transport for domain adaptation. In Interna- tional Joint Conference on Artificial Intelligence, 2021.
Pan, S. J. and Yang. Q. A survey on transfer learning. IEEE Transactions on knowledge and data engineering, 22(10): 1345-1359, 2009.
Kim, T. D.. Luo, T. Z., Pillow, J. W., and Brody, C. D. Infer- ring latent dynamics underlying neural population activity via neural differential equations. In International Con- ference on Machine Learning, pp. 5551-556666 PMLR, 2021.
Pandarinath, C., O'Shea, D. J., Collins, J., Jozefowicz, R., Stavisky, S. D., Kao, J. C., Trautmann, E. M., Kaufman, M. T., Ryu, S. I., Hochberg, L. R., et al. Inferring single- trial neural population dynamics using sequential auto- encoders. Nature methods, 15(10))805-81,, 2018.
Kingma, D. P., Welling, M., et al. An introduction vari- ational autoencoders. Foundations and Trends@ in Ma- chine Learning, 1244)3307-392, 2019.
Qi, Y., Liu, B., Wang, Y., and Pan, G. Dynamic ensemble modeling approach to nonstationary neural decoding in brain-computer interfaces. Advances in neural informa- tion processing systems, 32, 2019.
Kolter, J. Z. and Manek, G. Learning stable deep dynam- ics models. Advances in neural information processing systems, 32, 2019.
Lipman, Y., Chen, R. T., Ben-Bennl Hamu, H., Nickel, M., and Le, M. Flow matching for generative modeling. In The Eleventh International Conference on Learning Repre- sentations, 2023.
Schneider, S., Lee, J. H., and Mathis, M. W. Learnable latent embeddings for joint behavioural and neural analysis. Nature, 617(7960):360-368, 2023.
Song, Y., Sohh--Dccsttein, J., Kingma, D. P., Kumar, A., Er- mon, S., and Poole, B. baore-based generative modeling through stochastic differential equations. In International Conference on Learning Representations, 2021.
Liu, R., Azabou, M., Dabagia, M., Xiao, J., and Dyer, E. Seeing the forest and the tree: Building representations of both individual and collective dynamics with transform- ers. Advances in neural information processing systems, 35:2377-2391, 2022.
Truccolo, W., Frichs, G. M., Donoghue, J. P.,, and Hochberg, L. R. Primary motor cortex tuning to intended move- ment kinematics in humans with tetraplegia. Journal of Neuroscience, 28(5):1 1655):163-1117 163-1178, 2008
Liu, X., Gong, C., and Liu, Q. Flow straight and fast: Learning to generate and transfer data with rectified flow.

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
Vermani, A., Park, M., and Nassar, Leveraging gener- ative models for unsupervised alignment of neural time series data. In The Twelfth International Conference Learning Representations, 2024.
Ye, J., Collinger, J., Wehbe, L., and Gaunt, R. Neural data transformer 2: multi-context pretraining for neural spik- ing activity. Advances in Neural Information Processing Systems, 37, 2023.
Wang, H., Qi, Y., Yao, L., Wang, Y., Farina, D., and Pan, G. A human-machin joint learning framework to boost endogenous bei training. IEEE Transactions on Neural Networks and Learning Systems, 2023a.
Ye, J.. Collinger, J., Wehbe, L., and Gaunt, R. Neural data transformer 2: multi-context pretraining for neural spik- ing activity. Advances in Neural Information Processing Systems, 36, 2024.
Wang, J., Zhao, S., Luo, Z., Zhou, Y., Jiang, Li, S., Li, T., and Pan, G. CBramod: A criss-cross brain foundation model for EEG decoding. In The Thirteenth International Conference on Learning Representations, 2025.
Zhang, Y., Wang, Y., Jiménez-Benetó, D., Wang, Z., Az- abou, M., Richards, B., Tung, R., Winter, O., Dyer, E., Paninski, L.,, et al. Towards a" universal translator" for neural dynamics at single-cell, single-spike resolution. Advances in Neural Information Processing Systems, 37: 80495-8055 10991, 2024.
Wang, Y., Wu, Z., Li, C., and Wu, A. Extraction and re- covery of spatio-temporal structure in latent dynamics alignment with diffusion model. Advances in Neural Information Processing Systems, 37, 2023b.
Zhu, X., Qi. Y., Pan, G., and Wang, Y. Tracking func- tional changes in nonstationary signals with evolutionary ensemble bayesian model for robust neural decoding. Ad- vances in Neural Information Processing Systems, 35: 22576-22588, 2022.
Willett, F. R., Avansino, D. T., Hochberg, L. R., Henderson, M., and Shenoy, K. V. High-performance brain-to- text communication via handwriting. Nature, 593(7858):
249-254, 2021.
Willett, F. R., Kunz, E. M., Fan, C., Avansino, D. T., Wilson, G. H.. Choi, E. Y., Kamdar, F., Glasser, M. F., Hochberg, L. R., Druckmann, S., et high-performance speech neuroprosthesis. Nature, 620(7976;:103111000 2023.
Williams, A. H., Poole, B., Maheswaranathan, N., Dhawale, A. K., Fisher, T., Wilson, C. D., Brann, D. H., Trautmann, E. M., Ryu, S., Shusterman, R., et al. Discovering precise temporal patterns large-scale neural recordings through robust and interpretable time warping. Neuron, 105(2): 2020.
Woeppel, K., Hughes, C., Herrera, A. Eles, J. R., Tyler- Kabara, E. C., Gaunt, R. A., Collinger, J. L., and Cui, X. T. Explant amalysis of utah electrode arrays implanted in human cortex for brain-compptee--nneffface Frontiers in Bioengineering and Biotechnology, 9:1137, 2021.
Wolf, A., Swift, J. B., Swinney, H. L., and Vastano, J. De- termining lyapunov exponents from time series. Physica D: nonlinear phenomena, 16(3):285-317 1985.
Wu, Z., Zhou, Y., Shi, 7., Zhang, C., Li, G., Zheng, X., Zheng, N., and Pan, G. Cyborg intelligence: recent progress and future directions. IEEE Intelligent Systems, 31(6))44-50, 2016.
Yang, G., Huang, X., Hao, Z., Liu, M.-Y., Belongie, S., and Hariharan, B. Pointflow: 3d point cloud generation with continuous normalizing flows. Proceedings of the IEEE/CVF international conference on computer vision, pp. -5500, 2019.
12

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
Appendix of Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
A. Method
A.I. Detailed Architectures
We present the detailed architecture of our main modules as follows. The input neural signals have the shape of (Batch size=256, Window size=w, Number channels=m). The latent dimensions of conditional features are denoted as ke. the dimension of latent states in the continuous normalizing flow as kg. The dropout value represented as og- The architectures of fa, and by can be seen in Table SI.
Table SI. Detailed Architectures of FDA
fa
IMSA(ke, Rheoa), FFN(Ke Ahead xx
Ug
MLP(ks + Ke k2 vd)x5
Here, the term MLP to refer to Multilayer perceptron with residual connections, MSA to represent multi-head self-attention modules, and FFN to indicate feed-forward neural networks.
Moreover, default dimensions kc, k2, the drop-out rate va. the number of heads neeedd and the window length w mentioned above are configured as shown in Table S2 according to different datasets.
Table S2, Default Value Setup on Different Datascts
k.
k;
Vd
Thead
CO-C
64
64
0.1
8
6
CO-M
32
32
0.1
8
RT-M
32
32
0.1
A.2. Proof of Dynamical Stability in Theorem 3.1
First, consider the iterative relationship between two sampling steps. For example, analyzing the upper bound of (Tx) 2/ (Ti)l is as follows:
(1x)(()) =5(m)) = |1 (0) + un
- =5((0) 10 (1
(12)
$ || - 2 (0)1
0.
(13)
In this study, we use MLP layers with residuals to compose uo as illustrated in (Ma al., 2024), leading to:
0o (= fo),
)= (0) 335
(14)
where 7e is the scale coefficient, and we assume due the same sampling time point:
| + 7
We only consider the influence of fa (x.)) on ?
7 g b.). Similarly, 3 is calculated in the same way:
(15)
B = g(W bb).
(16)
Thus:
0o (0), x2 (2+)))))))+)) +35
(17)
Substituting the expansions of up into the earlier equation yields:
[m)) 2/ (7))l < || (0) (0) (00) +1135 - 1555
(18)
13

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
33+ <3++0111= (0)1 11 1891-
(19)
Further expanding ||,8 - 39
| -
- 8/
(a + bb) Sa +ba)ll
(20)
Since the activation function g of the MLP is typically Lipschitz continuous function (e.g., sigmoid function), this simplifies to:
| - 1991 - k W. III (2; fa (1] = / -
cf9ll
(21)
where K is the Lipschitz constant of the function g. Therefore:
(T)) - 25 (f1)) K2 12, - =f)]l + K, [wellle?
(22)
where 0 < K = 3 + 3 < 1.
Next, substituting in into the above Eq. (22), we obtain the approximate upper bound for || (Tw) - =z
|| 22 (Tm)ll (1,)" -2 (0)] + nn-1
Σ (K,)) )0 K, Kollwalllee - cfll.
(23)
Let h2 (I1= =/ (0)],, = )1 - ==(0)), where 12 : R20 x Zzo + Rzo is a decreasing function with respect to n.
Let (1le - c9 (I) EK Kyllwslllle -fffl. where he R20 + Rzo, and hellle cf + oc as
l|e.e - -c59l + 0c.
In summary, the latent space extracted by our method exhibits the dynamical stability defined in (Angeli, 2002).
A.3. General computation of likelihood in Section 3.2.2
More generally, alternative sampling methods can employ the unbiased Hutchinson- estimator (Hutchinson, 1989) to estimate the divergence in Eq. (2). The detailed computation is presented below.
Using the instantaneous change of variables formula (Chen al., 2018), the log-likelihood lo (2)) expressed as:
be
lo (=) L. V (T),
(g
(24)
where the latent variable (r) can be calculated using any sampling method based on Eq. (1). Furthermore, we estimate V vooo (x) via the unbiased Hutchinson- estimator.
Specifically, uo(x" (7), fo (x"), ), r) is estimated as:
(z (T), fa fax"), Eptele (1) T))).
(25)
where Vva(z (7), 7) can be computed via reverse-mode automatic differentiation. The random variable satisfies Epte/[] 0 and Covp(o) [c] I.
A.4. Related Work Normalizing Flows
Normalizing flows have been widely applied in distribution sampling due to their precise and explicit likelihood modeling. Traditional normalizing flows (Chen et al., 2019; Dinh et al., 2022) typically rely invertible transformations, but these constrain the representational capacity of the networks. Recent research has sought to alleviate this limitation by utilizing continuous normalizing flows (Yang et al., 2019) based on ODEs. For example, flow matching (Liu et al., 2023a; Lipman et al., 2023; Ma et al., 2024) extends diffusion models, an advanced generative model, allowing for more flexible diffusion paths. Conditional flow matching (Liu et al., 2023b; Atanackovic et al.) further incorporates conditional features to model conditional distributions.
14

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
B. Experimental Details
B.1. Dataset Description
CO-MMCO et al., 2023). Monkeys C and M conducted a center-out (CO) reaching task while holding an upright handle. Monkey C utilized its right hand, whereas Monkey M used its left. Each trial commenced with the monkey positioning its hand the center of the workspace. After random delay, one of eight evenly spaced outer targets arranged in circle was displayed. The monkey then maintained its position through variable pause until hearing auditory go cue. To earn liquid reward, the monkey needed to reach the outer target within 1.0 second and sustain its hold for 0.5 seconds.
RM- et al., 2023). Monkey M also participated in a random- (RT) task, where it reached for sequences of three targets shown in random locations on the screen. This task utilized the same apparatus as the CO reaching task. Each trial started with the monkey placing its hand at the center the workspace, followed by the sequential presentation of three targets. The monkey had 2.0 seconds to move the cursor each target after seeing it. Due the random positioning of the targets, the cursor trajectory varied with each trial.
For all datasets, we extracted trials from the "go cue time' to the 'trial end.' Next, we processed the neural signals by digitizing, applying a bandpass filter (250-5000 Hz), and detecting spikes using thresholds based on root-mean square activity. The data was then timestamped and smoothed with a Gaussian kernel to compute firing rates over 50 ms bins.
Preprocess Process.
B.2. Training Details
The main configurations for model training included the learning rate, weight decay parameters of the Adam optimizer, batch sizes, number of iterative epochs during pre-training and fine-tuning phases. Details of these hyperparameters are provided in Table and Table S4, respectively.
Table S3. Detailed Pre-training Setup
Learning Rate
Weight Decay
Epochs
Batch Size
CO-C CO-M
2e-3
le-5
3500
256
2e-3
le-5
3500
256
RT-M
2c-3
le-5
3500
256
Table S4. Detailed Fine-tuning Sctup
Learning Rate
Weight Decay
Epochs
Batch Size
CO-C
lc-4
lc-5
25
256
CO-M
le-4
le-5
25
256
RT-M
le-4
le-5
25
256
B.3. Baseline Implementation
CEBRA(Schneider et al., 2023). CEBRA is sophisticated muachne--learingg approach aimed at analyzing and compressing time series data, particularly in the context of behavioral and neural studies. It excels at revealing hidden structures in data variability and has been effectively applied to decode neural activity in the mouse brain's visual cortex, allowing for the reconstruction what the subject has seen. The code can be accessed at https://github..omm http://ggthbbbbmmmmmaaaaiaoooooo hwtpAAiiiieeooooooooolllbblaobba
ERDifR Wang al., 2023b). ERDiff introduces a method that utilizes diffusion models to extract latent dynamic structures from the source domain and subsequently recover them in the target domain using maximum likelihood alignment. Empirical evaluations on both synthetic and neural recording datasets indicate that this approach surpasses others in effectively preserving latent dynamic structures over time and across individuals. The latest code can be accessed at http://gghbbbbbommyy/vwa///////1
(oMAD(Karpowicz et al., 2022). NoMAD utilizes the latent manifold structure present in neural population activity to create a reliable connection between brain activity and motor behavior, It shows the capability to achieve accurate and
15

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
highly stable behavioral decoding over long durations, thus eliminating the necessity for supervised recalibration. In this study, implemented NoMAD using the LFADS code found http://stthhhoooooauss////////ss which may lead to some differences from the original implementation.
CANle et al., 2023). Cycle-GAN aligned the distributions of cull-dimensional neural recordings. stabilizing the original decoding model without the need for recalibration. Evaluations of Cycle-GAN alongside a related approach (ADAN) on multiple monkey and task datasets reveal that Cycle-GAN outperforms maintaining BCI accuracy robustly over time without additional training. Since this study employs the same datasets, we directly implement the publicly available code from
BCI.
B.4. Validation Details
Specifically, during the validation after fine-tuning phases, we employed neural signals x" from the target domain, which not leveraged during the fine-tuning phase, evaluate the efficacy of our alignment approach.
This evaluation is based on the decoding performance based on R² scores. We first sample z" (1) using the one-step Euler based on z² (0): z (1) = uz(z (0), 0, )x) The predicted target label y" are computed as below: y" rj (1)x" R² scores are further obtained between y and actual yc
B.5. Lyapunov Exponents
The stability described above can be quantified using the Lyapunov function (Angeli, 2002), which can also be estimated through the maximum Lyapunov exponent (MLE). The maximum Lyapunov exponent can be defined based on the latent state ztt) follows: À = lim lim In [da(t)] A non-positive MLE often indicates the stability of dynamical systems, 6x(0) [xx
achieving stable dynamical latent features (Wolf et al., 1985). Here, we estimated the MLE À of z; based on the method in (Wolf et al., 1985) to evaluate the stability of dynamical latent features extracted from D3 after the pre-training phase. The detailed calculation of À available below.
The stability defined in (Angeli, 2002) can be determined using a Lyapunov function V(z): given equilibrium point =" of the system,
V(=") 0,
V(2") = 0,
V(z) > for all = # 2²,
(=z) < for all # 2²
It is known that V(z) = _ is of the functions that meet the conditions. However, directly calculating complex V(=) can be difficult. Therefore, we used the method based on (Wolf et al., 1985) to estimate the stability of =(t) follows:
Step 1: Select N sample points, denoted one as (40), find j such that j = arg min - 24 (lo)ll and let Lo(to) =
|| (fo) - 2, (fo)
Step
Find 4, for given constant e, such that to St< t,, Lo(t) S Lo(ts) e. Let L' Lo(ts). Continue with 21 (t+) the next sample point following Step 1.
Step 3:
The maximum Lyapunov exponen((MLE) À is approximately as follows:
M
To
A
loga
NAt
Lo(to)
where At is the time step interval and M is the number of steps in a single orbit.
16

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
C. Additional Results
C.1. Comparative Study
(a)
CO-C
(b)
CO-C
(c) r 0. 02 CO-C
T
0. 0. CO-C
CO-M
RT-M
0.20
0.2
0.15
NoMAD
Cycle
Cycle
0.6
FD4
0.10
R² Score
0.1
R Score
R² Score
0.3
0.5
0.4
0.05
0.2
0.2
MLE
0.0
Cycle-GAN
0.3
FDA-MLA
0.1
0.2
-0.05
FDA MMD
0.0
0.1
-0.1
0.10
0.02
0.03
0.04
0.06
0.1
-0.1
0.0
(d)
0.04
CO-C
CO-M
RT-M
0. 06
CO-C
CO-M
RT-M
NoWAD
0.4
Cydl GAR.
0.6
0.4
0.6
FOA
R² Score
0.5
R? Score
0.3
0.5
0.4
0.4
0.2
0.2
0.3
0.3
0.1
0.2
0.1
0.2
0.1
0.0
0.1
0.1
0.0
-0.1
0.0
Figure (a) The maximum Lyapunov exponent (MLE) achieved by ERDiff, NoMAD, and FDA is displayed the CO-C dataset. Dots in different colors represent the average MLE from individual sessions. (b) Average R2 scores for NoMAD, Cycle-GAN, FDA-MLA, FDA-MMD are presented under varying values r on CO-C. (c) and (d): R² scores for cross-session decoding (r 0.02, 0.03 (c) and 0.04, 0.06 (d)) when Ds contains two sessions, obtained from NoMAD, Cyele-GAN, and FDA-MMD, shown. Dots in diffcrent colors represent the average R² scores for diffcrent Ds.
C.I.I. LATENT DYNAMICS STABILITY
To validate the dynamical stability of FDA, we measured the maximum Lyapunov exponent (MLE) À of z 2 after pre-training Dg. The value of X was computed described in (Wolf al., 1985), and the results of CO-C is shown in Fig. S1()).
Moreover, we also visualized all maximum Lyapunov exponents (MLE) achieved by ERDiff, NoMAD, and FDA across target sessions. As shown Fig. S2(a), FDA consistently achieved non-positive MLEs in most cases, aligning with the average MLE results. Compared to ERDiff and NoMAD, the latent dynamics of our learning based on FDA are more stable.
(a)
(b)
CO-M(Day8)
CO-M(Day8)
CO-M
RT-M
0.375
136
0.350
0.50
134
0.325
0.25
0.25
0.02
0.02
0.03
0.300
0.03
0.00
0.00
132
-0.25
-0.25
0.06
0.275
0.06
ERDiff
NoMAD
FDA
ERDiff
NoMAD
FDA
15
20
15
20
Piie zune
Oine, tune
Figure S2. (a) Violin plot of all maximum Lyapunov exponents (MLE) À achieved by ERDiff. NoMAD, and FDA on the CO-M and RT-M datasets, with non-positive À typically indicating dynamical stability. (b) Negative log likelihood (NLL) (Left) and corresponding R² (Right) curves CO-M (Day8) by FDA-MLA with various target ratios
17

---

FDA: Flow Matching for Tri-Trial Neural Adaptation with Stable Latent Dynamics
NoMAD
Cycle-GAN
FDA-MLA
FDA-MMD
0.6
Target Day
Target Day
Target Day
Target Day
0.4
RT-M
52
52
52
52
0.2
79
79
79
79
0.0
52
79
52
79
52
79
52
79
Source Day
Source Day
Source Day
Source Day
NoMAD
Cycle-GAN
FDA-MLA
FDA-MMD
0.6
Targer Day
Target Day
Target Day
Target Day
0.4
CO-M
24
24
24
24
0.2
32
32
32
32
24
32
24
32
24
32
24
32
Source Day
Source Day
Source Day
Source Day
Figure S3. Overall performance average It scores (r = 0.02) for NoMAD, Cycle-GAN, FDA-MLA, and FDA-MMD are demonstrated RT-M, and CO-M datasets. Blocks with various colors represent the corresponding values of R² For convenience, the diagonal values of the in-session performance were set to by default.
Additionally, we conducted a more thorough ablation study to validate the assumption of stability. Since stability is governed by activation functions and scale coefficients, we ablated these two components individually (FDA-al and FDA-se, respectively) to violate the assumption. As shown in Fig. S4, the distribution of maximum Lyapunov exponents (MLE) for FDA-al and FDA-se reveals frequent occurrences of positive MIEs, indicating instability.
(a)
CO-M
(b)
RT-M
0.4
0.2
0.2
MLEA A 4,
MLE 4,
0.0
T
0.0
FDA-al
FDA-sc
FDA
FDA-al
FDA-sc
FDA
Figure Violin plot of maximum Lyapunov exponents (MLE) À achieved by FDA-aKFDA without activation functions). FDA-
sc(DD without scale coefficients) and FDA on the (a) CO-M and (b) RT-M datasets, with non-positive À typically indicating dynamical stability.
18

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
C.1.2. CROSS-SESSION PERFORMANCE
We verified the cross-session performance of FDA with limited target trials. First, we conducted experiments with Ds containing only session. The full average R² scores on the CO-C dataset, using DayO the source session and target ratio of 0.02, are presented in Table S5.
In addition, as illustrated in Fig. S1(b), FDA achieved significantly higher average R2 scores across different values of r. The overall performance of average It² on RT-M, and CO-M datasets is presented in Fig. S3.
More comparisons on all datasets when Dy included two sessions when r equals 0.02, 0.03, 0.04, and 0.06 are shown in Fig. (C) and (d).
Table S5. Comparison of R² values (in %) of basclines and FDA on the CO-C dataset(r 0.02).
Data
Session
LSTM
CEBRA
ERDiff
NoMAD
Cycle-GAN
FDA-MLA
FDA-MMD
Day 0
86.65_1.18
87.86
88.6920.74
87.99
84.5441.32
81.63
81.6342..8
Day
5.041.27.90
18.87 1..82
10.34
27.76.1..21
8.05
49.13
50.8415.. 15.32
Day
9.25+32.88
44.73_14.00 14.03
-0.4920.04
34.81+3.40
15.35+11.34
36.25+5.60
34.28+5.35
Day 3
128.25
24.47
=0.39
17.59
5.40=7.21
7.54:44.52
4.494
Day 9
-24.15-433.53
4-3.55
-0.25
31.07
18.37
38.02
33.22+
CO-C
Day 10
-55.33=.6.225
14.64133.5
-0.97
30.05
20.30
1.21
0.76
Day 14
-65.46.22.55
-12.97
-0.62+0.06
29. 29.10
2.67+14.34
22.99
16.40+s.49
Day 15
-32.08-24.64
-12.95
0.53
21.72:1540
19.55116.31
9.80
15:35
Day 16
-123.74_63.89
-9.18
0.44
9.32
6.70
5.09
11.0446.00
Day 36
- -70.67 499.37
-30.76=30.00
0.33
-5.76_3.74
9.40+
-6.81
0.99 =2.62
Day 37
199.54
-21.54
1..01
8,40
8.76_6.63
3.08
15.9513.73
Day 38
-1 -112.02 1132.39
-7.36-16.50
0.48
6.88
12.17
-2.7718848
12.95 10.92
To explore the differences in results between Monkey C and Monkey M, we analyzed the cross-session performance of FDA-MMD with greater target ratios As shown in Table S6, although FDA-MMD initially performed worse on CO-C, its performance improved significantly and became comparable to RT-M when exceeded 0.3 (approximately 60 trials). Additionally, we observed larger deviations per session CO-C. This suggests that the difference arises from instability caused by outliers specifically from the dataset of Monkey C, which notably impacted performance when was small.
Table S6. Comparison average R² values (%) across sessions FDA-MMD on CO-C, CO-M, and RT-M datasets (r 0.02). The average standard deviations over five runs per session are also reported.
0.02
0.03
0.04
0.06
0.1
0.2
0.3
0.4
0.5
0.6
COAC
16.40=5.40
17.08-7.58
17.27
17.41
28.1845
42.61 #5.25
50.1246.50
54.87=5.05
45.05
56.00+4..9
CO-M
45.5925.15
48.40
4.500
50.71
41.10
57 57.9012
62.20a2.41
65.1612.55
66.3822.44
66 28
67.32
RT-M
42.08
44.36=5.83
45.35
47.23
52.15+4.18
53.66ga.35
55.2842.59
36.45
56 56.58
57.98
Additionally, we observed that the worst It2 score occurred on different days for each method. This variability may stem from the different criteria used for optimal alignment. For instance, FDA-MLA exhibited an abnormal increase in NLL during the initial fine-tuning epochs on Day (CO-M), as shown in Fig. S2(b). In contrast, other methods, such as NoMAD based KL divergences and LSTTM without alignment, did not show this phenomenon the same day, leading the worst performance of FDA-MLA while others did not experience such issue.
C. CROSS-SESSION PERFORMANCE UNDER DIFFERENT LATENT DIMENSIONS
To determine the appropriate latent dimensions, we conducted experiments on CEBRA under varying latent dimensions. As shown in Table S7, we selected the latent dimensions for CEBRA as 32, based on its better performance. For ERDiff and NoMAD, we set the latent dimension to and 16 respectively, following the default settings mentioned in the original paper due to its application similar datasets.
19

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
Table S7. Average R²² scores across sessions of CEBRA on CO-M and RT-M datasets under different latent dimensions.
Latent Dimension
16
32
48
CO-M RT-M
41.69 53.01
1.144
0.85 19.21
-45.48 +12.51
C.1.4. ZERO-SHOT CROSS-SESSION PERFORMANCE
Additionally, we compared the zero-shot cross-session performance of NoMAD without alignment, Cycle-GAN without alignment, and FDA without alignment, with detailed results presented in Table S8. FDA without fine-tuning outperformed the baselines, which we attribute to the dynamical stability of its pre-trained latent spaces. Furthermore, performance in few-trial scenarios continued to improve after fine-tuning. In summary, the combination of stable latent dynamics and efficient fine-tuning contributes to FDA's better performance in few-trial scenarios.
Table S8. Comparison of R² values (in %) across target sessions (where the R² scores for each session averaged over five random runs with different sample selections) of baselines and FDA without alignment on CO-M and RT-M datasets.
Data NoMAD w/o alignment
Cycle-GAN w/o alignment FDA w/o alignment
FDA-MLA
FDA-MMD
CO-M
-121.47 -27147177.60 -71.061449.91
126.84223.62
16.23
36.05
45.59 42.08
RT-M
-3.12
38.15 15
41.73
C.1.5. HERO-SHOT PERFORMANCE COMPARISON WITH NDT-2
We utilized 47 sessions recorded from the motor cortex of two monkeys, available via the external as well datasets provided by the Neural Latents Benchmark (https:/nneurallatentss. githtu..o.ttboo for pre-training NDT-2 (Ye et al., 2024). Subsequently, supervised fine-tuning was conducted using 80% of the trials from a source session of the CO-CICO-M datasets, followed by zero-shot evaluation on the remaining target sessions.
link
The average R²2 scores are presented Table S9. While NDT-2 achieved higher performance in intra-session decoding on the source session, its performance degraded substantially during zero-shot evaluation. This suggests that NDT-2 may be more effective when fine-tuned with supervised data from the target sessions.
Table Average R² scores (%) of NDT-2 intra session and inter session decoding on the CO-C CO-M datasets.
Data
Intra-session
Inter-session
CO-C
89.82
-34.70 =0.32
CO-M
93.75
-52.31 10.16
1.6. PERFORMANCE WITH DIFFERENT TARGET RATIOS T
To further evaluate the performance of FDA under different target ratios r, we gradually increased r from 0.02 to 0.6. The R² scores for NoMAD, Cycle-GAM and FDA are shown in Fig. S5. In particular, Cycle-GAN and NoMAD exhibited significantly lower performance (approximately five times worse) with fewer target samples. However, as r increased to around 0.3 (approximately 60 trials), their performance became comparable to that of FDA-MLA and FDA-MMD.
20

---

FDA: Flow Matching for Pew-Trial Neural Adaptation with Stable Latent Dynamics
(a)
CO-M
(b)
RT-M
0.55
0.55
0.45
0.45
R² Score
0.35
0.35
0.25
R²
NoMAD
0.15
NoMAD
0.15
Cycle-GAN
0.05
Cycle-Gal GAN
0.05
FDA-MLA
FDA-MLA
00.55
-0.05
FDA-MMD
FDA MMD
0.02 0.020.030.040.06
0.2 Target Ratio r
0.4 0.5 0.6
0.020.030.040.66
0.1 0.2
0.4 0.5 0.6
Target Ratio r
Figure Comparison of average R scores across target sessions (where the R² scores for each session are averaged over five random runs with different sample selections) for NoMAD, Cycle-GAN, FDA-MLA, and FDA-MMD under different target ratios on the (a) CO-M and (b) RT-M datasets.
Additionally, we examined the R curves across target sessions for FDA-MMD and Cycle-GAN on the CO-M dataset. As shown Fig. S6, both methods exhibited fluctuating R² curves at small target ratios. However, as the target ratio increased, the fluctuations were alleviated. With the exception few sessions, R² scores generally decreased across most target sessions. We attribute this trend the reduced influence of certain outliers scenarios with few target samples.
FDA-MMD (CO-M)
(b)
Cycle-GAN (CO-M)
0.85
0.75
0.75
0.65
Score
0.65
Score
0.55
0.45
0.55
0.35
0.45
0.2
0.2
0.25
0.4
0.35
0.15
14
15
22
24
25 Day
28
29
31
32
14
22
24
25 Day
28
29
31
32
Figure $6. Rt curves across target sessions for (a) FDA-MMD and (b) Cycle-GAN under different target ratios (0.2, 0.4, and 0.6) the
CO-M dataset.
C. 1.77 COMPUTATIONAL EFFICIENCY
We compared the computational efficiency of methods with that of ERDiff, Cycle-GAN, and NoMAD NVIDIA GeForce RTX 3080 Ti (12GB). The comparison was based on the number of parameters and training time per epoch, which includes pre-training and fine-tuning, on CO-C, CO-M, and RT-M. As shown in Table S10, FDA-MLA and FDA-MMD exhibited a higher number parameters. However, they required less training time compared to ERDiff and NoMAD, which can be attributed effective training losses and sampling methods.
Table S10. The computational efficiency comparison between the baselines and FDA, evaluated in terms of the number of parameters and per-epoch training time (s), including both pre-training and linettuning across CO-C, CO-M, RT-M datasets.
Method
FRDIFf Wang et al., 2023h)
CyNle-GAN(Ma et al., 2023)
NoMADD(krppwicze al., 2022)
FDA-MLA
FDA-MMD
Parameter Number (M)
Time(s)
CO-C
0.39
0.05
1.05
0.14
0.14
CO-M
1.14
0.02
1.03
0.13
0.14
RT-M
0.49
0.02
1.04
0.10
0.10
21

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
more detailed comparison of total training time (in seconds) during the pre-training and fine-tuning phases is provided in Table $11.
Table S11. Total training time (s) for pre-training and fine-tuning phases across baselines and FDA
Phase
ERDiff
Cycle-GAN
NoMAD
FDA-MLA
FDA-MMD
Pre-training
2449.68
135.34
98.95
98.95
Fine-tuning 1.21
11.90
76.83
2.32
2.38
We further analyzed the inference time of FDA-MLA and FDA-MMD NVIDIA GeForce GTX 1080 Ti (1IGB). As shown in the table below, the average inference time for single window is approximately 4 ms, indicating the method's suitability for real-time applications.
Table S12. Average inference time (ms) of FDA-MLA and FDA-MMD.
Data
FDA-MLA
FDA-MMD
Avg
3.90
3.97
C. 1.8. EXPERIMENTS ON SYNTHETIC NEURAL DATA
We conducted further experiments to evaluate the recovery of ground-trutt truth latent variables in synthetic data. Following the method in (Kapoor al., 2024), we used the Lorenz attractor the latent dynamics (3D latent variables). The visualizations of our decoded 3D trajectories presented in Fig. S7 confirmed that FDA effectively captured the neural dynamics.
Rescoeed
Figure Ground truth (green, solid) and reconstructed trajectories (orange, dashed) the underlying Lorenz system from synthetic spiking data. FDA accurately recovers the latent dynamics.
22

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
C.2. Ablation Study
C.2.1. ABLATION STUDY ON DIFFERENT ALIGNMENT STRATEGIES
To evaluate the effectiveness of our alignment strategy, we compared FDA with several variants. FDA-t only extracted features using fa and aligned them through MMD for decoding with linear decoder. FDA-g used adversarial approach via Cycle-GAN to align 2(1), while FDA-c applied MMD for aligning The average Rt values of CO-C dataset are shown in Table $13.
Moreover, the R2 curves for FDA-MMD and its variants are shown in Fig. S8(a). Additionally, as shown in Fig. S8(b), the negative log- likelihood (NLL) curves and their corresponding R² values, derived under various r using FDA-MLA, are presented.
Table S13. Average cross-session R" scores (%) for CO-C. FDA-t only extracted features using fa and aligned them through MMD for decoding with linear decoder. FDA-g used an adversarial approach via Cycle-GAN to align z(1), while FDA-c applied MMD for aligning c.
Data
Target Ratio
FDA-t
FDA-g
FDA-c
FDA-MLA
FDA-MMD
0.02
0.33+..229
13.19
13.1949.06
18.25=7.30
16.39
13.8445.41
CO-C
0.03
0..00+0.44
13.07
18.49=7.38
17.08
13.9344.79
0.04
0..22
13.064
18.64_7.48
17.27
13.9445.64
0.06
0.23
13.194
18.60.#.11
17.41
13.82:$348
(a)
CO-M(Day25)
KT-M(Day67)
CO-M(Day25)
CO-M(Day25)
0.51
0.5
0.4
125.0
R* Score
R² Score
0.3
Scooe
0.4
0.49
FDA-t
0.2
120.0
FDA-g
0.48
0.3
FDA-c
117.5
FDA-MMD
0.0
115.0
0
10
15
10
15
20
0
10
15
20
5
10
15
20
Nonee
Plane
CO M(Day29)
RT M(Day69)
RT Maa552
RT M((ay52))
0.6
0.4
0.50
150
0.3
145
R7 Score
R² Score
22 *Score
0.45
0.2
140
0.2
FDA
0.1
135
FDA-g g
0.40
0.0
130
FDA-MMD
125
0
10
1s
20
5
10
15
20
0
5
10
15
20
10
15
20
nitee June
Pione June
June
fone
Figure S8. (a) R² curves for FDA-t, FDA-g, FDA-c, and FDA-MMD are shown on CO-M (Day25, Day29) and RT-M (Day67, Day69) with being 0.02. FDA-t only extracted features using fa and aligned them through MMD for decoding with linear decoder. FDA-g used an adversarial approach via Cycle-GAN to align z(1), while FDA-c applied MMD aligning c. (b) Curves for R2 (Left) and the corresponding negative log likelihood (NLL) (Right) CO-M (Day25) and RT-M (Day52), obtained by FDA-MLA, visualized under distinct target ratios r.
To investigate the observed decline in R² with more finetuning samples as shown in Fig. 5(b), we further analyzed the average R" scores of FDA-MMD across multiple random seeds under varying training ratios r. The detailed results for each target session of the CO-M and RT-M datasets are provided Table S14 and Table S15 below. A general trend of increasing R² with larger tun-t sample sizes was observed across most sessions.
23

---

FDA: Flow Matching for Pew-Trial Neural Adaptation with Stable Latent Dynamics
Table S14.
Average R²
scores (%) across sessions for FDA- MMD on the CO-M M dataset under varying values.
Day
Day 14
Day 15
Day 22
Day 24
Day 25
Day 28
Day 29
Day 31
Day 32
0.02
45.23
a3.90
49.55
27.35
51.28
36.79
54,87
41.26-6.70
57.10 57.10
44.66
8..7728.31
49.1844..44
42.9044..62
40.58-24.98
55 1.78
2..1
57.9244.00
39.56
59. 1.77
48.08 2..90
46.68 22.82..44
65.54
53.1845.20 23
42.89 24 10
29.8229.2
45 2..44
59.9742.62 62
42,66_5.25
01.03:11 1..72
19.013.22
0.06
19.96.13.43
6.33
52.53
43.19
59.19
19.29
61.25
45,06_3.81
63.31 63.31
51.27
Table S15.
Average R² scores (%) across sessions for FDA-MMD on the RT-M dataset under varying r values.
Day
Day 38
Day 39
Day 40
Day 52
Day S3
Day 67
Day 69
Day 77
Day
0,02
74.32.2.22
55 25.3942.880
40.44.1
39.85
44 4.99
50.03
50.2945.07
99.19
16
1.8623..00 20
28.1222.70
11.6115.01
2.8.2.11 17
2.87
02.17
51.08 a0
43,40 64
00.51.8.00 1..4...444
41.95 26
0.04
74.57 24.5742..5
28.7942.71
41.39 41.39+6..44
42.20-44.28
45.0946..18
$3.39 33.39+1.50
51,2746.91
45.08
22 22.68. 22.68-7.64
41.09
0.06
74.98
18.97
43.8244.88
43.50-24544
45.0%
53.76
52.65
44.26_4.35
29.05
48.9455.50
In addition, we observed that the number of valid channels differs between the CO-M sessions (95 for the source and 96 for the target), whereas RT-M sessions remain consistent. This suggests less neuronal overlap with the source session in the CO-M dataset, resulting in worse decoding performance as presented Fig. S8(a).
C.2.2. ABLATION STUDY ON MAIN COMPONENTS
The average R for each target session achieved by FDA and its variants based on main components shown in Fig. S9, We employed FDAAv and FDA-p as variants utilizing VP and GVP flow paths, respectively. FDA-a and FDA-m employ transformers with temporal correlation attention and MLPs as conditional feature extractors, respectively, FDA-re includes an additional reconstruction term to regularize the learned neural representations.
Co-M[larget Ratio 0.03)
CO-M(Target Ratio
CO-M/Terget Ratio 0.06)
0.6
R2 Score
0.4
od
Score
0.24
0.0
0.0
0.0-
FMA-m
#okpp
rokre
roke
FD
Fble
FB4
FiArre
FB6-HLAFDHHH40
robi
F38m
Foure
FOSRRAADO HVD
RT-AM[aarget Ralio 0.03)
RT-Milarget Ratio = 0.04)
RT-M(Torget Ratio = 0.06)
0.6-
0.6
82 Scoree
8 Scoore
0.4-
0.4
0.2
0.0
Rokv
Hokp
Figure S9. Average H² scores across each target session, achieved by FDA-a. FDA-m, FDA-v, FDA-p. FDA-re, FDA-MLA, and FDA- MMD, displayed on CO-M (a) and RT-M (b) datasets with being 0.03, 0.04, and 0.06. Dots with different colors represent R² values for individual sessions. We employed FDA-v and FDA-p as variants utilizing VP and GVP flow paths, respectively. FDA-a and FDA-m employ transformers with temporal correlation attention and MLPs as conditional feature extractors, respectively. FDA-re includes an additional reconstruction term to regularize the learned neural representations.
24

---

FDA: Flow Matching for Few-Trial Neural Adaptation with Stable Latent Dynamics
C.3. Hyper-parameter Sensitivity Analysis
The main hyper-parameters of our FDA method include the signal window size (w), the dimensions of conditional features and latent states(k,,)). and the number of euler sampling steps Rewler when the target ratio r equals 0.02. For convenience, set &e and k₂ be the same. The results of their sensitivity analysis using FDA-MMD on CO-M, and RT-M datasets are shown in Table S16, Table S17, and Table S18.
Table S16. Average R² scores for different datasets with varying w.
ke
4
5/6
7
CO-M RT-M
43.91 24.68
45.59
48.38 40.5447.74
49.07 1:511
40.77
42.08
46.73=3.63
Table S17. Average RD scores for different datasets with varying ke-
ke
24
32
CO-M RT-M
28.00
45.5925.15
45.63
45.03_4.84 43.91
44.02 #6.01
42.08
39.48+6.01
Table S18. Average R² scores for different datasets with varying Redder.
Nester
2
10
CO-M
45.59 #0.15
45.32+
43. 1944.4
41.71
RT-M
42.08
42.14
40.33
38.99
We also conducted additional analyses selected sessions from CO-M to investigate the desirable level of diversity in target trials. The diversity was categorized into three levels: small (1-2 distinct targets), medium (3-4 targets), and large (all distinct targets). The average R² for FDA-MMD is presented in Table S19. Our results indicate that a medium level of diversity achieves desirable performance, while too little diversity negatively impacts performance.
Table S19. Average R2 scores (%) for FDA-MMD CO-M under different levels of trial diversity
Trial Diversity
Day14
Day15
Day28
Day32
Small
58.93
45.86
50.90
43.70.22.00
Medium
57.01 1:80
57.26
55.46
49.19 1.49
Large
65.6042.84
59.49
59.74-+1.33
53.23
25


Reviews:
[{"review_id": "rwjtGgcIEz", "reviewer": "Reviewer_3LVu", "summary": "The paper introduces a new approach for learning and aligning neural representations across multiple sessions to link neural activity with behavioral actions. Particularly, the authors present a neural decoder that aligns recordings from different sessions (e.g., over multiple days) \n based on flow matching in latent space. This method is particularly useful when only a few trials are available for alignment, a common issue in brain-computer interfaces. The paper also provides a theoretical proof for the stability of the approach using Lyapunov exponents. The authors demonstrate the effectiveness of their method on various monkey neural recording datasets and benchmark it against existing approaches.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We sincerely appreciate your thorough review and recognition of our work. Below we provide a detailed response to your concerns, with reference figures in the supplementary material [https://drive.google.com/file/d/129vv370SF4RLanLj92-lzh_vMmkeDCve/view?pli=1], indicated by Fig.R. \n\n### Weaknesses\n- Model interpretability\n\n The latent features effectively capture the evolved state within neural dynamics. We employ a transformer-based network $f_\\alpha$ to extract latent features from signal windows. Given the challenges in interpreting the meaning of these features for realistic scenarios, our current focus is on the effectiveness of FDA for few-trial adaptation. We demonstrate the successful extraction of the Lorenz attractor from synthetic spiking data using our method below. We will explore the relationship between the latent features and underlying neural dynamics across various cases in future.\n\n- Synthetic data\n\nWe conducted experiments to evaluate the recovery of ground-truth latent variables in synthetic data. Following method in (Kapoor, Jaivardhan, et al. Latent diffusion for neural spiking data. NeurIPS 2024: 118119), we used the Lorenz attractor as the latent dynamics. We simulated firing rates as an affine transformation of the 3D latent variables into a 96-dimensional space, then sampled spike trains from a Poisson distribution.\n\nAs shown in the table, our FDA successfully recovered the latent dynamics from synthetic spiking data. The visualizations of our decoded 3D trajectories in Fig.R1 confirmed that FDA effectively captured the neural dynamics.\n\n#### Average $R^2$ (%) on the recovered latent variables\n\n| Mean Firing Rates | 0.05 | 0.1 | 0.3 |\n|:------:|:---------------:|:---------------:|:---------------:|\n| $R^2$    | 95.43 ± 0.87    | 95.68 ± 1.07    | 95.24 ± 1.03    |\n\n- About z (0-1)\n\nThe evolution of z only represents the iterative learning process. The temporal evolution of neural dynamics is characterized by the shift of short-term windows(as explained in Line 106-108 on Page 2).\n\n### Comments:\n\n- We will clarify the multi-dimensional labels in the revision.\n\n- Here $\\tau$ represents the iterative learning steps instead of the temporal evolution of neural signals. To avoid confusion, we therefore used a distinct notation $\\tau$ .\n\n- The scale coefficient represents the shift parameter of z generated by the MLP for predicting the velocity field.\n\n- Yes, it is all $l_2$ distance and will be standardized.\n\n- We find that our flow model can be well-suited to both few-trial adaptation in BCIs and non-BCI recordings. The flow process can include feedback as conditional features to guide the flow of subsequent windows.\n\n### Questions:\n- Session definition\n\nThe sessions used in experiments were from the same subject. The recorded neurons across sessions largely originate from the same subset. Moreover, as shown in Fig.R2, the transformer-based $f_{\\alpha}$ is adaptable to varying numbers of tokens, corresponding to different channel counts.\n\n- Non-overlapping subset\n\nGiven the widespread application of transformers for universal representation from neurons across regions, we believe our model has the potential to be extended to cases with non-overlapping neuron subsets across sessions. We agree that this is an interesting direction for future study.\n\n- One step later\n\nYes, \"one step later\" refers to the next sample based on the sampling rate. The overlap between windows depends on the sampling rate, ensuring consistent time steps between the decoded and ground-truth variables.\n\n- $\\tau$ (0-1)\n\nAs explained above, $\\tau$ represents the iterative learning step of z to obatin latent features, differing from the temporal evolution of neural signals.\n\n- Choice of $\\eta$\n\n$\\eta$ is pre-initialized using Xavier initialization. We tested various choices via differnt random seeds, and observed no significant impact on the final results (as shown in Table 1 on Page 7).\n\n- Simultaneous neurons\n\nThe current model directly utilized temporal structures from single-channel recordings as input tokens for conditional features. Therefore, it is preferable for neurons to be recorded simultaneously within each session.\n\n- Poisson statistics\n\nAs shown in the table above, the model demonstrated adaptability to Poisson synthetic data with various firing rates. Furthermore, as illustrated by the coefficient of variation (CV) distribution in Fig.R3, some real data we used exhibits characteristics of Poisson distributions.\n\n- Monkey C\n\nThe figure for Monkey C is shown in Fig.S1(a).\n\nWe sincerely hope that these responses may address your concerns. We believe that our novel FDA framework will be of significant interest to the ICML community, given its potential impact on few-trial neural alignment and real-world BCI reliability. Could you please consider raising the scores? We look forward to your further feedback. Thank you in advance.", "claims_and_evidence": "Yes", "methods_and_evaluation_criteria": "Yes, please also see the 2nd point in strengths and weaknesses.", "theoretical_claims": "Yes.", "experimental_designs_or_analyses": "Yes, please also see the 2nd point in strengths and weaknesses.", "relation_to_broader_scientific_literature": "The paper addresses an important challenge in modeling neural dynamics across sessions with limited trial data available in each session. The authors explain how their method addresses this issue and compare its performance to several benchmark approaches using rich monkey datasets.", "essential_references_not_discussed": "No, I think that overall the related work section was written well", "other_strengths_and_weaknesses": "## Strengths:\n The paper is overall well-written and addresses a very important problem. The authors provide the assumptions, mathematical developments, and theory to support their claims and effectively motivate the need for their model. I also appreciate the supplementary material, which further supports the paper with helpful additional explanations.\n \n## Weaknesses:\n My main two concerns are: 1) Model interpretability, and 2) Lack of evaluation on synthetic data. Particularly:\n\n1) The model is very complex, as it includes the tuning of multiple networks, which are themselves not very interpretable. In other words, the fundamental components of the model may be very hard to understand or explain in relation to neural dynamics. Given that the paper focuses on BCIs that could ultimately be used in clinical settings, it’s hard to believe clinicians would trust a model that is not easily interpretable. Hence, I wonder if there was any effort from the authors to interpret the components themselves (e.g., f_alpha) to provide some understanding of what features they emphasize, etc.\n\n\n2) The authors demonstrate their method only on real-world monkey data, but they do not show recovery of ground-truth latent variables in synthetic data, which I believe is crucial to show that the model can truly recover the real underlying components. Specifically, I am referring to a test beyond just evaluating R² of reconstruction—creating simulated data with real known z, generating “observations” from this z, and then showing that the model can recover Z. Without this, while the model provides good reconstruction as demonstrated in the results, we cannot be sure it can recover the real underlying latent dynamics.\n\n\n3) How realistic is the assumption made on lines 196-197 regarding the z evolving linearly and monotonically between 0 and 1? I assume this choice is meant to regularize the model’s development of z, but some intuition for its implications (perhaps in the discussion) would be helpful.\n\n\nI also have smaller concerns listed under “Other Comments or Suggestions\".", "other_comments_or_suggestions": "1) I miss a comma before “resulting” in line 11 (right).  \n2) In line 111 (left), you mention that the labels are in $ \\mathbb{R}^d $; it would be helpful to clarify from the beginning that labels can be multi-dimensional (and also explain what $ d $ refers to).  \n3) The notation for $ z^{S}(\\tau) $ is a bit confusing since for $ x $, the input in brackets was the channel number, and the subscript referred to time. Why not be consistent by using the subscript for time here as well?  \n4) In line 181, you mention the scale coefficient, but I cannot see where it is used (at least in the main text). Are you sure you defined that?  \n5) In line 191 and Equations 5 and 7, is it all $ \\ell_2 $ distance? Why not to clarify it is $\\ell_2$ in the subscript to distinguish it from other norms (especially since you use other norms later)?  \n6) I believe lines 236-242 (left) would be better placed in the related work section.  \n7) It seems that the authors frame the motivation for the paper around BCIs; however, the model can also work on non-BCI neural recordings (e.g., neuropixels), as demonstrated on some of the datasets. It is unclear to me why the authors chose to focus mainly on  BCIs when the model doesn’t seem to integrate unique BCI features (e.g., feedback).", "questions_for_authors": "1. How do you define a session? Do different sessions necessarily come from the same subject, or can they involve different subjects with the model learning a unified representation for them? Is it always the same subset of neurons observed across sessions? I think a better clarification of how sessions can vary (e.g., subject identity, observed neurons) would be helpful. Based on lines 132-133, it sounds like your approach should adapt to changes in channels, but I cannot see how that is expressed in the math/model.\n\n2. In real-world scenarios, if the recording device is re-inserted across sessions, a different subset of neurons may be captured, which is a common challenge in neuroscience. Can your model be extended or generalized to cases where a potentially non-overlapping subset of neurons is observed across sessions (e.g., as done in [1])?  (I don’t expect the authors to change the model in this paper's scope, but it might be worth discussing in the discussion section)\n\n3. It is not clear to me from line 109 if there is overlap between windows, or what you mean by “one step later” (line 110). Do you mean 1 sample after, based on the sampling rate? And does the overlap between windows depend on the sampling rate, or how else do you define the “step”?\n\n4. Why is $ \\tau $ restricted to the 0-1 range? Is it just due to the normalization of each trial to this range, which makes it easier to handle varying durations? I would suggest adding a short explanation of that in line 148.\n\n5. How is $ \\eta $ defined? How sensitive is the model to different choices of $ \\eta $?\n\n6. For the model to work, do the neurons need to be recorded simultaneously within each session?\n\n7. Would the model work for brain areas (e.g., hippocampus) or animals (e.g., bats) with very sparse firing patterns, whose firing rates may not be well approximated by normal statistics? Would the model work for Poisson statistics data, which is more realistic for certain neural firing patterns?\n\n8. Where is Monkey C in figure 3?\n\n[1] Mudrik, N., Ly, R., Ruebel, O., & Charles, A. S. CREIMBO: Cross-Regional Ensemble Interactions in Multi-view Brain Observations. In The Thirteenth International Conference on Learning Representations.", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "0g9zrP7B4I", "reviewer": "Reviewer_Uwcf", "summary": "The work propose to utilize Flow-based distribution alignment (FDA) to learn flexible neural representations with stable latent dynamics, and performs source free alignment with likelihood maximization. The author additionally performed theoretical analysis on the stability of latent dynamics, and performed experiments on multiple motor cortex datasets.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We sincerely thank you for your careful review and recognition of our work. Below, we provide a point-by-point reply to your concerns. Due to the limit, all figures prefixed with 'R' below are available in the external link[https://drive.google.com/file/d/129vv370SF4RLanLj92-lzh_vMmkeDCve/view?pli=1].\n\n### Methods And Evaluation Criteria\n\n- About the motivation\n\nOur FDA successfully addresses the issues of significant degradation in zero-shot performance and instability in few-trial alignment, achieving stable latent feature extraction and reliable alignment with few trials.\n\nOn one hand, flow-based learning regulates feature deviations through stable latent dynamics, preserving essential semantic information from the source domain. This mechanism enforces bounded variations in latent features under input target perturbations, preserving semantic information in neural representations. Empirical validation of zero-shot transfer performance (original Table S8 on Page 18) highlights the advantage of this stability, further enhancing efficient few-shot adaptation.\n\nOn the other hand, by leveraging the unique properties of flows, FDA guarantees stable few-trial fine-tuning. The use of explicit log-probability objectives and flexible latent-space modeling enables stable parameter gradients, effectively preventing the catastrophic overfitting typically seen in few-trial adaptation.\n\n### Experimental Designs Or Analyses\n\n- About more intuitive visualization on the flow matching process\n\nThank you for the suggestion. We have provided a more intuitive visualization of the flow matching process in Fig.R4. As shown in this figure, our flow matching process learns latent variables from neural signals in a coarse-to-fine manner, differing from conventional one-step extraction.\n\nThe flow transforms noisy variables $\\mathbf{z}(0)$ into neural representations $\\mathbf{z}(1)$, guided by conditional features derived from neural signals. Simultaneously, the corresponding prior distribution $p_0$ is transformed into the target distribution $p_1$. The stable latent dynamics of the learning process ensure that latent factors with similar labels flow toward consistent neural representations, even when guided by shifted neural signals.\n\n### Essential References Not Discussed\n\n- About the missing related works that specifically tackling the variability of brain signal decoding\n\nThanks a lot for the suggestion. We will include more related works that specifically tackle the variability of brain signal decoding in the revision.\n\n### Other Comments Or Suggestions:\n\n- About more annotations in Fig. 2. For example, what does X^S and X^T respectively stands for. Similarly for C^S and C^T. And what is the relationship between C^S and v_{\\theta}?\n\nThank you for the valuable comment. We have added more annotations, and the revised version is provided as Fig.R2. Here, $\\mathbf{x}^S$ and $\\mathbf{x}^T$ represent input tokens derived from short-term windows of the source and target domains, with each token corresponding to spikes from a single channel. Additionally, $\\mathbf{c}^S$ and $\\mathbf{c}^T$ denote the output conditional features of the transformer-based $f_{\\alpha}$, which are utilized to guide the flow of $\\mathbf{z}$.\n\nAs illustrated in Fig.R4, we parameterize the guided velocity field of $\\mathbf{z}$ as $v_{\\theta}$, which determines the velocity and direction of $\\mathbf{z}$. $\\mathbf{c}^S$ further serves as the input to the neural network responsible for predicting $v_{\\theta}$.\n\n- About more explanations on why target distribution p1 representing the desired neural representation could be defined by a random variable z^S(1)?\n\nThank you for raising this point. To achieve optimal decoding performance, the target distribution is preferable to be defined by a random variable, which can then be transformed into the ground-truth labels through the decoders. When weights of the linear decoder are fixed, the desired $\\mathbf{z}^S(1)$ can be obtained via a linear transformation using the inverse of the decoder's weight matrix. The neural representation thus defined can subsequently be transformed into the desired labels through the decoder. Related explanation will be included in the revision.\n\nWe sincerely hope that these responses may address your concerns. We believe that our novel FDA framework will be of significant interest to the ICML community, given its potential impact on few-trial neural alignment and real-world BCI reliability. \nCould you please consider raising the scores? We look forward to your further feedback. Thank you in advance.", "claims_and_evidence": "The claim that BCIs trained on one day usually obtain degraded performance on other days due to the nonstationary property\nof neural signals makes sense. Actually the signal pattern could be quite different even across different sessions within the same day.", "methods_and_evaluation_criteria": "The method of using flow-based distribution alignment to tackle the variability in signal decoding looks pretty novel to me. However, stronger motivation is needed on the proposed approach. In addition to the general description that FDA fits well to the problem, the readers would want to know what are the exact benefits that the mechanism could bring to tackling the problem, and what functionality makes the method specifically fit to the problem.", "theoretical_claims": "The theoretical analysis on stability of latent dynamics is provided in the manuscript, I didn't check the details on the correctness.", "experimental_designs_or_analyses": "The authors performed pretty detailed comparison with numerous existing baselines, on top of three real-world datasets. Additionally, ablation study including different alignment strategies and the contribution of each of the components are analyzed. Overall the experiments looks pretty solid. I would appreciate it if the authors could provide more intuitive visualization on the flow matching process.", "relation_to_broader_scientific_literature": "The method could be useful in numerous downstream applications utilizing BCI systems for rehabilitation and other healthcare purposes.", "essential_references_not_discussed": "The work tackles the variability issue of brain signal decoding. While the work provided pretty nice review on the method side including neural representation alignment and normalizing flows, I found the related works that specifically tackling the variability of brain signal decoding currently missing, including [1][2] etc.\n\n\n[1] Distributionally Robust Cross Subject EEG Decoding, ECAI 2023\n[2] UNCER: A framework for uncertainty estimation and reduction in neural decoding of EEG signals, Neurocomputing 2023", "other_strengths_and_weaknesses": "N/A", "other_comments_or_suggestions": "More annotations are needed in Fig. 2 for readers to properly understand the mechanism of the approach. For example, what does X^S and X^T respectively stands for. Similarly for C^S and C^T. And what is the relationship between C^S and v_{\\theta}?\n\nMore explanation is needed on why target distribution p1 representing the desired neural representation could be defined by a random variable z^S(1)?", "questions_for_authors": "Please see above comments", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "XG3xu6Jeyc", "reviewer": "Reviewer_CxsD", "summary": "This paper proposes Flow-based Distributional Alignment (FDA), a few-shot alignment or adaptation method for neural signals across days, using flow matching. While neural activity adaptation methods in general struggle to maintain stable performance across multiple days, the authors claim that FDA would perform better due to theoretical guarantees on the stability of representations derived from FDA. That is, due to the highly negative maximum Lyapunov exponent of latent states through learning, the authors argue that FDA-finetuning results in latent representations that converge to a stable fixed point or manifold/attractor. The authors carry out comprehensive experiments on a motor cortical dataset containing data from 2 monkeys, and 2 tasks (centre-out and random target reaches) to demonstrate the performance of their model in comparison to baselines. They also carry out ablation studies to gauge the importance of each part of their method.\n\n### Update after rebuttal\n\nMy main outstanding concerns are summarised in my response to the authors' rebuttal. Finally, the NDT-2 0-shot results here don't seem consistent with Fig. 5 from the original NDT-2 paper, showing good 0-shot and few-shot performance (even for real-time control). In the absence of more details on the authors' reproduction of NDT-2 and 0-shot setup, I'm unable to evaluate this result completely. So overall, I will still retain my original score.", "questions": "", "limitations": "", "rating": 3, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We sincerely thank you for your careful review and recognition of our work. Below, we provide a point-by-point reply to your concerns.\n\n- Additional comparison with NDT-2\n\nWe conducted an additional comparison against NDT-2 by pre-training it on a single session with supervised readout training and evaluating its zero-shot performance without alignment. The average $R^2$ scores on the CO-C and CO-M datasets are presented in the table below. While NDT-2 achieved high decoding performance in the pre-trained session, its zero-shot performance degraded significantly. This decline may be attributed to its reliance on larger datasets to achieve robust zero-shot transfer.\n\n#### Average $R^2$ scores (%) of NDT-2\n\n| Data  | intra-session | inter-session |\n|:------: |:-----------------:|:-----------------:|\n| CO-C | 83.85 ± 1.49      | -28.59 ± 0.49     |\n| CO-M | 82.09 ± 1.06      | -35.69 ± 2.06     |\n\n- About the supervised alignment by NDT-2 and MtM\n\nThank you for the valuable comment. We agree that alignment of large-scale models isn't necessary in the cases we have presented in this study. \n\nWhat we meant is that the finetuning of MtM and NDT-2 can begin with self-supervised techniques, such as masked reconstruction. Then, for different downstream tasks, specific decoders are trained using only a few target labels, while all other weights remain fixed. This supervised alignment enables rapid transfer to tasks that were not encountered during pre-training.\n\n- About other BCI tasks and cross-task/subject adaptation\n\nThanks for the comment. We agree that this presents interesting directions for further study.\n\n### Questions:\n\n- About the drop of $R^2$ with more finetuning samples\n\nThe curve in Fig.4(b) and Fig.S6 is based on a single random run, and the observed decrease may be due to the small trial gap (~2 trials between adjacent points). Moreover, the overall trend shows an increase in $R^2$ as the number of finetuning samples grows, as demonstrated in Fig.3(c) on Page 6.\n\n- About the choice of window size w\n\nThanks. We conducted a grid search to determine the appropriate context window size $w$. As shown in the Table S11 on Page 21, balancing performance and computational efficiency, we selected 5 as the default size for the CO-M and RT-M.\n\n- About better $R^2$ on RT than CO tasks\n\nThe better performance on RT tasks may be attributed to differences in signal quality between subjects. For the same subject (Monkey M), performance on CO tasks is better than on RT tasks, as shown in the original Fig.3(b) on Page 6.\n\n- About the desirable level of diversity in trials\n\nWe conducted additional analyses on selected sessions of CO-M. The diversity was categorized into three levels: small (1–2 distinct targets), medium (3–4 targets), and large (all distinct targets). The average $R^2$ for FDA-MMD is presented in the tables below. Our results indicate that a medium level of diversity achieves desirable performance, while too little diversity negatively impacts performance.\n\n#### Average $R^2$ scores (%) for FDA-MMD on CO-M\n\n| Trial Diversity   | Day14  | Day15  | Day28 | Day32 |\n|:------:|:------------------:|:------------------:|:------------------:|:------------------:|\n| Small  | 58.93 ± 1.10       | 45.86 ± 1.81       | 50.90 ± 1.70       | 43.70 ± 2.60       |\n| Medium | 57.01 ± 1.80       | 57.26 ± 1.20       | 55.46 ± 1.00       | 49.19 ± 1.49       |\n| Large  | 65.60 ± 2.84       | 59.49 ± 0.46       | 59.74 ± 1.33       | 53.23 ± 1.09       |\n\n- About the linear decoder\n\nThe linear decoder was mentioned in Line 162 (right) on Page 3, and will be made clearer in the revision.\n\n- About details of hardware and reported computational efficiency\n\nThe hardware used was NVIDIA GeForce RTX 3080 Ti (12GB). The training time reported in Table S9 on Page 20 summarizes the time per epoch for both pre-training and fine-tuning. A more detailed comparison of total time(s) is presented below.\n\n|     | ERDiff  | Cycle-GAN | NoMAD  | FDA-MLA | FDA-MMD |\n|:-------------------:|:-------:|:---------:|:------:|:-------:|:-------:|\n| Pre-training           | 2449.68 | -         | 135.34 | 98.95   | 98.95   |\n| Fine-tuning            | 1.21    | 11.90     | 76.83  | 2.32    | 2.38    |\n\n- About the efficiency of inference\n\nWe conducted further analysis of FDA's inference time on an NVIDIA GeForce GTX 1080 Ti (11GB). As presented in the table below, average inference time for a single window is approximately 4 ms, making it suitable for real-time applications.\n\n#### Inference time of FDA (ms)  \n\n| Data   | FDA-MLA | FDA-MMD |\n|:------:|:-------:|:-------:|\n| Avg | 3.90 | 3.97 |\n\nWe hope that these responses may address your concerns. We believe that our novel FDA framework will be of significant interest to the ICML community, given its potential impact on few-trial neural alignment and real-world BCI reliability. Could you please consider raising the scores? We look forward to your further feedback. Thank you in advance.", "claims_and_evidence": "The main claim of the paper is that the proposed method, FDA, outperforms baseline methods in few-shot adaptation to new days. Based on the experiments in the paper, I mostly think that there is sufficient evidence for this claim. The claim about novelty is valid – to my knowledge, this is a novel application of flow matching to neural activity adaptation. The sample and compute efficiency claims also seem to hold in light of experimental results.", "methods_and_evaluation_criteria": "Yes, the proposed methods, evaluation datasets, and metrics (decoding $R^2$) make sense for the application at hand. Quantifying stability of dynamics through the maximum Lyapunov exponent is also a standard practice.", "theoretical_claims": "The theoretical result and the proof seem to make sense, I briefly went through the full proof in the appendix but did not read it in full detail.", "experimental_designs_or_analyses": "Yes, I believe the experiments carried out and the analyses are sound. The authors have correctly validated their claims of superior few-shot performance on cross-day neural decoding. The claim about stability of latent dynamics (through training) is also validated empirically through the Lyapunov exponent analysis. Several ablations have been carried out, validating the necessity and utility of various model components.", "relation_to_broader_scientific_literature": "This paper makes a contribution towards improving neural activity alignment methods, which is one class of methods meant to improve the performance of BCI decoders across days or even subjects (although the latter is not explored here and acknowledged as a limitation). Existing methods of this class often require a large number of trials to adapt neural activity on subsequent days to the source domain (usually day 0), however the proposed method is able to achieve good results with very few trials. It is also, to my knowledge, one of the first works applying flow matching to this setting. It is worth noting that this class of adaptation-based methods often end up yielding poorer performance than large-scale deep learning methods that have been proposed recently, however the asset of the proposed method is its ability to generalise in the setting with extremely few and unlabelled trials for finetuning.", "essential_references_not_discussed": "I think relevant and related work is adequately discussed in the paper.", "other_strengths_and_weaknesses": "Apart from points made previously, here are additional strengths and weaknesses:\n\n**Strengths:**\n* The ability to adapt few-shot using even just 5 trials is a great advantage.\n* The method does not require target trials to be labelled, so learning the adaptation is unsupervised.\n\n**Weaknesses:**\n* The paper is very dense and so is a lot to take in, but it also lacks clarity in certain places (see Questions section).\n* Some cited works such as Azabou et al. (2023; POYO), Ye et al. (2024; NDT-2), etc. were not compared against. I think it should be possible to compare against models like NDT-2 where the source code and weights are available (https://github.com/joel99/context_general_bci).\n* Related to the above, there is a claim in Section 2 that Ye at al. (2023; NDT-2) and Zhang et al. (2024; MtM) are capable of supervised alignment. I do not quite understand this point: NDT-2 and MtM are trained in a self-supervised manner, and only the readout training is supervised. Furthermore, alignment isn't really necessary in either case because they are large-scale models trained on multiple sessions/tasks/datasets to begin with. Could the authors clarify what they mean here and perhaps modify the text here? It is true that Azabou et al. (POYO; 2023) is amenable to supervised alignment.\n* Other BCI tasks such as speech and handwriting decoding were not considered.\n* As acknowledged by the authors, cross-task and cross-subject adaptation was not studied.", "other_comments_or_suggestions": "One suggestion to the authors would be to attempt to make the writing clearer and accessible to a BCI audience by retaining the most important details and experiments in the main text and relegating some of the others to the appendix. Given the number of ablations, it gets confusing to remember and map the abbreviated variants of FDA to particular components being ablated, especially when looking at figures. Some of the table captions, such as that of Table S9, could be made more descriptive. I had to go back to the main text to understand what I was looking at. Also, some figures lack certain axes labels such as Figure S4, which makes it hard to interpret them.", "questions_for_authors": "Apart from my comments above, here are some questions:\n* In some of the plots, such as Figure 4(b) and Figure S6, why does the $R^2$ drop as the number of samples for finetuning increases?\n* How do the authors decide the window size $w$ for the context windows?\n* In some cases, performance on the random target task is better than performance on centre-out. Do the authors have any intuition for why that might be the case? In general, decoding in RT tasks is more difficult than CO, and RT is a harder task for subjects to do as well.\n* The authors randomise the selection of few-shot finetuning trials, but could they comment on what level of diversity in the trials is desirable? For example, if all the finetuning trials sampled were associated with just one of the centre-out targets, I would expect the performance to be low – although in the real-world setting, one could argue that the experimenter can collect calibration data with some diversity.\n* I recall reading that the latent state was read out using a linear decoder somewhere in the paper, but could the authors clarify if my understanding is correct? This could be made clearer.\n* What are the details of the hardware used for the computational efficiency benchmarking? The time in seconds seems very low if that's the training time. Is it the total time taken or the time taken for 1 step/epoch?\n* Can the authors comment on the computational efficiency in terms of inference time? This is important given that the causal formulation allows for real-time inference.", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "eIA4FH2cxL", "reviewer": "Reviewer_pQPy", "summary": "Neural representational drift is a well-known problem in brain computer interfaces (BCIs) that make it difficult to re-use a decoder over multiple days without an additional recalibration step. Importantly, the amount of data available each day for recalibration is often small. Prior work has explored ways of aligning neural activity across days to aid this process, but they often require more data than would be available in a real-world deployment. This paper argues that this is partially due to assumptions made on the latent variables and choice of divergences, which may break down in the low-data regime, leading to poor transfer between days and training instabilities. The authors propose Flow-Based Distribution Alignment (FDA), which leverages flow matching for few-trial neural adaptation. The choice of a flow matching-based method is motivated by the fact that it places minimal assumptions on the distributions of neural representations while enabling direct likelihood maximization. This second property also enables source-free alignment, which enables calibration without behavioral labels. They prove that their flow-based transformation is stable in terms of Lyapunov exponents, which they claim aids with transfer. They show that FDA improves performance over appropriate baselines on motor cortex datasets.", "questions": "", "limitations": "", "rating": 4, "confidence": null, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We sincerely thank you for your careful review and recognition of our work. Below, we provide a point-by-point reply to your concerns. Due to the limit, all figures prefixed with 'R' below are available in the external link [https://drive.google.com/file/d/129vv370SF4RLanLj92-lzh_vMmkeDCve/view?pli=1].\n\n### Claims And Evidence:\n\n- About why the stability of the flow is made out to be so critical for transfer and a more thorough ablation\n\nThanks for raising the unclear point. The stability of flow models enhances zero-shot performance, making it effective for few-trial adaptation. Specifically, this stability regulates feature deviations, preserving essential semantic information across domains. As illustrated in Fig.R4, it ensures that latent factors with similar labels flow toward consistent semantic representations, even under input drifts in target signals. Empirical validation through zero-shot transfer performance (original Table S8 on Page 18) further demonstrates the benefits of this stability.\n\nAdditionally, we conducted a more thorough ablation study to further validate this effect. Since stability is maintained by activation functions and scale coefficients, we ablated these two components (FDA-al and FDA-sc, respectively) to violate the assumptions of stability. As shown in Fig.R5, the distribution of maximum Lyapunov exponents (MLE) for FDA-al and FDA-sc indicates that both variants frequently exhibit positive MLEs, signifying instability. Furthermore, the corresponding results for zero-shot and few-trial performance, evaluated using MMD-based alignment on the CO-M and RT-M datasets, are summarized in the table below. Consistent with their reduced stability, FDA-al and FDA-sc demonstrated substantially degraded transfer performance, which is comparable to the baselines. This result suggests that instability is the factor contributing to their poor transfer ability.\n\n#### Comparison of average $R^2$ scores (%) across sessions for FDA-al, FDA-sc, and FDA-MMD on the CO-M, and RT-M datasets ($r$ = 0, 0.02).\n\n| Data | $r$ | FDA-al | FDA-sc | FDA-MMD |\n|:---------:|:-----------:|:-------------------:|:----------------------:|:--------------------:|\n| CO-M  | 0        | -9.34 ± 9.57        | -18.20 ± 17.53         | **16.23 ± 9.43**         |\n|           | 0.02        | 14.51 ± 16.37       | 13.35 ± 19.01          | **45.59 ± 5.15**         |\n| RT-M  | 0       | 1.23 ± 4.76         | 1.78 ± 3.89            | **38.15 ± 8.21**         |\n|           | 0.02        | 16.99 ± 11.75       | 20.46 ± 11.77          | **42.08 ± 6.31**         |\n\n### Other Comments Or Suggestions:\n\n- I don't think that presenting the results in a table, as in Table 1, is the most effective way of communicating them in this case. While this is not uncommon in ML papers, I find this table to be too busy to parse. I'd suggest something more like a box or violin plot may help. Maybe with just the most important results, and then the rest could be moved to the supplementary material.\n\nThanks a lot for the valuable suggestion. We will improve the presentation of our results by using clearer violin plots and relocating some results to the supplementary material in our revision.\n\n### Questions For Authors:\n\n- About the easy way to ablate the stability property of FDA and show that it transfers worse in some way when those assumptions are violated\n\nYes, we found that FDA exhibited significantly worse zero-shot and few-trial transfer performance when these assumptions were violated. Specifically, since stability is governed by activation functions and scale coefficients, we ablated these two components (FDA-al and FDA-sc, respectively) to affect the stability property of FDA. More detailed results are provided above in the above response.\n\nWe sincerely hope that these responses may address your concerns. We believe that our novel FDA framework will be of significant interest to the ICML community, given its potential impact on few-trial neural alignment and real-world BCI reliability. \nCould you please consider raising the scores? We look forward to your further feedback. Thank you in advance.", "claims_and_evidence": "Overall, the paper did a good job supporting its claims with a thorough and extensive evaluation. However, it is still unclear to me why the stability of the flow is made out to be so critical for transfer. The baselines clearly do have larger Lyapunov exponents, but that doesn't prove that this is why they transfer poorly. I think this claim deserves a more thorough ablation. Either that, or it should not be so heavily focused on in the paper.", "methods_and_evaluation_criteria": "The proposed methods and evaluation criteria (both benchmarks and metrics) make sense for this problem setting.", "theoretical_claims": "I skimmed the proof of dynamical stability in appendix A2 and nothing popped out to me as incorrect.", "experimental_designs_or_analyses": "I looked over the experimental design of the main results and ablations and found them to be sound.", "relation_to_broader_scientific_literature": "This paper provides clear arguments as to why their method should work better in the data-limited regime and empirically show it through extensive evaluations with state-of-the-art methods. The authors do a good job discussing related work and situating their paper in it. While the innovations in this paper are more specific to the application, there are definitely aspects which are relevant to the broader scientific community. Pre-training on large datasets and transferring with selectively re-training a subset of the model weights on new data is a common paradigm across machine learning. This paper makes important claims about how the choices of distribution of latent variables can have a substantial impact on this transferability. On a more low-level, their choice of linear interpolation for the flow path allowed them to use a one-step Euler method, simplifying their source-free alignment method. This flavor of technique may have utility in more settings than just neural representation alignment. They also prove that their flow is stable under certain assumptions and regularizations, which to my knowledge, is novel to this work.", "essential_references_not_discussed": "There are not essential references missing from this paper as far as I'm aware of the literature.", "other_strengths_and_weaknesses": "The paper is well written and does a good job supporting most of its claims. It is a novel approach to neural representation alignment for BCI decoders, appears to have better few-shot transfer, and can do source-free alignment. Some of the technical innovations may also have broader application in other domains.", "other_comments_or_suggestions": "I don't think that presenting the results in a table, as in Table 1, is the most effective way of communicating them in this case. While this is not uncommon in ML papers, I find this table to be too busy to parse. I'd suggest something more like a box or violin plot may help. Maybe with just the most important results, and then the rest could be moved to the supplementary material. This is not critical, but just a minor comment.", "questions_for_authors": "Is there an easy way to ablate the stability property of FDA and show that when those assumptions are violated, it transfers worse in some way?", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:

Meta-review: In work on brain computer interfaces (BCI), drift of recordings across days or sessions presents a difficulty for fixed decoders. If a decoder is trained on data collected from one neural population at a particular time, a change in the recorded population may drastically reduce decoder performance. Thus, "aligning" data across sessions or subjects in order to preserve the performance of an existing decoder is an important problem at the intersection of ML and neural engineering.

This paper presents a new approach to the neural alignment problem based on recent work in flow-matching. Briefly, an encoder is trained to compress spiking neural data into a context variable $\mathbf{c}$ that can be used to condition a latent flow $\mathbf{z}(t)$ from an isotropic Gaussian to a specified representation for decoding based on provided labels. The strategy of the paper is to retrain the encoder and flow on a large dataset, then fine-tune the encoder producing the flow-conditioning variable on a new few trials in a manner that minimizes a KL divergence between source and target decoding distributions.

Reviewers agreed that the proposed method is novel and addresses an important problem in the literature. They likewise agreed that the results on fine-tuning appear impressive, particularly with so few trials. Some questions were raised about the performance of some other large-scale models (e.g., POYO) with respect to fine-tuning, which will hopefully be clarified in a full revision.

In summary, this is a solid paper that shows real promise in addressing distribution shift for BCI applications.
Decision: Accept (poster)