Aurelio Patelli

Ilyas Djafer-Cherif

Igor S Aranson

Eric Bertin

Hugues Chaté

Understanding dense active nematics from microscopic models

We study dry, dense active nematics at both particle and continuous levels. Specifically, extending the Boltzmann-Ginzburg-Landau approach, we derive well-behaved hydrodynamic equations from a Vicsek-style model with nematic alignment and pairwise repulsion. An extensive study of the phase diagram shows qualitative agreement between the two levels of description. We find in particular that the dynamics of topological defects strongly depends on parameters and can lead to "arch" solutions forming a globally polar, smectic arrangement of Néel walls. We show how these configurations are at the origin of the defect ordered states reported previously. This work offers a detailed understanding of the theoretical description of dense active nematics directly rooted in their microscopic dynamics.

Active nematics (collections of self-propelled elongated particles aligning by collisions) has been the subject of rather intense theoretical attention . This flurry of papers was largely triggered by a few remarkable experiments [22][START_REF] Zhou | Proc. Natl. Acad. Sci[END_REF][START_REF] Creppy | [END_REF][START_REF] Guillamat | Proc. Natl. Acad. Sci. USA[END_REF][START_REF] Guillamat | [END_REF][27][28][29][30][31] -see also [32,33] for recent reviews. In particular, Dogic et al. [22] studied a suspension of bundles of stabilized microtubules and clusters of kinesins motor proteins sandwiched at an oil-water interface. This revealed sustained regimes of 'nematic turbulence' with prominent motion of ± 1 2 topological defects, including intriguing 'defect ordered states' in which + 1 2 defects seem to be ordered on very large scales despite an overall disordered background.

Most theoretical efforts towards accounting for these remarkable experiments fall into two categories: microscopic, active particle models [3,22,[START_REF] Li | Proc. Natl. Acad. Sci. USA[END_REF] and continuum descriptions in terms of deterministic hydrodynamic equations [5,8,9,11]. The microscopic models are mostly 'dry', i.e., they neglect the fluid surrounding the active particles, while mostly 'wet' continuous descriptions, i.e. including a Stokes equation describing this fluid, have been considered. Dry continuous descriptions have also been written by enslaving the fluid [10,12,13]. Whereas all these works have had some success in accounting for the properties observed experimentally, they lack a direct connection between the microscopic and the macroscopic level: the proposed continuous descriptions have not been studied in parallel to particle-based models. It is thus impossible to relate clearly their many parameters to those of any underlying microscopic dynamics.

In this Letter, we bridge the gap between particlebased models and continuous theories for dense active nematics systems, restricting ourselves to the dry case. Extending the Boltzmann-Ginzburg-Landau approach of [START_REF] Peshkov | [END_REF][36][37], we derive well-behaved hydrodynamic equations from a Vicsek-style active nematics model with alignment and repulsion interactions. An extensive study of the phase diagrams of both the particle model and the hydrodynamic equations (varying the key parameters of the microscopic dynamics) shows qualitative agreement between the two levels of description. Among our salient results, we find that the dynamics of topological defects strongly depends on specific parameters. We also uncover 'arch' solutions forming a globally polar, smectic arrangement of Néel walls that coexist with the homogeneous nematic state in large regions of parameter space. We show them to be at the origin of 'defect ordered states' reported previously in [13,22]. Our work offers an understanding of the theoretical description of dense active nematics directly rooted in their microscopic dynamics and a unified account of previous partial results.

The microscopic, dry models proposed so far for dense active nematics rely on volume exclusion effects between elongated particles [3,22]. Here we use a Vicsek-style model instead, where pointwise particles interact with those within a fixed distance [38,39]. This makes both the derivation of hydrodynamic equations and an extensive numerical study easier. Specifically, we study a variant of the model introduced in [40] for the study of active smectics. We consider point particles moving at constant speed v 0 along the unit vector e(θ) defined by their heading θ in a rectangular domain of size L x × L y with periodic boundary conditions. At discrete unit timesteps, the position r i and heading θ i of particle i are updated according to:

r t+1 i = r t i + v 0 e(θ t+1 i ) (1)
θ t+1 i = arg (t) sgn(cos(θ t i -θ t j )) e(θ t j ) j +β rt ji j + ηχ t i (2)
where

χ t i ∈ [-π 2 , π 2
] is an angular white noise drawn from a uniform distribution, η is a parameter setting the strength of the angular noise, = ±1 reverses sign with probability rate k ∈ [0, 0.5], rji is the unit vector pointing from particle j to i, and the average is taken over the neighbors j within unit distance of particle i (including i for the alignment, i.e. the first term in (2)). The pairwise repulsion plays the role of a 'torque' and has constant modulus with coupling β. The interaction range is the same for both alignment and repulsion.

Without repulsion (β = 0), this model, for large reversal rate k, is the minimal model for active nematics introduced in [41] and studied more recently in [42,43], while without velocity reversals (k = 0) it is the Vicsekstyle model for 'self-propelled rods' of [36]. Figures 1a,b show how the typical (ρ 0 , η) phase diagram of these repulsion-free models changes in the presence of repulsion. First, the band-chaos coexistence phase bordering the order/disorder black line is too small to be seen at the system sizes and densities involved. Repulsion induces the emergence of new phases below this black line: For k = 0.5 (Fig. 1b), "arch" solutions (described in detail below) coexist with the defect-free nematic liquid at large-enough density (blue region). For rods (k = 0, Fig. 1a), an inner region of nematic chaos (in red) appears deep in the ordered phase [48]. Figures 1c,d show how the two limit cases above (k = 0 and k = 0.5) are connected when the reversal rate k is varied. In the (ρ 0 , k) plane (at η = 0.1, Fig. 1c), the regions of nematic chaos and arch solutions get closer to each other as ρ 0 gets larger. The gap in between becomes narrower as the system size in increased (not shown). In the (k, η) plane (at ρ 0 = 4, Fig. 1d), both the nematic chaos region and the arch solutions disappear when approaching the basic isotropic/nematic black transition line.

Nematic chaos is characterized by local nematic order but global disorder 'mediated' by ± 1 2 topological defects. It has long but finite correlations lengths and times, and is the result of a longitudinal instability of the homogeneous nematic, similar to that observed generically in the wet case. This instability never saturates into regular undulations, except in small systems. Instead, defects are always nucleated and nematic chaos sets in.

The arch solutions consist of a smectic pattern of rather sharp walls akin to Néel-or π-walls observed in some equilibrium liquid crystals (Fig. 2) [44]. Starting from random initial conditions, local nematic order quickly arises, defects are created, and move across the periodic boundaries. In a large-enough system, this dynamics often results in some solution comprising several arches, which are found more frequently than the defectfree homogeneous nematic state (Fig. 2a,b). Each arch displays local nematic order but is a globally polar object. Particle trajectories show weak but regular drift, with a velocity depending on their position across the arch pattern. Characteristic profiles of density, nematic and drift velocity (polar order) are shown in Fig. 2c. Arches do not have a preferred size: at fixed parameter values, there is a minimal width below which they disappear, but there is no maximal width (not shown). They do form a regular pattern, though: starting from a configuration made of n arches of various width, one observes that the total system slowly evolves toward n arches of equal width.

We now turn to the derivation of hydrodynamic equations for dense active nematics following the approach used for dilute Vicsek-style models in [START_REF] Peshkov | [END_REF]37,45]. The starting point is a Boltzmann equation governing f (r, θ, t), the probability (density) of finding a particle at position r, with orientation θ, at time t. This equation extends that used in [45] with a term describing velocity reversals at rate a, as in [43]:

∂ t f + v 0 e(θ) • ∇f = λ[ f (θ -η) η -f (θ)] + I col [f ] +a[f (θ + π) -f (θ)] ( 3
)
where λ is a tumbling rate, ∇ the gradient operator, and . . . η indicates an average over the noise distribution P (η). The collision integral

I col [f ] = π -π dθ 1 π -π dθ 2 f (r, θ 1 ) ∞ 0 ds s π -π dφ K(s, φ, θ 1 , θ 2 ) ×f (r+se(φ), θ 2 ) δ Ψ(θ 1 , θ 2 )+η-θ η -δ(θ 1 -θ) (4)
where Ψ is the π-periodic nematic alignment function

[Ψ(θ 1 , θ 2 ) = 1 2 (θ 2 -θ 1 ) for -π 2 < θ 2 -θ 1 < π 2 ]
, incorporates the distance-dependent repulsive interaction via the dependence of the collision kernel K(s, φ, θ 1 , θ 2 ) on the relative position rr ≡ se(φ) of the two colliding particles; δ is a 2π-periodic Dirac distribution. Suppose that the two particles are hard disks of diameter d 0 . The angle φ is an impact parameter defined by the position of the contact point at collision. The probability to collide within an infinitesimal interval dφ around φ is proportional to cos(φ -θ 12 )dφ where θ 12 is the direction of e(θ 1 ) -e(θ 2 ) [collision occurs only if cos(φ -θ 12 ) > 0]. Kernel K is thus modified from its form K(θ 1 , θ 2 ) = 2| sin θ1-θ2 2 | for ballistic particles to

K = 2g(s) sin θ 1 -θ 2 2 cos(φ-θ 12 ) Θ [cos (φ-θ 12 )] (5)
where Θ(x) is the Heaviside function and g(s) is an integrable function over the interval [0, d 0 ] modeling repulsion between soft spheres (g(s) = δ(s -d 0 ) in the hard spheres limit). Finally, only small variations of f are expected over the distance s between colliding particles, so that we write

f (r+se(φ), θ 2 ) ≈ [1+se(φ)•∇]f (r, θ 2 ) (6)
The tumbling rate λ and the elementary size d 0 can be set to unity without loss of generality, but the particle speed v 0 cannot be scaled out here. Using (6), the Boltzmann equation is expressed as a hierarchy of equations in terms of complex modes f k given by f k (r) = π -π dθe ıkθ f (r, θ). In addition to f 0 = ρ, the density field, the fields of interest here are both f 1 and f 2 which are related to polarity vector and the nematic tensorial fields [49]. This hierarchy is truncated and closed with the scaling ansatz used in [45] for the dilute case, 3), we obtain the closed equations

