Preprint
Article

This version is not peer-reviewed.

Danger Detection Through Audio Captioning and Classification Fusion

Submitted:

01 September 2026

Posted:

02 September 2026

You are already at the latest version

Abstract
Sound is inherently ambiguous, which makes certainty critical in danger recognition, where false alarms and missed detection both carry real consequences. The definition of danger adopted here extends beyond ISO 7731:2003, which covers only intentionally designed alarm signals, to naturally occurring dangerous events such as glass break-ing, gunshots, and human distress sounds, following the acoustic surveillance litera-ture. Existing systems largely treat danger as multiclass classification without seman-tic reasoning about context, or rely on one-shot audio-to-word predictions that do not describe the scene. We instead treat danger as an outcome of the full acoustic scene, requiring semantically rich descriptions. The proposed framework trains a CNN for binary danger/no-danger classification on ESC-50, UrbanSound8K, and AudioSet, and in parallel extracts captions with the pretrained CoNeTTE model, scores them through a custom danger lexicon with SBERT similarity, and fine-tunes a DistilBERT classifier on the resulting labeled captions. The two classifiers are combined through a rule-based uncertainty fusion strategy, in which an inexpensive first stage decision re-solves clear-cut cases and the semantic classifier is reserved for ambiguous ones, re-flecting the low-cost deployment demands of practical systems. On UrbanSound8K, fusion achieves a danger class recall of 0.82 and F1-score of 0.67, improving over the standalone CNN (recall 0.70) while preserving a transparent, human readable decision pipeline. We further evaluate the rule on two external, unseen datasets (XD-Violence and DESED) from different acoustic domains to assess generalization.
Keywords: 
;  ;  ;  ;  ;  ;  

1. Introduction

Sound is a constant presence in our everyday lives, from the alarm that wakes us in the morning, to the car horn when stuck in traffic, to the laughter we share with friends. People rely on it continuously to understand their surroundings. Hearing conveys rich information about the environment, often without any deliberate effort, and it also serves more focused purposes such as drawing attention and raising alarms, highlighting the need for protection. Yet the same sound is tied to different memories and perceptions for each individual, so its meaning is never fixed. Sound is, in this sense, inherently ambiguous, and this ambiguity makes certainty especially critical when building a danger recognition system, where a false alarm or a missed detection both carry real consequences. The definition of danger adopted in this work is grounded in the framework established by the International Organization for Standardization (ISO). ISO 7731:2003 [1] defines auditory danger signals as sound signals designed to warn people of hazardous situations in public and work areas, requiring them to be clear, distinct, and easily recognizable. However, the standard covers exclusively intentionally designed alarm signals and does not extend to naturally occurring dangerous acoustic events, such as glass breaking, gunshots or human distress sounds like screaming or crying, that arise in the context of violent or otherwise dangerous incidents. For this reason, the definition of dangerous sounds adopted in this work extends beyond the scope of ISO 7731:2003 to include such naturally occurring acoustic events, following definitions used in the acoustic surveillance literature [2,3,4].
Computer audition is the field concerned with giving machines the ability to interpret sound and has matured from task specific models toward general purpose systems that can describe an acoustic environment rather than merely label it [5]. This capability is central to detecting hazardous events and audio is an attractive complement to vision-based surveillance. Microphones capture events from every direction rather than within a fixed field of view, acoustic waves reflect around occluding objects, and audio remains robust to lighting conditions while being comparatively inexpensive to acquire and process in real time [6,7]. However, recognizing an isolated acoustic event is not equivalent to detecting danger. A single sound such as a scream or a loud bang can occur in both threatening and entirely benign contexts, which has motivated a shift from classifying individual events toward estimating the risk conveyed by the acoustic scene as a whole [8].
We focus our search in violence detection, a field investigated mostly by analyzing audio and video [9,10,11]. This is a good motive that shows that violence and subsequently also danger can be more effectively addressed as a multimodal problem, meaning that using audio and video, and in our case audio and language, can benefit the detection of crucial danger events more effectively [12,13].
Several danger detection systems, across both audio and video modalities, still treat the problem as multiclass classification, assigning a fixed behavioral label to an input without any semantic reasoning about the surrounding context. Such approaches have been seen in audio-based systems such as Omarov and Altayeva’s 8-category sound classifier [2], as well as video-based systems such as Wei et al.’s 5-category campus behavior detector [10]. Other systems that do incorporate language rely on zero-shot predictions, converting audio directly into words without generating a more detailed description of the scene [14]. Still others attempt to compensate by requiring the appearance of multiple sequential danger events before flagging a real incident [15]. Work in the image captioning domain suggests a more effective alternative. In the image domain, danger is rarely a property of a single isolated event, but of the broader scene in which that event occurs [8]. Capturing this requires semantically rich descriptions of the full acoustic scene, rather than sparse labels or isolated keywords, so this is the gap our work addresses.
One of the basic aspects for systems that detect danger is the need for fast detection, so the proposed systems must focus on fast predictions that rarely miss danger, while not producing many false alarms. Also, based on the research of Zhu-Zhou et al. [16] that focuses on real-time systems for acoustic violence detection, the need for low computational cost is of high importance. Moreover, our uncertainty fusion rule follows a broader pattern in resource conscious audio classification, where an inexpensive first-stage decision resolves clear cut cases and a more capable classifier is reserved for ambiguous ones. Zhu-Zhou et al. [16] apply this principle using a lightweight linear detector to screen segments before forwarding uncertain cases to a deep classifier, with the screening threshold derived empirically from the distribution of training scores rather than fixed in advance. In our current research paper we adopt the same logic.
Considering all the aforementioned, in this study we propose an acoustic-semantic framework as depicted in Figure 1. In this design we first train a convolutional neural network (CNN) for binary danger/no-danger classification using audio classification datasets (ESC-50, UrbanSound8K and AudioSet). Following the acoustic classifier, textual descriptions are extracted for each audio clip using a pretrained audio captioning model called CoNeTTE. A custom danger lexicon combined with SBERT semantic similarity scoring is applied to these captions to identify danger indicative content, producing a labeled caption dataset. A DistilBERT model is then fine-tuned on this caption dataset for danger classification. The predictions of the acoustic classifier (CNN) and the semantic classifier (DistilBERT) are combined through a rule-based, uncertainty fusion strategy. This fusion design approach achieves a danger class recall of 0.82 and F1-score of 0.67 on UrbanSound8K, improving over the standalone CNN classifier (recall 0.70) while preserving a transparent, human readable decision trail.
We further evaluate the fusion rule on two external, previously unseen datasets (XD-Violence and DESED) sourced from different acoustic domains than our training data, to assess the generalization of the fusion strategy beyond the conditions it was designed on. The system is demonstrated on a dataset repurposed from general sound classification corpora (ESC-50, UrbanSound8K, AudioSet) rather than a corpus built for danger detection. It is therefore presented as a proof of concept for an approach intended to be applied to dedicated danger datasets as they become available.
Within this context, this work addresses two research questions. RQ1: can potential danger be detected from audio alone, and what makes audio an appropriate and practical modality for the task? RQ2: does automatic audio captioning, used as an intermediate semantic representation, improve danger detection, and in what way? Across both, the guiding objective is to maximize recall of the danger class while keeping precision as high as possible, that is, to detect danger whenever it occurs while raising as few false alarms as possible.
To address these questions, this study delivers three main contributions. First, we introduce a hybrid, uncertainty-driven fusion framework that combines direct raw-waveform acoustic classification with a semantic natural language processing branch, offering a novel approach to environmental danger detection. Second, by utilizing automatically generated audio captions as an intermediate representation, our pipeline provides an implicit, human-readable justification for its decisions, directly addressing the interpretability gap of traditional “black-box” deep learning models. Third, we design and evaluate a resource-conscious sequential activation strategy that reserves the computationally heavier semantic analysis exclusively for ambiguous cases, maintaining a low computational profile. The robustness and boundary limitations of this framework are extensively validated on both internal test sets and two entirely unseen external datasets representing distinct acoustic environments.
The paper is structured as follows. In Section 2, related work on audio-based danger detection is referenced, in Section 3, the methodology, dataset preparation, architecture, and technical details of the proposed method are introduced, in Section 4 the experimental results are presented, in Section 5 the results are discussed and analyzed, and finally, in Section 6, the research is summarized and concluded, presenting future work and the new directions it opens up.

3. Materials and Methods

The proposed approach follows a rationale similar to the caption-based systems reviewed above, but exploits both acoustic and linguistic classification [32,33,34], aiming not merely at recognizing a dangerous event as an isolated occurrence but at semantically analyzing the entire acoustic scene in which that event occurs. The system is organized as two parallel decision flows over the same audio input, combined at the end by a rule based fusion stage. In the acoustic flow, a convolutional neural network (CNN) [35] maps the audio directly to a danger probability. In the semantic flow, a pretrained captioning model [36], CoNeTTE, converts each clip into a natural language caption, and a fine-tuned DistilBERT model maps that caption to a danger probability. Constructing these two flows involves six preparatory steps: (i) building a training dataset from three established audio-classification datasets (ESC-50, UrbanSound8K, and AudioSet); (ii) training the acoustic CNN classifier; (iii) generating captions with CoNeTTE, (iv) labeling them with a lexicon-based SBERT danger scorer to create the caption dataset; and (v) fine-tuning DistilBERT on that labeled dataset. Finally, (vi) the outputs of the acoustic and semantic classifiers are combined through a set of decision fusion rules, from which the best performing configuration is selected as the final system.

