A farewell to SVM: Bayes Factor Speaker Detection in Supervector Space Niko Br¨ ummer April 4, 2006

1

Introduction

We are interested in the speaker detection problem where, given just two speech segments, we have to decide: H1 : The two speech segments were spoken by the same speaker. H2 : The two speech segments were spoken by two different speakers. (The methodology that we shall develop in this paper allows for the generalization where N − 1 speech segments, all from the same speaker, are given and the question is posed whether the N th speech segment is from the same or a different speaker. But for simplicity of exposition, we consider the two-segment case.) Recent work in speaker detection has suggested that there exist good supervector-based strategies to detect speakers. This is a three-part strategy which can be described thus: 1. Extract a low-dimensional feature vector for every 10ms frame of each input speech segment. This leads to a separate variable-length sequence of feature vectors for each of the two speech segments. All further processing is based solely on these two sequences of feature vectors. 2. Map each of the two feature-vector sequences to a fixed-size supervector of very high dimension.(A supervector is just a vector, where the prefix super- is used to emphasize the distinction from feature vectors.) All further processing is based only on these two supervectors. 3. Process the two supervectors to decide between H1 and H2 . Examples of the supervectors extracted in step 2 include: • Averaged polynomial expansion of feature vectors. • Concatenated GMM means. • MLLR transform parameters obtained when a speech recognizer is adapted in unsupervised mode on each segment.

1

All of these representations give fixed-length supervectors (of high dimension) and have been proven to contain high-quality speaker information. In what follows, we shall be interested in step 3. How do we make the decisions in supervector space? In all of the speaker recognition literature where this three-part strategy is followed, SVM modeling is used to accomplish this. The recipe is roughly the following:

2

SVM recipe 1. Choose one of the supervectors to be the ‘training’ vector and train an SVM to distinguish this supervector from those of a large set of supervectors of background speakers. A linear SVM kernel is invariably used. This results in a model vector of the same dimension as the input supervectors1 . 2. Project the other supervector, denoted the ‘test’ vector onto the model vector (dot-product) to obtain the SVM score. This score can be thresholded to make decisions. This results in a linear (hyperplane) decision boundary in supervector space. 3. To improve performance, directions in supervector space which are considered (by some heuristic) to contain high intra-speaker variability, may be projected away before training and/or testing.

3

Bayesian solution

Although very good performance can be achieved with the SVM recipe, it remains an ad-hoc solution. The Bayesian solution is to explicitly model all sources of uncertainty and then to use probability theory to make decisions. Recent publications and NIST evaluations have shown that the following model for inter- and intra-speaker variability (particularly in the case of GMMbased supervectors) give good results (but admittedly not in quite the same three-part strategy):

3.1

Supervector model

A supervector x for a given segment is an additive combination between a speaker-dependent supervector s and an intra-speaker nuisance vector n: x=s+n

(1) 2

where we assume both speaker and nuisance vectors are normally distributed: s ∼ N (µ, D) n ∼ N (0, C)

(2)

That is, we model inter-speaker variability with the covariance matrix D and intra-speaker variability with the covariance matrix3 C. 1 and

also an offset constant can of course take steps to improve the normality of our supervectors. Recent SRI publications have shown that histogram normalization of supervector components are a good idea. 3 In the general case, we shall allow C to not necessarily be of full rank and therefore to be non-invertible. This means the intra-speaker variability can be limited to a subspace. 2 We

2

From this model we can immediately deduce: x ∼ N (µ, C + D)

(3)

Now let the supervector y for the other speech segment be modeled similarly: y = s0 + n0

(4)

s0 ∼ N (µ, D) n0 ∼ N (0, C) y ∼ N (µ, C + D)

(5)

where

After some work, we can deduce the joint probability distributions to be: • Under H1 , where s = s0 and where n and n0 are independent:       x µ D+C D ∼ N( , ), given H1 y µ D D+C • Under H2 , where s and s0 are also independent:       x µ D+C 0 ∼ N( , ), given H2 y µ 0 D+C

(6)

(7)