∇ ∼ ∂ t ∼ δρ ∼ , f 2k-1 ∼ f 2k ∼ |k| . At order O(
∂ t ρ = -1 2 v 0 ( * f 1 + f * 1 ) ( 7
)
∂ t f 1 = (α[ρ] -β|f 2 | 2 )f 1 + ζf * 1 f 2 -π 0 [ρ] ρ -π 2 [ρ] * f 2 + γ 2 f 2 f * 2 + γ 1 f * 2 f 2 -λ n f 2 * ρ + λ 1 f 1 * f 1 + λ 2 f 1 f * 1 + λ 3 f * 1 f 1 ( 8
)
∂ t f 2 = (µ[ρ] + τ |f 1 | 2 -ξ|f 2 | 2 )f 2 + ωf 2 1 + ν f 2 -π 1 [ρ] f 1 + χ 1 * (f 1 f 2 ) + χ 2 f 2 * f 1 + χ 3 f 2 f * 1 + κ 1 f * 1 f 2 + κ 2 f 1 ρ (9)
where = ∂ x + i∂ y , * = ∂ x -i∂ y , = * . These equations include those derived in [START_REF] Peshkov | [END_REF]45,46] for the case of dilute rods; the last line in ( 8) and ( 9) contain the new terms due to repulsion, whose coefficients depend on the first moments of g(s). The expressions of all coefficients have been derived; only their dependence on ρ is indicated explicitly above. These equations are formally very close to those obtained when enslaving the fluid in wet active nematics [10,12,13]. A detailed discussion of their structure will be given elsewhere [47]. They possess two main uniform solutions, the disordered (ρ = ρ 0 , f 1 = f 2 = 0) and the nematically-ordered one (ρ = ρ 0 ,

f 1 = 0, |f 2 | 2 = µ[ρ 0 ]/ξ).
The uniform disorder solution is linearly stable whenever µ[ρ 0 ] < 0. For µ[ρ 0 ] > 0, the nematic uniform solution exists. Its full linear stability analysis was performed semi-numerically. Without repulsion, and for a = 0 and a → ∞, we recover the simple phase diagrams found respectively in [37,45]. With repulsion (Fig. 3), the transversal instability region near the µ[ρ] = 0 line becomes very thin, and a new, mostly longitudinal instability of the uniform nematic solution emerges in the large density, low noise, and low reversal rate region (Fig. 3a).

We now study the inhomogeneous solutions of our hydrodynamic equations. As in the microscopic model, the longitudinal instability never saturates into stable undulations if the system size is large enough. It always leads to a nematic chaos regime qualitatively similar to that of the particle model. Where only the homogeneous nematic state is stable, we found no other solution, so that the regions of linear instability described in Fig. 3 are one to one with those of nematic chaos.

Equations (7,8,9) also support stable arch solutions coexisting with the homogeneous nematic state. These solutions are qualitatively similar to those observed in the microscopic model (Fig. 2c): at given parameter values, arches have a minimal width but no typical/preferred size. They eventually form a regular smectic pattern. They are globally polar objects with polar drift now encoded explicitly in the f 1 field. Note however, that the f 1 field profiles are rather different from the polar drift profiles recorded in the microscopic model (Fig. 2c), indicating a strong influence of fluctuations on this typically small field. The stability domain of arches is somewhat tedious to determine. A careful numerical investigation for a fixed-size system revealed that it is only in rough qualitative agreement with that found in the microscopic model (Fig. 3c). Again, we attribute this difference to the absence of fluctuations: near the bottom of the grey region in Fig. 3c, arch solutions are "fragile" and probably do not resist even small amounts of noise. At the fluctuating level of the particle-based model, all these fragile solutions disappear, leaving the smaller regions of stable arches reported in Figs. 1c,d.

We now examine in some detail the dynamics and interaction of ± 1 2 defects in both our microscopic model and hydrodynamic equations. Previous works have investigated defects in the nematic chaos (or nematic turbulence) regime, mostly in wet systems [3-6, 8-10, 13, 14, 17, 19-21, 30, 31]. Here, in an attempt to disentangle the consequences of the linear longitudinal instability (leading to chaos) from more intrinsic defect properties, we study the fate of a ± 1 2 pair of defects introduced in the uniform nematic state, using parameters values for which this state is the only stable solution. In such conditions, the two defects eventually merge and annihilate, since the spontaneous nucleation of a pair is never observed on the scales studied here. Increasing system size and the initial distance separating defects they can be observed for very long times. We mostly studied the fate of the configuration shown in Fig. 4a. For both the microscopic model and the hydrodynamic equations, we first observe that the + 1 2 defect has a well-defined asymptotic velocity v + in the limit of infinite separation distance. The -1 2 defect, on the other hand, has a vanishing velocity in this limit with a diffusive behavior driven by the fluctuations. This is in agreement with previous works. However, the velocity of the + 1 2 defect depends strikingly on the nominal particle speed v 0 and the reversal rate: in both the microscopic model and the hydrodynamic equations, it can even change sign (Fig. 4b), whereas + 1 2 defects were only reported to move with their cap ahead (i.e. upward here) before. (Note though that both signs are considered in [19,21].) We conjecture that in wet active nematics the velocity of the + 1 2 defect in the fluid frame could be found to take a different sign depending on swimming speed and/or reversal rate of the active particles involved. This has direct consequences on the existence of defect ordered states. No such regime was observed at the deterministic hydrodynamic level. This remarkable dynamics arises only for the microscopic model when v + > 0, for parameter values bordering the domain of observation of arch solutions, where fluctuations are strong enough to nucleate defect pairs. When v + > 0, freshly created pairs unbind quasi-deterministically (for v + < 0, they recom-bine), and they continuously remodel the underlying arch pattern without breaking its global polar order (Fig. 4c). Thus, the global ordering of + 1 2 defects -they flockonly reflects that of the nearby arch pattern. This elucidates the origin of the defect ordered state reported for the microscopic model studied in [22] (see also [12,17] for similar, but distinct situations).