3.1. Audio Dataset

The training dataset was constructed following the danger class selection strategy of Omarov and Altayeva [2], who assembled a dangerous sound dataset by selecting hazard related classes from ESC-50 [37], and extended here with additional classes drawn from other corpora. Eight danger classes were taken from ESC-50 (siren, chainsaw, glass breaking, coughing, sneezing, crying baby, car horn, and dog) and augmented with two indoor relevant classes: gun_shot from UrbanSound8K [38] and screaming from AudioSet [39]. This yields ten danger classes. All remaining classes are mapped to the non-danger category, framing the task as binary classification between danger and no-danger sounds. Because ESC-50 and UrbanSound8K both draw recordings from Freesound, an overlap check based on source metadata and audio signal comparison was performed before merging, removing 240 duplicate recordings from UrbanSound8K (99 car_horn, 91 dog_bark, 50 siren) to avoid performance overestimation. To preserve balance with the 40 sample per class structure of ESC-50, 40 gun_shot clips were randomly drawn from UrbanSound8K. The AudioSet screaming class yielded only 18 usable clips, owing to its loose labeling and the frequent unavailability of the source YouTube videos. The retrieved 10-second AudioSet clips were split into two 5-second halves, the higher energy half was retained, and all screaming clips were manually verified by listening, prioritizing quality over quantity. The final training set (Table 1) contains 2058 clips, 378 danger (18.4%) and 1680 no-danger (81.6%), an imbalance that reflects the rarity of genuine danger events in real indoor monitoring. After overlap removal and exclusion of the 40 gun_shot clips used in training, the remaining 8419 UrbanSound8K clips (with gun_shot, siren, car_horn, and dog_bark treated as danger, giving 2419 danger and 6000 no-danger) were held out as an independent test set for both classifiers.
The ten danger classes were selected by combining three sources of evidence: the auditory danger-signal framework of ISO 7731:2003 [1], prior work on hazardous sound detection [2], and a small majority-vote labeling procedure following the panel based ground truth strategy of Dimoulas et al [40]. Five listeners independently judged whether each candidate sound should be treated as a potential danger, and a class was retained as danger when at least three of the five agreed, prioritizing recall of genuinely hazardous events over the exclusion of ambiguous ones.

3.2. Audio Classifier

The acoustic classifier builds on the one-dimensional CNN architectures [41] proposed by Vrysis et al. [42] and Stamatiadou et al. [43], which apply successive Convolutional–Pooling–Dropout (CPD) blocks to audio event classification [44]. The classifier operates directly on the raw waveform [45,46,47,48]. Each 5 second clip, sampled at 22.05 kHz (110,250 samples), passes through three CPD blocks with 32, 64, and 96 filters respectively (kernel size 8), followed by global average pooling and two fully connected layers, with ReLU activations throughout, 25% dropout, and a sigmoid output for binary classification (~72k trainable parameters). Four variants of this raw waveform model were compared, differing only in the stride/pooling configuration, which trades temporal detail against output compactness: LV-18 (stride 1, pooling 8) preserves the most detail, LV-24 (stride 2, pooling 4) balances detail and reduction, LV-42 (stride 4, pooling 2) favors feature compression, and LV-81 (stride 8, pooling 1) minimizes the representation for speed. Figure 2 illustrates this structure for the stride 1 / pooling 8 configuration. Because stride × pooling equals 8 in every variant, all four share the same between-block output shapes and differ only in the internal placement of the down sampling.
Raw waveform input was adopted deliberately. As a conventional alternative, a feature-based CNN operating on a 32-dimensional descriptor per clip (13 MFCCs, 12 Chroma, and 7 Spectral Contrast coefficients, time-averaged over the clip and standardized using training-set statistics) was also evaluated, and it proved competitive. However, such a model performs a comparatively heavy, high dimensional analysis, stacking many handcrafted features beneath successive convolutional layers, whereas raw waveform 1D-CNNs learn directly from the signal, dispense with a separate feature extraction stage, and are lighter and better suited to the real-time, on device operation that danger detection systems require [6,16]. The study therefore centers on the raw waveform models and retains the feature based CNN only as a comparison point.

3.2.1. Training Procedure

The principal challenge in training is the class imbalance [49], with danger clips forming only 18.4% of the data. Two cost function strategies were compared. Focal loss [50,51] with α = 0.75 and γ = 2, a modification of binary cross-entropy that downweighs easily classified examples and focuses learning on hard ones (α raising the weight of the positive danger class, γ controlling the decay), and weighted binary cross entropy with fixed class weights of 4.18 for danger and 1.0 for no-danger, derived from the training set class ratio. All models used the Adam optimizer and a batch size of 32, and were trained in Google Colab on an NVIDIA T4 GPU. The dataset was split 60%/20%/20% into training, validation, and test subsets using stratified sampling on the original source class, and this split was held fixed across all runs to allow direct comparison. To counter the scarcity of the screaming class, data augmentation (noise addition, time shifting, pitch shifting, and time-stretching) was applied to the training subset only [52]. Rather than a fixed number of epochs, two checkpoints were retained per run, the model with the lowest validation loss and the one with the highest validation AUC. The four raw waveform architectures, together with the feature-based CNN retained for comparison, were each trained under both loss functions, yielding ten trained models and twenty checkpoints in total.
A complementary experiment used 5-fold cross validation to assess generalization more thoroughly, with each ESC-50 sample retaining its official fold assignment and the gun_shot and screaming clips distributed proportionally across folds (8 and 4/4/4/3/3 respectively). In this setting, proportional undersampling of the majority class was applied at a 1:1.25 danger to no danger ratio, 240 danger and 300 no-danger clips per run (540 total), retaining roughly 7–8 samples from each of the 42 non-danger categories, while screaming was augmented to 24 samples within the training folds only. Using focal loss (α = 0.75, γ = 2), each architecture was trained on every fold, giving 25 runs and 50 checkpoints, with final performance reported as the mean and standard deviation across folds.

3.3. Semantic Classifier

The semantic branch converts each clip into a natural language caption and then reasons about danger over that caption. It comprises three steps: caption generation with CoNeTTE, rule based semantic danger scoring that also labels the caption dataset, and fine-tuning of a DistilBERT classifier on the labeled captions.

3.3.1. Caption Generation with CoNeTTE

Once acoustic classification was complete, the pretrained CoNeTTE model [53] was applied to all 2058 clips to generate the natural language captions that form the caption dataset. CoNeTTE was used with no fine-tuning or retraining, following similar caption based approaches in the literature [14,31]. It was chosen for several reasons. Its demonstrated ability to generalize to unseen datasets, aided by task embedding inputs that indicate the source dataset, its training exclusively on environmental and everyday acoustic scenes [54] rather than speech or music, matching this work’s domain and its treatment of speech, which it reports as the presence of speech rather than transcribing its content. Captions were generated in the Clotho configuration [55] with a length of 3–20 words, and manual inspection confirmed that Clotho produced more descriptive captions, richer in content and in the spatio-temporal relationships of events than the AudioCaps configuration (for example, Clotho rendered a siren clip as “a police car with a siren is blaring and a vehicle is driving by”, whereas AudioCaps produced the terser “a police car siren is blaring”) [56], consistent with the original CoNeTTE report [57]. A qualitative comparison of the two configurations is provided in Table 2.

3.3.2. Semantic Danger Scoring