From equation 6 we see the somewhat surprising result that the cross-correlation between supervectors of the same speaker is just the inter-speaker covariance: E{(x − µ)(y − µ)T } = E{(y − µ)(x − µ)T } = D, given H1

(8)

where E{·} denotes expectation and T denotes transpose. But this can be explained by noting that under the independence assumptions of this model, all cross-correlations between nuisance vectors and between nuisance and speaker vectors vanish. It is also useful to consider the distributions of the following reparameterization of the joint vector: • Under H1 : 

x−y x+y



    0 2C 0 ∼ N( , ), given H1 2µ 0 2C + 4D

• Under H2 :       x−y 0 2C + 2D 0 ∼ N( , ), given H2 x+y 2µ 0 2C + 2D

3

(9)

(10)

3.2

Bayes factor

Using this model, in the general case, we may approach the decision problem via calculation of the Bayes factor: B(x, y) =

p(x, y|H1 ) N (z|m, Σ1 ) = p(x, y|H2 ) N (z|m, Σ2 )

(11)

where 

x y





µ µ





D+C D D D+C





D+C 0 0 D+C



z= m= Σ1 = Σ2 =

(12)

where we have assumed that D is of full rank, making the covariances invertible. However under the special case where C is also of full rank, we may factor the equation so that the matrix inversions are smaller: R N (x|s, C)N (y|s, C)N (s|µ, D)ds R B(x, y) = R ( N (x|s, C)N (s|µ, D)ds)( N (y|s, C)N (s|µ, D)ds) (13) C N (x − y|0, 2C)N ( x+y 2 |µ, D + 2 ) = N (x|µ, C + D)N (y|µ, C + D) This equation also shows why we call B(x, y) a Bayes factor — if we consider s to be a speaker model, then we are effectively integrating over all possible models. With this approach there is no need to make hard decisions in order to obtain speaker models. We can directly compute the score from the two supervectors, in a symmetrical way.

3.3

Score

We let our detection score for a trial (x, y) be the log-likelihood-ratio which is given by the log of the Bayes factor. This can be written as: S(x, y) = log B(x, y) = xT M1 x+yT M1 y+xT M2 y+xT m3 +yT m3 +m4 (14) where the square matrices M1 and M2 and the vector m3 and the scalar m4 are constants which depend on the parameters   C, D and µ. In short, the score x is a quadratic function of the joint vector . y Note that the score does not give a distance measure between x and y. Rather, the score as a function of the joint vector has a saddle-point at x = y = µ, from where the values rise to arbitrarily large positive, when x is close to y and both far from from µ; and from where the values fall to arbitrarily large negative, when all of x, y and µ are far from each other. This has the following interpretation: 4

• When x and y are close to µ, we can never affirm with great certainty that they are the same speaker, not even when x = y. • The further away from µ we move x and y, the more certain we can be of either H1 or H2 . If this model proves to be an accurate description of what is really going on, then this offers some explanation for the “wolf/sheep/lamb/goat” phenomenon of the difference in recognizability of different speakers4 .

3.4

Regularization

The matrices C and D are huge, having numbers of elements that grow as the square of the supervector dimension. We have to make some regularization assumptions in order to work with these parameters. In particular, we shall work with factor analysis decompositions of these covariance matrices: C = E + FGFT D = H + JKJT

(15) (16)

where E and H are d by d diagonal; F is d by nF rectangular; J is d by nJ rectangular; G is nF by nF diagonal; K is nJ by nJ diagonal; d is the supervector dimension and where nF << d and nJ << d. Note that in the special case where E and H are isotropic, that is if they are scalar multiples of the identity matrix, then the factor analysis model is called a probabilistic principal component analysis (PPCA). 3.4.1

Factor analysis model format

The matrices G and K are strictly speaking unnecessary, if F and J are unconstrained. But if we constrain F and J to be orthonormal, we need them. We can collapse the model to a simpler format by letting: 1

W = FG 2 V = JK

1 2

(17) (18)

so that C = E + WWT D = H + VVT

(19) (20)

