This invention relates generally to a method for reducing dimensionality of spectrograms of time-varying signals, and more particularly to representing the spectrograms as independent basis matrices.
Typical examples of signals varying over time are acoustic signals, such as speech, mechanical vibrations, and electro-magnetic signals. In signal processing, such signals are generated by “processes,” and signals are frequently referred to as “time series” data. Time-varying signals can be represented as magnitude spectrograms. All values of the magnitude spectrograms are nonnegative.
In many applications, it is useful to decompose the magnitude spectrogram into a small number of independent components, especially when the spectrogram is concurrently generated by multiple independent processes.
The decomposition can be performed by factoring the magnitude spectrogram. The factoring reduces the spectrogram to basis matrices, which are a low-dimensional representation of the spectrogram. Then the basis matrices can be used for classification, denoising, or source separation.
Hence, it is desired to represent the spectrograms of time-varying signals as a convex combination of a small number of independent, nonnegative basis matrices.
Embodiments of the invention disclose a system and a method for reducing a dimensionality of a spectrogram matrix. The embodiments constructs an intermediate time basis matrix and an intermediate frequency basis matrix and applies iteratively a non-negative matrix factorization (NMF) to the intermediate time basis matrix and the intermediate frequency basis matrix until a termination condition is reached, wherein the NMF is subject to a constraint on a an independence regularization term, wherein the constraint is in a form of a gradient of the term.
One embodiment discloses a method for reducing a dimensionality of a spectrogram of a signal produced by a number of independent processes, the spectrogram is represented by a spectrogram matrix such that the spectrogram matrix is factored into a combination of a frequency basis matrix and a time basis matrix, wherein values of rows of the time basis matrix are substantially independent, comprising a processor for performing steps of the method, comprising the following steps.
The method acquires an intermediate frequency basis matrix having a number of columns equal to the number of independent processes and a number of rows equal to the number of rows in the spectrogram matrix, an intermediate time basis matrix having a number of rows equal to the number of independent processes and a number of columns equal to the number of columns in the spectrogram matrix; and a gradient of an independence regularization requirement.
Next, the method updates the intermediate frequency basis matrix and the intermediate time basis matrix according to a non-negative matrix factorization (NMF) with the gradient of the independence regularization requirement, and selects the intermediate frequency basis matrix as the frequency basis matrix and the intermediate time basis matrix as the time basis matrix, if a termination condition is reached. Otherwise the updating is repeated.
Our invention is based on a realization that a spectrogram represented by a matrix can be factored into a frequency basis matrix and a time basis matrix using a regularized non-negative matrix factorization (RNMF) with a specific regularization term describing an independence constraint such that the time basis matrix has uncorrelated rows.
Rows in the matrix V represent different frequencies F 130 of the spectrogram, and columns represent times T 140. Accordingly, a value of the spectrogram 110, i.e., an amplitude of a particular frequency at a particular time, form elements v 125 of the spectrogram matrix. Hence, the spectrogram matrix V is a nonnegative matrix of size F*T.
As shown on
Because the processes forming the spectrogram are independent, the time basis matrix has uncorrelated elements, i.e., the rows are independent of each other. Accordingly, the decomposition
V=WH,
is constrained by
Wab≧0∀a,b
Hbc≧0∀b,c
Vac≧0∀a,c
E(HHT)≈diag(E(HHT)) (1)
where Wab 235 and Hbc 345 are elements of matrices W and H respectively, and a function E( ) is an expectation over all of the vectors in the matrix H. A function diag( ) is a diagonal matrix with the same diagonal elements as an argument of the function.
Embodiments of the invention determine solution of Equation (1) based on minimization of RNMF according to
where ∥V−WH∥F2 is a reconstruction error, i.e., a Frobenius norm of a difference between the spectrogram matrix V, and factorized approximation WH. Ideally, the reconstruction error should be 0. J(H) represents an independence regularization requirement for the time basis matrix H, and a is a scalar weight for the independence regularization requirement during an optimization process.
The independence regularization requirement J(H) is selected such that when the requirement is minimized, the correlation between the rows of the time basis matrix H is also minimized.
In one embodiment, we use the Frobenius norm of the empirical correlation of matrix H according to
J(H)=∥C(H)∥F2 (3)
C(H)=PH−1/2HHTPH−1/2, (4)
where C(H) is an energy-normalized correlation matrix of H, PH is a diagonal matrix of energies, e.g., sums of squares, of the rows of the time basis matrix H. The diagonal elements of the matrix C(H) are one. Thus, minimization of the Frobenius norm forces non-diagonal elements toward zero.
We update the RNMF with the independence regularization requirement of the matrix H according to
where ε is a small positive constant and [ ]ε indicates that any values within the brackets less than ε are replaced with ε to prevent violations of the nonnegativity constraint. A gradient of the independence regularization requirement J(H) with respect to time basis matrix H is φ(H), and
where variable A and B are defined according to
A=HHT, (9)
B=NNT, (10)
Nb=∥Hb∥, (11)
δAij/δHbc=1bHcT+Hc1bT, (12)
δBij/δHbc=Hbc(U1b1bT+1b1bTUT, and (13)
U=N(N−1)T, (14)
where 1b is an indicator vector having a zero value for all elements, except the bth element that is one. N is a vector whose elements are norms of the rows of the time basis matrix H, and U is an outer product of the vector N where the elements are inverted.
The gradient φ(H) imposes an independence constraint on the rows of the time basis matrix H. The desired decomposition achieves time-dependent activation levels of the processes generating the spectrogram. Thus, an activation levels for one process, i.e., the elements in one row of the matrix H provides no information about the activation levels for another process, i.e., the elements in another row of the matrix H.
Accordingly, the embodiments of the invention provide a novel gradient constraint for the independence regularization requirement, which leads to a substantial independence of elements of the rows of the matrix H, wherein the rows are independent or nearly independent of each other.
Method for Nonlinear Dimensionality Reduction of Spectrograms
Inputs to the method include the spectrogram matrix 120, the number n 313 of independent processes generating the spectrogram, an intermediate time basis matrix Hin 311, an intermediate frequency basis matrix Win 315, a gradient φ(H) 317 of an independence regularization requirement, and a threshold Th 340.
The spectrogram matrix represents the spectrogram acquired from the n independent processes. The number of independent processes is less than a number of rows in the spectrogram matrix 120, i.e., less than the number of frequency bands 130 in the spectrogram 110. The intermediate time basis matrix Hin is constructed at random with a number of rows equal to the number n and a number of columns equal to the number of columns in the spectrogram matrix 120. The intermediate frequency basis matrix Win 315 is constructed at random with a number of columns equal to the number n and a number of rows equal to the number of rows in the spectrogram matrix 120. The threshold 340 can indicate a number of iterations, or a difference in values between the current and previous iterations.
In each iteration, the RNMF 310 determines frequency and time basis matrices W, H 320 according Equation (5), with the gradient φ(H) defined according to Equations (6)-(14).
Satisfaction of the termination condition is checked 320. If the condition is false, the RNMF is repeated with updated factors W, H 320. Otherwise, if true, the matrix W 230 and matrix H 240 are output.
Although the invention has been described by way of examples of preferred embodiments, it is to be understood that various other adaptations and modifications may be made within the spirit and scope of the invention. Therefore, it is the object of the appended claims to cover all such variations and modifications as come within the true spirit and scope of the invention.