Interposing CoNeTTE raises two needs. Assessing how faithfully its captions reflect the original audio class and exploiting the semantic cues in language that the acoustic model may miss (for instance, that a distant siren, a single dog bark, or gunshots from a television do not indicate real danger). This stage therefore has two goals: to label the caption dataset for DistilBERT fine-tuning, and to provide a first rule based semantic classification of danger. Scoring uses the sentence transformers library with the all-MiniLM-L6-v2 model, a Sentence-BERT variant [58,59]. Rather than exact matching, which cannot capture paraphrase, each caption and each lexicon keyword is encoded into a normalized embedding and compared by cosine similarity, a caption being taken to match a keyword when their similarity exceeds a preset threshold:
Similarity = cosine_similarity(E(caption), E(lexicon_termi)),
where E is the embedding.
A manually constructed danger lexicon, stored as JSON, defines four scoring categories. The first assigns a base danger weight to each of the ten danger classes, set empirically by severity in domestic settings following analogous work [8]: dog and sneezing score 1; car horn and coughing score 2; crying baby, siren, screaming, and chainsaw score 3; and glass breaking and gunshot score 4. The hierarchical assignment of these base weights is grounded in a heuristic prioritization of threat level, physical safety, and urgency within indoor and residential environments. Acute, unambiguous indicators of physical violence or structural compromise, such as gunshots or glass breaking, are assigned the maximum weight of 4. Conversely, common physiological or environmental sounds that frequently occur in benign contexts, such as sneezing or a dog barking, are assigned the minimum weight of 1. These lower weighted events only trigger a danger classification if they are accompanied by strong intensity or proximity modifiers (e.g., ‘loudly’ or ‘in the foreground’). This weighted scaling ensures that the semantic scorer remains highly sensitive to immediate emergencies while successfully suppressing false alarms from routine household activity.
The second category captures intensity and duration: terms such as “loud”, “repeatedly”, “continuously”, and “rapidly” add one point, while neutral terms such as “once”, “passing by”, and “steady pace” leave the score unchanged. The third category holds context and distance modifiers: proximity terms (“near”, “foreground”, “close”) raise the score by up to two points, whereas distance terms (“far”, “background”, “in the distance”) lower it by up to one. The fourth category applies a −2 penalty when the caption indicates playback through a television, radio, recording, or other device, preventing non environmental sounds from being misclassified as dangerous. The contribution of each matched term is its similarity times its lexicon weight:
Contributioni = Similarityi × LexiconWeighti.
The total is the sum of an event score (from the danger class matches), a modifier score (from intensity, duration, and context, clipped to [−3, +3] to avoid extremes), and a media score:
DangerScore = EventScore + ModifierScore + MediaScore.
with a caption labeled potential danger when DangerScore > 0. Three threshold profiles were defined, low (class 0.35, event 0.38, modifier 0.35), medium (0.40, 0.42, 0.38), and strict (0.45, 0.48, 0.42), producing three candidate datasets. In parallel, a second JSON of keywords covering all 50 ESC-50 classes, the 10 UrbanSound8K classes, and the AudioSet screaming class is used to compute a class alignment score, identifying the most semantically similar true class for each caption and quantifying how well the caption matches the clip’s real label, an added quality indicator that flags classes where captioning is least reliable. Each record in the resulting dataset stores the filename, original class, caption, binary danger label, total danger score, best aligned class with its similarity, and the alignment score. The resulting dataset manifests are publicly available (see Data Availability Statement). The low threshold dataset was selected for DistilBERT fine-tuning, with the justification given in the Results. Table 3 shows representative scorer outputs.

3.3.3. Fine- Tuning and Training DistilBERT

The labeled caption dataset was used to fine-tune a DistilBERT model for binary classification. It takes a CoNeTTE caption as input and outputs a danger / no-danger prediction, forming the semantic classifier. The pretrained distilbert-base-uncased model [60] was imported from Hugging Face and adapted for sequence classification by replacing its output layer with a two class head. Six experiments were run, crossing two independent factors, the data split strategy and the training loss. Two split strategies were compared, both at 60%/20%/20%. The first, a random split, stratifies only on the danger label so that each subset mirrors the overall class distribution. The second, an alignment stratified split, stratifies jointly on the danger label and the alignment score of Section 3.3.2 (value 1 for a caption that matches its true class, 0 otherwise), ensuring that captions of differing quality are distributed proportionally across subsets rather than, for example, evaluating the model only on well described samples. For each split, three loss functions were compared: standard cross-entropy (equal class weights, simple but prone to majority bias), weighted cross-entropy (per-class weights from the training distribution, directly offsetting imbalance) and focal loss (γ = 2, additionally downweighing easy examples to focus on ambiguous captions). All experiments shared a learning rate of 2×10⁻⁵, a training batch size of 8 and evaluation batch size of 16, and a maximum of 8 epochs, selecting each epoch’s checkpoint by danger recall on the validation set, prioritizing recall, since the system’s goal is to minimize missed danger events even at the cost of additional false positives. The best performing of the six models was carried forward to the fusion stage.

3.4. Decision Fusion

The final stage combines the outputs of the acoustic CNN classifier and the semantic DistilBERT classifier. Twelve fusion rules were evaluated on the held out UrbanSound8K test set (after overlap removal and re-inclusion of the 40 gun_shot clips used during training). Table 4 defines the rules. Two act as baselines, cnn_only and distilbert_only, which use a single model’s probability; the remaining ten combine the two. Two evidential rules apply Dempster–Shafer combination [61,62].
Following the cascade approach of Zhu-Zhou et al. [16], the fusion thresholds are not fixed in advance but derived empirically from the model’s own score distribution. Specifically, the threshold-dependent rules use two data driven thresholds derived from the medians of the averaged false-negative and false-positive probabilities on UrbanSound8K. During model comparison these were computed per loss family (0.35–0.60 for focal loss models, 0.27–0.66 for weighted cross-entropy models) to rank candidate configurations on a common basis, with the near boundary rescue zone spanning 0.35–0.50 and 0.27–0.50 respectively and the cascade rules using the corresponding low threshold. Once the final model was selected, the thresholds were recomputed on that model’s own probability distribution, giving an activation zone of 0.17–0.60 for the deployed system, calibrating the hand-off to the exact classifier in use rather than to a family average. For the CNNs trained under the 5-fold undersampling scheme, only the custom_uncertain rule was applied, with an activation zone of 0.43–0.59 set from the mean median across all folds and models on UrbanSound8K.
Two fusion topologies were implemented (Figure 3): a parallel scheme, in which both classifiers run on every clip and their outputs are combined, and an uncertainty correction scheme, in which the semantic classifier is invoked only when the CNN is uncertain, the latter offering a computational advantage, since the semantic branch need not run when the acoustic model is already confident. The best performing configuration, the LV-18 weighted-cross-entropy acoustic classifier combined with the stratified weighted-cross-entropy DistilBERT classifier through the custom_uncertain rule, was selected as the final system and carried forward to external evaluation. The acoustic classifier trained under 5-fold cross-validation with undersampling was retained as a complementary configuration for assessing robustness.

4. Experimental Results

4.1. Acoustic Classifier

Model selection prioritized recall of the danger class, so as to miss as few genuine danger events as possible. On the internal test set (412 clips), the LV-18 model trained with weighted cross-entropy achieved the highest danger class recall (0.86–0.87 across the two checkpoints) while maintaining a competitive danger class F1 (0.64) (Table 5). This choice was confirmed on the full, held out UrbanSound8K set (8419 clips), where LV-18 with weighted cross-entropy and the validation AUC checkpoint produced the highest danger class recall of any model (0.70), at 81.8% overall accuracy (Table 6).
The feature-based CNN, retained as a conventional comparison point, proved competitive but did not surpass the raw waveform models on the selection criterion. Its best danger class recall on UrbanSound8K reached 0.64, below the 0.70 of the selected LV-18 model, and it offered no compensating advantage in precision or macro F1. Given that it also performs a heavier, high dimensional feature analysis less suited to real-time deployment, the raw waveform LV-18 configuration with weighted cross-entropy was carried forward as the acoustic classifier.

4.2. Semantic Danger Scoring

The lexicon based SBERT scorer was evaluated across the three threshold profiles on the full 2058 clip caption dataset (Table 6). The low threshold (0.35) maximized danger class recall at 0.92, at the cost of precision (0.52), for a danger class F1 of 0.66; the medium and strict profiles traded recall for precision (recall 0.86 and 0.62, precision 0.69 and 0.87). Consistent with the recall first objective, the scorer’s role being to label captions without discarding genuine danger, the low threshold dataset was selected for DistilBERT fine-tuning. A per class fidelity check, using the class alignment keywords to compare each caption against its true label, found all original classes correctly aligned except sneezing, which the scorer associated with coughing, reflecting the acoustic proximity of the two.
Table 7. Sentence-BERT danger-scoring results for the three threshold profiles (2058 clips). Selected profile highlighted.
Table 7. Sentence-BERT danger-scoring results for the three threshold profiles (2058 clips). Selected profile highlighted.
Threshold TN FP FN TP Accuracy Danger Prec. Danger Rec. Danger F1 Macro-F1
Low (0.35) 1352 328 29 349 82.65% 0.52 0.92 0.66 0.77
Medium (0.40) 1532 148 53 325 90.23% 0.69 0.86 0.76 0.85
Strict (0.45) 1644 36 144 234 91.25% 0.87 0.62 0.72 0.83

4.3. Semantic Classifier

Across the six DistilBERT configurations, all models performed strongly, reaching danger class recall of 0.92–0.94 on the caption test set with balanced precision (Table 8), and on the UrbanSound8K captions producing roughly one false alarm for every sixteen correctly detected danger sounds. The configuration carried into the final system, DistilBERT fine-tuned on the alignment stratified split with weighted cross-entropy, combined high danger recall with strong precision, making it well suited to correcting the acoustic classifier within the fusion stage.

4.4. Decision Fusion

