Effects of different additives and chopping lengths on the biosafety of Sophora Davidii silage Authors: Shihao Liu, Ning Mao, Ermei Du, Zhengrong Deng, Shangxiong Zhang, Hanyu Zhang, Meiling Fan, Juan Chen, Haiyan Yin, Yulong Zheng, Hong Sun, Fuyu Yang, Yixiao Xie Published: 2025 ABSTRACT BackgroundAntibiotic resistance genes (ARGs), mobile genetic elements (MGEs), and virulence factors (VFs) represent growing threats to global public health. Sophora davidii silage is a common feed in livestock production, may potentially serve as a reservoir and vector for the dissemination of these genetic determinants. The biosafety risks associated with Sophora davidii silage remain poorly evaluated. Consequently, mitigating these risks through improved processing techniques has become an urgent priority. This study systematically elucidates the effects of additives and chopping lengths on the microbial community structure, ARGs, MGEs, and VFs during the ensiling of Sophora davidii.ResultsMetagenomic analyses demonstrated that both additives and chopping length significantly influenced the biosafety profile of Sophora davidii silage. Additives markedly reduced the abundance of ARGs, MGEs, and VFs (P < 0.05). Formic acid (FA) demonstrated the most pronounced suppression, whereas cellulase (CE) was least effective. Notably, although inoculation with Lactiplantibacillus plantarum (LP) reduced the overall abundance of these risk factors, the strain may be associated with the vanY gene in the vanB cluster, mobile genetic elements (MGEs) such as ISLpl1 and ISLp1, as well as specific virulence factors (VFs). Furthermore, at a 5 cm chopping length, the Control group exhibited significantly higher levels of ARGs and VFs compared to the 1 cm and 3 cm treatments (P < 0.05).ConclusionThe findings highlight the efficacy of reducing chopping length (to 1 cm) in controlling the proliferation and dissemination of ARGs, MGEs, and VFs. Moreover, the use of direct acidifying agents, particularly formic acid, offers considerable advantages in enhancing the microbial safety of silage.Supplementary InformationThe online version contains supplementary material available at 10.1186/s12866-025-04580-6. Background Antibiotic resistance genes (ARGs) have led to global public health and ecological risks, posing a significant threat to human health [1]. The emergence and dissemination of ARGs within microbiomes reduce the efficacy of antibiotic treatments. Their distribution across various environmental matrices has become increasingly widespread and abundant, including wastewater treatment plants, water bodies, soils, livestock farms, and aerosols, which have garnered considerable attention [2, 3]. According to World Bank data, by 2050, it is projected that over 10 million people worldwide will die annually from antibiotic-resistant diseases, with economic losses equivalent to those of the 2008 financial crisis. The ongoing evolution of ARGs is attributed to the persistent use of antibiotics in human and animal disease treatment, livestock production, and agricultural applications [4]. Previous reports indicate that over 30–90% of antibiotics administered to livestock and humans are released into the environment via urine and feces, accelerating the spread of ARGs in crops [4]. The rapid dissemination of ARGs primarily occurs through horizontal gene transfer (HGT), a process reliant on mobile genetic elements (MGEs) as vectors for transferring resistance among bacteria, thereby fostering the emergence of multidrug-resistant strains [5]. Concurrently, the threats posed by ARGs-carrying pathogens are exacerbated by their virulence factors (VFs). VFs represent critical genetic determinants that enable microbes to colonize hosts, evade immune systems, and induce tissue damage [6]. In the livestock industry, ensuring forage safety serves as a vital strategy for preventing and treating infectious diseases. Sophora davidii is a native perennial shrub widely distributed in the dry valleys of the Hengduan Mountains and other regions, representing one of the prevalent indigenous shrubs in the karst areas of Guizhou [7]. Owing to its forage attributes, including drought tolerance, adaptability to barren soils, and rich nutritional content [8, 9], it has been extensively promoted as a pioneer species for vegetation restoration in rocky desertification areas and as a significant forage resource. Typically, ensiling can be employed to preserve collected Sophora davidii, thereby enhancing its storage efficacy. However, silage quality is often influenced by multiple factors during the fermentation process. Studies have demonstrated that appropriate additives can improve silage fermentation characteristics and forage nutritional value, minimizing fermentation losses [10]. Among various additives, exogenous cellulase has been shown to degrade structural carbohydrates into soluble sugars, which serve as substrates for lactic acid bacterial fermentation [11]. Lactic acid bacteria and molasses are regarded as effective stimulants, enhancing silage quality by increasing initial lactic acid bacterial abundance and fermentable substrates, respectively [12]. Furthermore, the addition of formic acid is considered to inhibit undesirable bacterial growth, thereby improving fermentation quality [10]. Additionally, optimal chopping lengths are crucial for achieving compact packing and oxygen exclusion, effectively suppressing aerobic bacteria and creating favorable conditions for lactic acid bacteria-dominated fermentation [11]. Despite the significant ecological and economic value of Sophora davidii silage, in depth research on its ensiling techniques particularly systematic regulation of microbial safety remains scarce. To address this gap, the present study employed metagenomic sequencing to investigate the distribution, dissemination mechanisms, and potential risks of ARGs and MGEs in Sophora davidii silage treated with different chopping lengths and additives. Furthermore, the study aimed to examine the distribution characteristics of VFs in Sophora davidii silage. This indirectly evaluates the biosafety of various treatment methods. The findings provide valuable references for biosafety protection in silage feed and herbivorous animal agricultural systems. Methods Sophora davidii silage preparation The experimental materials were sourced from the Agricultural Institute of Huaxi District, Guiyang City, Guizhou Province (latitude 26.50 °, longitude 106.66 °, azimuth 359.0 °). The region is located in the central part of Guizhou Province, with an average annual temperature of 16 °C and annual precipitation of 1335.6 mm. The materials used were artificially cultivated Sophora davidii, harvested at the podding stage, and the top 30 cm of branches and leaves were collected. The experimental design focused on two factors: chopping length and additives. The chopping length was set at three levels: 1 cm, 3 cm, and 5 cm. The additives were designed in five groups: Control (control group with distilled water), M (1.5% molasses based on fresh matter, FM), LP (1 × 10⁶ CFU/g of commercial Lactiplantibacillus plantarum, FM, purchased from Zhongke Jiayi Company), CE (0.05% cellulase, FM, purchased from Beijing Coolab Company, with enzyme activity of 1:7000, derived from Trichoderma viride), and FA (0.4% formic acid, FM). After thorough mixing, each sample was placed in 500 mL silage silo, compacted, sealed, and stored in a dark place at room temperature. Each treatment group was replicated three times and totaling 45 samples were prepared. After 30 days of ensiling, the jars were opened. The samples were extracted and subjected to sequencing. Library construction, quality control and sequencing The genomic DNA sample was fragmented into short fragments. These DNA fragments were then end-polished, A-tailed, and ligated with full-length adapters for Illumina sequencing before further size selection. PCR amplification was then conducted unless specified as PCR free. Purification was then conducted through the AMPure XP system (Beverly). The resulting library was assessed on the Agilent Fragment Analyzer System (Agilent) and quantified to 1.5nM through Qubit (Thermo Fisher Scientific) and qPCR. The qualified libraries were pooled and sequenced on Illumina platforms, according to the effective library concentration and data amount required. Preprocessing of sequencing results Fastp (https://github.com/OpenGene/fastp) is used for preprocessing raw data from the Illumina sequencing platform to obtain clean data for subsequent analysis. We will discard the paired reads in the following situation: when either one read contains adapter contamination; when either one read contains more than 10% uncertain nucleotides; when either one read contains more than 50% low quality nucleotides (base quality less than 5). Considering the possibility of host contamination in samples, clean data needs to be blasted to the host database to filter out reads that may come from host origin. Bowtie2 software (http://bowtie-bio.sourceforge.net/bowtie2/index.shtml) is used by default, with the following parameter settings:--end-to-end,--sensitive,-I 200, and-X 400 [13–15]. Assembly of metagenome MEGAHIT software is used for assembly analysis of clean data, with assembly parameter settings:--presets meta-large (--end-to-end,--sensitive,-I 200,-X 400) [14, 16], and scaftigs without N is obtained by breaking the resulted scaffolds from the N junction [17, 18]. Gene prediction and abundance analysis With the default parameters, MetaGeneMark (http://topaz.gatech.edu/GeneMark/) is used to perform ORF prediction for scaftigs (> = 500 bp) of each sample [12, 19–22], and the information with a length less than 100 nt in the prediction results is filtered out [16, 18, 23–25]. For the ORF prediction results, CD-HIT software (http://www.bioinformatics.org/cd-hit/) is used to eliminate redundancy [26, 27] and obtain the non redundant initial gene catalogue (the nucleic acid sequences encoded by successive non redundant genes are called genes) [24], with parameter settings:-c 0.95,-G 0,-aS 0.9,-g 1,-d 0 [20, 22]. Clean data of each sample is aligned to the initial gene catalogue by using Bowtie2 to calculate the number of reads of the genes on each sample alignment, with parameter settings:--end-to-end,--sensitive,-I 200,-x 400 [18, 20]. Genes with reads < = 2 in each sample are filtered out to finally determine the gene catalogue (Unigenes) for subsequent analysis [24]. Based on the number of reads aligned and the length of gene, the abundance of each gene in each sample is calculated by the following formula, in which r is the number of gene reads on alignment, and L is the length of gene [28–30]: Based on the abundance of each gene in the gene catalogue in each sample, basic information statistics, core-pan gene analysis, correlation analysis between samples, and Venn diagram analysis of gene number are performed. Species annotation DIAMOND software (https://github.com/bbuchfink/diamond/) [29] is used for alignment of unigenes sequences with Micro_NR database, which includes sequences from bacteria, fungi, archaea, and viruses extracted from NCBI’s NR database (https://www.ncbi.nlm.nih.gov/). The alignment is performed useing the blastp algorithm with a parameter setting of 1e-5 [13]. From the alignment results of each sequence, the one with evalue < = min. evalue *10 is selected. Since each sequence may have multiple alignment results, LCA algorithm (applied to systematic taxonomy of MEGAN software (https://en.wikipedia.org/wiki/Lowest_common_ancestor) is adopted to determine the species annotation information of the sequence [31]. Out of the results of LCA annotation and gene abundance table, the abundance of each sample at each taxonomy (kingdom, phylum, class, order, family, genus, or species) and the corresponding gene abundance tables are acquired. The abundance of a species in a sample is equal to the sum of the abundance of those genes annotated as that species [13, 20, 32]. The number of genes of a species in a sample is equal to the number of genes whose abundance is non-zero among the genes annotated as that species. Annotations of resistance gene Unigenes are aligned to the CARD database (https://card.mcmaster.ca/) [33] using the Resistance Gene Identifier (RGI) software [34] provided by the CARD database (RGI built-in blastp, default evalue < 1e-30) [35]. According to the RGI alignment result and unigenes abundance information, the relative abundance of each ARO is calculated. Based on the abundance of ARO, the abundance histogram, abundance clustering heat map, abundance distribution circle map, ARO difference analysis between groups, resistance genes (unigenes annotated as ARO) and species attribution analysis of resistance mechanism are carried out (some AROs with long names are abbreviated as the first three words plus underlines.) Mobile genetic elements (MGEs), unigenes were compared with the insertion sequence (ISfinder), INTEGRALL and plasmid databases, respectively, to obtain abundance information. The annotated abundance information was further visualized, and the results of abundance histogram and relative abundance heatmap were displayed. Annotations of virulence factor data base DIAMOND software (https://github.com/bbuchfink/diamond/) is used to align unigenes with those in the functional database, with parameter settings: blastp, -e 1e-5 [20, 32]. Functional databases include VFDB database (http://www.mgc.ac.cn/VFs/main.htm). From the alignment results of each sequence, the best blast hit results are selected for subsequent analysis [20, 32, 36, 37]. Statistical analysis Initial organization and visualization of the basic data were carried out using Excel 2010. Statistical analysis of experimental data was conducted using SPSS 27.0 software, which facilitated one-way or two-way analysis of variance. LSD’s multiple range test was employed to discern statistically significant differences among the means. Throughout all analyses, statistical significance was defined as P < 0.05. Results Microbial community structure in Sophora davidii silage from different treatments The microbial diversity in Sophora davidii silage was significantly influenced by additives (P < 0.05) (Fig. 1A), with LP and FA additions notably reducing the microbial community diversity (P < 0.05), and the effect of LP being the most pronounced. Principal coordinate analysis (PCoA) based on Bray-Curtis distances revealed four distinct clusters in the Sophora davidii silage microbial communities (Fig. 1B), indicating that different chopping lengths and additives significantly affected the succession of microbial communities in Sophora davidii silage. Among the treatment groups, the most abundant genera were Lactiplantibacillus, Enterobacter, Fusarium, and Pantoea (Fig. 1C-F). Under the interactive effects of different additives and chopping lengths, the abundance of Fusarium in Control group decreased significantly with increasing chopping length (P < 0.05). At a chopping length of 1 cm, all additive groups significantly suppressed Fusarium abundance compared to Control group (P < 0.05). The effects of various additives on Enterobacter, Pantoea, and Lactiplantibacillus were significant (P < 0.05). Among them, the FA and LP groups exhibited the most pronounced suppression of Enterobacter abundance (P < 0.05). Due to the direct addition of LP, the LP group carried the highest abundance of Lactiplantibacillus, while the FA group inhibited the growth of most microbial communities.Fig. 1Microbial community structure in Sophora davidii silage from different treatment. A Alpha diversity as measured by the Shannon index. B Principal Coordinates Analysis (PCoA) based on Bray-Curtis dissimilarity, illustrating the variation in microbial community structure among treatments. C-F Relative abundance of the four most dominant genera (Lactiplantibacillus, Enterobacter, Fusarium, and Pantoea) across different treatments. M, molasses; LP, commercial Lactiplantibacillus plantarum; CE, cellulase; FA, formic acid. Values with different lowercase letters above the bars indicate significant differences (P < 0.05) among additive treatments within the same chopping length. Different uppercase letters indicate significant differences (P < 0.05) among chopping lengths within the same additive treatment. When there are no significant differences among groups, no letters are assigned Microbial community structure in Sophora davidii silage from different treatment. A Alpha diversity as measured by the Shannon index. B Principal Coordinates Analysis (PCoA) based on Bray-Curtis dissimilarity, illustrating the variation in microbial community structure among treatments. C-F Relative abundance of the four most dominant genera (Lactiplantibacillus, Enterobacter, Fusarium, and Pantoea) across different treatments. M, molasses; LP, commercial Lactiplantibacillus plantarum; CE, cellulase; FA, formic acid. Values with different lowercase letters above the bars indicate significant differences (P < 0.05) among additive treatments within the same chopping length. Different uppercase letters indicate significant differences (P < 0.05) among chopping lengths within the same additive treatment. When there are no significant differences among groups, no letters are assigned ARGs distribution in Sophora davidii silage from different treatments In the CARD database analysis of Sophora davidii silage, additives significantly influenced the total abundance and diversity of ARGs in Sophora davidii silage (Fig. 2A-C). All four additives exerted inhibitory effects on ARGs richness and diversity, with FA and M showing the most pronounced suppression (P < 0.05), while CE was the least effective. Analysis of ARGs compositional profiles under various treatments identified representative ARGs types significantly affected by chopping lengths and additives (Fig. 2D-K). Among these, Escherichia coli acrA, ACT-8, and ramA exhibited significant interactions (P < 0.05). In the Control group, ramA abundance increased with chopping length (P < 0.05), reaching the highest ACT-8 abundance at 5 cm. In the LP group, ACT-8, Escherichia coli acrA, and ramA abundances were highest at 3 cm compared to 1 cm and 5 cm (P < 0.05). Additionally, LP treatment led to high expression of the vanH gene in the vanA cluster and the vanY gene in the vanB cluster. PCoA revealed that ARGs profiles in Sophora davidii silage under different treatments formed two clusters, with the LP group forming a distinct small cluster (Fig. 2D).Fig. 2Antibiotic resistance genes (ARGs) in Sophora davidii silage from different treatment. A The relative abundance of major ARGs types and PCoA based on Bray-Curtis dissimilarity of the ARGs. B-C Shannon index and total abundance of the ARGs across all treatments. D-K Relative abundance of selected individual ARGs that exhibited significant responses to the treatments. M, molasses; LP, commercial Lactiplantibacillus plantarum; CE, cellulase; FA, formic acid. Values with different lowercase letters above the bars indicate significant differences (P < 0.05) among additive treatments within the same chopping length. Different uppercase letters indicate significant differences (P < 0.05) among chopping lengths within the same additive treatment. When there are no significant differences among groups, no letters are assigned Antibiotic resistance genes (ARGs) in Sophora davidii silage from different treatment. A The relative abundance of major ARGs types and PCoA based on Bray-Curtis dissimilarity of the ARGs. B-C Shannon index and total abundance of the ARGs across all treatments. D-K Relative abundance of selected individual ARGs that exhibited significant responses to the treatments. M, molasses; LP, commercial Lactiplantibacillus plantarum; CE, cellulase; FA, formic acid. Values with different lowercase letters above the bars indicate significant differences (P < 0.05) among additive treatments within the same chopping length. Different uppercase letters indicate significant differences (P < 0.05) among chopping lengths within the same additive treatment. When there are no significant differences among groups, no letters are assigned MGEs profiles in Sophora davidii silage from different treatments Additives significantly influenced MGEs composed of INTEGRALL, plasmids and ISfinder (Fig. 3A-C). Except for the CE group, the other three additives exhibited significant inhibitory effects on MGEs compared to the Control group (P < 0.05). Among them, the FA group demonstrated the most effective suppression of total MGEs abundance. In Sophora davidii silage under different treatments, the effects of various additives on different types of MGEs were significant (P < 0.05) (Fig. 3D-F). Notably, the FA group showed pronounced inhibitory effects on MGEs, while the LP group exhibited similar outcomes. All data for INTEGRALL, ISfinders, and plasmids are presented in Tables S1 - S3.Fig. 3Mobile genetic elements (MGEs) in in Sophora davidii silage from different treatments. A-C Absolute abundance of MGEs categories, including INTEGRALL (identified via the INTEGRALL database), insertion sequences (IS, identified via the ISfinder database), and plasmids (identified via a plasmid database). D-F Compositional profiles showing the relative abundance of the major types within each MGEs category across the different treatments. M, molasses; LP, commercial Lactiplantibacillus plantarum; CE, cellulase; FA, formic acid. Values with different lowercase letters above the bars indicate significant differences (P < 0.05) among additive treatments within the same chopping length. Different uppercase letters indicate significant differences (P < 0.05) among chopping lengths within the same additive treatment Mobile genetic elements (MGEs) in in Sophora davidii silage from different treatments. A-C Absolute abundance of MGEs categories, including INTEGRALL (identified via the INTEGRALL database), insertion sequences (IS, identified via the ISfinder database), and plasmids (identified via a plasmid database). D-F Compositional profiles showing the relative abundance of the major types within each MGEs category across the different treatments. M, molasses; LP, commercial Lactiplantibacillus plantarum; CE, cellulase; FA, formic acid. Values with different lowercase letters above the bars indicate significant differences (P < 0.05) among additive treatments within the same chopping length. Different uppercase letters indicate significant differences (P < 0.05) among chopping lengths within the same additive treatment VFs in Sophora davidii silage from different treatments Comparisons of VFs at Levels1 in ensiled Sophora davidi silage revealed that the LP treatment formed a distinct small cluster in PCoA for both Level 1 and Level 2 (Fig. 4 A). Different additive treatments significantly influenced VFs (Fig. 4B), with the FA group exhibiting the most pronounced inhibitory effect (P < 0.05), whereas the CE group suppressed VFs to a certain extent but with the least efficacy. In the abundance profiles of Level 1 VFs, VF1028, VF1263, VF1154, VF0950, VF0784, and VF0963 showed the most significant interactions (P < 0.05). In the Control group, the abundances of VF1028, VF1154, and VF0784 increased with chopping length (P < 0.05). In the LP group, except for VF0784 which reached its highest abundance at a chopping length of 5 cm, the other five VFs peaked at 3 cm (P < 0.05). At a chopping length of 1 cm, the CE group generated the highest number of the aforementioned VFs (P < 0.05). Additionally, other VFs were significantly affected by additives (P < 0.05), with the FA group demonstrating the stronger inhibitory effect. Notably, VF0361, VF0842, VF0659, VF0144, VF0558, and VF0543 exhibited the highest abundances under LP treatment (P < 0.05). Moreover, other VFs subclasses were significantly influenced by additives (P < 0.05), with the FA group showing better effect than other groups. Data for VFs abundance are shown in Table S4.Fig. 4. Virulence factors of Sophora davidii silage in different treatment. (A) PCoA of virulence factors Level1 based on Bray-Curtis dissimilarity. (B) Total abundance of virulence factors across all treatment groups. M, molasses; LP, commercial Lactiplantibacillus plantarum; CE, cellulase; FA, formic acid. Values with different lowercase letters above the bars indicate significant differences (P < 0.05) among additive treatments within the same chopping length. Different uppercase letters indicate significant differences (P < 0.05) among chopping lengths within the same additive treatment.Fig. 4Virulence factors of Sophora davidii silage in different treatment. A PCoA of virulence factors Level1 based on Bray-Curtis dissimilarity. B Total abundance of virulence factors across all treatment groups. M, molasses; LP, commercial Lactiplantibacillus plantarum; CE, cellulase; FA, formic acid. Values with different lowercase letters above the bars indicate significant differences (P < 0.05) among additive treatments within the same chopping length. Different uppercase letters indicate significant differences (P < 0.05) among chopping lengths within the same additive treatment Virulence factors of Sophora davidii silage in different treatment. A PCoA of virulence factors Level1 based on Bray-Curtis dissimilarity. B Total abundance of virulence factors across all treatment groups. M, molasses; LP, commercial Lactiplantibacillus plantarum; CE, cellulase; FA, formic acid. Values with different lowercase letters above the bars indicate significant differences (P < 0.05) among additive treatments within the same chopping length. Different uppercase letters indicate significant differences (P < 0.05) among chopping lengths within the same additive treatment Discussion The ARGs in agricultural ecosystems is widespread, occurring in plants, soil, manure, and water sources. Hence, their detection in Sophora davidii silage is not unexpected [38]. The dissemination of ARGs is driven not only by host proliferation but also through HGT mediated by MGEs, including plasmids, integrons, and transposons [39]. Elevated abundance of MGEs indicates a greater potential for the spread of ARGs and is associated with the enrichment of resistomes [40]. Meanwhile, VFs form the molecular basis of microbial pathogenicity, and their prevalence in silage directly affects feed safety and animal health risks [6]. The application of additives and variations in chopping length influence the overall distribution and abundance of ARGs, MGEs, and VFs in Sophora davidii silage by modulating the microbial community. In the Control group, the abundance of efflux pump genes (e.g., acrA and ramA) and the β-lactamase gene ACT-8 increased with longer chopping lengths, a trend similarly observed for numerous MGEs and VFs. This is likely attributable to the increased proliferation of Gram-negative bacteria, such as Enterobacter [41–43]. Dunière et al. reported that the primary organic acid produced by the addition of commercial lactic acid bacteria is lactic acid, which is responsible for the rapid decrease in pH, thereby limiting the ecological niches available for non-target bacteria [44]. This explains why the LP group exhibited the strongest inhibitory effect compared with the control group. Specifically, the introduction of exogenous Lactiplantibacillus plantarum in the LP group significantly reduced the abundance of Pantoea through competitive exclusion [45]. However, although Dunière et al. reported that Lactiplantibacillus plantarum can be widely used as a silage inoculant that improves fermentation quality via rapid acidification [44], in our study the LP treatment group showed higher abundances of certain ARGs (e.g., vanH gene in the vanA cluster and vanY gene in the vanB cluster), MGEs (including insertion sequences ISLpl3, ISLpl1. ISLp1, ISP2, ISLpl2, and plasmid NZ_CP071453.1), and specific VFs related to immune evasion, iron uptake, and toxin synthesis (such as VF0361, VF0842, VF0659, VF0144, VF0558, and VF0543) compared to other additive treatments. This suggests that these genetic elements may be associated with the commercial Lactiplantibacillus plantarum strain itself [46]. Furthermore, within the LP group, the abundances of acrA, ramA, ACT-8, and most VFs peaked at the 3 cm chopping length. This may be because a moderate chopping length can retain trace amounts of oxygen, which promotes the growth of facultative anaerobes and intensifies competition between the inoculant and the indigenous microbiota, potentially stimulating ARG expression or horizontal gene transfer (HGT) among certain microbial populations [47, 48]. Similarly, as a strong organic acid, FA suppresses sensitive bacteria during early ensiling through acidification and direct bactericidal activity, and further inhibits spoilage organisms via sustained acidification [10]. PCoA revealed four distinct microbial clusters, confirming that both additive type and chopping length significantly influenced microbial succession patterns, steering the community toward specific compositional structures. In this experiment, Fusarium was observed at relatively high abundance. As a significant cereal pathogen, it is known to cause substantial yield losses in major crops such as maize, rice, and wheat [49]. In the Control, the abundance of Fusarium decreased with increasing chopping length, likely due to larger inter-particle voids and higher residual oxygen levels in longer (5 cm) material, which may inhibit the proliferation of such anaerobic fungi [50]. Notably, at a 1 cm chopping length, all additives significantly suppressed Fusarium except cellulase. Under CE treatment, a 5 cm chopping length promoted its growth. This may be attributed to the delayed release of fermentable sugars from cell wall polysaccharides by CE. Guo et al. reported that in less densely packed silage, inefficient fiber degradation may provide carbon sources that favor fungal proliferation and support the growth of pathogens [51], which in turn may result in inadequate suppression of virulence factors [52, 53]. Conclusions This study systematically reveals the comprehensive effects of different additives and chopping lengths on microbial community, ARGs, MGEs, and VFs diversity during the ensiling process of Sophora davidii. During ensiling, the spread of ARGs, MGEs, and VFs can be effectively controlled by shortening the chopping length (to 1 cm). Meanwhile, the experiment demonstrates the significant advantages of direct acidifiers (such as FA) in ensuring the microbial safety of silage. Notably, the future selection of probiotics or fermenting agents may need to go beyond traditional fermentation performance evaluations and incorporate comprehensive biosafety assessments based on whole-genome sequencing, particularly rigorous scrutiny of the ARGs, MGEs, and VFs profiles they carry, to ensure that while enhancing agricultural production efficiency, no potential genetic risks are posed to the ecological environment and food chain. Overall, the FA treatment combined with a 1 cm chopping length shows better effect than other groups in reducing ARGs, MGEs, and VFs in Sophora davidii silage, with more pronounced antibacterial effects and higher safety. Supplementary Information Supplementary material 1. Supplementary material 1. Supplementary material 2. Supplementary material 2.