dataesr/scientific-paragraphs-categorization huggingface dataset:
For future-frame prediction, the training error of the prediction-based video anomaly detection algorithm is the prediction error, and the basic structure is to extract the video features of the previous frames and predict the features of the future frames. During the training phase, the network parameters are updated. This paper proposes a video anomaly detection algorithm for future frame prediction, which follows the assumptions that the models trained on normal datasets have small errors in predicting future frames of normal events, and abnormal events have higher prediction errors owing to their uncertainty  [13]. After the emergence of deep learning techniques, the use of CNN to extract video features instead of the original handmade features significantly reduces both time and cost, and achieves higher accuracy after training the models in a specific scenario.
Compared with the object detection algorithm, the attention mechanism is lightweight, does not consume a lot of time, and can effectively process videos. The memory storage module stores more important content information than the entire video frame pixels. Our experiments were deployed on the USCD  [15]  and Avenue datasets  [16]  , and the experimental results show that the proposed algorithm has better results than the benchmark models. The main contributions of this paper are: 1) to propose a novel video anomaly detection method-called COVAD-for future frame prediction by combining the content-based attention mechanism, which can resist the interference of noise and focus on extracting the features of objects in the video; 2) to redefine the memory module that is used to classify and memorize various normal behavioral patterns available in video streams; and 3) to further improve the performance of video anomaly detection models focused on both normal and exceptional events.
In 2016, Zhang et al. proposed using a locality-sensitive hash filter to detect abnormal events  [19]. This method hashes the normal dataset in the bucket through a locality-sensitive hash function and matches the coordinate points in the bucket in the detection stage. In 2016, Hasan et al. combined handcrafted features and autoencoding techniques to propose an end-toend learning framework that uses a fully convolutional feed-forward autoencoder to learn features and classifiers trained from a multiple mixed data model  [20]. However, these methods usually require manual extraction of video features, which consumes significant time and labor, and identification is much more difficult in real-time detection. After the advent of deep neural networks, the situation has improved, and researchers and scholars have delivered the work of feature extraction to neural networks.
Methodology This paper focuses on combining memory module guidance and a content-based attention mechanism to propose a new video anomaly detection algorithm that is mainly based on future frame prediction. The COVAD method proposed in this study first learns the temporal and spatial features of the video, maps its features to the memory storage module, and updates the records of the memory storage module. Finally, the decoder network is used to restore the video features, calculate the difference between the predicted and real video frames, and evaluate the error. However, unlike previous methods, this study modifies both the encoder and decoder networks and proposes a content-oriented self-attention mechanism by integrating an encoder/ decoder network that mainly analyzes the video content using the features learned from the neural network.
The algorithm proposed in this paper is mainly divided into three parts: encoder, memory storage module, and decoder. • The encoder is used to extract the temporal and spatial features of the video. • The memory storage module records the behavior patterns of normal events. • The encoder restores the extracted features as video frames. Encoder and decoder: currently, the most popular encoder and decoder used for video processing is the U-Net Symmetric Network. The structure of the network is symmetrically distributed, which can effectively represent the process of feature extraction and restoration of video frames, as shown in Figure  1. In addition, because of the special aggregation mode of the U-Net network (meaningful data are appended when restoring features) and the upsampling process, the motion and appearance information of the video can be preserved to the greatest extent.
In the decoder, upsampling uses these switches to reconstruct the current layer above into the appropriate locations of the next layer, preserving the structure of the stimulus  [27]. Currently, U-Net is widely used for video frame reconstruction and future-frame prediction tasks. In addition, owing to the skip connection of the U-Net network, fine-grained details can be recovered during prediction by extracting more video information during the decoding process. However, in the U-Net network structure, skip connections are not always useful, particularly for reconstruction tasks. This is mainly owing to the noisy data in the previous feature set and is not conducive to restoring the most realistic features. Thus, skip connections are unrealistic for applications in this scenario. The prediction-based video anomaly detection task in this study focused on the previous features that contain part of the information lost during the training process, and connecting the previous features to the current features can improve the prediction accuracy  [28].
TPR Recall TP TP FN ( ) = + ( 14 ) FPR FP FP TN = + (15) The area under the ROC curve (AUC)  [35, 36]  provides an aggregate measure of performance across all possible classification thresholds. The area under the PR curve (AUC-PR) is useful when TNs are more common than TPs. The PR curve only focuses on the predictions of the positive (rare) class; therefore, it is a good metric for anomaly detection. The difficulty lies in predicting rare and truly positive events. Accuracy is directly affected by the category or class imbalance effect; as a result, the FP outcome of the model is also affected. Hence, the ROC curve does not capture this effect. For highly imbalanced datasets, the PR curves are more capable of highlighting the differences between model outcomes. Therefore, for a highly unbalanced class setting, the AUC-PR score can be considered as the best metric for comparing the different models.
The proposed COVAD approach The following step-by-step process provides detailed information on how our proposed anomaly detection approach-called COVAD -was implemented and evaluated. (1) First, our algorithm randomly generates memory modules and builds M R m c × matrix according to the number of videos and behavioral patterns, where R represents Equation  6 , m is the number of normal behavior patterns, and c represents the number of features per channel. Initially, the value of m is set to 10. (2) Next, the dataset is read and divided into multiple consecutive T frames. The first n 1 frame is assigned as the input to the encoder network, and uses convolution and downsampling to scale up the extracted features to create a 32 × 32 × 512 feature space. (3) The extracted features are then input into the collaborative attention mechanism, weights are reallocated to obtain new video features.
Dataset Description The analyses in this study are mainly based on two different datasets: UCSD  [15]  and Avenue  [16]. The UCSD dataset is a campus pedestrian dataset released by the University of California, San Diego, in 2013, which contains two subsets called Ped1 and Ped2. The number of training video sets used in Ped1 and Ped2 was videos and 16 videos, respectively, and this training set contained only normal frames. The test set contained both normal frames and exception frames, and had 36 videos in Ped1 and 12 videos in Ped2. Frame-level annotations were provided for all the test video clips, ten of which had pixel-level ground truth. In this study, our analyses were mainly based on Ped2, as Ped1 was not preprocessed, and it was an unlabeled dataset. The Avenue dataset was released by the Chinese University of Hong Kong in 2013 and contained 15 videos of 2 minutes each.
Hyperparameter selection process We conducted several experiments to select the best values for the hyperparameters f and in Equation  13 to calculate the total loss. To verify the effectiveness of these hyperparameters with different values in our analysis, we used the UCSD-Ped2 dataset to verify the anomaly detection accuracy when s and parameters were set to 0. 02, 0. 04, 0. 06, 0. 08, and 0. 1, respectively, for different iterations. The accuracy of the COVAD model for different experiments is shown in Table  1. The accuracy did not show obvious regularity, but f had a significant influence on the detection results. When the value of f was 0. 1, the experimental effect was relatively stable and the detection accuracy was the highest. Therefore, in our analysis, we set f = 0. 1. Table  1  lists the detection results for different hyperparameter values for f and s.
Effectiveness of the attention mechanism in video anomaly detection In this section, we present the analysis of the outcomes of the COVAD model to explore whether the attention mechanism improves the accuracy of video anomaly detection. To verify this, we randomly selected an image Figure  5a  from the Avenue dataset and extracted its features before and after adding coordinated attention using our COVAD model and MNAD model (Memory-Guided Normality for Anomaly Detection, is a paper proposed in [14]). The comparison was performed using the following steps: (1) The MNAD and COVAD networks were separately trained. The MNAD network was implemented without using the attention mechanism, whereas COVAD was implemented using coordinated attention. (2) A video frame was randomly selected and then input into the two trained networks mentioned above.
In the same network, pollen beetle pressure was also the highest in a decade, with a mean of 6 (2019) to 10 (2020) individuals per flowering stem at the sensitive stage, just before flowering. We digitized the land cover types of cropped and non-cropped areas within a 500 m radius around each field (the landscape buffer), based on an intensive land survey, with QGIS software (version 3. 12; www. qgis. org). We calculated the proportion of semi-natural habitats (including woods, fallow, hedges, and wildflower strips) within this radius. The proportion of semi-natural habitats within a radius of 500 m ranged from 0. 18 to 63. 72% (median=7. 48%) of the landscape buffer areas. The proportion of oilseed rape ranged from 4. 75 to 37. 79% (median=18. 68%). Our sampled fields were mostly located in open landscapes and the proportions of semi-natural habitats and oilseed rape tested in the first model did not significantly explain the rates of parasitism in the two species (Table  S2 ).
We tested the first-order interactions between the cover of plants providing accessible nectar in the fields and (a) strategy and (b) distance. We accounted for the spatial dependence of observations between distances in the same field, by introducing field name as a random-effect variable. All variables were standardized (i. e. by subtracting the mean and dividing by the standard deviation). Correlations between covariates in full models were assessed with variance inflation factors (all VIF < 5;  James et al. 2013). Diagnostic residual plots were generated with DHARMa (Hartig and Hartig, 2017) and confirmed a good fit for all models. Spatial correlation in the residuals was evaluated with the 'bubble' function from the 'sp' package and with Correlogram (package 'ncf'); no spatial correlation was detected.
Acknowledgements This work was funded by  INRAE (metaprogram EcoServ) , the  François Sommer Foundation, AgroParisTech , the  Office Français de la Biodiversité , the  Fondation pour la Recherche sur la Biodiversité , and  Labex BASC. We would like to thank  Eleonore Courteau ,  Arnaud Butier ,  Alexandre Morisseau ,  Dominique Le Floch ,  Emmanuel Frankenreiter  and  Solene Morelle  for technical assistance in the collection of field data and larval dissection. We thank all the farmers involved in the study.
Small RNAs processed from transfer RNA are recognized to have regulatory functions distinct from protein synthesis. This rapidly advancing field has led to a constellation of transcript nomenclatures. Building upon the accepted tRNA naming system and linking tRNA-derived small RNAs to their molecular sources, we propose an improved nomenclature. Facilitated by the tDRnamer system, it will promote inter-study comparisons leveraging a biologically-rooted nomenclature for this emerging class of intriguing regulators.
presumed non-functional degradation products. Although naming algorithms such as License Plates  12  and databases such as tRFdb  3  assign systematic identifiers, for various reasons, these names have not been widely adopted in the same way as systematic tRNA gene names. Here we propose a consistent, uniform naming system (Fig. 1a ) that is biologically informative and builds upon an existing, proven naming scheme. To make the naming system readily accessible to the research community, we have also developed tDRnamer (Fig. 1b , Supplementary Table  1 ), a new resource with both web-based and standalone software versions to enable user-friendly information-rich interfaces as well as efficient bulk processing. Given one or more sequences, the tool deterministically generates standardized tDR names; conversely, given one or more previously generated tDR names, it provides exact sequences that avoid any ambiguity while preserving a consistent, descriptive nomenclature.
e. , positions 34-36). Third, the identifier of the most likely source tRNA found within the Genomic tRNA Database (GtRNAdb)  14  is appended to the tDR name (e. g. , "Val-AAC-1"). Because some regions of different tRNAs in the same species may be identical, tDRs may be derived from multiple indistinguishable parent tRNAs (for example, see Fig. 2c : 5011a exactly matches the 5' end of 8 different tRNAs). In this case, a fourth component is added to the tDR name to indicate when there is more than one potential source tRNA (e. g. , "M7"). Finally, a fifth component of the name may be needed to represent any nucleotide differences between the tDR and the most similar source tRNA. Differences between tDRs and the reference tRNA set could potentially be due to nucleotide misincorporation at certain RNA modifications (common during the reverse transcription step of tRNA sequencing), or natural genetic variation.
To describe these tDRs succinctly, a name component is added, consisting of the original and substituted bases (or insertions/deletions) with their relative positions (e. g. , "U10A"). To demonstrate application of the new naming system with tDRnamer, we created systematic names for the existing sequence entries in tRFdb  3  , a widely-used, first-of-its-kind database containing sequences from eight different species. Focusing on the human subset as an example, one can glean a wealth of information from examining the tDR names and new analytics, generated in seconds, from the tDRnamer website service. For example, 79% (123 out of 155) of these tDRs are derived from mature tRNAs; the rest are derived from pre-tRNAs, consistent with the tRF type classification (tRF-5, tRF-3, and tRF-1) from tRFdb (Supplementary Data 1).
In terms of determining all the potential sources of the tRFdb human entries, tDRnamer found that more than half (88 out of 155) could be derived from more than one source tRNA (i. e. , those with "M" in the fourth component of the tDR name), with every possibility given (Supplementary Data 1). tDRnamer also provides multiple-sequence alignments to illustrate the relationships among the set of submitted tDR sequences and all potential source tRNAs. An interesting case involves a group of seven tRFdb entries potentially derived from multiple tRNA Pro with different anticodons (Fig. 2a ). For tDR-1:31-Pro-AGG-1-M5 (tRFdb ID: 5013c), the possible synonyms include all five matching source tRNAs (Fig. 2b-c ; Supplementary Table  2 ). In comparison, this information is necessarily absent in the tRFdb IDs 3 and License Plates  12  nomenclature.
Methods tDRnamer software design and requirements tDRnamer is a software package that generates standardized transcript names and annotations for tRNA-derived RNAs (tDRs) and searches tDR sequences by name (Fig. 1b , Supplementary Table  1 ). The standalone version runs natively as a command-line tool within the Unix/Linux environment, and can also be used via a Docker container or Conda environment in a broader context. The software was developed using Perl and Python for the framework and data processing. The package also uses external bioinformatics tools and data sources as described below in more detail. Researchers who do not have the resources or expertise to work with a command-line tool can use the web server version, developed using HTML, Javascript, and CGI Perl for the execution of the tDRnamer processing engine.
The command-line software was designed to be used with transcript sequences in FASTA file format as well as sequencing data in FASTQ format generated by the Illumina sequencing platform. Due to the relatively large file size and much longer processing time for sequencing data, the web server version is limited to support only transcript sequences as input. For the same reason, we recommend that researchers use tDRnamer on a computing server with multi-core processors instead of personal computers when processing sequencing data.
Reference database generation tDRnamer requires the use of a reference database that is specifically built with mature and precursor tRNAs of a desired genome. A tool called create_tDRnamer_db is included in the tDRnamer package with which researchers can create the database via tRNAscan-SE 2. 0  15  annotations and sequences downloaded from the Genomic tRNA Database 14 , and the genome sequence of the organism. As a default feature, the tool will exclude pseudogenes and tRNA genes with unknown isotype in the database generation process. Moreover, only the high confidence tRNA set, and genes with consistent isotype model and anticodon, prediction score at least 50 bits, and isotype model score at least 80 bits are included for large eukaryotes to avoid confusion and likely inaccurate associations with tRNA-derived repetitive elements which very rarely produce stable mature tRNAs.
tRNA genes removed by this filtering step are outputted in the tRNAscan-SE  15  output file format (Supplementary Table  3 ). Researchers can choose to skip this filtering step by using the --skipfilter option or specify alternative score cutoffs with --score and --isoscore options to fit their needs. The database building tool generates a Bowtie2 16 index (Supplementary Table  3 ) that consists of unique mature tRNA and precursor tRNA sequences based on the provided data. The mature tRNA sequences are created with 3′ CCA tails, removal of introns, and addition of the histidine tRNA-specific post-transcriptional 5′ G base at position -1. Unlike eukaryotic tRNAs that always have the 3′ CCA added enzymatically, some bacterial and archaeal tRNAs have genetically encoded 3′ CCA 17 tails. Therefore, the tool will assess the existence of 3′ CCA in each tRNA gene when the sequence source (--source option) is set for bacteria or archaea, and only make the addition as appropriate.
As an additional step, 20 "N" bases flanking each side of the tRNA sequences are added to allow for extra bases appearing off the end of sequenced transcripts, such as potential "CCACCA" ends. Precursor tRNA sequences are created with 50 nt flanking regions to accommodate tDRs that are derived from 5′ leaders or 3′ trailers. When the intergenic region that flanks a tRNA gene is shorter than 50 nt, such as those transcribed in polycistronic operons, only the annotated intergenic region will be included. The reference database also contains the alignments of both mature and precursor tRNA sequences in Stockholm  18  file format for determining the derived location of tDRs (Supplementary Table  3 ). These alignments that include both primary sequence and secondary structure information are generated using the cmalign program from Infernal v1.
1  18  with options "--nonbanded --notrunc -g" and clade-specific tRNA covariance models corresponding to the specified sequence source. For alignments of precursor tRNAs, covariance models trained with eukaryotic, bacterial, or archaeal tRNA genes from tRNAscan-SE 2. 0 15 are used. Because tRNAscan-SE covariance models were trained with tRNA genes (some which include introns), the training data were converted to mature tRNA sequences as described above for generating new covariance models using cmbuild from Infernal  18  , with options "--hand --wnone --enone". Reference databases for the following model organisms in Eukaryota, Bacteria, and Archaea have been pre-built for the web server version and are available for download: Arabidopsis thaliana (TAIR10), Caenorhabditis elegans (WBcel235/ce11), Drosophila melanogaster (Release 6 plus ISO1 MT/dm6), Homo sapiens (GRCh37/hg19 and GRCh38/hg38), Mus musculus (GRCm38/mm10 and GRCm39/mm39), Rattus norvegicus (Rnor_6.
0/rn6 and mRatBN7. 2/rn7), Saccharomyces cerevisiae S288c, Schizosaccharomyces pombe 972h-, Bacillus subtilis 168, Escherichia coli K-12 MG1655, Helicobacter pylori J99, Mycobacterium tuberculosis H37Rv, Haloferax volcanii DS2, Methanosarcina barkeri str Fusaro, Methanococcus maripaludis S2, and Thermococcus kodakarensis KOD1. Reference databases for additional species may also be requested for use on the web server resource.
Processing small RNA sequencing reads When searching by sequence (option --mode as "seq"), tDRnamer automatically determines the input data type by file extension. Small RNA sequencing reads should be contained in a FASTQ file called *. fq or *. fastq, or in Gzip compressed format. The sequencing reads are expected to have been pre-processed, with sequencing adapters and low-quality reads removed, before executing tDRnamer. If paired-end reads are used, the two read ends must be merged into pseudo-single-end reads. Although tDRnamer does not include the pre-processing step, trimadapters. py in the companion tRNA-sequencing data analysis pipeline, tRAX (http://trna. ucsc. edu/tRAX/), can be used for this task. To identify possible tDRs, unique sequencing reads are extracted from the input data as the first step of tDRnamer.
Identifying tDRs by alignments to reference database Sequences provided in a FASTA file or as unique sequencing reads extracted from a FASTQ file are aligned to the pre-built reference database using Bowtie2  16  in the very-sensitive mode which ignores quality scores and allows a maximum of 100 alignments per sequence (--very-sensitive --ignore-quals --np 5 -k 100). Because RNA modifications and editing may exist in tDRs, tDRnamer does not use a hard mismatch threshold to filter alignments. Instead, only all best mappings (highest alignment score -AS tag in SAM file) of the sequence alignments are included. When the sequence source (--source option) is set to eukaryotes, sequences aligned to mature tRNAs and pre-tRNAs are both assessed. Otherwise, only those aligned to mature tRNAs are assessed.