C ONDITIONING S EQUENCE - TO - SEQUENCE M ODELS WITH L EARNED A CTIVATION F UNCTIONS
A BSTRACT
Conditional neural networks play an important role in a number of sequenceto-sequence modeling tasks, including personalized sound enhancement (PSE), speaker dependent automatic speech recognition (ASR), and generative modeling such as text-to-speech synthesis.
In conditional neural networks, the output of a model is often inﬂuenced by a conditioning vector, in addition to the input.
Common approaches of conditioning include input concatenation or modulation with the conditioning vector, which comes at a cost of increased model size.
In this work, we introduce a novel approach of neural network conditioning by learning intermediate layer activations based on the conditioning vector.
We systematically explore and show that learned activation functions can produce conditional models with comparable or better quality, while decreasing model sizes, thus making them ideal candidates for resource-efﬁcient on-device deployment.
As exemplary target use-cases we consider (i) the task of PSE as a pre-processing technique for improving telephony or pre-trained ASR performance under noise, and (ii) personalized ASR in single speaker scenarios.
We ﬁnd that conditioning via activation function learning is an effective modeling strategy, suggesting a broad applicability of the proposed technique across a number of application domains.
I NTRODUCTION
The use of latent or embedding vectors to condition neural networks is common in a number of machine learning tasks.
For example, in personalized sound enhancement (PSE) prior knowledge of a speaker’s voice proﬁle is used to ﬁlter out noise from an audio recording (Choi et al., 2021;
Hu et al., 2020; Wang et al., 2020; 2019), in speaker-dependent or personalized Automatic Speech Recognition (ASR) a speaker’s voice proﬁle is also used to improve the overall transcription quality (Bell et al., 2021;
He et al., 2019; Samarakoon et al., 2016; Saon et al., 2013), in personalized Text-To-Speech (TTS) systems synthesized voice proﬁle can be purposefully adapted (van den Oord et al., 2018), in computer vision tasks, such as in visual reasoning applications (Chen et al., 2019; Perez et al., 2018), questions are used as the conditioning vectors, and similarly in conditional domain adaptation techniques (Long et al., 2018).
More generally, conditional neural networks accept an additional conditioning vector, that inﬂuences how the networks process inputs to produce outputs.
Most common approaches for conditioning neural networks either concatenate or modulate the conditioning vector with one or more intermediate representations of the network, before the updated representations are processed by a layer, e.g., see Figure 1a-b for an overview.
Such conditioning techniques come at the cost of signiﬁcantly increasing the network parameters by inﬂating the dimensionality of intermediate features or by requiring additional network parameters proportional to the dimensionality of the conditioning vectors and the number of channels present in the representations.
In this work, we introduce a new approach for neural network conditioning and show that effective conditioning can be achieved by learning layer-speciﬁc activation functions based on the conditioning vectors.
Unlike previous approaches, our learned activation ( LA ) functions approach does not increase the model parameters signiﬁcantly, since the number of additional parameters it requires depends only on the size of the conditioning vector, and not on the shape of the feature representations nor on the output shapes of any subsequent layers.
LA uses the conditioning vectors to dynamically modify intermediate activation functions, which are R → R (1-D) mappings, see Figure 1c.
Dynamic
[Figure]
) (c)
[Table] [Table]
.g.
[Table]
b d b u b d+u
b b v v
[Table]
d+u v
[Table]
b
Activation, e
Relu b b v
[Table]
=
=</latexit>
z <latexit sha1_base64="+OTuQAeTCjJZ9TlHMaOOBSsAsnY=">AAAB9XicbVDLSgMxFL1TX7W+qi7dBIvgqswUUXFVcOOygn1AO5ZMmmlDM8mQZNQy9D/cuFDErf/izr8x085CWw+EHM65l5ycIOZMG9f9dgorq2vrG8XN0tb2zu5eef+gpWWiCG0SyaXqBFhTzgRtGmY47cSK4ijgtB2MrzO//UCVZlLcmUlM/QgPBQsZwcZK971A8oGeRPZKn6b9csWtujOgZeLlpAI5Gv3yV28gSRJRYQjHWnc9NzZ+ipVhhNNpqZdoGmMyxkPatVTgiGo/naWeohOrDFAolT3CoJn6eyPFkc6i2ckIm5Fe9DLxP6+bmPDST5mIE0MFmT8UJhwZibIK0IApSgyfWIKJYjYrIiOsMDG2qJItwVv88jJp1areebV2e1apX+V1FOEIjuEUPLiAOtxAA5pAQMEzvMKb8+i8OO/Ox3y04OQ7h/AHzucPUy6TCA==</latexit> x
[Figure]
LAs allow us to extract important insights on how the model is being adapted for different conditioning vectors by simply analyzing the learned activation functions, which are agnostic to the input.
In this work we consider two popular and timely sequence-to-sequence modeling tasks: personalized sound enhancement (PSE) and personalized ASR (PASR) as exemplary tasks for modeling conditional neural networks.
PSE leverages a speaker embedding vector, i.e., a unique encoded voice proﬁle of a speaker, for ﬁltering out everything but the speaker’s voice from an audio recording corrupted with babble or ambient noise (Wang et al., 2020; 2019).
Speaker embeddings can generally be obtained by using an embedding network once during an enrolment phase, e.g., from recorded utterances like “Hey Alexa” or “Hey Bixby”.
PSE networks can be evaluated for improving signal quality for telephony or can also be used to improve the quality of downstream tasks, such as a pre-trained ASR.
PASR on the other hand, aims to improve ASR quality in single speaker scenarios, by leveraging user’s enrollment data to enhance performance directly without any pre-processing.
We evaluate LA on three PSE model families ( § 4.2), on two datasets Librispeech (Panayotov et al., 2015) and Voxforge (vox, 2006).
We show that the use of LA on all models achieves competitive performance to conditioning using concatenation and modulation approaches.
At the same time, concatenation approaches require 10 – 95% more model parameters over our solution.
For PASR, we compare the performance of non-personalized and personalized versions of the conformer encoder model architecture (Gulati et al., 2020) with a dense layer for character or subword text encoder trained with CTC loss and decoded via CTC decoder ( § 5.2).
Results on Librispeech (Panayotov et al., 2015) show that LA yields effective ASR personalization, i.e., increased performance across all users while using two seconds of enrollment data, with up to 19% relative WER improvement across all users, and up to 40% for some users.
R ELATED W ORK
Conditioning through tensor concatenation The concatenation of intermediate features with latent vectors before being passed to subsequent layers is the most common form of conditioning, but leads to inﬂated model sizes, which hinder their deployment to low-resource constrained devices (Wang et al., 2019; 2020; Valin et al., 2020;
Hu et al., 2020; Comon & Jutten, 2010; Wang et al., 2021; Lam et al., 2021; Vincent et al., 2018; Luo & Mesgarani, 2019;
Xu et al., 2020; Abdulatif et al., 2020; Wisdom et al., 2020; Isik et al., 2020;
Luo et al., 2020; Choi et al., 2021; Snyder et al., 2018;
Panayotov et al., 2015; Bell et al., 2021;
He et al., 2019; van den Oord et al., 2018).
Our approach overcomes this issue and learns smaller models with competitive quality.
Conditioning via normalization layers Another family of techniques is based on having per channel learned linear transformation based on the conditioning vector, which yields a form of conditional normalization (Perez et al., 2018; de Vries et al., 2017; Huang & Belongie, 2017).
Our approach distinguishes itself from this line of work since it learns the non-linear components of the network rather than the linear ones, and thus offers greater modelling at lower cost.
Learning activations without conditioning Outside the context of conditional neural networks, there is work on learning an optimal activation function as a good default to be used in all layers of most neural network architectures (Apicella et al., 2021;
Liu et al., 2020; Ramachandran et al., 2018;
Agostinelli et al., 2015).
Our work instead i) learns conditional activations based on conditioning vectors, and ii) uses differently learnt activations throughout the network.
C ONDITIONING BY L EARNING A CTIVATIONS
Conditioning a neural network corresponds to using some form of latent vector or additional prior knowledge, e.g., encoded typically in the form of an embedding vector, to inﬂuence the output of the network for a given input.
We show in the evaluation that the inﬂuence of the conditioning vector can be successfully modeled by learning a weighted combination of a set of basic activation functions ( § 3.1) and carefully selecting hyperparameters ( § 3.2).
3. D YNAMICALLY L EARNED A CTIVATIONS
To introduce our conditioning approach using dynamically weighted activation functions, we begin by deﬁning a few key variables: z ∈ R b × d is a 2-D tensor representing b number of d -dimensional conditioning vectors, where b is the batch size, x ∈ R b ×··· is the input data with arbitrary tensor dimensions (e.g., vectors, matrices, higher order tensors), h ∈ R b ×··· is the hidden pre-activation of the previous layer, and { A i : R → R } ai =1 is an ordered family of a basic activations, e.g., { relu , sigmoid , tanh } (we will discuss below more on the elements of this ordered set of activations).
Dynamically learned activation ( LA ) functions require a small number of trainable variables
w ∈ R d × a and b ∈ R 1 × a , and are deﬁned by transforming input tuples ( z , h ) into output tensors y through (note the parallel between the following equations and the pictorial representation in Figure 1c, where there is a direct correspondence on the roles of z , h and y between the formulas and the diagram):
[Equation]
where softmax rowwise denotes the matrix-matrix operation with entries deﬁned rowwise via softmax rowwise ( m )
j := softmax( m j ) , and LA elementwise ( h j,...
| z j ) denotes the result of applying
LA( · | z j ) elementwise to each entry of h j,... .
Note that during training, batch size is greater than one in which case z is a matrix, whereas during inference batch size is one for each user in which case z is a row vector.
So during training z j is the conditioning vector corresponding to the j -th sample, but during inference
z j is the conditioning vector corresponding to the j -th user in the discussion below.
Figure 1 highlights the qualitative and quantitative differences between our approach (Figure 1c) and existing state-of-the-art (SOTA) solutions (Figure 1a-b).
Concatenation approaches as depicted in
Fig.
1a can be deﬁned by A elementwise (F θ ([ z (cid:62) j , x (cid:62) j,..., : ] (cid:62) )) , where F θ denotes a common learnable transformation such as a dense, conv1d, conv2d or LSTM layer without activation and A : R → R denotes a generic activation such as the rectiﬁed linear unit.
Whereas, as shown in Fig.
1b, modulation approaches are deﬁned as A elementwise (G η (U µ ( z j ) (cid:12) x j,..., : + V ν ( z j ))) , where G η represents a common learnable transformation (which may be slightly different than F θ given their inputs have different shapes) and U µ : R d → R f and V ν : R d → R f are often taken as linear mappings (where d denotes the conditioning vectors dimension and f denotes the number of channels of x ).
In comparison to these SOTA approaches, our learned activation functions mechanism can simply be formulated as LA elementwise (G η ( x j,... ) | z j ) .
For simplicity, we use a dense layer in the ﬁgure (i.e., we take F θ and G η to be dense layers and f = 1 ), however, our approach is general and can be applied to any layer type, e.g, dense, conv1d, conv2d and LSTM.
From a qualitative point of view,
LAs conditions the non-linearities rather than the linearities of the network.
From a quantitative point of view, Figure 1 also highlights the superior compression abilities achieved by our proposed method.
In particular, concatenation approaches (Figure 1a) require ( d + u ) ∗ v parameters and modulation approaches (Figure 1b) require u ∗ v + d ∗ 2 ∗ f , where f denotes the number of channels in the input tensor x , which per channel is multiplied by a scaling factor and offset by a bias term.
The learned activation functions approach on the other hand, requires only u ∗ v + d ∗ a parameters.
For example, in most audio and video applications, our approach yields signiﬁcant savings of d ∗ ( v − a ) given that d (cid:29) 1 and v (cid:29) a , when compared to concatenation approaches.
The saving becomes d ∗ (2 ∗ f − a ) when compared to modulation approaches, given that often in such cases 2 ∗ f − a > 0 .
For temporal data, such as audio and video, the savings of our approach are even more signiﬁcant as in those applications the conditioning vector is concatenated with each time frame of the inputs and for f (cid:29) 1 the model requires larger parameter size.
In our approach the operational requirements do not change across data type, i.e., tensor dimensions.
3. H YPER - PARAMETERS
Basic Activations As discussed above, our conditioning approach relies on a set of standard activations provided for modelling.
Therefore, the selection of these basic activations is an important hyper-parameter in our approach.
Following are the key characteristics that should be taken into account when searching for an optimal set of activations:
• Dynamically learned activation coefﬁcients s j are all positive and sum to one.
Thus, some families of activations will generate learned activations that remain in the same family, however, this not always true.
For example, if all basic activations are all increasing functions, so is the learned activation.
Monotonic increasing property of the learned activation may not be retained if we include both increasing and decreasing functions in the basic activation set.
• The fact that s j are in the probability simplex means that the ranges of the basic activations play an important role in the ﬁnal learned activations.
One could consider basic activations with i) unbounded, ii) upper bounded, iii) lower bounded or iv) bounded ranges.
• Finally, the basic activations could instead be picked from well known basis functions.
For instance, Fourier basis or Chebyshev polynomials could be used to create bounded learned activations with compact support, and Hermite polynomials to create unbounded learned activations on the real line.
Note that this direction of investigation is outside the scope of our paper.
Initialization Choices Another important hyper-parameter to consider is what are the values of the dynamically learned coefﬁcients s j at initialization time for most conditioning vectors z j .
Given s j is a probability distribution, to start training with an unbiased model, they could be at initialization time approximately uniform, i.e., providing roughly the same weight to each of the basic activations for most z j .
Alternatively, they could be such that for most z j at the beginning of training the learned activations have a desired shape.
Therefore, trainable variables w and b should be initialized considering i) the statistics of the conditioning vectors z j , and ii) the shapes of the basic activations.
E XPERIMENTS P ART I: PSE FOR T ELEPHONY AND P RE - TRAINED ASR
In this section we consider the task of PSE, with the aim of enhancing a user’s voice to improve telephony and pre-trained ASR quality under babble (i.e., other speaker’s voices) or ambient noise, in real-world scenarios with only two seconds of enrolment audio of non-constrained speech.
4. D ATASETS
We consider two representative datasets:
LibriSpeech (Panayotov et al., 2015) and Voxforge (vox, 2006), which cover English and Spanish respectively.
For the English training set, we take 100h and 360h of clean speech from LibriSpeech, which are recorded using close-talk microphones, without any background noise.
Although, supervised learning approaches have shown great performance in sound enhancement tasks, it is often impossible to collect the mixed audio and its ground-truth sound sources from the same audio environment (Wisdom et al., 2020).
Furthermore, to evaluate performances of learned activation on realistic data, we create a training dataset by taking 32 .
5 h of
Spanish audio from Voxforge, which are mainly recorded with a far-ﬁeld microphone and contain noise.
Both datasets have audio recorded at 16kHz.
The raw datasets consist of tuples ( speech , transcript , speaker identiﬁer ).
For each pair of different speakers a and b , we collect two speech samples from a and one from b to create 4 -tuples (speech a , speech (cid:48) a + speech b , speech (cid:48) a , text (cid:48) a ) , with elements being: i ) a reference speech from user a to be passed through a speaker embedding model (Snyder et al., 2018) to create the conditioning vector, ii ) a speech from user a , different from that given to the embedding model, which is corrupted (at various db levels) with speech from user b , iii ) the ground-truth speech by user a present in the corrupted speech, and, iv ) a transcript of the ground-truth speech by user a .
All PSE models are trained in a supervised fashion, where the goal is to recover speech (cid:48) a from speech (cid:48) a + speech b as closely as possible for telephony applications and such that ASR(PSE(speech (cid:48) a +speech b ))
= text (cid:48)
a for ASR applications.
We also evaluate performances under ambient acoustic noise by constructing (speech a , speech (cid:48) a + noise , speech (cid:48) a , text (cid:48) a ) tuples, where noise is sampled from the DEMAND dataset (Thiemann et al., 2013).
2 h   y
RNN LA #   2 h RNN LA #   2 h
TDS LA #   2 h TDS LA #   2 h
TDS-RNN LA
#   2 h
TDS-RNN LA #
User A User B User C User D
User E
[Table] [Table]
4. B ASELINE M ODELS
A variety of architectures have been proposed lately for speech enhancement.
In this work, we consider architectures suitable for low-latency on-device deployment that have small memory footprints and operate in real-time.
With that in mind, we use the following three architectures as baselines:
• RNN.
These are RNN models with skip-connections (Takeuchi et al., 2020; Wang et al., 2020) (c.f., Figure 5a in Appendix A).
• TDS.
These models (Figure 5b in Appendix A) comprise of stacked time-depth-separable (TDS) convolution blocks (Isik et al., 2020; Luo & Mesgarani, 2019).
• TDS-RNN.
These are encoder-decoder style models with a separator block in between (Figure 5c in Appendix A).
Encoder and decoder are made of stacked TDS blocks and the separator of stacked RNN blocks (Choi et al., 2021).
Furthermore, we consider a different number of conditioning layers (#Cond.)
for each model family.
In particular, for RNN 8, for TDS 21 and for TDS–RNN 2 conditioning layers leading to 8, 42 andnodes in the models being inﬂuenced by the conditioning information (c.f., Figure 5 in Appendix
A).
We have done so to investigate also how the number of conditioning layers inﬂuences the personalization effects from the conditioning vectors (c.f., Appendix A.2).
In our experiments we apply LAs in all three families of models and perform extensive comparisons with the baselines in terms of performance, model size and latency.
In particular, we take the best performing baseline concatenation architectures, not the weights, and for every layer with a conditioning concatenation, we replace that with a modulation layer or a conditionally learned activation.
Finally we train the modulation models and the conditionally learned activation models from scratch, without performing any architectural hyper-parameter optimization (HPO).
As a representative of light weight-modulation approaches, we consider the Feature-wise Linear Modulation (FiLM)
(Perez et al., 2018) mechanism throughout.
Notably, our evaluation experiments give more advantages to the baseline concatenation models.
4. H YPER - PARAMETERS
Basic Activations
The choice of basic activation functions is an important hyper-parameter in our approach and we consider a comprehensive list of popular activation functions used in deep learning.
Speciﬁcally, we use the following ordered set as the basic activation functions: { A i : R → R } ai =1 = { elu , exponential , hard _ sigmoid , linear , relu , selu , sigmoid , softplus , softsign , swish , tanh } .
Initialization Choices We consider enrolment data (e.g., a short pre-deﬁned utterance spoken by the user once) to extract (using a (cid:96) 2 -normalized X-Vector model (Snyder et al., 2018))
a speech embedding vector of the target user, i.e., the owner of the device.
This speech embedding is used as the conditioning vector in PSE models to enhance the user’s voice and suppress unwanted voices and background noise.
Although, the embedding vectors in the training set are not perfectly zero mean and unit variance, the fact that they are (cid:96) 2 -normalized motivates us to take for initialization of the weight matrix in the LAs the Glorot uniform initializer and for the bias vector the zero initializer.
4. T RAINING S ETTINGS
All models considered in this work operate in the time-frequency domain.
We apply Short Time
Fourier Transform (STFT) to extract 512 coefﬁcients using a 32 ms window and with a stride ofms.
Models are trained in a data-parallel way with four GPUs using TensorFlow and Horovod.
We use batch size of 64, learning rates in [1e − 5 , 1e − 3] , exponential decay learning rate scheduler and early stopping (max epochs 100).
4. E VALUATION M ETRICS
We evaluate our models in terms of source-to-distortion ratio improvement (SDRi) (Comon & Jutten, 2010) and word-error-rate (WER) metrics.
A high SDRi indicates the improvement in signal quality for telephony and a low WER quantiﬁes good transcription quality of the downstream ASR task.
We use open-source Silero (sil, 2021)
ASR models (English and Spanish) in our evaluations.
4. R ESULTS
This subsection presents evaluation results for quantifying the effectiveness of learned activations (LA), compared to concatenation- and modulation-based conditioning approaches, on LibriSpeech (Table 1) and Voxforge (Table 2) datasets.
The results show that models with all three conditioning approaches improve telephony (high SDRi) and ASR (low WER) performances on both datasets.
We observe that LA and concatenation-based conditioning approaches yield very similar performances, indicating high efﬁcacy of the proposed LA approach.
Note that when evaluating ASR, it is also important that a good PSE model shows almost no degradation in WER, when clean audio is presented.
Interestingly in some cases in the concatenation-based approach, we see that higher success in removing babble noise, comes with an adverse impact in clean speech WER, mainly due to over-suppression (Wang et al., 2020).
Furthermore, Table 1–2 show that both concatenation and modulations produce signiﬁcantly larger models, i.e., up to 95% larger, compared to LA approaches.
Tables 1–2 highlight the trade-off between the number of parameters and quality metrics.
However, it is important also to consider the impact of the different approaches in terms of FLOPS and latency,
[Table]
as shown in Table 3 (where latency was measured by passing one second of data one hundred times by the models and summarized via mean and standard deviation), which demonstrates LAs are competitive in this dimension.
Speciﬁcally, LA is faster than standard concatenation approach with comparable quality, and slower than FiLM but with higher quality (i.e., higher SDRi and lower WER).
To gain a better understanding of how LAs adapt based on conditioning vectors, Figure 2 presents plots centered at the origin of the LAs for a PSE application conditioned on speaker embedding vectors extracted from enrolment audio from randomly selected users.
In particular, we can see that for all models i) in each layer, different users have different LAs, and ii) each user has different
LAs across different layers.
As such the visualization of the internal mechanisms of LAs, provides a tangible way to improve how we understand the manner in which models leverage conditioning vectors to inﬂuence predictions.
E XPERIMENTS P ART II: P ERSONALIZED ASR
In this section we consider the problem of personalized ASR, with the objective of improving ASR performance in single speaker scenarios.
This is a challenging task, especially in realistic setups with only a couple of seconds of enrolment audio with non-constrained speech which we explore below.
5. D ATASETS
We consider LibriSpeech (Panayotov et al., 2015) 1000h of English annotated audios with transcripts.
We augment each sample tuple (audio , transcript) to include two seconds enrollment audio from the same user (audio , transcript , enrollment) .
We ensure the enrollment audio is taken from a different sample from the same user.
For diversity during training the enrollment audio is selected randomly under the aforementioned constraint, whereas for evaluation it is always the same.
5. B ASELINE M ODELS
ASR.
For non-personalized ASR models we take the conformer encoder model architecture (Gulati et al., 2020) with a dense layer for character (with 28 characters, namely: ‘A’–‘Z’, ‘ ’ and ‘'’) or subword (with 753 subwords) text encoder trained with CTC loss and decoded via CTC decoder.
These models take as input an audio and output a predicted transcript.
PASR.
For personalized ASR we take the ASR architecture but replace the ReLU and Swish activations with our proposed LAs (see § 3.1).
We consider basic activations (see § 3.2) containing
ReLU and Swish, and an initialization of the bias (see, § 3.2) so that at initialization time, the LAs replacing ReLU are approximately ReLU, and the LAs replacing Swish are approximately Swish, a proﬁle which changes during training as a mechanism to enable personalization.
As a similar mechanism to the bias offset in LAs, we altered FiLM’s deﬁnition
A elementwise (G η (U µ ( z j ) (cid:12) x j,..., : + V ν ( z j ))) to A elementwise (G η ((1 + α · tanh(U µ ( z j )))
(cid:12) x j,..., : + β · tanh(V ν
( z j )))) with α and β as trainable variables, so that at initialization FiLM is approximately the identity function for most conditioning vectors.
As with non-personalized ASR, we consider character and subword text encoders trained with CTC loss and decoded by CTC decoder.
These models take as input an audio and a ﬁxed speaker embedding vector for each user computed from enrollment data by a speaker embedding network (Snyder et al., 2018), and output a predicted transcript.
5. H YPER - PARAMETERS
For consistency with previous experiments, we take as the basic activations those used in § 4.3.
For initialization choices as mentioned earlier we introduce a bias offset so that at initialization the softmax s described in § 3.1 is approximately one-hot to leverage the inductive bias of activations proven to work well in non-personalized settings.
Interestingly, we observed in our experiments that subword models seem to be more sensitive to this hyper-parameter than character models.
5. E VALUATION M ETRICS
For character and subword models we consider greedy (beam search with tops paths and beam width equal to one) and beam search (with a beam width of four) CTC decoders.
Once predicted transcripts are produced from the models, they are compared with ground-truth transcripts in terms of word error rate (WER) and character error rate (CER).
5. R ESULTS
We consider the performance of PASR models created from existing ASR models by replacing their ﬁxed activations with LAs.
To delve deeper into the effect of LAs on PASR, we consider two dimensions to our experiments, namely, in terms of whether i) training is performed only on the speaker embedding model as well as on the weights and biases of LA, or ii) training is done on all parameters.
In both cases, optimization is done with respect to lower CTC loss.
These settings are designed on the one hand to understand what are the effects of taking pre-trained ASR models and personalizing them by replacing their activations with LAs, and on the other hand to understand the capacity and convergence properties that LAs provide for PASR.
Before a ﬁne-grain analysis of the results below, note that similarly to Figure 2 for PSE, Figure 3 shows that LAs consistently create different activation proﬁles across users and layers for PASR as well.
5.5. T RAIN SELECTED PARAMETERS
Leaving the parameters of the original ASR intact, allows for switching between the original static activations and the LAs, which might be beneﬁcial for deployment scenarios lacking clean enrolment data.
We investigate this scenario by ﬁne-tuning only the speaker embedding model and LA parameters, which results in an overall 2% WER relative improvement which is a modest but signiﬁcant improvement given an already low WER/CER of the original ASR.
Figure 4 (top) shows that for some users this improvement is even more signiﬁcant, as high as 15% WER relative improvement.
5.5. T RAIN ALL PARAMETERS
In this section we investigate the performance of PASR models derived from training all their parameters after initializing their non-personalized components from existing ASR models.
Results for all users together Table 4 contains WER/CER results aggregated across all users of
LibriSpeech test-clean.
Overall the results show a consistent improvement in performance, i.e., lower WER/CER for personalized ASR via LAs compared with non-personalized ASR.
The results also show that subword models yield better WER, but character models give better CER, with the gains through personalization being higher for character than subword models, being as high as 19% relative WER improvement across all users.
Results for each user separately Figure 4 (bottom) shows plots of WER relative (
[Table]
[Figure]
T r a i n
L A
T r a i n a ll replacing the original activations with LAs as expected without training (ensured by an appropriate choice of the bias offset hyper-parameter as described in § 5.3), and the beneﬁts of training the personalized ASR, with signiﬁcant gains in WER per user, in terms of relative and absolute WER.
Furthermore, the gains can be seen to reach up to 40% and 35% relative improvement for some users for CTC greedy decoder and CTC beam search decoder respectively, which is a signiﬁcant improvement in the domain of ASR.
L IMITATIONS
Our evaluations are limited to two supervised audio domains, namely: i) PSE to improve telephony and pre-trained ASR quality for English and Spanish, under babble and ambient noise, and ii) personalized ASR for single speaker scenarios over English, based only on two seconds of enrollment data.
We nevertheless see value in assessing our approach in generative or image domains.
Another limitation stems from the fact that the evaluation is performed with speaker embeddings computed from clean enrolment data, which might not be available at deployment time.
So the robustness to this source of issues is not explored in our experimental setting.
This limitation is common in most, if not all studies, in these application domains.
C ONCLUSIONS
We introduced a new general method for designing conditional neural networks.
Unlike state-of-theart techniques, which are based on concatenation or modulation strategies, we presented a new form of conditioning by dynamically learning activations.
By conducting an extensive set of experiments, we highlighted the efﬁcacy of our modeling technique in terms of quality metrics and model sizes.
Although, we mainly focus on PSE under babble and ambient scenarios and personalized ASR for single speaker cases as the main application domains, we believe our approach will open ways for the generalized use of dynamically learned activation functions in many application domains. A. B ASELINE MODEL FOR PSE Figure 5 presents a pictorial representation of the PSE models introduced in § 4.2. [Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
y
TDS—RNN Model
Dense
Dense
[Table]
<
[Table]
latexit>
Decoder
TDSB TDSB
Encoder
TDSB TDSB
Filter
RNNB RNNB <latexit sha1_base64="
[Table]
=
[Table]
AAAB9XicbVDLSgMxFL1TX7W
[Table]
[Figure]
[Table]
TDS—RNN Model
Dense
Dense
[Table]
=<
[Table]
>
Decoder
TDSB TDSB
Encoder
TDSB TDSB
Filter
RNNB RNNB <latexit sha
[Table]
t e n a t i o n ( C ) /
M o d u l a t i o n ( M )
L ea r n e d A c t i v a t i o n s
A. R EGULARIZERS
We also investigate the use of regularizers during training for learning activation functions, in order to boost deployment and conditioning efﬁciency.
We consider two regularizers: entropy-based and t-SNE (Van der Maaten & Hinton, 2008).
Through entropy regularization we encourage learned activations to approximately select one element of a family of predeﬁned activations (with applications to efﬁciency).
Whereas, with t-SNE regularization we promote that similar/dissimilar conditioning vectors yield similar/dissimilar learned activations, thereby instilling the geometry of the speaker embedding space in the conditioning mechanism (for enhanced conditioning quality).
A.2. A PPROXIMATELY ONE - HOT ASSIGNMENTS AND GEOMETRY
We explore mainly two regularization techniques to promote certain qualitative properties in the learned activations during training.
The ﬁrst technique encourages the learned activations to approximately select one element of { A i : R → R } ai =1 , based on the conditioning vector.
Different non-linear functions require different amount of computational resources, thus biasing the learned activations towards a single known form can improve efﬁciently, in comparison to their weighted combinations.
The second technique guides training so that similar/dissimilar conditioning vectors yield similar/dissimilar learned activations, thereby preserving the geometry of the speaker embedding space in the conditioning mechanism.
Considering a particular use-case of PSE, there might be some variation in the conditioning vectors (i.e., speech samples collected during enrolment).
This turns into a challenge of selecting or aggregating these vectors to properly condition the network.
The use of our second technique for regularization during training could reduce the impact of such variations in conditioning vectors at deployment phase by increasing the stability of the network against subtle variations in the conditioning vectors.
Learning approximately one-hot assignments Sparse assignments can be encouraged by adding known regularizers, such as entroypy or (cid:96) 1 to the loss during training, scaled by a hyper-parameter α , i.e., α H( s ) or α (cid:107) s (cid:107) 1 .
Alternatively, sparsity can be promoted by considering a temperature parameter t ≤ 1 .
For example, a value lower than one makes the model more conﬁdent, whereas higher than one makes it less so.
Thus sparse activation can be learned as: s :=
softmax rowwise ( t − 1 ( z × w + b )) .
Approximately preserving conditioning vectors geometry Learned activations are built based on conditioning vectors, and we may expect these functions to have a discriminative property for the conditioning vectors they are based on.
In other words, clusters in z j space would be correlated to clusters in the space of learnt conditioned activations weights s j for similar/dissimilar conditioning vectors.
However, strong correlation may not happen automatically due to: i) the dimension of the conditioning vectors is often much larger than the number of basic activation functions a , i.e., d (cid:29) a , ii) the manner in which z j is used to produce s j may be affected by the fact that softmax is invariant to translation, i.e., softmax( v + c )
= softmax( v ) , and iii) the similarity/dissimilarity of the basic activations { A i : R → R } ai =1 .
High correlation can be promoted though by geometry aware high- to low-dimensional embeddings like t-SNE (Van der Maaten & Hinton, 2008).
Although typically used for data visualization, we instead leverage the t-SNE objective function as a regularizer in our loss function.
Speciﬁcally, we take t-SNE probabilities p , q ∈ [0 , 1] b × b deﬁned by p i,i :=
q i,i := 0 and for i (cid:54) =
j : p j | i :=
[Equation]
and add β KL ( p (cid:107) q ) to our loss function, where β is a hyper-parameter and KL denotes the Kullback–
Leibler divergence.
The minimization of the KL regularizer may be useful in applications, where conditioning vectors are naturally clustered such as in audio applications involving speaker embedding vectors, such as PSE, TTS, and speaker-dependent ASR.
Also in applications with discrete latent vectors (Oord et al., 2017), where the preservation of the geometry of the conditioning vectors in the learned activations may offer superior results or better insights into the modelling internals.
A.2. I MPACT OF R EGULARIZERS
We now investigate the impact of using regularizers for training PSE models.
We trained all models with two regularizes (c.f § A.2), which are used individually to analyze their unique beneﬁts (as discussed earlier).
Tables 5–6 present the performance of all models by using each regularizer with models trained on two datasets.
To show the effectiveness of the regularizers, we compare these results against those in Tables 1–2 for models learned without regularizers.
The results clearly demonstrate the improvement in performance of RNN and TDS models when trained with either of the regularizers.
The performance gain is consistent across both datasets, but there is a trade off with the impact on clean speech.
Moreover, we observe that entropy regularizer is outperformed by t-SNE regularizer.
This could be due to the fact that t-SNE regularizer is less restrictive allowing a wider range of combinations of the basic activations.
Whereas, entropy regularizer promotes the selection of only one of the basic activations.
Interestingly, the TDS-RNN models, which performed best without regularizers, get worse performance with regularizers.
This could be due to limited number of ﬁlter layers (i.e., only 2, compared with 8 and 42 for RNN and TDS models respectively) present in the model architecture.
Given that
LA was given only 11 basic activation to learn from, there could be merely 121 (i.e., 11 2 ) unique separations learned by LA.
This makes it difﬁcult for these models to successfully differentiate between all unique conditioning vectors which might contain way more separations.
Note, we considered as hyper-parameters only the values in α, β ∈ { 1e − 5 , 1e − 4 , 1e − 3 , 1e − 2 } , σ ∈ { 1 } and used the same learning rates as for training models without regularizers.
Due to limited computational budget, we could not perform an exhaustive search on these hyper-parameters.
A.2. C ORRELATION ANALYSIS
To understand the manner in which the models leverage the conditioning vectors together with inputs to predict outputs, we perform a correlation analysis between distance matrices of softmax values (of
LA) and of conditioning vectors.
For a random selection of embedding vectors { z j } 100 j =1 , we computed the weights s ( l ) j with j ∈ { 1 , . . .
, 100 } of the l LAs of a model.
Now, we compute the distance
[Table]
[Table]
[Table]
[Table]
TDS
[Table]
[Table]
[Table]
matrices for z j and s ( l ) j , which we refer to as Z and S ( l ) .
Here, the distance matrix is computed by taking the pair-wise cosine distances.
To get insights about how LAs perform conditioning, we compute the Spearman correlation between vec( Z ) and vec( S ( l ) ) .
This correlation is computed for all LAs (i.e., 8, 42 and 2 for RNN, TDS, TDS–RNN models).
This allows to better measure the impact of the conditioning vector across the depth (i.e., position of the LA) in the network.
In Figure 6 (bottom rows of each sub-ﬁgure)
we present the correlation values for each LA in all three models.
We observe there is a large variability in correlation values as the number of layers increases.
We do not see very strong correlation with a speciﬁc LA, which might be due to the fact that conditioning is performed at different stages.
In addition, we also present (shown in top rows of each sub-ﬁgure of Figure 6) the distance matrices
S ( l ) (for l which has the highest correlation), as well as Z (in the last column).
The overall structure of Z is approximately block diagonal with three blocks, is not well preserved when learning without regularizers given the blocks collapse to two, but is well preserved when learning with regularizers.
This is especially signiﬁcant given that conditioning vectors are high dimensional (in this example 256) but the weight vectors in LAs are low dimensional (in this case 11).
We also observe that the models with less number of LAs preserve much similar structure between S ( l ) and Z .
Given the networks have similar performance, this indicates that as the number of LAs decrease, the networks enforce higher degree of conditioning per LA.
A. I MPACT OF ENROLLMENT DATA ON AMBIENT NOISE
Tables 5 and 6 show the performance of various PSE models based on two seconds of enrollment data in terms of babble and ambient noise.
Although babble noise, i.e., other people talking, cannot be expected to be suppressed without knowledge of the owner’s voice proﬁle, clean and ambient noise on the other hand does not in principle require such enrollment data.
To investigate the performance of the various PSE models in the absence of enrolment data we have replaced it with vectors of random, zeros and ones, and measured the quality of PSE on ambient noise in Tables 7–8, which demonstrate that all architectures work well (compared to concatenation based conditioning approach) even without enrolment data for clean and ambient noise when using ones instead of conditioning vectors.
We also see that for the best architecture (TDS–RNN) that is the case not just with replacing by ones but also by random and zeros.
[Figure]
[Table]
[Table]