The twelve fusion rules were evaluated on UrbanSound8K for every acoustic-semantic model pairing. The final system combines the LV-18 weighted cross-entropy acoustic classifier with the stratified weighted cross-entropy DistilBERT classifier through the custom_uncertain rule, which forwards a clip to the semantic classifier only when the acoustic probability falls within the uncertainty zone and otherwise accepts the acoustic decision. For this deployed model, the uncertainty zone was calibrated to the selected classifier’s own probability distribution on UrbanSound8K, giving an activation range of 0.17–0.60 (Section 3.4).
This configuration raised danger class recall to 0.82 (precision 0.56, F1 0.67), a substantial improvement over the standalone acoustic classifier (recall 0.70, precision 0.45, F1 0.55) and approaching the standalone semantic classifier (recall 0.86, precision 0.63, F1 0.73), while activating the semantic branch for only 3276 of 8419 clips (≈39%) (Table 9). In confusion matrix terms, fusion recovered 1994 of the 2419 danger clips (TP 1994, FN 425) against 1572 false alarms, reducing missed danger from the acoustic classifier’s 727 to 425 at a moderate cost in additional false positives. This is the central empirical result of the system: the semantic classifier, invoked only in the acoustic model’s uncertainty zone, improves danger recall while roughly 61% of clips are still resolved by the fast acoustic classifier alone.
A complementary experiment applied the same rule to an acoustic classifier trained under 5-fold cross-validation with majority class undersampling, paired with a DistilBERT classifier, to assess robustness under a different training regime (Table 10). Across folds it reached a mean danger class recall of 0.84 (± 6.7%), precision 0.52, F1 0.64, and macro-F1 0.70, with per-fold recall ranging from 0.74 to 0.91. The best balanced fold achieved recall 0.83 at 61% precision, roughly one false alarm per 2.5 correctly detected danger sounds. These results confirm that the recall gains of the uncertainty correction rule are stable across training regimes, although the fixed split configuration above is the one carried forward to external evaluation.

4.5. Generalization to External Datasets

The final system was evaluated on two external datasets not seen during training, following the false alarm focused protocol of Potamitis [14] (Table 11). Both were adjusted to match this work’s danger definition. From DESED, the dog class was excluded [63], since dog is treated as a potential danger class here and its detection would not constitute a false alarm. From XD-Violence, the non_violence class was excluded [64] to yield a pure danger set, taking into consideration that the non_violence class may contain various audio events that are not specified so evaluating the proposed model on them does not provide meaningful results. After these adjustments, the evaluation sets comprised 610 DESED clips (all no-danger) and 1383 XD-Violence clips (all danger). Because the external clips differ in length from the fixed 5-second training clips, all files were processed through 5-second windows with 50% overlap, and the window level predictions were aggregated into a clip level decision under a Multiple Instance Learning (MIL) scheme. Following the standard MIL formulation, aggregation used max pooling, so that a clip is labeled potential danger whenever at least one of its windows is, in keeping with the system’s recall-oriented objective.
DESED, containing only indoor non-danger sounds, measures false alarm behavior directly. The final fusion system correctly identified 449 of the 610 no-danger clips (no-danger recall 0.74, F1 0.85), misclassifying 161 as danger, a false-positive rate of 26%, roughly one false alarm for every three correct decisions, with the semantic branch triggered on 272 clips. As on the internal data, the standalone semantic classifier was the most conservative on this set (recall 0.88, only 74 false alarms) and the standalone acoustic classifier the least (recall 0.69), with fusion between the two. This ordering reflects the complementary roles of the two classifiers, the semantic branch tempering the acoustic model’s tendency to over flag.
On XD-Violence, whose danger content is defined largely by its visual channel, the audio only system reached a danger class recall of 0.69, detecting 952 of the 1383 danger clips (danger class F1 0.82), with the semantic branch triggered on 112 clips. Rather than a failure of the method, this quantifies a known boundary. For danger that is primarily visual, the acoustic modality alone is insufficient, confirming that the proposed system is best positioned as a complement to, not a replacement for, audio-visual approaches. A qualitative review of the false negatives in the XD-Violence dataset reveals two primary causes for the missed detections. First, in several clips the danger is entirely visual, accompanied only by low-level ambient noise or silent movement that lacks any distinct acoustic signature (e.g., physical confrontations, thefts). Second, many clips from cinematic sources contain background music or synthetic sound effects that mask genuine acoustic danger cues (e.g., screaming or impacts), causing both the CNN and CoNeTTE to misinterpret the scene. This highlights the inherent physical boundaries of audio-only monitoring in highly noisy or media-rich environments.

4.6. Answers to the Research Questions

With respect to the two research questions posed earlier for RQ1 the results indicate that audio alone is a viable and practical basis for danger detection. Sound is almost always present, regardless of lighting, line of sight, or occlusion, so an event a camera would miss can still be heard, and it is far less resource intensive than video, requiring less data to capture, process and transmit, which suits real-time and on-device monitoring. Empirically, the system detected danger from audio with a danger class recall of 0.82 and F1 of 0.67 on UrbanSound8K, and on realistic indoor no-danger audio (DESED) its false alarm rate was acceptable. Its low recall on XD-Violence, a dataset whose danger is defined largely by the visual channel, marks the boundary of the modality rather than a failure of the method. It is specifically a visual danger dataset for which audio only is insufficient. Audio is therefore good practice for hazards with an acoustic signature, particularly indoor and residential monitoring, and is best positioned as a complement to visual approaches where danger is purely visual. For RQ2, captioning as an intermediate semantic stage is useful and improves detection. The semantic branch helps recognize danger indicative acoustic events without missing genuine danger. It raised danger class recall over the standalone acoustic classifier (0.70 → 0.82), though it does not by itself improve precision. The custom_uncertain rule strikes a favorable balance between recall and false alarm rate while confining the costly semantic branch to roughly 39% of clips. Beyond accuracy, the intermediate caption makes each decision interpretable. Meaning that the system emits a human readable description alongside its prediction, an implicit explanation that conventional black-box classifiers lack.
Further research is nonetheless needed, above all on data. The system was validated on a dataset repurposed from general sound classification rather than one built for danger detection. Thus, a dedicated, appropriately designed danger dataset is required to establish the approach fully. Following the incremental repository building strategy of Kotsakis and Dimoulas [65], the captioning pipeline itself can be used to progressively accumulate such a dataset, on which a dedicated model can then be trained.

5. Discussion

The proposed system was built and evaluated as two independent, parallel flows, an acoustic CNN classifier and a semantic branch (CoNeTTE captioning followed by DistilBERT), but the selected uncertainty correction rule (custom_uncertain) defines a sequential runtime for the deployed system. The full CoNeTTE–DistilBERT path is activated only when the CNN’s danger probability falls within its uncertainty zone, while clips classified with high confidence as danger or no-danger are decided by the acoustic classifier alone. Examined separately, the two classifiers play complementary roles. The acoustic CNN is fast and has comparatively high danger recall, but produces a large number of false alarms, whereas the semantic classifier is the more precise of the two. Fusing them through the uncertainty correction rule improves the recall of the potential danger class relative to the standalone CNN while keeping false alarms in check, and it does so while invoking the semantic branch for only roughly 39% of the inputs.
The choice of a sequential activation rule was driven by the requirements of a practical system to classify danger quickly and as reliably as possible, missing as few danger events as possible while producing as few false alarms as possible. This dual objective follows the emphasis of Momynkulov et al. [6] on rapid danger detection and of Saradopoulos et al. [15] on reducing false alarms for a usable real-world system, and it is oriented toward the fast, accurate detection of potential dangers in indoor settings such as homes, workplaces, and public buildings. The computational profile of the system supports this orientation. The acoustic CNN stage has very low computational requirements, and is the lightweight component of the pipeline, consistent with the efficiency reported for small acoustic CNNs in the literature [66]. The heaviest stage is caption generation with CoNeTTE, which pairs a ConvNeXt encoder [67] with an autoregressive Transformer decoder [68]. Although CoNeTTE attains competitive captioning performance with four to forty times fewer parameters than earlier captioning models [53], its autoregressive decoding still makes it the most demanding component when activated. The fine-tuned DistilBERT classifier is comparatively lightweight [60]. Overall, the pipeline is designed to run on commodity hardware without specialized accelerators, since the heaviest component is invoked only selectively. It is precisely the sequential activation of the semantic branch that keeps this profile practical, since the heaviest stage does not run on the clips the acoustic model already resolves with confidence. Whereas the continuous, real-time systems of Saradopoulos et al. [15] and Potamitis [14] prioritize low response latency at the expense of semantic depth, the present approach uses audio captioning together with an adapted DistilBERT text classifier to achieve a richer semantic understanding of the acoustic environment and greater specialization in predicting dangerous events.

6. Conclusions and Future Work