If we start with a factor analysis model in this reduced WWT format, we can convert it back to the FGFT format via an eigen-analysis5 of the small nF by nF matrix WT W. This eigen-analysis (or diagonalization) gives: WT W = RΛRT WWT = (WR)(WR)T Λ = (WR)T (WR) 4 See

(21) (22) (23)

http://www.nist.gov/speech/publications/papersrc/icslp 98.pdf. we don’t need to do an eigen-analysis of the huge d by d matrux WWT .

5 Fortuitously

5

where R is a unitary6 matrix having the normalized eigenvectors of WT W as columns; and where Λ is a diagonal matrix of eigenvalues. As the last equation shows, the columns of the tall d by nF matrix (WR) are orthogonal, but not normalized. Now if we let F be the orthonormal matrix of normalized columns of (WR) and if we let G = Λ, then we have the desired format conversion: WWT = FGFT 3.4.2

(24)

Linear combinations

We need to be able to form linear combinations of C and D. Fortunately if we use the format C = E + WWT and D = H + VVT , this is easy. We get a result that is in the same format: αC + βD = A + UUT A = αE + βD  √ √ αW βV U=

(25) (26) (27)

where again A is diagonal and U is of low rank, d by nF + nJ . 3.4.3

Inversion and determinants

This factor analysis covariance model lends itself, via the matrix inversion lemma, to tractable ways of calculating the determinants and inverses of the huge d by d matrices which we need to implement equation 13. In the case of C = E + FGFT we have: C−1 = E−1 − E−1 FL−1 FT E−1 |C| = |E||G||L|  L = G−1 + FT E−1 F

(28) (29) (30)

where E is easy to work with because it is diagonal and L and G are easy to work with because they are small: nF by nF . Of course, all the other covariance matrices in either of the formats discussed can be treated similarly.

4

Training

Training of this speaker detection system consists of using large numbers of detection trials (x, y) to assign values to the parameters C and D. As always, we may consider both generative and discriminative ways to do this training.

4.1

Generative training

At a first glance, generative training would consist of finding separate maximumlikelihood (ML) or MAP solutions under each of the hypotheses H1 and H2 . But looking at equations 9 and 10, we see that these maximizations would not be independent. We also see that obtaining the sub-covariances 2C and 2C + 4D under H1 can help us separate C and D but training under H2 cannot because the sub-covariances are identical. 6 RT R

= RRT = I

6

This suggests that ML or MAP training under H1 is sufficient to determine the whole system. In what follows, we shall consider only constrained ML solutions as opposed to MAP solutions for C and D. In particular, we shall employ the factor analysis constraints of equations 15 and 16. 4.1.1

Simple solution

First, to keep things simple, we constrain D to be diagonal, (i.e. nJ = 0). This is motivated by the work of Patrick Kenny which suggests that this is a good (although perhaps not optimal) assumption. (As a further explanation for this, we can note that it seems to be a good idea not to ‘remember’ speaker characteristics with too many parameters, because in new data the speakers will all be different. But it is a good idea to reserve more parameters to ‘remember’ how intra-speaker noise (including channel effects) is structured, because presumably this structure will be repeated in future.) It would probably be a good idea to formally derive a maximum likelihoodlikelihood solution with respect to the parameters in the model. But, in the mean time, here is a quick-and-dirty calculus-shy solution: Input: A large set of same-speaker (H1 ) trials: (xi , yi ), i = 1, 2, . . . , N . PN 1 Step 1: Let µ = 2N i−1 xi + yi . Step 2: Let element djj of diagonal matrix D be: djj =

N 1 X (xji − µj )(yji − µj ) N i=1

(31)

where µj , xji and yji are the respective components of vectors µ, xi and yi . Step 3: Choose nF << d and perform a factor analysis so that: N 1 X C = λI + FGF ≈ Γ = (x − y)(x − y)T 2N i=1 T

(32)

Where the columns of F are normalized. We could do the factor analysis, for example, by doing a PCA analysis7 of Γ and then choosing λ so that trace(C) = trace(Γ). Of course, λ > 0 makes C invertible.

4.2

Discriminative training

