# MPFM-VC: A Voice Conversion Algorithm Based on Multi-Dimensional Perception Flow Matching
## 3 Flow Matching in Voice Conversion  
As illustrated in Figure 2, in this study, we adopt a conditionally guided flow matching method based on optimal transport to learn the distribution of mel spectrograms and generate samples from this distribution conditioned on a set of acoustic features. Compared with diffusion probabilistic models [18], the proposed optimal transport-based conditional flow matching approach eliminates the need for reverse processes and complex mathematical derivations. Instead, it generates speech by learning a direct linear mapping between distributions, achieving results comparable to those of diffusion models. This method not only offers better generation performance but also provides a simpler gradient formulation, improved training efficiency, and significantly higher inference speed.  
In this work, data representations are denoted by \(z_{0}\sim p_{0}\) and \(z_{1}\sim p_{1}\), where \(p_{0}\) and \(p_{1}\) represent the prior distribution and the target mel spectrogram distribution, respectively.  
Figure 2: The process of flow matching.  
The subscripts indicate temporal positions, with zero denoting the starting point and one denoting the endpoint. In the flow-matching framework, a continuous path of probability densities is constructed from the initial prior distribution \(p_{0}(z\mid z_{0})=\mathcal{N}(z\mid 0,1)\) to the mel spectrogram distribution \(p_{1}(z\mid z_{1})\). Notably, the prior distribution in this formulation differs from that of many existing flow-matching models in that it is independent of any acoustic-related features. Instead, it is randomly initialized from a standard normal distribution. This acoustically agnostic initialization helps reduce entanglement among the feature representations within the dataset. The entire process can be formally described by the ordinary differential equation (ODE) shown in Equation (1).  
\[\frac{dz_{t}}{dt}=v(z_{t},t) \tag{1}\]  
where \(t\in[0,1]\) denotes the normalized time, and \(z_{t}\) represents the data point at time \(t\). The function \(v(z_{t},t)\) is a vector field that defines the direction and magnitude of change for each data point in the state space over time. In the flow-matching framework, this vector field is parameterized and predicted by a neural network.  
Once the predicted vector field \(v(z_{t},t)\) is obtained, a continuous transformation path from the initial distribution \(z_{0}\sim p_{0}\) to the target distribution \(z_{1}\sim p_{1}\) can be constructed by solving the corresponding ordinary differential equation (ODE). This ODE can be numerically solved by using the Euler method, as shown in Equation (2).  
\[z_{t+\Delta t}=z_{t}+\Delta t\cdot v(z_{t},t) \tag{2}\]  
where \(\Delta t=1/N\) denotes the step size, \(t\) is the sampled time point, \(N\) is the total number of discretization steps, and \(z_{t}\) represents the approximate solution at time \(t\).  
Overall, the core idea of flow matching lies in enforcing consistency between the predicted vector field and the ground-truth vector field corresponding to the target mel spectrogram. This ensures that the transformed probability distribution accurately aligns with the desired mel spectrogram distribution. The optimization objective can be formulated as the following loss function:  
\[L_{FM}(\theta)=\|v_{t}(z)-u_{t}(z)\|^{2} \tag{3}\]  
where \(\theta\) denotes the parameters of the neural network, \(t\in[0,1]\), and \(z_{1}\sim p_{1}(z)\) represents a sample from the target mel spectrogram distribution. \(u_{t}(z)=z_{1}-z_{0}\) denotes the ground-truth vector field, while \(v_{t}(z)\) represents the predicted vector field to be learned.