This work introduced a methodology for the automatic prediction of potential danger from audio that departs from the dominant approach of direct acoustic classification by incorporating natural language as an intermediate semantic representation. Rather than mapping an audio signal directly onto a binary danger label, the proposed system generates a natural language description of the acoustic scene through the pretrained CoNeTTE captioning model and then applies NLP based semantic analysis, via a fine-tuned DistilBERT classifier, to estimate the level of danger conveyed by that description. Its central contribution is the integration of automated audio captioning into a danger detection pipeline, which addresses the interpretability gap that characterizes conventional deep learning classifiers. Because these models emit a danger prediction without an understandable justification, trust in their decisions is limited. By using natural language as an intermediate stage, the system provides an implicit explanation of each prediction in the form of a descriptive caption, making the decision process more transparent and auditable for human users. Empirically, combining the acoustic and semantic classifiers through the uncertainty correction rule improved the recall of the danger class over the standalone acoustic classifier while keeping the additional cost of the semantic branch confined to the minority of clips that require it. A natural next step is to apply this pipeline iteratively. The present system was validated on a repurposed dataset not originally designed for danger detection, and the same captioning-based process can be used to progressively accumulate a large, task-specific danger dataset. Once such a dataset exists, a dedicated model can be trained on it, following the incremental repository building strategy of Kotsakis and Dimoulas [65], in which a modest initial dataset is iteratively augmented and later reserved for more sophisticated models. This makes the proposed pipeline a recommended route to the danger detection problem once appropriately designed data are available.
The implementation is a step toward interpretable, semantically enriched danger detection systems and opens several directions for future work. The most significant limitation evident in the literature is the gap between training conditions and real deployment conditions, which stems from the nature of the available datasets. Most studies rely on simulated, staged, or acoustically clean data that fail to capture the complexity of genuine dangerous incidents [3], so models trained on them are likely to struggle to generalize to the noisy, unpredictable environments in which they are most needed. Future efforts should prioritize the collection of more realistic and diverse datasets, spanning heterogeneous recording conditions, varied demographics, and a broader range of dangerous acoustic events, while the standardization of danger and violence definitions across studies, together with systematic reporting of architectures, hyperparameters, and evaluation metrics, remains an open challenge [3]. A particularly promising dataset structure, in the spirit of Ogura et al. [31], would place dangerous events in the positive class and their acoustically similar counterparts in the negative class. Such a dataset would benefit both classifier training and the construction of more targeted natural language datasets for captioning.
On the captioning side, the available datasets and evaluation metrics remain insufficient for systems that are genuinely useful in human–machine interaction. As Xu et al. [69] argue, the very notion of a useful audio description needs to be reconsidered. A description should not be limited to identifying individual sound events but should also convey the environmental context in which they occur and the temporal relationships among them. Descriptions of this kind would help close the interpretability gap in deep learning classification by allowing models to accompany their predictions with a linguistic justification, a capability whose absence has been a significant obstacle to trust in danger prediction applications, since existing systems produce labels that are not further exploited [14]. A further direction concerns the fusion stage itself. Rather than combining the outputs of the individual classifiers through hand designed rules, a machine learning based fusion model could be trained, given datasets containing real dangerous events and false alarms, to predict whether a particular combination of acoustic and textual outputs corresponds to genuine danger, so that decisions would rest on patterns learned from data rather than manually specified thresholds.
Finally, audio remains complementary to visual information. Audio-only danger detection systems such as the one proposed here can operate alongside more demanding multimodal systems that combine sound and image, enhancing the interpretability of their decisions and better supporting the understanding of language and human speech [14]. Because the ultimate goal of such models is deployment in real systems, research into their performance, computational requirements and into model design guided by those constraints is warranted, as is careful attention to user data. Feedback loops that collect data from users are valuable, but only if the protection of personal data is ensured first. More broadly, and in line with the most recent literature [5], the field of audio related tasks is trending toward unification and away from isolated, problem specific solutions. As with large language models, a shift toward unified audio models appears likely, and future implementations should be structured with that trajectory in mind.

Data Availability Statement

The audio datasets used in this study are publicly available from their original providers: ESC-50, UrbanSound8K, and AudioSet. The dataset manifests supporting the findings of this study, listing every clip used, its source, assigned danger/no-danger label, and generated caption, are available at https://github.com/mcstampa/DangerDetective and permanently archived at https://doi.org/10.5281/zenodo.22165447.