Possibly, the above quick-and-dirty solution is not an optimal solution for the generative case. Most probably the optimal generative solution does not have a closed-form solution, requiring some sort of iterative optimization. Possibly the assumptions of our generative model are far from good. All of these are 7 (For example, the MATLAB function EIGS can do this kind of PCA analysis, to find a few eigen-values and -vectors of a large matrix.)

7

reasons to consider also iterative discriminative training solutions. In this case, we maximize the following objective function: X p O(C, D) = log σ(x, y) kT1 k (x,y)∈T1

1−p + kT2 k

X

(33)

log(1 − σ(x, y))

(x,y)∈T2

 σ(x, y) =σ S(x, y) + logit(1 − p) where the sigmoid or logistic function σ(·) is: 1 ∂ log σ(−x) =− 1 + e−x ∂x ∂ log σ(x) 1 = σ(−x) = 1 − σ(x) = 1 + ex ∂x σ(x) = logit−1 (x) =

(34) (35)

where T1 is a training set of same-speaker trials and T2 is a training set of different-speaker trials. A good approach to perform the iterative optimization, is with a conjugategradient algorithm. This requires analytical solution for the gradient of O(C, D) with respect to every parameter involved in the optimization. To start this agenda, we can express the partial derivative of the objective w.r.t. a parameter, say α as: ∂O p = ∂α kT1 k 1−p − kT2 k

X

(1 − σ(x, y))

(x,y)∈T1

X (x,y)∈T2

∂S(x, y) ∂α (36)

∂S(x, y) σ(x, y) ∂α

Note that this is a weighted sum of the score derivatives ∂S(x,y) ∂α , where the weighting depends on the parameters that we are optimizing. The second derivative will also come in handy: p ∂2O =− 2 ∂α kT1 k

X

 (1 − σ(x, y))σ(x, y)

(x,y)∈T1

∂S(x, y) ∂α

2

∂ 2 S(x, y) ∂α2  2 ∂S(x, y) σ(x, y)(1 − σ(x, y)) ∂α

+ (1 − σ(x, y)) 1−p − kT2 k

X (x,y)∈T2

+ σ(x, y)

(37)

∂ 2 S(x, y) ∂α2

To get the score derivatives, we assume an even simpler structure for our covariances matrices, which can be discriminatively ‘tuned’.

8

4.2.1

Simple solution

We start from a generatively trained baseline. We assume the generative training has given us a model of the form: C = E + FGFT D = H + JKJT

(38) (39)

We can rewrite this for convenience as C=

nX F +1

e γ i Γi

(40)

i=1

D=

nF +n XJ +2

e γ i Γi

(41)

i=nF +2

where (Γ1 , Γ2 , . . . , Γn−1 ) = (E, f1 f1T , f2 f2T , . . . , H, j1 jT1 , . . . , jnJ jTnJ )

(42)

and where8 n = nF + nJ + 3 and where fi is the ith column of F and ji is the ith column of J. It is easy to choose suitable values for the weight-vector ~γ = [γ1 , γ2 , · · · , γn ]T to make the equalities (40) and (41) true, but the object of the exercise is now to tune these scalar parameters with our discriminative optimization to assume different values to those given by the generative solution. Note that exponentiation keeps our weights positive, so that the parameter vector ~γ ∈ Rn can be unconstrained. To form our score, we use the Gaussian supervector models given by (9) and (10):       v x−y Q1 0 = ∼ N (0, ), given H1 (43) w x + y − 2µ 0 Q2 and



v w



 =

x−y x + y − 2µ



 ∼ N (0,

 Q3 0 ), given H2 0 Q3

(44)

where Q1 =

2C

=

n−1 X

a1j eγj Γj

(45)

a2j eγj Γj

(46)

a3j eγj Γj

(47)

j=1

Q2 = 2C + 4D =

n−1 X j=1

Q3 = 2C + 2D =

n−1 X j=1

where the aij ≥ 0 are chosen to make these equalities valid. Now we can write: −1 −1 −1 T S(x, y) = γn − vT (Q−1 1 − Q3 )v + w (Q3 − Q2 )w 8 notice