To summarize, we have bridged the gap between the microscopic and the hydrodynamic level in dense, dry active nematics. The Boltzmann-Ginzburg-Landau approach has provided well-behaved hydrodynamic equations whose solutions are in good qualitative agreement with the collective states of the original particle model. This comparison was only possible thanks to the expression of hydrodynamic transport coefficients in terms of the microscopic control parameters. With respect to the dilute case, the phase diagram contains two main new features: (i) a large region at low reversal rate where the homogeneous nematic state is unstable at low noise and leaves places to nematic chaos, and (ii) multiple arch solutions that coexist with the nematic state at large reversal rate. These solutions form globally polar smectic patterns at the origin of the heretofore somewhat mysterious defect ordered states. We also demonstrated that the properties of the ubiquitous ± 1 2 topological defects depend strongly on microscopic parameters such as the reversal rate and the nominal speed of particles. Future work will be devoted to obtaining a connection between the microscopic and hydrodynamic level similar to that presented here in the case of wet active nematics.

zero reversal rates. These bands constitute a marginal phenomenon in the context of this paper.

[49] The polarization vector is P = ( {f1}, {f1}) while the independent components of the nematic tensor are Qxx = {f2} and Qxy = {f2}.

  FIG. 1. (color online) Phase diagram of the particle model (β = 0.5, v0 = 0.3, 256 × 256 periodic box). (a,b): (ρ0, η) plane for the rods (k = 0) and active nematics (k = 0.5) cases. (c): (ρ0, k) plane at η = 0.1. (d): (k, η) plane at ρ0 = 4.