References

  1. International Organization for Standardization, “Ergonomics — Danger signals for public and work areas — Auditory danger signals,” ISO 7731:2003, Geneva, Switzerland, 2003.
  2. N. Omarov and A. Altayeva, “Dangerous Sound Detection Using Convolutional Feature Extraction and Temporal Modeling with BiLSTM,” Eng. Technol. Appl. Sci. Res., vol. 15, no. 6, pp. 28850–28855, Dec. 2025. [CrossRef]
  3. C. Figueroa-Flores, N. Araya-Valenzuela, I. Miranda-Sandoval, and P. González, “A systematic review of artificial intelligence techniques for violence detection in audio,” Neural Comput & Applic, vol. 38, no. 6, p. 149, Mar. 2026. [CrossRef]
  4. M. Crocco, M. Cristani, A. Trucco, and V. Murino, “Audio Surveillance: A Systematic Review,” ACM Comput. Surv., vol. 48, no. 4, pp. 1–46, May 2016. [CrossRef]
  5. A. Triantafyllopoulos, I. Tsangko, A. Gebhard, A. Mesaros, T. Virtanen, and B. W. Schuller, “Computer Audition: From Task-Specific Machine Learning to Foundation Models,” Proc. IEEE, vol. 113, no. 4, pp. 317–343, Apr. 2025. [CrossRef]
  6. Z. Momynkulov et al., “Fast Detection and Classification of Dangerous Urban Sounds Using Deep Learning,” Computers, Materials & Continua, vol. 75, no. 1, pp. 2191–2208, 2023. [CrossRef]
  7. D. Durães, B. Veloso, and P. Novais, “Violence Detection in Audio: Evaluating the Effectiveness of Deep Learning Models and Data Augmentation.,” IJIMAI, vol. 8, no. 3, pp. 72–84, Sep. 2023. [CrossRef]
  8. M. Jeon, J. Ko, and K. Cheoi, “Enhancing Surveillance Systems: Integration of Object, Behavior, and Space Information in Captions for Advanced Risk Assessment,” Sensors, vol. 24, no. 1, p. 292, Jan. 2024. [CrossRef]
  9. F. J. Rendón-Segador, J. A. Álvarez-García, F. Enríquez, and O. Deniz, “ViolenceNet: Dense Multi-Head Self-Attention with Bidirectional Convolutional LSTM for Detecting Violence,” Electronics, vol. 10, no. 13, p. 1601, Jul. 2021. [CrossRef]
  10. F. Wei et al., “Campus Abnormal Behavior Detection with a Spatio-Temporal Fusion–Temporal Difference Network,” Electronics, vol. 14, no. 21, p. 4221, Oct. 2025. [CrossRef]
  11. J. Lou, D. Zuo, Z. Zhang, and H. Liu, “Violence Recognition Based on Auditory-Visual Fusion of Autoencoder Mapping,” Electronics, vol. 10, no. 21, p. 2654, Oct. 2021. [CrossRef]
  12. W.-F. Pang, Q.-H. He, Y. Hu, and Y.-X. Li, “Violence Detection in Videos Based on Fusing Visual and Audio Information,” in ICASSP 2021 - 2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Toronto, ON, Canada: IEEE, Jun. 2021, pp. 2260–2264. [CrossRef]
  13. D.-L. Wei, C.-G. Liu, Y. Liu, J. Liu, X.-G. Zhu, and X.-H. Zeng, “Look, Listen and Pay More Attention: Fusing Multi-Modal Information for Video Violence Detection,” in ICASSP 2022 - 2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Singapore, Singapore: IEEE, May 2022, pp. 1980–1984. [CrossRef]
  14. I. Potamitis, “From Sound to Risk: Streaming Audio Flags for Real-World Hazard Inference Based on AI,” JSAN, vol. 15, no. 1, p. 6, Jan. 2026. [CrossRef]
  15. I. Saradopoulos, I. Potamitis, S. Ntalampiras, I. Rigakis, C. Manifavas, and A. Konstantaras, “Real-Time Acoustic Detection of Critical Incidents in Smart Cities Using Artificial Intelligence and Edge Networks,” Sensors, vol. 25, no. 8, p. 2597, Apr. 2025. [CrossRef]
  16. F. Zhu-Zhou, D. Tejera-Berengué, R. Gil-Pita, M. Utrilla-Manso, and M. Rosa-Zurera, “Acoustic Violence Detection Using Cascade Strategy for Computationally Constrained Scenarios,” Electronics, vol. 15, no. 6, p. 1227, Mar. 2026. [CrossRef]
  17. H. Souto, R. Mello, and A. Furtado, “An acoustic scene classification approach involving domestic violence using machine learning,” in Anais do XVI Encontro Nacional de Inteligência Artificial e Computacional (ENIAC 2019), Brasil: Sociedade Brasileira de Computação - SBC, Oct. 2019, pp. 705–716. [CrossRef]
  18. H. Purwins, B. Li, T. Virtanen, J. Schluter, S.-Y. Chang, and T. Sainath, “Deep Learning for Audio Signal Processing,” IEEE J. Sel. Top. Signal Process., vol. 13, no. 2, pp. 206–219, May 2019. [CrossRef]
  19. A. Bakhshi, J. García-Gómez, R. Gil-Pita, and S. Chalup, “Violence Detection in Real-Life Audio Signals Using Lightweight Deep Neural Networks,” Procedia Computer Science, vol. 222, pp. 244–251, 2023. [CrossRef]
  20. P. Doungpaisan and P. Khunarsa, “Deep Spectrogram Learning for Gunshot Classification: A Comparative Study of CNN Architectures and Time-Frequency Representations,” J. Imaging, vol. 11, no. 8, p. 281, Aug. 2025. [CrossRef]
  21. F. Zhu-Zhou, D. Tejera-Berengué, R. Gil-Pita, M. Utrilla-Manso, and M. Rosa-Zurera, “Computationally constrained audio-based violence detection through transfer learning and data augmentation techniques,” Applied Acoustics, vol. 213, p. 109638, Oct. 2023. [CrossRef]
  22. G. S. A. B, K. B, N. G, and G. M, “Ambulance Siren Detection Using Audio Classification Through Deep Learning Models,” in 2026 IEEE International Conference on Interdisciplinary Approaches in Technology and Management for Social Innovation (IATMSI), Gwalior, India: IEEE, Mar. 2026, pp. 1–6. [CrossRef]
  23. V.-T. Tran and W.-H. Tsai, “Acoustic-Based Emergency Vehicle Detection Using Convolutional Neural Networks,” IEEE Access, vol. 8, pp. 75702–75713, 2020. [CrossRef]
  24. T. M. Nithya, P. Dhivya, S. N. Sangeethaa, and P. Rajesh Kanna, “TB-MFCC multifuse feature for emergency vehicle sound classification using multistacked CNN – Attention BiLSTM,” Biomedical Signal Processing and Control, vol. 88, p. 105688, Feb. 2024. [CrossRef]
  25. Z. Momynkulov, N. Omarov, and A. Altayeva, “CNN-RNN Hybrid Model For Dangerous Sound Detection in Urban Area,” in 2024 IEEE 4th International Conference on Smart Information Systems and Technologies (SIST), Astana, Kazakhstan: IEEE, May 2024, pp. 284–289. [CrossRef]
  26. T. Marteau, D. Sodoyer, S. Ambellouis, and S. Afanou, “Level fusion analysis of recurrent audio and video neural network for violence detection in railway,” in 2022 30th European Signal Processing Conference (EUSIPCO), Belgrade, Serbia: IEEE, Aug. 2022, pp. 563–567. [CrossRef]
  27. W. Jin, L. Zhu, and J. Sun, “Aligning First, Then Fusing: A novel weakly supervised multimodal violence detection method,” Knowledge-Based Systems, vol. 322, p. 113709, Jul. 2025. [CrossRef]
  28. K. Drossos, S. Adavanne, and T. Virtanen, “Automated audio captioning with recurrent neural networks,” in 2017 IEEE Workshop on Applications of Signal Processing to Audio and Acoustics (WASPAA), New Paltz, NY: IEEE, Oct. 2017, pp. 374–378. [CrossRef]
  29. A. Tran, K. Drossos, and T. Virtanen, “WaveTransformer: An Architecture for Audio Captioning Based on Learning Temporal and Time-Frequency Information,” in 2021 29th European Signal Processing Conference (EUSIPCO), Dublin, Ireland: IEEE, Aug. 2021, pp. 576–580. [CrossRef]
  30. J. Devlin, M.-W. Chang, K. Lee, and K. Toutanova, “BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding,” May 24, 2019, arXiv: arXiv:1810.04805. [CrossRef]
  31. R. Ogura, T. Nishida, and Y. Kawaguchi, “Retrieval-Augmented Difference Captioning to Explain Unsupervised Anomalous Sound Detection,” in 2025 Asia Pacific Signal and Information Processing Association Annual Summit and Conference (APSIPA ASC), Singapore, Singapore: IEEE, Oct. 2025, pp. 119–124. [CrossRef]
  32. B. Elizalde, S. Deshmukh, and H. Wang, “Natural Language Supervision For General-Purpose Audio Representations,” in ICASSP 2024 - 2024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Seoul, Korea, Republic of: IEEE, Apr. 2024, pp. 336–340. [CrossRef]
  33. K. Chen, X. Du, B. Zhu, Z. Ma, T. Berg-Kirkpatrick, and S. Dubnov, “HTS-AT: A Hierarchical Token-Semantic Audio Transformer for Sound Classification and Detection,” in ICASSP 2022 - 2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Singapore, Singapore: IEEE, May 2022, pp. 646–650. [CrossRef]
  34. Y. Wu, K. Chen, T. Zhang, Y. Hui, T. Berg-Kirkpatrick, and S. Dubnov, “Large-Scale Contrastive Language-Audio Pretraining with Feature Fusion and Keyword-to-Caption Augmentation,” in ICASSP 2023 - 2023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Rhodes Island, Greece: IEEE, Jun. 2023, pp. 1–5. [CrossRef]
  35. K. O’Shea and R. Nash, “An Introduction to Convolutional Neural Networks,” Dec. 02, 2015, arXiv: arXiv:1511.08458. [CrossRef]
  36. I. Sutskever, O. Vinyals, and Q. V. Le, “Sequence to Sequence Learning with Neural Networks,” Dec. 14, 2014, arXiv: arXiv:1409.3215. [CrossRef]
  37. K. J. Piczak, “ESC: Dataset for Environmental Sound Classification,” in Proceedings of the 23rd ACM international conference on Multimedia, Brisbane Australia: ACM, Oct. 2015, pp. 1015–1018. [CrossRef]
  38. J. Salamon, C. Jacoby, and J. P. Bello, “A Dataset and Taxonomy for Urban Sound Research,” in Proceedings of the 22nd ACM international conference on Multimedia, Orlando Florida USA: ACM, Nov. 2014, pp. 1041–1044. [CrossRef]
  39. J. F. Gemmeke et al., “Audio Set: An ontology and human-labeled dataset for audio events,” in 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), New Orleans, LA: IEEE, Mar. 2017, pp. 776–780. [CrossRef]
  40. C. A. Dimoulas, G. V. Papanikolaou, and V. Petridis, “Pattern classification and audiovisual content management techniques using hybrid expert systems: A video-assisted bioacoustics application in Abdominal Sounds pattern analysis,” Expert Systems with Applications, vol. 38, no. 10, pp. 13082–13093, Sep. 2011. [CrossRef]
  41. S. Kiranyaz, O. Avci, O. Abdeljaber, T. Ince, M. Gabbouj, and D. J. Inman, “1D convolutional neural networks and applications: A survey,” Mechanical Systems and Signal Processing, vol. 151, p. 107398, Apr. 2021. [CrossRef]
  42. “L. Vrysis, I. Thoidis, C. Dimoulas, and G. Papanikolaou, ‘Experimenting with 1D CNN Architectures for Generic Audio Classification,’ in Proc. 148th Audio Engineering Society Convention, Paper 10329, May 2020. [Online]. Available: https://aes.org/publications/elibrary-page/?id=20746,”.
  43. “M.-E. Stamatiadou, A. Mpesmerti, N. Vryzas, L. Vrysis, and C. Dimoulas, ‘A Scalable AI Architecture for Audio and Multimodal Analysis on Mobile Devices: A Case of Environmental Monitoring,’ in Proc. AES International Conference on Machine Learning and Artificial Intelligence for Audio, London, UK, Sep. 8–10, 2025.,”.
  44. E. Cakir, T. Heittola, H. Huttunen, and T. Virtanen, “Polyphonic sound event detection using multi label deep neural networks,” in 2015 International Joint Conference on Neural Networks (IJCNN), Killarney, Ireland: IEEE, Jul. 2015, pp. 1–7. [CrossRef]
  45. Q. Kong, Y. Cao, T. Iqbal, Y. Wang, W. Wang, and M. D. Plumbley, “PANNs: Large-Scale Pretrained Audio Neural Networks for Audio Pattern Recognition,” IEEE/ACM Trans. Audio Speech Lang. Process., vol. 28, pp. 2880–2894, 2020. [CrossRef]
  46. A. Greco, A. Roberto, A. Saggese, and M. Vento, “DENet: a deep architecture for audio surveillance applications,” Neural Comput & Applic, vol. 33, no. 17, pp. 11273–11284, Sep. 2021. [CrossRef]
  47. S. Hershey et al., “CNN architectures for large-scale audio classification,” in 2017 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), New Orleans, LA: IEEE, Mar. 2017, pp. 131–135. [CrossRef]
  48. A. van den Oord et al., “WaveNet: A Generative Model for Raw Audio,” Sep. 19, 2016, arXiv: arXiv:1609.03499. [CrossRef]
  49. S. Henning, W. Beluch, A. Fraser, and A. Friedrich, “A Survey of Methods for Addressing Class Imbalance in Deep-Learning Based Natural Language Processing,” in Proceedings of the 17th Conference of the European Chapter of the Association for Computational Linguistics, Dubrovnik, Croatia: Association for Computational Linguistics, 2023, pp. 523–540. [CrossRef]
  50. T.-Y. Lin, P. Goyal, R. Girshick, K. He, and P. Dollar, “Focal Loss for Dense Object Detection,” in 2017 IEEE International Conference on Computer Vision (ICCV), Venice: IEEE, Oct. 2017, pp. 2999–3007. [CrossRef]
  51. Y. Liang, Y. Long, Y. Li, J. Liang, and Y. Wang, “Joint framework with deep feature distillation and adaptive focal loss for weakly supervised audio tagging and acoustic event detection,” 2021. [CrossRef]
  52. “Y. Shi et al., ‘Improving Imbalanced Learning by Pre-finetuning with Data Augmentation,’ in Proc. LIDTA Workshop, PMLR, vol. 183, pp. 68–82, 2022. https://proceedings.mlr.press/v183/shi22a.html”.
  53. É. Labbé, T. Pellegrini, and J. Pinquier, “CoNeTTE: An Efficient Audio Captioning System Leveraging Multiple Datasets With Task Embedding,” IEEE/ACM Trans. Audio Speech Lang. Process., vol. 32, pp. 3785–3794, 2024. [CrossRef]
  54. S. Chu, S. Narayanan, and C.-C. J. Kuo, “Environmental Sound Recognition With Time–Frequency Audio Features,” IEEE Trans. Audio Speech Lang. Process., vol. 17, no. 6, pp. 1142–1158, Aug. 2009. [CrossRef]
  55. K. Drossos, S. Lipping, and T. Virtanen, “Clotho: an Audio Captioning Dataset,” in ICASSP 2020 - 2020 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Barcelona, Spain: IEEE, May 2020, pp. 736–740. [CrossRef]
  56. C. D. Kim, B. Kim, H. Lee, and G. Kim, “AudioCaps: Generating Captions for Audios in The Wild,” in Proceedings of the 2019 Conference of the North, Minneapolis, Minnesota: Association for Computational Linguistics, 2019, pp. 119–132. [CrossRef]
  57. Z. Zhou, Z. Zhang, X. Xu, Z. Xie, M. Wu, and K. Q. Zhu, “Can Audio Captions Be Evaluated With Image Caption Metrics?,” in ICASSP 2022 - 2022 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Singapore, Singapore: IEEE, May 2022, pp. 981–985. [CrossRef]
  58. N. Reimers and I. Gurevych, “Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks,” in Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), Hong Kong, China: Association for Computational Linguistics, 2019, pp. 3980–3990. [CrossRef]
  59. T. Mikolov, I. Sutskever, K. Chen, G. Corrado, and J. Dean, “Distributed Representations of Words and Phrases and their Compositionality,” Oct. 16, 2013, arXiv: arXiv:1310.4546. [CrossRef]
  60. V. Sanh, L. Debut, J. Chaumond, and T. Wolf, “DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter,” Mar. 01, 2020, arXiv: arXiv:1910.01108. [CrossRef]
  61. Y. Su, K. Zhang, J. Wang, and K. Madani, “Environment Sound Classification Using a Two-Stream CNN Based on Decision-Level Fusion,” Sensors, vol. 19, no. 7, p. 1733, Apr. 2019. [CrossRef]
  62. Shafer, G. A Mathematical Theory of Evidence; Princeton University Press: Princeton, NJ, USA, 1976.
  63. N. Turpault, R. Serizel, J. Salamon, and A. P. Shah, “Sound Event Detection in Domestic Environments with Weakly Labeled Data and Soundscape Synthesis,” in Proceedings of the Detection and Classification of Acoustic Scenes and Events 2019 Workshop (DCASE2019), New York University, 2019, pp. 253–257. [CrossRef]
  64. P. Wu et al., “Not only Look, But Also Listen: Learning Multimodal Violence Detection Under Weak Supervision,” in Computer Vision – ECCV 2020, vol. 12375, A. Vedaldi, H. Bischof, T. Brox, and J.-M. Frahm, Eds., in Lecture Notes in Computer Science, vol. 12375. , Cham: Springer International Publishing, 2020, pp. 322–339. [CrossRef]
  65. R. Kotsakis and C. Dimoulas, “Extending Radio Broadcasting Semantics through Adaptive Audio Segmentation Automations,” Knowledge, vol. 2, no. 3, pp. 347–364, Jul. 2022. [CrossRef]
  66. P. B. Dehaghania, D. Penab, and A. P. Aguiar, “Evaluating CNN with Stacked Feature Representations and Audio Spectrogram Transformer Models for Sound Classification,” 2026, arXiv. [CrossRef]
  67. Z. Liu, H. Mao, C.-Y. Wu, C. Feichtenhofer, T. Darrell, and S. Xie, “A ConvNet for the 2020s,” in 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA: IEEE, Jun. 2022, pp. 11966–11976. [CrossRef]
  68. A. Vaswani et al., “Attention Is All You Need,” Aug. 02, 2023, arXiv: arXiv:1706.03762. [CrossRef]
  69. X. Xu, Z. Xie, M. Wu, and K. Yu, “Beyond the Status Quo: A Contemporary Survey of Advances and Challenges in Audio Captioning,” IEEE/ACM Trans. Audio Speech Lang. Process., vol. 32, pp. 95–112, 2024. [CrossRef]