we have added an extra parameter γn , to be used later

9

(48)

and where we have chosen to replace the determinant-derived constant simply by the free parameter γn . An interesting note is that if both C and D are of full rank, then both of the matrices forming the quadratic terms are positive definite9 −1 −1 N = Q−1 = Q−1 = C−1 DQ−1 1 − Q3 3 DC 3 1 −1 −1 −1 −1 −1 = C (C + D ) C 2 1 = (C + CD−1 C)−1 2 −1 −1 −1 −1 M = Q−1 = 2Q−1 3 − Q2 3 DQ2 = 2Q2 DQ3 1 = (CD−1 C + 3C + 2D)−1 2

(49) (50) (51) (52) (53)

This means the quadratic terms are non-negative. This confirms the behaviour observed above: • When the magnitude of the difference vector increases, the score decreases. • When the sum vector moves away from 2µ, then the score increases. This allows us to write: T    v M 0 v S(x, y) = γn + w 0 −N w   x−µ Or we can re-parameterize to z = . Then we get: y−µ   M−N M+N S(x, y) = γn + zT z M+N M−N 

(54)

(55)

matrix CD−1 C is positive definite if D is positive definite and if C is of full rank. (A matrix M is positive definite if and only if, for any vector v 6= 0 the quadratic form vT Mv > 0. 9 The

10

A farewell to SVM: Bayes Factor Speaker Detection in ...

Apr 4, 2006 - Map each of the two feature-vector sequences to a fixed-size .... of (WR) and if we let G = Λ, then we have the desired format conversion:.

165KB Sizes 0 Downloads 130 Views

Recommend Documents

Detection of a Third Speaker in Telephone Conversations
Differentiating speakers participating in telephone conversations ... telephone conversations. 1. ..... the Study of Handset Transducer Effects", ICASSP, 1997.

FAST SVM-BASED KIDNEY DETECTION AND ...
leverages a database of 480 3D images through a support vec- tor machine(SVM)-based detection ..... don, “Kidney detection and real-time segmentation in 3d.

A Hybrid Approach to Error Detection in a Treebank - language
recall error identification tool for Hindi treebank validation. In The 7th. International Conference on Language Resources and Evaluation (LREC). Valleta, Malta.

A Hybrid Approach to Error Detection in a Treebank - language
of Ambati et al. (2011). The figure shows the pseudo code of the algo- rithm. Using this algorithm Ambati et al. (2011) could not only detect. 3False positives occur when a node that is not an error is detected as an error. 4http://sourceforge.net/pr

Online Kernel SVM - GitHub
Usually best to pick at least one greedy and one random. Alekh AgarwalMicrosoft Research. KSVM ... Additionally takes --degree d (default 2). RBF: specified as ...

On the detection and refinement of transcription factor ...
Jan 6, 2010 - 1Center for Statistical Genetics, 2Department of Biostatistics, 3Michigan Center of ..... model is no longer sufficient for analyzing ChIP-Seq data.

Application-Independent Evaluation of Speaker Detection
best any speaker detection system can do is limited by: • The information in ...... AIP Conference ... IEEE Trans. on Speech and Audio Processing, Vol. 9, No.8:.

pdf-12119\a-farewell-sermon-delivered-in-the-first-presbyterian ...
... apps below to open or edit this item. pdf-12119\a-farewell-sermon-delivered-in-the-first-pre ... or-michigan-volume-2-by-samuel-willoughby-duffield.pdf.

farewell to manzanar book pdf
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. farewell to ...

A Global-Model Naive Bayes Approach to the ...
i=1(Ai=Vij |Class)×P(Class) [11]. However this needs to be adapted to hierarchical classification, where classes at different levels have different trade-offs of ...

svm timeline.pdf
It is pointed out publicly that the hosting company for this domain has a. primary focus on anonymous hosting. • Metal Augmentor publishes its own analysis of ...

Farewell Letter.pdf
Page 1. Whoops! There was a problem loading more pages. Retrying... Farewell Letter.pdf. Farewell Letter.pdf. Open. Extract. Open with. Sign In. Main menu.