FIG. 2 .

 2 FIG. 2. Arch solutions. (a) snapshot of a steady pattern of arches in the microscopic model (L = 256, ρ0 = 3 v = 0.3, η = 0.1, β = 0.5, k = 0.5, particles colored by their orientation). (b) zoom on one of the arches seen in (a) (particles' orientation marked by small double arrows) (c) profiles of density, nematic and polar order (modulus and direction) for the microscopic model (left, same parameters as (a)) and the hydrodynamic equations (ρ0 = 1, a = 10, σ = 0.1, b1 = 0.25).

FIG. 3 .

 3 FIG. 3. Phase diagram of hydrodynamic equations. (a): (ρ0, σ) plane for a = 0.4. (b): (a, σ) plane for ρ0 = 1.5. (c): (ρ0, a) plane for σ = 0.15. Colormap: angle of most unstable wavenumber, if any. The thin green region along the basic order/disorder line is the transverse banding instability. Orange region: longitudinal instability leading to nematic chaos. In the grey region, multiple arch solutions coexist with the homogeneous nematic state (shown only on panel (c)).

FIG. 4 .

 4 FIG. 4. Defects dynamics and defect ordered states. (a): typical configuration during initial motion at 'asymptotic' velocities (microscopic model). (b): asymptotic velocity v + of the + 1 2 defect (along the vertical axis in (a)) vs v0. Top: microscopic model (ρ0 = 4, η = 0.1, β = 0.5, k = 0.5). Bottom: hydrodynamic equations (ρ0 = 3, σ = 0.15, a = 8.0, b1 = 0.25) (c) snapshot of defect ordered state (microscopic model, ρ0 = 4, η = 0.1, β = 0.5, k = 0.5). Colors as in Fig. 2a with superimposed -1 2 (triangles) and + 1 2 defects (circles with red arrows showing the direction of motion).


Nicolas Turpault

Romain Serizel

Emmanuel Vincent

LIMITATIONS OF WEAK LABELS FOR EMBEDDING AND TAGGING

Keywords: Weak labels, triplet loss, prototypical network, audio tagging, audio embedding

Many datasets and approaches in ambient sound analysis use weakly labeled data. Weak labels are employed because annotating every data sample with a strong label is too expensive. Yet, their impact on the performance in comparison to strong labels remains unclear. Indeed, weak labels must often be dealt with at the same time as other challenges, namely multiple labels per sample, unbalanced classes and/or overlapping events. In this paper, we formulate a supervised learning problem which involves weak labels. We create a dataset that focuses on the difference between strong and weak labels as opposed to other challenges. We investigate the impact of weak labels when training an embedding or an end-to-end classifier. Different experimental scenarios are discussed to provide insights into which applications are most sensitive to weakly labeled data.

INTRODUCTION

Sound carries a lot of information that can provide important information on our environment. In recent years, interest in ambient sound analysis has grown in particular due to the numerous potential applications [START_REF] Virtanen | Computational Analysis of Sound Scenes and Events[END_REF]. Most current approaches rely on training "big" classifiers in an end-to-end fashion on large-scale labeled data. An alternative approach is to learn an intermediate representation or embedding of the data that can allow for better generalization, shorter training time and smaller labeled data requirements by separating the time-consuming stage of learning the embedding from the final stage of training a smaller classifier. This approach has been used successfully in various domains related to audio signal processing [START_REF] Pascual | Learning problem-agnostic speech representations from multiple self-supervised tasks[END_REF][START_REF] Van Der Maaten | Stochastic triplet embedding[END_REF].

Several attempts towards learning meaningful embeddings have been made in the field of ambient sound analysis relying on audioonly [START_REF] Xu | Unsupervised feature learning based on deep models for environmental audio tagging[END_REF][START_REF] Cartwright | TRICY-CLE: Audio representation learning from sensor network data using self-supervision[END_REF][START_REF] Pons | Training neural audio classifiers with few data[END_REF] or audiovisual data [START_REF] Cramer | Look, listen, and learn more: Design choices for deep audio embeddings[END_REF]. These approaches are either unsupervised or based on a very small amount of labeled data. Some supervised approaches have been proposed that can exploit labeled data to learn an embedding with a classifier that is later truncated [START_REF] Hershey | CNN architectures for large-scale audio classification[END_REF] or to learn the embedding using sampling methods like triplet networks [START_REF] Weinberger | Distance metric learning for large margin nearest neighbor classification[END_REF] or prototypical networks [START_REF] Snell | Prototypical networks for few-shot learning[END_REF]. Tokozume et al. [START_REF] Tokozume | Learning from between-class examples for deep sound recognition[END_REF] explained how embeddings can be learned by mixing two examples and predicting the ratio of the mix. However the extension of these approaches to weakly labeled data remains an open issue.

Weak labels consist of indicating the presence of a label in a segment without any information about the number of instances or This work was made with the support of the French National Research Agency, in the framework of the project LEAUDS "Learning to understand audio scenes" (ANR-18-CE23-0020) and the French region Grand-Est. Experiments presented in this paper were carried out using the Grid'5000 testbed, supported by a scientific interest group hosted by Inria and including CNRS, RENATER and several Universities as well as other organizations (see https://www.grid5000.fr).

their time localization in the recording. This can be considered as introducing noise in the labels as opposed to strong labels that can be considered as clean, accurate labels. Weak labels form a recurring challenge in various machine learning applications [START_REF] Lu | Learning from weak and noisy labels for semantic segmentation[END_REF][START_REF] Schlüter | Learning to pinpoint singing voice from weakly labeled examples[END_REF] including ambient sound analysis [START_REF] Kumar | Audio event detection using weakly labeled data[END_REF]. Since obtaining enough strongly labeled data is usually too expensive, a common choice is to gather a sufficient amount of weakly labeled data. For instance, Task 4 of the Detection and Classification of Acoustic Scene and Events (DCASE) challenge 1 has provided weakly labeled data since 2018.

The use of weakly labeled data to train a sound event detection system, which outputs labels together with their time localization in a segment of audio, has been studied in recent years [START_REF] Mcfee | Adaptive pooling operators for weakly labeled sound event detection[END_REF][START_REF] Serizel | Sound event detection from partially annotated data: Trends and challenges[END_REF][START_REF] Shah | A closer look at weak label learning for audio events[END_REF]. A common approach is to use multi-instance learning [START_REF] Kumar | Audio event detection using weakly labeled data[END_REF] to predict strong labels while training on weak labels only. The top performing systems for DCASE Task 4 used a mean-teacher model [START_REF] Lin | Guided learning convolution system for DCASE 2019 task 4[END_REF][START_REF] Delphin-Poulat | Mean teacher with data augmentation for DCASE 2019 task 4[END_REF]. However, from the evaluation reports, it is hard to analyze how much weakly labeled data and the strongly labeled data is used for training and the impact of this distribution on the performance.

Shah et al. [START_REF] Shah | A closer look at weak label learning for audio events[END_REF] analyzed the impact of weak labels using Audioset [START_REF] Gemmeke | Audio set: An ontology and human-labeled dataset for audio events[END_REF] (which is already weakly labeled) and measured the performance degradation when extending the length of the original 10 s segments to 30 s or 60 s. Audioset has the advantage of being real data, but this has the inherent drawback of posing several additional challenges that are difficult to analyze separately: multiple labels per segment, unbalanced classes, and overlapping events. Tokozume et al. [START_REF] Tokozume | Learning from between-class examples for deep sound recognition[END_REF] used data from UrbanSound8k [START_REF] Salamon | A dataset and taxonomy for urban sound research[END_REF], a synthetic dataset composed of urban sound recordings extracted from Freesound [START_REF] Font | Freesound technical demo[END_REF] and verified by human annotators. The segments are mostly strongly labeled and last up to 4 s.

In order to properly tackle the challenge of weak labels, we need strongly labeled events in longer recordings so that we can simulate weaker labels in a controlled way. Also, we want a single event per recording so as to focus on the challenge of weak labels and avoid multiple labels, unbalanced classes, and overlapping events which could be considered in future experiments. To do so, we propose to create a synthetic dataset by combining ambient sound events from Freesound with a background sound. This approach is directly inspired by the DESED synthetic dataset [START_REF] Turpault | Sound event detection in domestic environments with weakly labeled data and soundscape synthesis[END_REF].

Our contributions in this paper are the formulation of the problem specific to supervised learning using weak labels for embedding learning and tagging, and the experimental analysis using several embedding learning methods in order not to depend on a specific method. The dataset and the code are available 2 .

The remainder of this manuscript is organized as follows. Section 2 describes the different methods to learn embeddings and perform tagging. Section 3 introduces the proposed dataset. Section 4 describes the experiments. Section 5 discusses the results and conclusions are provided in Section 6.

LEARNING EMBEDDINGS

Let C be a set of K classes. We have a dataset

D = {(xi, yi)} N i=1
where xi is a time-frequency representation of the input data and yi = [yi,1, ..., yi,K ] is a vector containing the labels with y i,k ∈ {0, 1} indicating whether the sound event class k is present in the clip or not. Our goal is to learn an embedding E that can easily discriminate the classes k ∈ C . The embedding network is followed by a classifier G which performs audio tagging, i.e., detecting the sound event classes that are present within an audio clip, regardless of their time boundaries. E and G can be trained jointly (end-to-end classifier) or E can be trained separately from G (triplet network or prototypical network). We detail these three approaches below.

End-to-end classifier

The end-to-end approach consists of jointly training E and G to minimize a classification cost. In the following, we minimize the binary cross-entropy

k -y i,k log(G(E(xi)) k ) -(1 -y i,k ) log(1 -G(E(xi)) k ). (1)
Since E is not trained to optimize an explicit distance, there is no such distance between the embeddings learned.

Triplet network

In the triplet network based approach, we consider triplets (x a , x p , x n ) where the anchor x a is any sample from the training dataset, the positive example x p is a random sample with the same label as the anchor and the negative example x n is a random sample with a label different from that of the anchor. The embedding network E is trained by minimizing the triplet loss [START_REF] Wang | Learning fine-grained image similarity with deep ranking[END_REF] x

i ∈D ||E(x a i ) -E(x p i )|| 2 2 -||E(x a i ) -E(x n i )|| 2 2 + δ + , (2)
where [.]+ is the hinge loss, ||.||2 is the L2 norm, and δ is a margin parameter. The triplet loss aims to find a meaningful embedding space in which the anchor and the positive example are closer than the anchor and the negative example. The margin corresponds to the difference of the distance between the anchor and the negative example and the distance between the anchor and the positive example (in the embedding space). The larger the margin, the further the negative example will be. Since the margin depends on distances between the embeddings, in order for it to make sense, the embeddings must be normalized before computing the distances.

Prototypical network

In the prototypical network based approach, the data are sampled in a specific manner. Each batch contains J classes (in the following, J = K), and m training data points (xi, yi) for each class. Among them, ms points are called support points and are used to generate a prototype of the class. The prototype vector for class j is the average of the embeddings of the support points:

cj = 1 mj (x i ,y i )∈D j E(xi) (3)
where Dj is the set of support points of that class. the embedding network E. The loss function to be minimized is the sum over all queries of the cross-entropy between the class label of a given query and the softmax over the distances between the embedding of that query and the prototypes of all classes. This results in a soft assignment of each query point to one of the J classes based on these distances.

Classification of the embeddings

Once the embeddings have been learned with the triplet network or the prototypical network, we can learn a classifier G from these embeddings by optimizing the cross-netropy cost in (1).

DATASETS

In order to analyze the impact of weak labels independently of other challenges, we introduce two new datasets called the weak annotation analysis (WAA) dataset and the 200 ms dataset. These datasets are generated from the DESED dataset [START_REF] Turpault | Sound event detection in domestic environments with weakly labeled data and soundscape synthesis[END_REF] and contain 10 s sound clips generated by mixing foreground sound events from Freesound [START_REF] Fonseca | Freesound datasets: a platform for the creation of open audio datasets[END_REF][START_REF] Font | Freesound technical demo[END_REF] with backgrounds from SINS [START_REF] Dekkers | The SINS database for detection of daily activities in a home environment using an acoustic sensor network[END_REF] and MUSAN [START_REF] Snyder | MUSAN: A music, speech, and noise corpus[END_REF]. The synthetic data for training and validation use the foreground sound events and backgrounds from the DESED synthetic development dataset. The sound clips in our evaluation set use the foreground sound events and backgrounds from the synthetic evaluation set in DESED. Both the training set, the validation set and the evaluation set were created using Scaper [START_REF] Salamon | Scaper: A library for soundscape synthesis and augmentation[END_REF]. We further made sure that the foreground sound events do not overlap between the training set and the validation set and that foreground files from the same Freesound user do belong to the same set. Since we want to focus on the problem of weak labels, we created sound clips with a single event and a signal-to-noise ratio (SNR) between the foreground sound event and the background uniformly drawn between 6 dB and 30 dB.

WAA dataset

The WAA dataset contains 2,700 clips for training, 300 for validation and 750 for evaluation. It is composed of the 10 sound event classes of the DESED dataset. The number of unique Freesound sound events used to generate each subset is presented in Table 1.

Each of the subsets is balanced, i.e., it contains the same number of clips for each class.

The effective duration of each sound event depends on the duration of the isolated event and its onset time within the clip (sound events which are longer than the time remaining until the end of the clip are cut down). Figure 1 shows the distribution of sound event durations for each class in the training set. We can distinguish two categories of sound event classes: short events (Dishes, Speech, Alarm/bell/ringing, Dog, Cat) and long events (Blender, Electric shaver/toothbrush, Frying, Vacuum cleaner, Running water). However, the duration still varies within each category. In order to control the "weakness" of the labels, we cut the 10 s clips into shorter fixed-sized segments. Specifically, we assume that we know the labels, and divided the sound clips into segments that contain either the full sound event or part of it when the event is long. In order to keep a consistent subset size, we kept only one segment per original 10 s clip. When the segment duration is small, most of the frames within the segment do actually contain the sound event therefore the label can be considered as strong. When the segment duration is larger, the number of frames where the sound event is absent increases therefore the label becomes weaker.

We set the segment durations to 200 ms, 1 s, and 10 s in practice. Since most of the events are longer than 200 ms, the 200 ms subset is almost entirely strongly labeled. The experiments using 1 s segments introduce some weak labels for short sound events. When the segment duration is increased to 10 s the proportion of labels that can be considered as weak increases too.

200 ms dataset

In order to study the impact of the weak labels on the embedding quality regardless of the event duration, we derived an additional set from the original isolated sound events which we call the 200 ms dataset. To create this dataset, we used the same association of foreground sound events and background files as in the WAA dataset. However, we cut the duration of the foreground sound events down to 200 ms. In this dataset, only 122 clips have a foreground event that lasts less than 200 ms. The distribution of sound events that are shorter than 200 ms is as follows: 60 Dishes, 18 Speech, 18 Dog, 13 Alarm bell ringing, 10 Running water, and 3 Cat events. Therefore, even though the bias induced by sound event duration is greatly reduced, there are still about 1 4 of the Dishes events for which the models may exhibit a different behavior.

EXPERIMENTS

Feature extraction

The sound clips are single-channel and sampled at 44.1 kHz. We first resample them at 16 kHz. We then compute the short-time Fourier transform on 25 ms windows with a step size of 10 ms. We finally compute log-mel features with 64 mel bands.

Model and parameters

Our embedding model E is a convolutional neural network (CNN) with 4 layers. We apply the CNN to 200 ms intervals and we average the outputs along the time axis to obtain a single embedding vector. When considering 1 s or 10 s input segments, the embeddings obtained over each 200 ms interval are averaged over time to obtain a single embedding representing the whole segment. We consider averaging for aggregation here as we want the approach to be extensible to the multi-event case in the future (which is not compatible with, e.g., maximum-based aggregation). The final output is a vector of dimension 130 regardless of the duration of the input segment.

The classifier G is a fully connected layer of size 32 with leaky ReLU activation followed by an output layer of size 10 with sigmoid activation which predicts the sound event class. The sigmoid is used here in order to allow for a future extension to multi-label classification. The architecture of the model (number of convolution layers, dropout, embedding size, number of fully connected layers) has been optimized on the end-to-end classifier with the Asynchronous Successive Halving Algorithm (the asynchronous version of Hyperband) [START_REF] Li | Massively parallel hyperparameter tuning[END_REF], using Orion3 . We use the same architectures for all experiments.

Validation of the embeddings for early stopping

When the embeddings are learned separately, we perform early stopping based on a metric related to the quality of the embeddings on the validation set. We propose a metric that relies on the average value of the embeddings for each sound event class:

c k = 1 |D k | (x i ,y i )∈D k E(x k ) (4)
where D k is the subset of D that contains the points (xi, yi) from the class k and |D k | denotes the size of that subset. Note that this is similar to the prototypes (3) but computed on the whole training set.

In order to measure the quality of an embedding, we then define a metric that indicates for each example (xi, yi) whether the closest centroid c k is the centroid corresponding to the sound event class that is present in the sound clip:

F (xi) = 1 if arg min k ||E(xi) -c k || 2 2 = arg max k (yi) 0 otherwise. ( 5
)
This metric is motivated by the fact that we want embeddings which are grouped into separable clusters. Indeed, if every point of each class is closer to the mean of its class, we should be able to separate the classes.

Method

RESULTS

We have described three different methods to learn embeddings and perform sound event tagging. In this section, we report the results achieved by the final classifier G on the evaluation set in terms of the F-measure. Note that, since we are using a sigmoid output for each class, a classifier that performs randomly will likely predict that no class is active. Therefore, the F-score can be as low as 0%, rather than 10% as usually expected for a 10-class classification problem (this would be the case if we were using a softmax output). Also note that we are not interested in the absolute performance of the three methods but in their behavior relatively to weakly labeled data. We present the results on the 200 ms dataset in Table 2. Training the models with 200 ms segments (first row for each method), and predicting aggregated embeddings for 1 s or 10 s segments containing background noise does not work well. Therefore, if we have a strongly labeled training dataset and we train a model on a good segmentation, we cannot expect it to predict accurately the labels on unsegmented data. Training the models on weakly labeled data also has an impact even when we test the models on already segmented data (first column of the table). This impact is a lot more negative on the embedding methods based on triplets and prototypes than on the end-to-end classifier, possibly because when using segments that are longer than the actual event we are mostly learning embeddings for the background noise. By contrast, training the end-to-end classifier on 1 s segments actually improves the performance when testing on 200 ms segments. This could be due to the noisy frames acting as a regularization to the model which sees a small amount of data (especially in the case of short segments).

We present the results on the WAA dataset in Table 3. We can see that, for each of the models, training on 1 s segments and testing on 1 s segments gives the best results. We can relate this observation to Figure 1. As we can see, the duration of most of the short sounds is around 1 s so the bias introduced when training on 1 s segments remains small. This is confirmed when comparing these results with those in Table 2. On the 200 ms dataset, changing the duration of the training segments from 200 ms to 1 s and testing on 200 ms segments degrades the performance because 9 frames out of 10 during training contain noise. On the WAA dataset, when we test on 200 ms segments, training on 1 s segments performs at least as well as training on 200 ms segments (triplets) and often performs event better (endto-end classifier and prototypes). The latter aspect also indicates that 200 ms is probably not long enough to accurately identify the sound classes.

Method

Training We can also assume that 1 s is sufficient to get enough information about long events. When we train on 10 s segments, performance with the embedding-based methods degrades severely while the end-to-end classifier still performs well. Indeed, learning embeddings on longer segments becomes very complicated probably because in most cases the segments then contain mostly noise. The embeddings learned at segment level are then probably representing the background noise more than the foreground sound event class that is hardly present within the segment. The training of the classifier on the other hand is based on a decision about the class present in the segment. Since the background noise is not a class, the classifier cannot be biased towards it and it remains more robust to loose segmentation.

CONCLUSION

In this paper, we studied the impact of learning embeddings for audio tagging on weakly labeled data. We proposed two complementary datasets composed of synthetic sound clips. We showed that weak labels degrade the performance slightly when using an end-to-end classifier trained in a discriminative manner. Learning embeddings by sampling and comparing distances (protypical network, triplet loss) is very sensitive to the bias introduced when using weak labels (i.e., several frames within the clip actually do not contain the sound event class but just some background). We observed that learning on shorter duration segments reduces this bias. However, the amount of information contained in the segments can then become insufficient for accurate sound tagging. We also showed that using clips that are too long (both at training and test time) is introducing too much bias and that embedding-based methods then become unreliable. This work could be extended by analyzing more in detail the impact of the sound event duration. The work so far has focused on clips with a single event but real scenarios often include several sound events that possibly overlap. The impact of these aspects will also have to be investigated.

Fig. 1 :

 1 Fig. 1: Kernel density estimates of the duration of sound events for each of the 10 classes in the training dataset.

Table 1 :

 1 Unique Freesound sound events used in each set.

	Class	Dev Train Valid	Eval
	Alarm/bell/ringing	177	13	63
	Blender	89	9	27
	Cat	78	10	26
	Dishes	99	10	34
	Dog	121	15	43
	Electric shaver/toothbrush	51	5	17
	Frying	56	8	17
	Running water	59	9	20
	Speech	117	11	47
	Vacuum cleaner	62	10	20
	Total	909	100	314

The remaining mq = m -ms points are called query points and are used to train

Table 2 :

 2 F-measure (%) achieved on the 200 ms dataset.

		Training	Test segment
		segment	200 ms	1 s	10 s
		200 ms	45.8±2.9 29.6±1.7 3.7±0.5
	Classifier	1 s	44.2±1.8 47.4±3.2 12.7±2.4
		10 s	39.8±1.9 49.3±3.2 36.7±3.8
		200 ms	42.5±1.0 2.6±0.4	0.0±0.0
	Triplets	1 s	39.1±2.4 28.9±2.7 0.1±0.1
		10 s	0.0±0.0	0.0±0.0	0.0±0.0
		200 ms	41.2±3.5 9.4±2.7	0.0±0.0
	Prototypes	1 s	38.8±1.8 36.1±2.1 1.1±1.3
		10 s	0.0±0.0	0.0±0.0	0.0±0.0

Table 3 :

 3 F-measure (%) achieved on the WAA dataset.

			Test segment
		segment	200 ms	1 s	10 s
		200 ms	45.8±2.9 49.0±4.1	26.8±3.1
	Classifier	1 s	46.9±1.2 57.5±2.5	38.0±1.9
		10 s	40.2±2.0 54.2±0.7	51.0±2.3
		200 ms	42.5±1.0 38.2±3.6	11.7±3.2
	Triplets	1 s	41.7±7.0 44.8±10.9 18.3±7.3
		10 s	9.1±3.2	10.2±2.0	2.8±0.7
		200 ms	41.2±3.5 36.1±7.3	9.5±4.3
	Prototypes	1 s	45.2±0.4 52.4±3.9	22.0±3.4
		10 s	29.9±6.2 35.8±10.9 28.6±11.0

http://dcase.community/challenge2019/ task-sound-event-detection-in-domestic-environments

https://github.com/turpaultn/walle

https://github.com/Epistimio/orion