{'fraction_non_alphanumeric': 0.024222541793996046, 'fraction_numerical': 0.008089160524896638, 'mean_word_length': 5.302180685358255, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Towards Lightweight Controllable Audio Synthesis with Conditional Implicit Neural Representations

The high temporal resolution of audio and our perceptual sensitivity to small irregularities in waveforms make synthesizing at high sampling rates a complex and computationally intensive task, prohibiting real-time, controllable synthesis within many approaches. In this work we aim to shed light on the potential of Conditional Implicit Neural Representations (CINRs) as lightweight backbones in generative frameworks for audio synthesis. Our experiments show that small Periodic Conditional INRs (PCINRs) learn faster and generally produce quantitatively better audio reconstructions than Transposed Convolutional Neural Networks with equal parameter counts. However, their performance is very sensitive to activation scaling hyperparameters. When learning to represent more uniform sets, PCINRs tend to introduce artificial high-frequency components in reconstructions. We validate this noise can be minimized by applying standard weight regularization during training or decreasing the compositional depth of PCINRs, and suggest directions for future research.


Introduction
Controllable audio synthesis is a core element of creative sound design. Advancements in AI have made high-fidelity neural audio synthesis achievable. However, the temporal resolution of audio and our perceptual sensitivity to small irregularities in waveforms make high quality audio synthesis a complex and computationally intensive task, prohibiting real-time, controllable synthesis within many approaches. In this work we aim to shed light on the potential of Conditional Implicit Neural Representations (CINRs) as lightweight backbones in generative frameworks for audio synthesis.
Implicit neural representations (INRs) are neural networks used to approximate low-dimensional functions, trained to represent a single geometric object by mapping input coordinates to structural information at input locations. In contrast with other neural methods for representing geometric objects, the memory required to parameterize the object is independent of resolution, and only scales with its complexity. A corollary of this is that INRs have infinite resolution, as they can be sampled at arbitrary resolutions. Moreover, the fact that object samples are calculated independently allows sequential synthesis in memory-and/or computationally limited environments.
To apply the concept of INRs in the generative domain we frame generative modelling as learning a distribution of continuous functions [4]. This can be achieved by introducing conditioning methods to INRs, e.g. by concatenating latent codes to input coordinates [2] or modulating layer activations [1]. We refer to this family of architectures as CINRs.
The dominant architectures in INR literature are multilayer perceptrons (MLPs) with traditional nonlinearities. These networks are biased towards low-frequency functions, known as spectral bias [26]. Recently, several concurrent works have proposed to use periodic nonlinearities in INRs to facilitate learning finer, high-frequency details [22,28,30]. This increased expressiveness creates great potential for applying INRs in the domain of audio.
At the time of writing there is no published research applying CINRs to audio. To gauge the potential of CINRs for controllable audio synthesis we compare the ability of CINRs with periodic nonlinearities (PCINRs, based on π-GAN [1]) and transposed convolution neural networks (TCNNs, based on WaveGAN [3]) to reconstruct different medium-scale sets of NSYNTH [5] waveform samples.
Our experiments show that PCINRs learn faster and generally produce quantitatively better audio reconstructions than TCNNs with equal parameter counts. However, their performance is very sensitive to activation scaling hyperparameters. When learning to represent more uniform sets, PCINRs tend to introduce artificial high-frequency components in reconstructions. We validate this noise can be minimized by applying standard weight regularization during training or decreasing the compositional depth of PCINRs, and suggest directions for future research. 1 1

Overview of Methodology and Results
We investigate the ability of PCINRs to reconstruct two 1024 item sets of one second NSYNTH [5] waveform samples, NSYNTH Keyboard and NSYNTH Diverse. The performance of TCNNs with equal parameter counts is reported as a baseline. Tested PCINRs are conditioned using feature-wise linear modulation (FiLM [24]). In our FiLM implementation, latent codes modulate the activation scaling and shift before periodic nonlinearities are applied. Preliminary experiments showed highfrequency noise in the output of PCINRs. We test two regularization methods to minize this. PCINR Wide, an MLP with fewer layers and more hidden neurons. PCINR WR, the same MLP with weight regularization (WR) applied during training. See Figure 1. Details in Section 4 and 5.
Three quantitative evaluation metrics are reported: Contrastive learning-based multi-dimensional Deep Perceptual Audio similarity Metric (CDPAM [19]), Multi-resolution Short-Time Fourier Transform Mean Squared magnitude Error (Multi STFT MSE) and Mean Squared Error (MSE). Details in Section 6. Experimental results are reported in Table 1.

Overview of Conclusions and Future work
PCINRs exhibit exceptional expressiveness making them well-suited for modelling sets of highfrequency one-dimensional continuous functions such as audio. They perform superior with TCNNs in quantitative metrics representing quality, noise and similarity. Qualitatively, PCINRs model more details, but induce a certain amount of high-frequency noise in the output signal. They offer direct control for balancing this trade-off between expressiveness and local smoothness. However, the optimal hyperparameters and performance of PCINRs are very sensitive to dataset characteristics such as note-and timbral diversity. It is unknown if these observations hold for large-scale PCINRs.
An idea which looks promising in light of our results, yet unexplored in INR literature, is splitting PCINRs fully-connected MLP in parallel subnetworks. In Section 7 we argue this would reduce the propagation of noise induced at the recurrent stationary points in periodic nonlinearities, and by doing so minimize noise in the learning signal during training and in the output signal during synthesis. This argumentation is supported by multiple research directions [7,10,17,32].

Problem formulation
We are interested in learning to represent a set of continuous audio waveforms covered in dataset D consisting of N discretely sampled waveforms. Waveforms in datasets D are represented by point sets X i , consisting of M equally-spaced sampled amplitude values from the corresponding continuous amplitude functions y i : R 1 → R 1 : Where t j are time coordinates, and a j are the corresponding amplitudes or air pressure measurements at these time coordinates.
We represent audio waveforms by directly approximating amplitude functions y i with continuous functions f i : R 1 → R 1 , parameterized by MLPs φ i with sets of (learnable) parameters θ i ∈ Θ.
We assume parameter sets θ i live in a low-dimensional manifold. We define: • A function mapping latent representations z to intermediate latent representations w ∈ W, w = g(z) with g : Z → W, parameterized by a neural network ψ with learnable parameters ξ, also known as the latent mapping network. • A set of parameters α functioning as weights in φ i shared between representations.
, also known as the conditioning method.
The shared parameters α, latent mapping network ψ and conditioning method c together parameterize the conditional distribution p(θ|z), allowing us to map latent representations to the parameter space By learning z i during training using an autodecoder setup, obtaining w i by mapping z i through g(z i ), conditioning shared parameters α using w i and conditioning method c(w i , α), we obtain parameter set θ i for φ i . Then, we can evaluate φ i |θ i at time coordinates t j to obtain corresponding amplitude approximationsâ j : We optimize φ i |θ i to represent functions y i with absolute fidelity, MSE.

Architectural details
PCINR, based on π-GAN PCINR is adapted from the π-GAN [1] decoder, which is designed to produce implicit 3D radiance fields conditioned on z i . Ignoring the final parallel layer which integrates ray directions, π-GAN parameterizes φ i as an 8 layer MLP with sine nonlinearities and a constant amount of hidden units (256). The conditional distribution p(θ|z) is parameterized as follows: • Latent mapping network ψ consists of a 3 layer MLP with ReLU activations.
• The conditioning mechansism c falls under the category of FiLM. w γ and w β vectors are shared between layers, drastically decreasing the total size of w. • w γ does not scale layer activations directly, but is summed element-wise with the predefined activation scaling factor ω 0 we know from SIRENs, resulting in the following conditioning method c in layer k: 2 See figure 2 for a schematic overview of the network structure. 2 Technical descriptions in the paper of π-GAN seem to indicate that w γ k directly replaces ω 0,k . This resulted in instable behaviour in preliminary experiments. E. Chan shared parts of their implementation showing the discussed conditioning method in which w γ k and ω 0,k are summed. TCNN, based on WaveGAN TCNN is adapted from the WaveGAN decoder, which is based on of DCGAN [25]'s decoder, which popularized usage of GANs for image synthesis. This decoder uses transposed convolution to iteratively upsample low-resolution feature maps into a high-resolution image. In the WaveGAN decoder this is modified to work with audio by replacing its two-dimensional 5x5 filters with one-dimensional filters of length 25, and changing the stride factor for all convolutions from 2x2 to 4. These changes result in WaveGAN having the same number of parameters, numerical operations, and output dimensionality as DCGAN. Because DCGAN outputs 64x64 pixel images -equivalent to just 4096 audio samples -one additional layer is added to the model resulting in 16384 samples, slightly more than one second of audio at 16 kHz.
Latent code inference Autodecoders were introduced recently by Park et al. [23]. They have no encoder network. Latent embeddings z i are instead treated as learnable parameters rather than inferred from observations at training. By storing and updating intermediate latent embeddings z i with backpropagated training errors during training the decoder can function as an encoder, see Figure  3 for a schematic overview. Due to the direct optimization of latent embeddings z i , autodecoders generally require less training iterations to reconstruct datasets faithfully. Autodecoders are more parameter efficient by not having an encoder, resulting in less operations per iteration and lower memory requirements during training. Finally, autodecoders can alleviate incompatibility issues between encoders and decoders. This is especially useful when dealing with implicit neural representations (INRs), as these are less trivial to be mirrored to use as an encoder.
Feature-wise linear modulation (FiLM) FiLM proposes to apply element-wise 3 scaling and shifting of intermediate layer activations based on latent representations z i . Framing the method in the conceptual framework described in section 4.1 we note the following specifics: 1. Intermediate latent representations w have the dimensiononality of twice the total amount of hidden units of conditioned layers in θ i , one half for scaling (w γ ) and one half for shifting (w β ) layer activations.
2. The conditioning function c is applied as shown in the equation below. Note that parameters controlling bias θ b i are replaced by w β i . 3. All other parameters θ in φ i are parameterized by α, shared between representations.
FiLM is a unification of methods that modulate intermediate layer activations, as in normalization layers introduced originally in batch norm [13]. Other implementations include Dynamic Layer Norm for speech recognition [15], Conditional Instance Norm [8], Adaptive Instance Norm [12], and Conditional Batch Norm as used in Occupancy networks [21]. For all parameterizations of φ i & p(θ|z), the network architecture is changed such that parameter counts are in the order of 10 6 . TCNN's parameter count is reduced by reducing the number of channels throughout the WaveGAN decoder network by a factor of eight. Models are trained with latent codes of size 256

Objective function
In our experiments we use MSE with addition of MSE between the derivative of target signals approximated with forward finite difference, and the derivative of reconstructions evaluated in the PCINRs (For TCNNs this is approximated by forward finite difference derivative of the reconstruction): Where N is the batch size, M is the amount of sampled time coordinates per waveform and ∆ is the forward finite difference. The addition of a MSE of derivatives of signals is justified by consistent training improvements observed in preliminary experiments.
All reported results in table 1 are after training until convergence (∼ 5k epochs).

Weight regularization
We use weight regularization as in the following function: Note that weight regularization is only applied to the weights of φ i , not to those of ψ.

Datasets
We consider the following datasets: Preliminary tests of baseline parameterizations of φ i and p(θ|z) in the specific generative framework described in section 4.1 showed that φ i and p(θ|z) with a reasonable amount of parameters were uncapable of reconstructing large datasets 4 . Thus, we set the dataset size for the main experiments to be challenging, but not infeasible based on preliminary experiments.
We selected a dataset subset with the smallest range of subsequent notes within one instrument family cumulating to 1024 items. This turned out to be the keyboard instrument family, MIDI note 60 (C4, 261.63Hz) to 64 (E4, 329.63Hz). The dataset was sampled balancing for note counts. We refer to this dataset as NSYNTH Keyboard.
We selected the other split of NSYNTH to contrast with NSYNTH Keyboard in pitch-and timbral diversity. Furthermore, we selected MIDI notes 24 (C1, 32.70Hz) to 84 (C6, 1046.50Hz). We selected three instruments families to introduce more timbral diversity: keyboard, mallet and guitar. The dataset was sampled balancing for note-and instrument family counts. We refer to this dataset as NSYNTH Diverse.

Optimizer
Modern neural networks are typically trained with first-order gradient methods, which can be broadly categorized into two branches: the accelerated stochastic gradient descent family such as SGD with momentum and the adaptive learning rate methods, such as Adam. SGD methods use a global learning rate for all parameters, while adaptive methods compute an individual learning rate for each parameter. Compared to the SGD family, adaptive methods typically converge fast in the early training phases, but have poor generalization performance. In our baseline decoder comparison we compare Adam [16] and Adabelief [33]. AdaBelief consists of the same algorithm as Adam, but also considers curvature information by scaling update directions by the change in gradient. Preliminary experiments showed consistent, favourable results for Adabelief in all setups.

Hyperparameter search
In all experiments we optimize PCINR hyperparameters activation scaling first and activation scaling hidden. For every combination of dataset D, architecture and latent embedding inference method. We optimize these hyperparameters by running respective experiments in a short training regime of 200 epochs, using Bayesian Search [29] with Hyperband early stopping [18] to guide the search. Preliminary experiments indicated that optimal activation scaling or coordinate multiplier values are very sensitive to many architectural-and data characteristics. Thus, these values are swept using the described procedure in all experiments.

Evaluation
Capturing the perceptual fidelity of audio reconstructions in a metric is not straightforward. Many audio-to-audio distances exist, each with different sensitivities, indicating the complexity of the problem.
For this work, we decided to start with an extensive selection of metrics based on recent and established research in audio reconstruction and generation and implementation availability. Then, we select metrics for representing background noise presence and overall quality based on correlation with a small sample of human judgements of reconstructions.
Considered metrics We compared the following metrics: Multi resolution STFT MSE is calculated by averaging STFT magnitude MSE's as shown in the equation with hamming windowing for N=4 window sizes: {400, 800, 1600 3200}: CDPAM is a contrastive learning based perceptual audio similarity metric parameterized as a deep neural network. It is trained on a dataset of audio similarity judgements based on triplet comparisons, asking subjects: "Is A or B closer to reference C?".

Discussion and Future Work
In all evaluated setups latent representations z are optimized per audio sample. We do not enforce any distribution on the latent space, nor any other method to improve generative capabilities. Thus, the current implementations allow timbre interpolation, but these interpolations contain artifacts. It should also be noted that the current implementations are not built to do conditional generation (e.g. note-or text conditioned). Unseen samples can be encoded and synthesized by iteratively optimizing latent representations z.
PCINR gains are largest for MSE, which is optimized directly by the loss function during training. However, this does not translate to strong gains in perceptual metrics, showing that PCINRs do not contain a strong oscillatory bias and suggesting they could benefit significantly from spectral or perceptual objective functions.
We experimented with several spectral and perceptual objective functions, but none resulted in improvements. We argue this is caused by inconsistent gradients for near identical inputs and note three mutually reinforcing sources for this. Firstly, because the inputs of PCINRs are onedimensional coordinates, they process relatively many close to identical inputs. Secondly, the loss landscapes of perceptual and spectral objective functions are locally inconsistent [31]. Finally, periodic nonlinearities with high scaling factors contain a high density of stationary points, which cause locally inconsistent signal propagation (which also stimulates noise in output signals).
Taking the inferior label noise robustness observed in PCINRs into account, methods for dealing with noisy loss signals could be another promising avenue. This would allow the usage of spectral and perceptual reconstruction losses, which correlate much better with perceptual qualities than MSE.
Combined with the expressivity of sinusoidal representation networks conditioned using feature wise linear modulation this could greatly improve perceptual qualities of represented distributions. One might hope that gradient clipping can also aid in mitigating the detrimental effects of locally inconsistent loss functions on learning. However, it has been proven that in classification problems standard gradient clipping does not in general provide robustness to label noise [20].
The compositional nature of PCINRs makes it difficult to analyze representation characteristics in a signal processing context. Multiplicative filter networks [6] (MFNs) can be viewed as linear function approximators over an exponential number of Fourier or Gabor basis functions. This establishes a connection of the network architecture with the traditional Fourier and Gabor wavelet transforms, which are extensively studied in literature and widely used in many application domains, especially audio.
Comparisons with MFNs would be useful to indicate if the compositional depth of PCINRs form a substantial benefit. In the experiments reported by the authors, MFNs show similar performance as SIRENs in parameter equal experiments, and larger gains in performance when increasing network depth and width. We indeed found PCINRs to lack in terms of scaling gains. Combined with the intuition that Fourier-based MFNs contain a strong oscillatory bias, the architecture is a promising avenue for future research in the area of implicit neural audio synthesis.
Another idea which looks promising in the light of our results, still unexplored in current INR literature, is that of splitting the classically fully-connected MLP parametrizing INR's in multiple parallel subnetworks. This could reduce the propagation of noise induced at stationary points and cancel noise in output by aggre-gating multiple independent noise sources. This argumentation is supported by multiple research directions.
Assuming similar principles are shared between channels in convolutional neural networks and subnetworks in INRs, several publications [17,32] show that increasing the amount of kernels in Resnets has profound effects on reducing chaotic behaviour of loss landscapes.
The concept of combining the outputs of parallel subnetworks also has clear analogies to the field of ensemble methods, which could provide further theoretical foundations relating to this idea. For example, recent work of Fort et al. [7] shows how different randomly initialized CNN's trained for classification problems tend to explore diverse modes in function space, resulting in improved robustness. We found that averaging waveform reproductions of independently trained conditional INR's worked well in mitigating noisy components, indicating that similar principles might apply.

Broader Impact
The development of neural audio synthesis technologies has the potential to negatively impact musicians who make a living as professional performers. To what extent this is already occurring is unclear, however, it is consistent with a trend of increased access to music production methods that had previously been reserved primarily for professional recording studios.