Figure 1. Overview of the proposed acoustic–semantic approach. Each audio clip is processed by an acoustic classifier and, in parallel, converted to a natural language caption and processed by a semantic classifier, each producing a danger probability.
Figure 1. Overview of the proposed acoustic–semantic approach. Each audio clip is processed by an acoustic classifier and, in parallel, converted to a natural language caption and processed by a semantic classifier, each producing a danger probability.
Preprints 231154 g001
Figure 2. Example architecture of the raw-waveform 1D-CNN classifier, shown for the stride 1 / pooling 8 configuration (LV-18). The four variants (LV-18/24/42/81) share this block structure and produce identical between-block output shapes, differing only in how the reduction is split between convolutional stride and pooling. CPD = Conv1D + MaxPool1D + Dropout.
Figure 2. Example architecture of the raw-waveform 1D-CNN classifier, shown for the stride 1 / pooling 8 configuration (LV-18). The four variants (LV-18/24/42/81) share this block structure and produce identical between-block output shapes, differing only in how the reduction is split between convolutional stride and pooling. CPD = Conv1D + MaxPool1D + Dropout.
Preprints 231154 g002
Figure 3. The two fusion topologies: a. parallel classification, in which both classifiers run on every clip; b. uncertainty-correction, in which the semantic branch (CoNeTTE + DistilBERT) is invoked only when the CNN probability falls within its uncertainty zone.
Figure 3. The two fusion topologies: a. parallel classification, in which both classifiers run on every clip; b. uncertainty-correction, in which the semantic branch (CoNeTTE + DistilBERT) is invoked only when the CNN probability falls within its uncertainty zone.
Preprints 231154 g003
Table 1. Per-class composition of the danger category in the training set.
Table 1. Per-class composition of the danger category in the training set.
Danger class Samples
Car Horn 40
Chainsaw 40
Coughing 40
Crying Baby 40
Dog Barking 40
Glass Breaking 40
Gun Shot 40
Screaming 18
Siren 40
Sneezing 40
Total 378
Table 2. Representative CoNeTTE captions under the Clotho and AudioCaps configurations for the same audio clips.
Table 2. Representative CoNeTTE captions under the Clotho and AudioCaps configurations for the same audio clips.
Audio class Clotho caption AudioCaps caption
car_horn a car horn honks and horns honking in the background a horn honking
children_playing children are playing and adults are talking in the background children are talking and a child is speaking
drilling a machine is running at a high speed and then it cuts off an engine is running
engine_idling an engine is idling while a motor is running an engine idles and a motor runs
gun_shot a gun is fired repeatedly in the distance a gun fires several times
jackhammer a machine is running at a constant speed and then stops an engine is running
siren a police car with a siren is blaring and a vehicle is driving by a police car siren is blaring
Table 3. Representative Sentence-BERT scoring outputs: generated caption, class-alignment similarity, and danger score.
Table 3. Representative Sentence-BERT scoring outputs: generated caption, class-alignment similarity, and danger score.
Class Generated caption Alignment Danger score
breathing a person is breathing heavily and steadily in the background 0.35 0
siren a siren is blaring while people are talking in the background 0.69 5.74
screaming a person is screaming and making a loud scream 0.54 2.87
gun_shot a gun is fired in the distance and then more gunshots go off in the background 0.45 4.05
children_playing a group of children are laughing and screaming while playing in the background 0.39 1.35
Table 4. The twelve decision-fusion rules. Activation thresholds are given for the focal-loss and weighted cross-entropy (WCE) model families.
Table 4. The twelve decision-fusion rules. Activation thresholds are given for the focal-loss and weighted cross-entropy (WCE) model families.
Rule Definition Activation threshold
cnn_only Uses only the CNN probability.
distilbert_only Uses only the DistilBERT probability.
override If DistilBERT predicts danger, use its probability; otherwise keep the CNN output.
weighted_average Symmetric mean of the two probabilities (0.50 each).
cascade_correction If CNN prob < low threshold and DistilBERT predicts danger, use DistilBERT; else CNN. Focal 0.35 / WCE 0.27
probabilistic_late If CNN prob < low threshold, use the weighted average; else CNN. Focal 0.35 / WCE 0.27
custom_uncertain If CNN prob lies in the uncertainty zone, defer to DistilBERT; else keep CNN. Focal 0.35–0.60 / WCE 0.27–0.66 (deployed 0.17–0.60)
cascade_near_boundary_rescue If CNN prob near the boundary and DistilBERT predicts danger, use DistilBERT; else CNN. Focal 0.35–0.50 / WCE 0.27–0.50
ds_fusion Dempster–Shafer combination with θ = 0.10 (CNN), θ = 0.05 (DistilBERT).
ds_fusion_no_theta Dempster–Shafer combination without uncertainty mass.
or_rule Danger if either model predicts danger.
and_rule Danger only if both models agree; “unknown” on disagreement.
Table 5. CNN training results on the internal test set (412 clips), danger class metrics. Selected model highlighted. WCE = weighted cross-entropy.
Table 5. CNN training results on the internal test set (412 clips), danger class metrics. Selected model highlighted. WCE = weighted cross-entropy.
Model Loss Checkpoint AUC-ROC Danger Prec. Danger Rec. Danger F1 Macro-F1
LV-18 Focal Val Loss 0.89 0.54 0.81 0.65 0.77
LV-18 Focal Val AUC 0.89 0.54 0.79 0.64 0.77
LV-24 Focal Val Loss 0.88 0.47 0.80 0.59 0.73
LV-24 Focal Val AUC 0.89 0.49 0.84 0.62 0.75
LV-42 Focal Val Loss 0.87 0.54 0.76 0.63 0.76
LV-42 Focal Val AUC 0.89 0.54 0.83 0.65 0.77
LV-81 Focal Val Loss 0.82 0.49 0.64 0.56 0.72
LV-81 Focal Val AUC 0.83 0.54 0.67 0.60 0.75
Feature CNN Focal Val Loss 0.82 0.50 0.59 0.54 0.71
Feature CNN Focal Val AUC 0.83 0.58 0.55 0.57 0.73
LV-18 WCE Val Loss 0.88 0.51 0.86 0.64 0.76
LV-18 WCE Val AUC 0.87 0.50 0.87 0.64 0.76
LV-24 WCE Val Loss 0.87 0.48 0.79 0.60 0.73
LV-24 WCE Val AUC 0.86 0.49 0.75 0.59 0.73
LV-42 WCE Val Loss 0.88 0.43 0.85 0.57 0.70
LV-42 WCE Val AUC 0.88 0.43 0.85 0.57 0.70
LV-81 WCE Val Loss 0.85 0.46 0.75 0.57 0.72
LV-81 WCE Val AUC 0.85 0.46 0.75 0.57 0.72
Feature CNN WCE Val Loss 0.82 0.48 0.67 0.56 0.72
Feature CNN WCE Val AUC 0.82 0.54 0.63 0.58 0.74
Table 6. CNN evaluation on the held-out UrbanSound8K set (8419 clips), danger class metrics. Selected model highlighted.
Table 6. CNN evaluation on the held-out UrbanSound8K set (8419 clips), danger class metrics. Selected model highlighted.
Model Loss Checkpoint AUC-ROC Danger Prec. Danger Rec. Danger F1 Macro-F1 Accuracy
LV-18 Focal Val Loss 0.76 0.52 0.46 0.49 0.65 83.98%
LV-18 Focal Val AUC 0.76 0.54 0.48 0.51 0.65 83.98%
LV-24 Focal Val Loss 0.73 0.49 0.48 0.48 0.64 79.61%
LV-24 Focal Val AUC 0.71 0.50 0.49 0.49 0.65 81.31%
LV-42 Focal Val Loss 0.75 0.54 0.46 0.49 0.66 83.74%
LV-42 Focal Val AUC 0.74 0.50 0.52 0.51 0.65 83.74%
LV-81 Focal Val Loss 0.76 0.53 0.39 0.46 0.65 83.50%
LV-81 Focal Val AUC 0.77 0.59 0.38 0.46 0.65 81.31%
Feature CNN Focal Val Loss 0.73 0.51 0.55 0.53 0.66 84.47%
Feature CNN Focal Val AUC 0.71 0.53 0.43 0.48 0.65 81.55%
LV-18 WCE Val Loss 0.74 0.46 0.53 0.50 0.63 82.28%
LV-18 WCE Val AUC 0.74 0.45 0.70 0.55 0.64 81.80%
LV-24 WCE Val Loss 0.76 0.54 0.49 0.51 0.66 80.34%
LV-24 WCE Val AUC 0.77 0.57 0.47 0.51 0.67 81.07%
LV-42 WCE Val Loss 0.72 0.56 0.56 0.56 0.63 76.46%
LV-42 WCE Val AUC 0.72 0.44 0.59 0.53 0.63 76.21%
LV-81 WCE Val Loss 0.76 0.55 0.46 0.50 0.66 79.13%
LV-81 WCE Val AUC 0.76 0.55 0.46 0.50 0.66 79.13%
Feature CNN WCE Val Loss 0.72 0.46 0.64 0.54 0.65 80.58%
Feature CNN WCE Val AUC 0.72 0.54 0.63 0.58 0.65 83.50%
Table 8. DistilBERT results on the caption test set for the six configurations. Selected configuration highlighted..
Table 8. DistilBERT results on the caption test set for the six configurations. Selected configuration highlighted..
Split Loss Accuracy Danger Prec. Danger Rec. Danger F1 Macro-F1
Random Standard CE 95.39% 0.93 0.93 0.93 0.95
Stratified Weighted CE 95.39% 0.94 0.92 0.93 0.95
Random Weighted CE 94.90% 0.93 0.92 0.92 0.94
Stratified Standard CE 94.17% 0.89 0.93 0.91 0.93
Random Focal Loss 93.93% 0.88 0.94 0.91 0.93
Stratified Focal Loss 92.96% 0.86 0.93 0.90 0.92
Table 9. Decision-fusion results on UrbanSound8K for the final fixed-split system, compared with the standalone classifiers. Fused system highlighted.
Table 9. Decision-fusion results on UrbanSound8K for the final fixed-split system, compared with the standalone classifiers. Fused system highlighted.
Model Danger Rec. Danger Prec. Danger F1 TN FP FN TP Triggered
CNN only 0.70 0.45 0.55 3944 2056 727 1692
DistilBERT only 0.86 0.63 0.73 4786 1214 336 2083
Fusion (custom_uncertain) 0.82 0.56 0.67 4428 1572 425 1994 3276
Table 10. Decision-fusion results on UrbanSound8K for the final fixed-split system, compared with the standalone classifiers. Fused system highlighted.
Table 10. Decision-fusion results on UrbanSound8K for the final fixed-split system, compared with the standalone classifiers. Fused system highlighted.
Model (5-fold mean) Danger Rec. Danger Prec. Danger F1 Macro-F1 TN FP FN TP Triggered
CNN (LV-18, undersampling) 0.79 0.40 0.52 2869 3131 497 1922
DistilBERT (Random, Std CE) 0.91 0.57 0.70 4321 1679 209 2210
Fusion (custom_uncertain) 0.84 0.52 0.64 0.70 4044 1956 384 2035 3865
Table 11. External evaluation of the fused system on DESED (610 clips, all no-danger) and XD-Violence (1383 clips, all danger). For DESED, Recall and F1 refer to the no-danger class; for XD-Violence, to the danger class. Fused system rows highlighted.
Table 11. External evaluation of the fused system on DESED (610 clips, all no-danger) and XD-Violence (1383 clips, all danger). For DESED, Recall and F1 refer to the no-danger class; for XD-Violence, to the danger class. Fused system rows highlighted.
Dataset Model Recall F1 TN / FP TP / FN Triggered FPR
DESED CNN only 0.69 0.82 423 / 187 31%
DESED DistilBERT only 0.88 0.94 536 / 74 12%
DESED Fusion (final) 0.74 0.85 449 / 161 272 26%
XD-Violence CNN only 0.60 0.75 830 / 553
XD-Violence DistilBERT only 0.73 0.84 1004 / 379
XD-Violence Fusion (final) 0.69 0.82 952 / 431 112
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.
Copyright: This open access article is published under a Creative Commons CC BY 4.0 license, which permit the free download, distribution, and reuse, provided that the author and preprint are cited in any reuse.