Magnetically recoverable Fe3O4-chitosan/ZIF-8 beads for tetracycline removal from aqueous solution Authors: Mahziyar Amanizadegan, Leila Vafajoo, Mansooreh Soleimani Published: 2026 ABSTRACT AbstractThe remediation of water contaminated by persistent antibiotic residues necessitates advanced treatment technologies that combine high removal efficiency with facile operational recovery. This study presents the development of a magnetically retrievable composite adsorbent, synthesized via ionic cross-linking co-assembly of pre-formed Fe₃O₄ nanoparticles and ZIF-8 nanocrystallites with industrial-grade chitosan. Comprehensive characterization (PXRD, FTIR, SEM, BET) confirmed the successful integration of components into a cohesive, macroporous bead architecture with robust mechanical stability. Process optimization utilized a hierarchical approach: initial univariate screening identified key operational parameters, which subsequently informed a multivariate Box-Behnken design. The derived second-order response surface model (R² = 0.9930) provided a benchmark for comparison against multiple machine learning algorithms, including support vector regression (SVR), Artificial Neural Networks, and tree-based ensembles. The SVR model demonstrated superior predictive accuracy (R² = 0.9994, RMSE = 0.434) and reliable extrapolation (predicted R² = 0.9618), enabling precise parameter optimization. At the identified optimum conditions (10 mg L⁻¹ tetracycline, 300 mg L⁻¹ sorbent, 135 min, pH 8.5), a sequestration efficiency of 74.04% was achieved. The composite exhibited excellent reusability, retaining > 60% of its initial capacity over five consecutive adsorption-desorption cycles, facilitated by rapid magnetic separation. Kinetic studies revealed that uptake followed a pseudo-second-order model (R² = 0.991), indicative of chemisorption, with an experimental maximum capacity of 24.5 mg g⁻¹. By unifying low-cost materials, a clear structure-property relationship, and a sophisticated modeling framework, this work provides a practical, magnetically separable adsorption system for the targeted removal of tetracycline in engineered water treatment.Supplementary InformationThe online version contains supplementary material available at 10.1038/s41598-026-52519-2.Keywords: Aquatic pollution, Metal organic framework adsorbent, Tetracycline abatement, Sorbent reusability, Data-driven optimizationSubject terms: Chemistry, Engineering, Environmental sciences, Materials science, Nanoscience and technology Introduction Pharmaceutical contaminants, particularly active pharmaceutical ingredients (APIs) and their metabolites, often remain in the effluents of conventional wastewater-treatment plants at concentrations ranging from nanograms to micrograms per liter1,2. These pollutants accumulate in aquatic environments and disrupt critical biological processes in aquatic organisms, inhibiting algal photosynthesis, inducing oxidative stress and impairing reproduction3. Chronic exposure to macrolides, sulfonamides and NSAIDs (e.g., diclofenac) presents moderate-to-high ecological risks, especially in urban rivers where contaminants originate from both point sources (e.g., hospitals) and non-point sources (e.g., agricultural run-off). The bioaccumulation of these compounds in sediments and their trophic transfer through food webs further increase risks to non-target organisms2,3. In humans, prolonged exposure whether via contaminated drinking water or crops can lead to endocrine disruption, chronic toxicity and the acceleration of antimicrobial resistance (AMR), now recognized as a critical global-health threat1. Pharmaceutical wastewater, enriched with diverse xenobiotics and APIs, poses a serious threat to aquatic ecosystems and necessitates advanced treatment modalities4. Owing to their persistence, these contaminants require tertiary treatment techniques such as membrane bioreactors (MBRs), advanced oxidation processes (AOPs), and enhanced bioremediation. In particular, MBRs provide effective biomass retention and stable effluent quality, AOPs enable the degradation of recalcitrant pharmaceutical molecules through highly reactive oxidizing species, and bioremediation-based approaches can be further strengthened through enzyme-assisted systems capable of accelerating pharmaceutical transformation in complex wastewaters5–7. These methods not only reduce bioaccumulation risks but also curb the proliferation of AMR linked to the incomplete removal of antibiotic residues from effluent8. Strengthening treatment protocols is therefore crucial to maintaining ecological integrity and water quality. Adsorption is a particularly efficient technique in wastewater treatment, relying on surface interactions of adsorbent materials including activated carbon, biochar and composite materials to remove diverse pollutants4,9. Sustainable adsorbents derived from agricultural or industrial wastes offer both environmental and economic advantages, serving as cost-effective alternatives to conventional adsorbents such as activated carbon10,11. Unlike some AOPs that may generate harmful by-products, adsorption is non-destructive, economical and compliant with stringent environmental regulations10,12. Recent developments in materials science have markedly expanded the repertoire of materials available for advanced wastewater treatment, with particular emphasis on nanostructured, biopolymer-based, and green-derived composites that enable high-efficiency adsorption across chemically diverse pollutant classes. Owing to their high specific surface areas, elevated surface reactivity, and dense populations of accessible functional groups, these materials provide intensified contaminant–surface contact and, consequently, improved removal performance3,13. Illustrative examples include chitosan- and alginate-based nanocomposites that can sequester heavy metals, organic pollutants, and surfactants while remaining compatible with low-toxicity, environmentally benign processing routes1,2. In parallel, green nanomaterials synthesized through eco-friendly, biopolymer-assisted pathways – for example, biopolymer-coated metal nanoparticles – offer reusable, low-hazard adsorbents that help mitigate secondary contamination and are aligned with contemporary sustainability directives in water management3. As a result, such material platforms have become central to adsorption- and nanofiltration-based treatment configurations targeting both legacy pollutants and emerging contaminants, and their continued refinement is consistent with global sustainability objectives for wastewater systems1–3,13. Adsorption itself is inherently heterogeneous: its efficiency and selectivity depend not only on the physicochemical attributes of the sorbent but also on the dominant interaction mechanism and the intended application domain. Physisorption processes governed primarily by van der Waals forces are operationally straightforward and thus attractive for certain mercury species or volatile organic compounds; however, they typically suffer from weak binding energies and regenerable constrained, which limit long-term applicability14,15. By contrast, chemisorptive pathways based on covalent, coordinative, or ionic interactions can deliver markedly higher selectivity and capacity toward trace metals, dyes, and pharmaceutical ingredients, even though they may produce secondary waste streams and render sorbent reuse more labor-intensive16. To reconcile these competing advantages, recent studies have engineered “hybrid” adsorbents (e.g., chemically modified activated carbons and hierarchically nano porous frameworks) in which tunable pore systems are combined with application-specific surface functionalities. When the micro-/mesoporous architecture is deliberately balanced, mass-transfer resistances are reduced, adsorption kinetics are accelerated, and the overall uptake capacity increases; likewise, functionalization with targeted groups or metal oxides can intensify sorbent affinity toward heavy metals and recalcitrant organics16,17. Collectively, these findings reinforce the premise that scalable, high-performance adsorption requires adsorbents whose structure and chemistry are co-designed around the pollutant suite of interest. Equally important is the recognition that, in realistic water-treatment scenarios, process variables exert control that is at least comparable to – and often inseparable from – material design. Solution pH modifies both the surface charge of the adsorbent and the ionization state of the solute; in many cases, acidic environments enhance heavy-metal binding via protonated adsorption sites17,18. Appropriate adsorbent dosage guarantees sufficient binding sites, but excessive solid loading can trigger agglomeration, site overlap, or diffusional shielding, all of which depress the apparent removal efficiency18,19. Contact time dictates the transition from fast, external-surface uptake to slower, intraparticle diffusion–controlled regimes that govern the approach to equilibrium20. Temperature, particularly for endothermic adsorption systems, can augment molecular mobility and strengthen adsorbent–adsorbate interactions, thereby elevating capacity18,19. Engineered sorbents such as polyethyleneimine-modified activated carbons judiciously leverage these effects – large porosity, enriched surface basicity, and carefully selected operating windows – to reach superior separation performance under practical conditions18,21. Because these operational factors interact in demonstrably nonlinear ways, response-surface-based statistical optimization has gained currency as a means to identify operating domains that maximize pollutant removal while minimizing material and energy demands17,22. Equally important is the recognition that, in realistic water treatment scenarios, process variables exert control that is at least comparable to—and often inseparable from—material design. Solution pH modifies both the surface charge of the adsorbent and the ionization state of the solute; in many cases, acidic environments enhance heavy metal binding via protonated adsorption sites17,18. Appropriate adsorbent dosage guarantees sufficient binding sites, but excessive solid loading can trigger agglomeration, site overlap, or diffusional shielding, all of which depress the apparent removal efficiency18,19. Contact time dictates the transition from fast, external-surface uptake to slower, intraparticle diffusion-controlled regimes that govern the approach to equilibrium20. Temperature, particularly for endothermic adsorption systems, can augment molecular mobility and strengthen adsorbent–adsorbate interactions, thereby elevating capacity18,21. Recent studies further indicate that adsorption performance can be substantially improved by engineering adsorbents with a higher density of accessible functional sites and well-defined coordination environments; for example, heteroatom-functionalized chitosan and rationally designed MOF-based adsorbents have shown enhanced selectivity, rapid uptake, and good reusability through combined electrostatic and coordination interactions under realistic wastewater conditions23,24. Because these operational factors interact in demonstrably nonlinear ways, response surface based statistical optimization has gained currency as a means to identify operating domains that maximize pollutant removal while minimizing material and energy demands17,22. Within this broader methodological frame, chitosan – a deacetylated derivative of chitin – has drawn sustained interest for wastewater remediation due to its biodegradability, biocompatibility, and natural abundance of amino and hydroxyl groups that can effectively chelate or electrostatically bind metal ions, dyes, and pharmaceutical residues25,26. Nevertheless, unmodified chitosan exhibits several well-documented drawbacks: low mechanical strength, relatively modest surface area, and instability in acidic media. These deficiencies constrain its direct use in continuous-flow or high-throughput operations. To overcome them, researchers have explored chemical crosslinking, surface grafting, and, crucially, the incorporation of nanostructured fillers or other reinforcing phases within the chitosan matrix. Magnetic chitosan beads and chitosan-based hydrogels exemplify such approaches and have demonstrated both enhanced adsorption capacities and more straightforward recovery from treated effluents27,28. Additional integration of high-surface-area components, notably metal–organic frameworks (MOFs) and graphene oxide (GO), has been shown to further increase adsorption capacity while simultaneously improving mechanical resilience, thereby moving chitosan-centered systems closer to deployable, regenerable sorbents for water treatment26,28. Current efforts thus focus on translating these laboratory-scale modifications into industrially scalable processes and on strengthening regeneration protocols to maintain low lifecycle costs29. Magnetic modification has emerged as a particularly persuasive strategy in this context because it enhances separation efficiency, enables facile recyclability, and improves process economics. Embedding superparamagnetic nanoparticles – most commonly Fe₃O₄ – into an adsorbent framework allows the exhausted sorbent to be recovered rapidly with an external magnetic field, thereby obviating centrifugation or pressure-driven solid–liquid separation and shortening process cycle times30,31. Among magnetically responsive sorbents, magnetic chitosan has become one of the most intensively investigated biopolymer platforms: it retains chitosan’s intrinsic amino and hydroxyl moieties, which can be further derivatized using crosslinkers or secondary functionalities (including graphene oxide and EDTA) to expand the range of targetable contaminants32,33. Controlled solvothermal and co-precipitation syntheses enable precise adjustment of particle size, crystallinity, and magnetization, which in turn improves colloidal stability and promotes higher adsorption efficiencies in aqueous systems31,33. Importantly, many such materials preserve a substantial fraction of their adsorption capacity over multiple adsorption–desorption cycles, directly addressing sustainability concerns frequently raised for nanostructured sorbents32. A sizeable empirical literature supports the versatility of these magnetic chitosan systems. Yuwei and Jianlong fabricated magnetic chitosan nanoparticles (8–40 nm) via co-precipitation, achieving a saturation magnetization of 36 emu/g and enabling rapid magnetic decantation from water34. El-Kharrag et al. prepared chitosan-coated Fe₃O₄ particles with diameters near 10 nm using a wet-chemistry route, thereby enhancing surface functionality for adsorption35. Hosain et al. introduced crotonaldehyde and succinic anhydride to modify nano chitosan-coated Fe₃O₄, which markedly elevated the adsorption capacities for Pb(II), Cu(II), and Cd(II) – up to 4700 µmol/g for Cu(II) – by generating additional coordination sites36. In a related study, Ren et al. synthesized an EDTA-modified chitosan/SiO₂/Fe₃O₄ composite that exhibited excellent chelation ability and high removal efficiencies even under acidic conditions37. Complementary formulations have also been reported: Fan et al. incorporated β-cyclodextrin into magnetic chitosan to enhance uptake of organic pollutants, and Tanhaei et al. developed a chitosan/Al₂O₃/Fe₃O₄ composite to exploit alumina’s chemical stability alongside chitosan’s sorptive potential38,39. Extending this materials-engineering trajectory, functionalization of chitosan with zeolitic imidazolate framework-8 (ZIF-8) has proved particularly effective because it unites the hydrophilicity and processability of chitosan with the ultrahigh specific surface area, permanent porosity, and chemical robustness of ZIF-840. Wang et al. reported a ZIF-8-modified PVA–chitosan aerogel with an adsorption capacity of 1216.5 mg/g for Congo Red, while Chen et al. demonstrated that carboxymethyl chitosan aerogels incorporating ZIF-8 could attain 231.36 mg/g for tetracycline, thereby evidencing the synergistic combination of chitosan’s binding sites with MOF-derived porosity41,42. Additional enhancements have been realized through metal-center engineering: Fe-doping of ZIF-8 establishes supplementary adsorption sites and has been shown to raise tetracycline removal to approximately 867 mg/g43. Further functionalization with chitosan and polyethylene glycol (PEG) has likewise been explored to couple improved adsorption with enzyme-immobilization capability, opening routes to multifunctional water-treatment platforms44. Collectively, these studies demonstrate that chitosan–ZIF-8 hybrids can be rendered high-capacity, mechanically robust, and application-flexible. The adsorption of pharmaceutical compounds on such hybrid sorbents is nevertheless mechanistically complex. Hydrogen bonding tends to predominate when the sorbent presents accessible hydroxyl or amine groups, which is often the case for tetracycline and triclosan removal45,46. Electrostatic attraction becomes the principal driving force when the surface charge of the adsorbent and the ionic state of the pharmaceutical are opposite, while nonpolar or weakly polar pharmaceuticals may instead rely on hydrophobic interactions for uptake, as shown in several polymer–drug systems46,47. π–π stacking is especially consequential for aromatic pharmaceuticals and dyes interacting with carbonaceous or other π-electron-rich surfaces47. Moreover, in adsorbents with high internal porosity, size-compatible drug molecules can be captured via simple pore-filling, which complements – rather than replaces – the specific chemical interactions described above46. ZIF-8 itself is a member of the MOF family with a zeolite-like topology constructed from Zn²⁺ nodes and 2-methylimidazole linkers; this framework affords ultrahigh porosity, tunable pore apertures, and excellent thermal and chemical stability48,49. With surface areas frequently exceeding 1100 m²/g, ZIF-8 can adsorb a wide range of pollutant species – heavy metals, synthetic dyes, and antibiotics – predominantly through π–π interactions, hydrogen bonding, and metal–ligand coordination50,51. A further advantage is its synthetic versatility: solvothermal and room-temperature routes both permit structural customization and facilitate scale-up to practical throughputs49,52. Numerous investigations have underscored ZIF-8’s efficacy for removing tetracyclines and sulfamethoxazole, noting that it maintains its crystallinity and sorptive capacity in both acidic and neutral media50,52,53. This operational durability is crucial for hybrid adsorbents intended for repeated cycling. Consistent with these observations, chitosan-based adsorbents have been repeatedly proposed for the remediation of pharmaceutical-laden effluents. Salahshoori et al. examined UiO-66-type MOFs functionalized with chitosan and oxidized chitosan for removing rosuvastatin and simvastatin; complementary molecular-modeling analyses confirmed that hydrogen bonding and π–π stacking were the principal contributors to the observed uptake enhancement54. Kasbaji et al. emphasized chitosan’s adaptability when co-formulated with other biopolymers, highlighting its inherent regenerability and cost-effectiveness for water-treatment applications55. Isibor et al. further corroborated this view by demonstrating that chitosan integrated with advanced nanostructures can increase surface functionality and accelerate adsorption kinetics, pointing to chitosan-centered hybrids as technically plausible candidates for treating pharmaceutical-contaminated wastewaters56. Despite the breadth of these contributions, several practically important gaps remain. First, the majority of published studies rely on laboratory-grade chitosan or on single-mode chitosan modifications, whereas real-world implementation favors purified industrial-grade chitosan because of its lower cost and wider availability. Second, only a limited number of reports integrate both magnetic nanoparticles – to enable rapid, tool-free recovery – and ZIF-8 nanocrystals – to furnish high porosity and high-affinity adsorption sites – within a single, hierarchically organized chitosan matrix tailored for antibiotic removal. Third, even when promising materials are produced, optimization of tetracycline uptake is often carried out with classical one-factor-at-a-time experimentation, which cannot faithfully resolve the nonlinear, interaction-rich relationships among pH, concentration, temperature, contact time, and adsorbent dosage. To address these gaps, in the present work we fabricate a magnetic, chitosan-based adsorbent by integrating Fe₃O₄ nanoparticles and ZIF-8 nanocrystals into purified industrial-grade chitosan via alkaline gelation followed by post-synthetic surface modification. The synthesis is intentionally designed to couple magnetic recoverability (from Fe₃O₄) with enhanced textural properties and active-site density (from ZIF-8). The resulting materials are comprehensively characterized by FESEM, FTIR, BET, XRD, and DRS to establish morphology, crystallinity, surface chemistry, and textural attributes. Their adsorption toward tetracycline is then systematically evaluated as a function of pH, initial antibiotic concentration, temperature, contact time, and adsorbent dosage. A Box–Behnken design within the framework of response surface methodology is employed to optimize operating conditions, and five machine-learning models – SVR, ANN, RFR, GBR, and XGBoost – are subsequently trained to capture nonlinear dependencies among the variables and to enable accurate prediction of adsorption efficiency. Finally, kinetic modeling is performed to elucidate the dominant adsorption mechanisms under optimized conditions. Materials and methods Materials Locally sourced chitosan (C6H11NO4)n was employed as the foundational biopolymer for the adsorbent system. All other reagents, including ferric chloride (FeCl₃), ferrous chloride tetrahydrate (FeCl₂·4 H₂O), sodium hydroxide (NaOH), ethanol (C2H5OH), zinc nitrate hexahydrate (Zn(NO₃)₂·6 H₂O), 2-methylimidazole (C4H6N2), and tetracycline hydrochloride (C22H24N2O8·HCl), were all obtained from Merck were utilized in their as-received form without additional purification. Only chitosan was subjected to a preliminary purification process to enhance its functional performance. Preparation of functionalized adsorbents Purification of industrial-grade chitosan To purify industrial-grade chitosan, it was suspended in deionized water adjusted to neutral mildly alkaline pH to suppress dissolution and facilitate impurity release. Continuous stirring at room temperature (≈ 25 °C) for 60 min enhanced dispersion and mass transfer, promoting desorption of low-molecular-weight and ionic impurities; the suspension was then allowed to settle, the supernatant was decanted, and the rinse was repeated with fresh deionized water. Synthesis of Fe₃O₄ magnetic nanoparticles To synthesize Fe₃O₄ nanoparticles, 2.448 g FeCl₃ and 1.5 g FeCl₂·4 H₂O were added to 200 mL of deionized water heated to 90 °C. After stirring for 30 min at 2000 rpm, 1 M NaOH was added dropwise to reach pH 11. The mixture was stirred at 90 °C for 8 h. The formed Fe₃O₄ nanoparticles were magnetically separated, washed with ethanol–water, and vacuum-dried. Preparation of ZIF-8 nanocrystals Zinc nitrate (1.17 g) and 2-methylimidazole (22.7 g) were each dissolved in deionized water under vigorous stirring at atmospheric condition. The two solutions were immediately combined under vigorous stirring and allowed to react for 5 min. The precipitate was collected by centrifugation at 8,000 rpm for 15 min, washed with deionized water, and dried at 65 °C for 24 h. Fabrication of chitosan/ZIF-8 composite beads To prepare chitosan/ZIF-8 beads, 3 g chitosan and 1.487 g zinc nitrate hexahydrate were dissolved in 100 mL deionized water with 2% acetic acid and stirred for 4 h. The solution was dropped into 200 mL of 1 M NaOH from 30 cm height to form beads, which were stabilized for 20 min and rinsed thrice. A 0.15 M solution of 2.315 g 2-methylimidazole in 188 mL water was prepared separately. The beads were soaked in this solution for 12–24 h, then washed and freeze-dried. Synthesis of magnetic chitosan/ZIF-8 composite beads To synthesize magnetic chitosan/ZIF-8 beads, 3 g chitosan and 1.487 g zinc nitrate were dissolved in 100 mL of 2% acetic acid solution and stirred for 4 h. After adding 3 g Fe₃O₄, the mixture was stirred for 30 min and then dropped into 200 mL of 1 M NaOH from 30 cm height to form beads. Beads were stabilized for 20 min and rinsed. A 0.15 M solution of 2.315 g 2-methylimidazole in 188 mL water was prepared, and the beads were soaked for 12–24 h, washed, and freeze-dried. Adsorption experiments for tetracycline removal Batch adsorption experiments for tetracycline (10–50 mg L⁻¹) were performed in a mechanically stirred batch reactor under controlled laboratory conditions. Adsorbent dosages of 50–300 mg L⁻¹ were evaluated. Suspensions were continuously stirred throughout to maintain uniform dispersion and solid–liquid contact. After the prescribed contact time, the solids were separated (magnetic decantation for Fe₃O₄-containing beads or filtration, as appropriate), and the supernatants were analyzed at 357 nm by spectrophotometry to quantify tetracycline removal. Each experiment was repeated three times. All experimental results in this study are presented with a ± 5% error margin, reflecting the high accuracy and excellent repeatability achieved throughout the experimental procedures. Optimization studies Response surface methodology A Box–Behnken design (BBD) was applied under the response surface methodology (RSM) framework to optimize the adsorption process for tetracycline removal. Four key factors were evaluated for their impact on removal efficiency. The resulting dataset supported the development of a second-order polynomial model. Significance of model terms was tested using ANOVA. Factor ranges are presented in Table 1. Table 1Experimental variables and their ranges.ParameterRangeA: Tetracycline concentration (mg/L)10–50B: Catalyst dosage (mg/L)50–300C: Time (min)30–240D: pH6–11 Experimental variables and their ranges. Machine learning models To rigorously model the nonlinear and high-dimensional interactions influencing tetracycline adsorption, five advanced supervised machine learning (ML) algorithms were employed: Artificial Neural Networks (ANN), Support Vector Regression (SVR), Random Forest Regression (RFR), Gradient Boosting Regression (GBR), and Extreme Gradient Boosting (XGBoost). Each model utilized four key input features (tetracycline concentration, adsorbent dosage, contact time, and pH) with adsorption efficiency as the target response variable. A summary of the core characteristics and configurations of these algorithms is presented in Table 2. Model performance was evaluated consistently across all approaches using standard statistical metrics, including the coefficient of determination (R²), root mean square error (RMSE), mean absolute error (MAE), and 5-fold cross-validation. Table 2Overview of machine learning algorithms used for tetracycline adsorption modeling.ModelTypePreprocessingKey hyperparameter focusANNNeural networkStandardScalerNetwork architecture, activation dynamics, optimization strategySVRKernel regressionStandardScalerRegularization control, margin flexibility, kernel responsivenessRFREnsemble (bagging)NoneTree ensemble size, model complexity, branching precisionGBREnsemble (boosting)NoneLearning momentum, tree refinement depth, progressive error correctionXGBoostRegularized boostingNoneRegularized boosting strength, structural efficiency, sampling robustness Overview of machine learning algorithms used for tetracycline adsorption modeling. Results and disscusion Morphological insights The FESEM of the purified chitosan reveals a fibrous surface architecture that has been moderately preserved following the purification procedure. In Fig. 1(a), the surface shows a slightly rough texture with somewhat uniform features, suggesting that the base fibrous morphology of chitosan has not been significantly disrupted. This surface texture may result from the removal of superficial impurities during washing and settling, although no substantial structural enhancement is observed. At higher magnifications, as seen in Fig. 1(b,c), some fine structural details can be distinguished, including minor alignments in the polymeric matrix. These observations indicate that the vacuum drying process at 50 °C did not cause major degradation, though the chitosan surface remains relatively simple in its morphology, as expected from a sample at this stage of processing. Elemental mapping analysis offers additional insight, showing that nitrogen, oxygen, and carbon elements are present and generally distributed across the surface. The nitrogen signal, corresponding to amino groups, appears moderately uniform, suggesting that some reactive sites remain accessible. Similarly, the oxygen distribution indicates the presence of hydroxyl groups, though without pronounced structural regularity. The carbon mapping, while slightly uneven, aligns with expectations for industrial-grade chitosan that has undergone basic purification. Figure 1 suggest that the chitosan retains essential chemical features but does not exhibit particularly advanced or enhanced surface characteristics at this stage. FESEM images (a–c) and elemental mapping of purified chitosan showing fibrous suface morphology and uniform distribution of nitrogen, oxygen and carbon. The FESEM micrographs of the Fe₃O₄ nanoparticles, synthesized via the co-precipitation method, exhibit a well-defined and homogenous surface morphology. In Fig. 2(a), at lower magnification, the particles present a smooth yet subtly textured surface, indicative of the formation of uniform nanoparticles. As magnification increases in Fig. 2(b,c), the aggregation of the nanoparticles becomes more pronounced, revealing spherical clusters with dimensions ranging from approximately 500 nm to several micrometers. This aggregation can be attributed to inter-particle interactions during the precipitation process, without signifying excessive particle coarsening. The elemental mapping in Fig. 2(d) confirms a uniform distribution of iron (red) throughout the nanoparticle surface, essential for ensuring the desired magnetic properties. The oxygen (blue) distribution is similarly homogenous, validating the formation of Fe₃O₄ with an appropriate ferrite structure. FESEM imaging and elemental mapping of Fe₃O₄ nanoparticles: Surface morphology, aggregation behavior, and uniform distribution of iron and oxygen. The FESEM images of the ZIF-8 nanoparticles (Fig. 3(a–c)) demonstrate a highly uniform and crystalline morphology, characteristic of well-synthesized nanoparticles. Figure 3(a) presents a smooth yet granular surface, with individual particles exhibiting a spherical shape, indicative of controlled growth during synthesis. Figure 3(b) shows the particles with well-defined faceted surfaces, highlighting the crystalline nature of ZIF-8, while maintaining size uniformity and minimizing aggregation. In Fig. 3(c), the nanoparticles retain their sharp facets and distinct edges, underscoring the absence of significant coarsening or irregularities. Elemental mapping in Fig. 3(d) confirms the uniform distribution of the key elements within the nanoparticles. Nitrogen (orange) is evenly spread, confirming the successful incorporation of 2-methylimidazole into the ZIF-8 framework. The oxygen (blue) distribution further validates the formation of the porous structure, while carbon (green) and zinc (magenta) are uniformly dispersed, demonstrating the efficient synthesis of high-purity ZIF-8 nanoparticles with the desired crystalline and chemical characteristics. FESEM images and elemental mapping of ZIF-8 nanoparticles: Surface morphology (a), particle faceting (b,c), and uniform distribution of nitrogen (orange), oxygen (blue), carbon (green), and zinc (magenta) (d). The FESEM images of the chitosan-ZIF-8 composite beads (Fig. 4(a–f)) provide in-depth insights into both the external and internal structures of the material. Figure 4(a) presents the external surface of the composite beads, where the ZIF-8 particles are uniformly distributed over the chitosan matrix, creating a textured surface. The granular nature of the surface indicates the effective incorporation of ZIF-8 into the chitosan framework, providing structural reinforcement to the beads. In Fig. 4(b), the spherical shape of the beads is more pronounced, demonstrating the consistency in particle size, which results from the controlled dropwise addition during synthesis. The uniform distribution of particles across the surface reflects the homogeneous reaction environment during synthesis. Figure 4(c) shows the surface at a higher magnification, revealing sharper features and faceting typical of the ZIF-8 crystal structure, confirming the successful synthesis of the composite material. Upon examining the internal structure of the beads, Fig. 4(df) display the cross-sectional views, which reveal a highly porous interior. Figure 4(d) shows interconnected voids within the beads, essential for creating high surface area and enhancing the adsorption capacity of the material. These pores are uniformly distributed, ensuring that the composite beads retain their structural consistency. Figure 4(e,f) provide closer views of the internal porosity, confirming the presence of large, well-formed cavities that contribute to the overall porosity of the material. The uniformity of these voids throughout the internal structure is a key feature that supports the material’s utility in adsorption and environmental applications. The elemental mapping analysis in Fig. 4(a–c) further verifies the uniform distribution of elements within the composite. In Fig. 4(a), the nitrogen (green) mapping reveals the presence of chitosan, while Fig. 4(b) shows the zinc (orange) distribution, confirming the incorporation of zinc into the composite. Figure 4(c) displays the oxygen (blue) mapping, confirming the presence of oxygen atoms, which are essential for the formation of the ZIF-8 framework. The internal elemental distribution is also mapped in Fig. 4(d–f), where nitrogen, zinc, oxygen, and carbon are evenly distributed throughout the structure, indicating the successful and consistent synthesis of the chitosan-ZIF-8 composite. This consistent elemental distribution and the well-defined porosity of both the external and internal structures make these composite beads highly suitable for advanced applications in adsorption and environmental remediation. FESEM images and elemental mapping of chitosan-ZIF-8 composite beads: External surface morphology (a–c), internal porosity (d–f), and uniform distribution of nitrogen (green), zinc (yellow), oxygen (blue), and carbon (red). The FESEM images of the magnetic chitosan-ZIF-8 composite beads (Fig. 5 (a–f)) offer a comprehensive look into both the external and internal characteristics of the composite material. Figure 5 (a) shows the external surface of the beads, where the particles are uniformly distributed, creating a granular yet smooth surface. This texture indicates the successful formation of the ZIF-8 crystals on the chitosan beads, resulting in a stable composite with well-defined features. Figure 5 (b) presents a clearer view of the surface, highlighting the distinct granular structure of the ZIF-8 particles that are well-dispersed on the chitosan matrix. The uniformity in particle size and distribution reflects the controlled synthesis conditions used in the preparation of these beads. Figure 5 (c), captured at a higher magnification, shows the crystalline facets of ZIF-8 on the surface, which reinforces the material’s well-ordered and stable framework. For the internal morphology, Fig. 5 (d–f) provide cross-sectional views that reveal the bead’s highly porous structure. Figure 5 (d) shows the internal network of interconnected pores that provide a large surface area, essential for applications such as adsorption. The uniform distribution of these pores throughout the internal structure ensures consistency in surface area and stability. Figure 5 (e,f) provide closer examination of the pores, showing well-defined cavities that further contribute to the bead’s high surface area. These cavities are essential for increasing the adsorption capacity of the beads, which is crucial for their use in environmental and wastewater treatment applications. Elemental mapping analysis in Fig. 5(a–c) provides further confirmation of the successful integration of the chitosan and ZIF-8 components. Figure 5 (a) shows nitrogen (green) distribution, confirming the presence of chitosan in the composite, while Fig. 5 (b) presents zinc (yellow), confirming the successful incorporation of zinc into the structure. Figure 5 (c) highlights the distribution of oxygen (blue) and carbon (red), confirming the formation of the ZIF-8 framework and the retention of the chitosan structure. The mapping in Fig. 5 (d–f) for nitrogen, zinc, and oxygen further demonstrates the uniform distribution of these elements throughout the internal structure, ensuring the integrity and functionality of the composite material. These well-defined structural and elemental features make the magnetic chitosan-ZIF-8 composite beads suitable for a variety of advanced applications, including environmental remediation, drug delivery, and magnetic separation. FESEM images and elemental mapping of magnetic chitosan-ZIF-8 composite beads: External surface morphology (a–c), internal porosity (d–f), and uniform distribution of nitrogen (green), zinc (yellow), iron (magenta), oxygen (blue), and carbon (red). Functional group determination The FTIR spectra provide mechanistic insights into the individual and synergistic contributions of chitosan, ZIF-8, and Fe₃O₄ toward tetracycline adsorption (Fig. 6). Industrial-grade chitosan exhibits canonical polysaccharide signatures, including a broad O–H/N–H stretching band (3400–3250 cm⁻¹), amide I (~ 1650 cm⁻¹) and II (~ 1590 cm⁻¹) bands, and C–O stretching modes (1080–1020 cm⁻¹), consistent with its hydrophilic, hydrogen-bonding nature and partially deacetylated structure. FTIR spectra of the individual and composite materials: chitosan, ZIF-8, chitosan@ZIF-8 (before and after tetracycline adsorption), magnetic chitosan@ZIF-8 (before and after tetracycline adsorption). ZIF-8 displays characteristic vibrational features of its metal-organic framework: aromatic C–H stretching (3100–2900 cm⁻¹), C = N stretching (1580–1500 cm⁻¹) confirming Zn–imidazolate coordination, and Zn–N vibrations (760–690 cm⁻¹) serving as a structural fingerprint. In the chitosan@ZIF-8 hybrid, these ZIF-8 peaks co-exist with dominant chitosan bands. Slight shifts in amide I/II bands and emerging C–N vibrations (1350–1250 cm⁻¹) indicate intermolecular interactions and partial encapsulation of ZIF-8 within the biopolymeric matrix. Fe₃O₄ incorporation introduces an Fe–O band (580–550 cm⁻¹) without diminishing ZIF-8 or chitosan signals, imparting magnetic separability while preserving adsorption-relevant chemical functionality. The co-existence of Zn–N and Fe–O peaks confirms structural retention of both inorganic domains. Synergistically, ZIF-8 contributes coordinatively unsaturated Zn²⁺ sites and nitrogen-rich imidazolate rings for Lewis’s acid-base interactions and π–π stacking with tetracycline’s aromatic moieties. Fe₃O₄ provides additional surface hydroxyls and electrostatic binding sites, potentially enhancing adsorption via metal–ligand coordination and hydrogen bonding. Chitosan supplies accessible amino and hydroxyl groups, facilitating secondary hydrogen bonding and electrostatic interactions. Following tetracycline adsorption, FTIR deconvolution reveals intensified and broadened O–H/N–H stretching (3400–3250 cm⁻¹), signifying enhanced hydrogen bonding across chitosan, Fe₃O₄, and ZIF-8 sites. The amide I band becomes more pronounced and slightly red-shifted, overlapping with tetracycline’s carbonyl absorption. New peaks emerge between 1500 and 1450 cm⁻¹, attributed to tetracycline’s aromatic C = C stretches, while broader C–O and C–O–C features (1100–1000 cm⁻¹) suggest complexation involving both ZIF-8 nitrogen sites and Fe₃O₄ hydroxyl groups. The Zn–N (≈ 750 cm⁻¹) and Fe–O (≈ 570 cm⁻¹) peaks persist but exhibit subtle shifts, implying that adsorption partially perturbs metal–ligand environments at ZIF-8 and Fe₃O₄ surfaces. The fingerprint region below 900 cm⁻¹ becomes more complex, consistent with multi-site, synergistic adsorption where chitosan’s polymeric matrix, ZIF-8 frameworks, and Fe₃O₄ nanoparticles collectively contribute to high tetracycline affinity. Surface area characterization The BET and BJH results confirmed the progressive modification of the textural properties after incorporation of ZIF-8 and Fe₃O₄ into the chitosan matrix (Table 3). Purified chitosan exhibited a low BET surface area of 13.903 m² g⁻¹, an average pore diameter of 10.945 nm, a BJH mesopore volume of 0.03727 cm³ g⁻¹, and a BJH mesopore surface area of 11.038 m² g⁻¹, indicating a limited mesostructured texture. In contrast, ZIF-8 showed a much higher BET surface area of 511.14 m² g⁻¹, together with a smaller average pore diameter of 2.0013 nm, a BJH mesopore volume of 0.072886 cm³ g⁻¹, and a BJH mesopore surface area of 93.458 m² g⁻¹, confirming that ZIF-8 is the main porous component of the system. After ZIF-8 incorporation, the BET surface area of the chitosan/ZIF-8 composite increased to 28.945 m² g⁻¹, while the mesopore volume and mesopore surface area increased to 0.054851 cm³ g⁻¹ and 16.455 m² g⁻¹, respectively. These changes demonstrate that ZIF-8 enhanced the accessible surface and pore volume of chitosan, although the composite remained significantly less porous than pristine ZIF-8. Table 3BET specific surface area and BJH pore-structure parameters of chitosan, ZIF-8, and their non-magnetic and magnetic composites before and after tetracycline adsorption.SampleBET surface area (m²/g)Avg. pore diameter (nm)BJH peak pore diameter (nm)BJH mesopore volume (cm³/g)BJH mesopore surface area (m²/g)Chitosan13.90310.9454.650.0372711.038ZIF-8511.142.00131.290.07288693.458Chitosan + ZIF-828.9458.21074.650.05485116.455Chitosan + ZIF-8(After adsorption)5.53463.14833.150.001682~ 0Magnetic Chitosan + ZIF-847.66343.03125.30.500623.478Magnetic Chitosan + ZIF-8 (after ads)10.764.6983.150.0090361.6528 BET specific surface area and BJH pore-structure parameters of chitosan, ZIF-8, and their non-magnetic and magnetic composites before and after tetracycline adsorption. Chitosan + ZIF-8 (After adsorption) After tetracycline adsorption, the chitosan/ZIF-8 composite showed a marked decrease in textural accessibility. The BET surface area decreased from 28.945 to 5.5346 m² g⁻¹, the average pore diameter decreased from 8.2107 to 3.1483 nm, the BJH mesopore volume dropped from 0.054851 to 0.001682 cm³ g⁻¹, and the BJH mesopore surface area approached zero. The BJH peak pore diameter also shifted from 4.65 to 3.15 nm. These reductions indicate substantial occupation of the accessible pore structure by tetracycline molecules and a strong decrease in available adsorption space after uptake. The effect of Fe₃O₄ incorporation was more pronounced at the composite level. The magnetic chitosan/ZIF-8 sample exhibited a BET surface area of 47.663 m² g⁻¹, an average pore diameter of 43.031 nm, a BJH peak pore diameter of 25.3 nm, a mesopore volume of 0.5006 cm³ g⁻¹, and a mesopore surface area of 23.478 m² g⁻¹, all of which were higher than those of the non-magnetic composite. This result indicates that Fe₃O₄ incorporation generated a more open mesostructured architecture with greater transport-accessible pore space. After adsorption, these values decreased to 10.76 m² g⁻¹, 4.698 nm, 3.15 nm, 0.009036 cm³ g⁻¹, and 1.6528 m² g⁻¹, respectively, confirming direct participation of the accessible pore network in tetracycline uptake. Importantly, the magnetic composite retained higher residual surface area and mesopore parameters than the non-magnetic composite after adsorption, indicating a more open and accessible structure under adsorption conditions. XRD As illustrated in Fig. 7, ZIF-8 exhibits a highly resolved diffraction profile with intense reflections at 2θ angles of 7.3°, 10.4°, 12.8°, 14.7°, 16.4°, and 18.1°, which correspond to the (011), (002), (112), (022), (013), and (222) planes of its cubic sodalite framework (JCPDS No. 96-410-5651). These peaks display narrow FWHM values, indicative of well-developed crystallinity and a uniform coordination network of Zn²⁺ nodes linked by 2-methylimidazolate ligands. The absence of non-indexed peaks suggests excellent phase purity, highlighting the efficiency of the solvothermal synthesis in suppressing undesired side products and amorphous content. XRD patterns of ZIF-8, chitosan/ZIF-8, and magnetic chitosan/ZIF-8 beads showing preserved ZIF-8 crystallinity after composite formation and magnetic functionalization. In the Chitosan + ZIF-8 composite, the signature reflections of ZIF-8 are retained, although attenuated and broadened which can be considered as evidence of reduced long-range order due to chitosan integration. The semi-amorphous nature of chitosan introduces local structural disorder, but the preservation of Bragg peak positions confirms that the MOF lattice remains unaltered. Slight elevation in background scattering further supports the presence of an amorphous organic phase. The absence of new crystalline peaks indicates that no additional phases nucleated during composite formation, and that chitosan functions as a structural encapsulant without disrupting ZIF-8 topology. The Magnetic Chitosan + ZIF-8 composite shows superimposed diffraction features arising from both ZIF-8 and Fe₃O₄. ZIF-8 peaks are further broadened and suppressed, reflecting cumulative effects of both chitosan encapsulation and magnetic nanoparticle loading. Notably, additional peaks emerge at 30.2°, 35.6°, 43.2°, 53.6°, 57.2°, and 62.8°, which correspond to the (220), (311), (400), (422), (511), and (440) planes of spinel-structured Fe₃O₄ (JCPDS No. 19–0629). The prominent (311) reflection, typical of magnetite, signifies crystallographically oriented domains. No reflections corresponding to other iron oxides such as α-Fe₂O₃ or γ-Fe₂O₃ are present, indicating phase-selective formation of Fe₃O₄. The absence of any peak shifts or significant line broadening in either phase implies minimal interfacial lattice strain and supports structural compatibility within the hybrid matrix. These data confirm homogeneous nanoparticle dispersion without aggregation and demonstrate the preservation of ZIF-8 crystallinity in a magnetically active composite architecture. Effect of parameters The influence of adsorbent dosage on tetracycline adsorption was rigorously assessed over a concentration range of 50 to 300 mg L⁻¹ (Fig. 8c). A progressive enhancement in removal efficiency was observed, reaching approximately 48% at the highest dosage. This increase is attributed primarily to the greater availability of accessible adsorption sites and the enlarged effective interfacial area provided by higher sorbent loading, which collectively promote more frequent adsorbent–adsorbate interactions. Nevertheless, the response tended to level off beyond 250 mg L⁻¹, indicating that further increases in dosage yielded only marginal improvement. This behavior is consistent with the gradual approach to site saturation and with the possible overlap or partial shielding of active sites at elevated solid loading. Temperature-dependent adsorption behavior (Fig. 8d) exhibited a maximum at 35 °C, followed by a decline at higher temperature. Such behavior suggests that moderate thermal input facilitates mass transfer and solute mobility, whereas excessive temperature may weaken interfacial binding forces and favor partial desorption, thereby reducing overall removal efficiency. Effect of (a) pH, (b) initial concentration, (c) adsorbent dosage, and (d) temperature on tetracycline removal using Fe₃O₄@CS/ZIF-8, evaluated by the OFAT method. Adsorption efficiency showed an inverse relationship with initial tetracycline concentration (Fig. 8b), decreasing from approximately 48% at 10 mg L⁻¹ to below 30% at 50 mg L⁻¹. This trend is consistent with the finite number of available active sites on the adsorbent surface; as the solute concentration increases, the ratio of available sites to tetracycline molecules decreases, resulting in lower percentage removal despite a possible increase in the absolute amount adsorbed. The effect of pH (Fig. 8a) revealed a monotonic increase in removal toward the alkaline region, with the highest OFAT response observed near pH 11. However, this trend should be interpreted within the limitations of the one-factor-at-a-time framework, in which pH was varied independently while the other operational variables were kept fixed. Accordingly, the maximum observed near pH 11 represents a local univariate response under fixed co-conditions rather than the overall optimum of the integrated adsorption system. From a chemical standpoint, the alkaline enhancement cannot be attributed solely to a simple electrostatic attraction mechanism. As the medium becomes alkaline, tetracycline progressively shifts toward deprotonated forms, while proton competition for adsorption sites is reduced. Under such conditions, adsorption is more plausibly promoted by the cooperative contribution of multiple interactions, including hydrogen bonding through hydroxyl and amino functionalities of the composite, interfacial interactions involving the inorganic domains, and confinement of tetracycline molecules within the accessible porous structure. Therefore, the improved uptake in the alkaline region is better understood as the result of a combined multi-site adsorption environment rather than a single charge-driven pathway. Optimization As illustrated in Table 4, a comparative evaluation of six data-driven modeling paradigms was undertaken to quantify the adsorption efficiency of tetracycline, based on an experimental dataset derived from a BBD within the framework of RSM. The experimental matrix encompassed systematic variation of tetracycline concentration, adsorbent dosage, contact time, and pH, enabling detailed analysis of nonlinearities and synergistic interactions. The BBD model, constructed as a second-order polynomial regression, demonstrated high statistical integrity, evidenced by an R² of 0.9930, adjusted R² of 0.9856, and predicted R² of 0.9510, with an adequate precision value of 45.079. Analysis of variance confirmed the significance of all main effects as well as several interaction and curvature terms, indicating strong model fit across the experimental space. Table 4Run matrix for tetracycline adsorption: factor levels (A–D) with observed and model-predicted removal efficiencies (%).RunA: Tetracycline Concentration (mg/L)B: Catalyst Dosage (mg/L)C: Time (min)D: pHR: removal (%)Prediction modelsBBDSVRRFRGBRANNXGBoost110175308.542.0045.5842.1035.8641.9941.9941.61230502408.540.3747.7140.4735.1238.2341.2539.573101752408.571.1872.1971.2868.3372.5470.9371.64430175240643.7348.9843.8345.0842.6043.7042.305501752408.548.9561.1048.8544.1246.7548.9348.356303002408.563.8368.1663.7359.1065.7263.7564.46710501358.546.8145.6946.7040.4445.4146.6946.248503001358.545.0160.7545.1043.9745.0445.2144.69910175135653.8552.3953.7555.2753.0253.9653.2810101751351173.8572.1573.7569.1174.0773.8474.3211501751351145.1760.7045.0744.1144.7345.2644.751250175135621.3137.0921.4136.2521.7221.3521.781330300135649.6754.5849.7646.2147.7349.6048.911450175308.515.2329.9415.3228.6615.7615.1315.6715301751358.556.6261.2355.6856.5756.1655.8156.111630300308.545.0547.2544.9533.9042.9645.3144.22173050135611.3617.4811.4629.5613.2511.5712.091830175301136.9541.7837.0531.1235.1937.0335.2619301751358.555.1861.2355.6856.5756.1655.8156.1120301751358.557.6661.2355.6856.5756.1655.8156.1121301751358.555.7861.2355.6856.5756.1655.8156.1122301752401163.1468.4763.2459.0364.9162.8064.81233017530613.1617.9013.2626.8214.9312.9514.792430501351141.5547.8341.6535.6639.4641.5940.8525301751358.555.2861.2355.6856.5756.1655.8156.1126303001351162.5167.5962.6158.8664.5662.7263.18273050308.55.61610.845.7124.237.695.716.4428103001358.574.0477.2674.1268.6974.3774.5974.392950501358.524.0535.4623.9533.3225.4124.1024.55 Run matrix for tetracycline adsorption: factor levels (A–D) with observed and model-predicted removal efficiencies (%). The Box–Cox plot (Figure S.1) confirms the statistical adequacy of the response surface model without the need for transformation, as the optimal lambda (λ) value of 1 lies well within the 95% confidence interval and coincides with the minimum residual sum of squares. This indicates that the model residuals are already homoscedastic and approximately normally distributed, validating the accuracy and stability of the parameter estimates. In alignment with these findings, the normal probability plot of externally studentized residuals (Figure S.2) demonstrates that virtually all data points fall in close proximity to the reference line, with negligible departures even at the distribution tails. This pattern indicates that the residuals conform closely to a Gaussian distribution, evidencing homogeneity of variance and the lack of appreciable skewness or kurtosis, thereby supporting the validity of the model’s underlying statistical assumptions. The ANOVA results in Table S.1 indicate that the quadratic model is highly significant (p < 0.0001) with an F-value of 141.72, confirming a strong overall fit to the experimental data. Among the individual factors, tetracycline concentration (A), adsorbent dosage (B), contact time (C), and pH (D) each exhibit highly significant effects (p < 0.0001), reflecting their critical roles in influencing the adsorption efficiency. Interaction terms BC and BD are also significant, implying that the combined effects of contact time with dosage, and pH with dosage, meaningfully impact the response. Most other two-factor interactions (AB, AC, AD, and CD) are not significant, suggesting limited synergistic or antagonistic behavior between those parameter pairs. Significant quadratic terms for B², C², and D² highlight pronounced curvature effects in the response surface, particularly for dosage, time, and pH, while A² remains non-significant. The residual error is low, and the lack-of-fit test is not significant (p = 0.0505), indicating that the model captures the systematic variation in the data without unexplained structure. Nevertheless, the BBD model’s reliance on a fixed second-order polynomial equation inherently restricts its ability to capture highly nonlinear behaviors or complex higher order interactions among variables. In the tetracycline adsorption system investigated here, certain parameters (such as pH and contact time) exhibit multi peak or saturation type response patterns that cannot be adequately represented by a quadratic form constrained to simple curvature and bilinear interaction terms. This structural limitation reduces the model’s capacity to resolve localized variations and asymmetrical dependencies in the response surface. In contrast, machine learning frameworks such as SVR and ANN achieve enhanced flexibility by expanding the feature space through kernel-based mapping or nonlinear activation layers, enabling them to fit irregular and multi scale patterns in the data. Such architectures can more effectively learn and generalize the complex, non-isotropic variable interactions intrinsic to the adsorption process, resulting in higher pointwise predictive accuracy and greater robustness across diverse operating conditions. SVR outperformed all other models in terms of predictive resolution, attaining an R² of 0.99944, with an RMSE of 0.4339 and MAE of 0.2174. The SVR architecture leveraged scaled inputs and kernel-based feature expansion, enabling it to model complex response surfaces with minimal error propagation. Hyperparameter tuning via cross-validation further optimized model stability under small-sample conditions, yielding high reproducibility. ANNs yielded comparable performance, achieving an R² of 0.99935 with RMSE and MAE of 0.4668 and 0.2720, respectively. The ANN model employed a two-layer structure trained to convergence on standardized inputs. Regularization and validation routines constrained model complexity, mitigating overfitting while retaining sufficient flexibility to learn nonlinear interdependencies intrinsic to the dataset. XGBoost returned an R² of 0.99778, with higher RMSE (0.8661) and MAE (0.7603). Its architecture, based on iterative refinement of residuals within a boosted ensemble of decision trees, delivered a well-calibrated balance between bias reduction and variance control. Embedded regularization and stochastic sampling conferred robustness, albeit with slightly diminished precision relative to SVR and ANN. GBR, while structurally akin to XGBoost, exhibited reduced predictive acuity, with an R² of 0.99390 and elevated RMSE and MAE values of 1.4339 and 1.2381, respectively. The absence of advanced regularization strategies and computational efficiencies inherent to XGBoost likely contributed to this disparity, despite a comparable optimization protocol. RFR, although widely utilized for its ensemble strength and variance reduction capabilities, underperformed relative to other learners. Constructed through bagging and averaging across multiple trees, the RFR model exhibited heightened sensitivity to data sparsity and lacked the fine-scale resolution needed for accurate regression in this constrained experimental domain. While the BBD model retained value for factorial analysis and preliminary optimization, its rigid polynomial formulation limited its practical utility in high-resolution predictive contexts. In contrast, data-driven machine learning frameworks demonstrated superior performance across all evaluation metrics, establishing SVR and ANN as particularly potent tools for modeling adsorption phenomena characterized by multidimensional nonlinearities and sparse sampling. The three-dimensional response surface plots (Fig. 9) derived from the Box–Behnken design elucidate the interactive effects of tetracycline concentration, adsorbent dosage, contact time, and pH on adsorption efficiency. As observed, adsorption performance generally improves with increasing adsorbent dosage and contact time, reflecting the availability of more active sites and extended interaction duration. pH notably influences the system, with optimal removal occurring in the mildly alkaline range, likely due to favorable electrostatic interactions between deprotonated tetracycline species and protonated chitosan-based adsorbent sites. Increasing tetracycline concentration tends to decrease removal efficiency, potentially due to site saturation effects. The pronounced curvature in several plots confirms the nonlinear nature of variable interactions, thereby justifying the application of response surface methodology for process optimization. 3D response surface plots showing the interactive effects of tetracycline concentration, adsorbent dosage, contact time, and pH on adsorption efficiency, based on the Box–Behnken design. The curved surfaces highlight nonlinear and synergistic influences among the variables. A comparative evaluation of the six models based on their statistical performance highlights significant disparities in predictive accuracy and generalizability (Table 5). The SVR model outperformed all others, achieving the highest (0.9994), adjusted (0.9993), and predicted (0.9618), confirming its superior capacity for fitting and forecasting within the defined design space. ANN closely followed, with comparable values for (0.9993) and adjusted (0.9992), albeit with a slightly lower predicted (0.9045), suggesting robust interpolation with marginally less generalization strength. GBR and XGBoost exhibited strong fits (> 0.99), yet their predicted values (0.8392 and 0.7936, respectively) indicated limited extrapolative fidelity. RFR, while conceptually advantageous for ensemble modeling, underperformed across all indicators, especially in predicted (0.6527), reflecting its vulnerability to overfitting and reduced robustness under sparse conditions. The BBD model, despite offering a solid foundation for factorial interpretation, demonstrated lower adaptability, particularly in terms of predictive resolution. These results establish SVR and ANN as the most reliable and generalizable approaches for modeling complex adsorption systems with nonlinear parameter interactions. Table 5Statistical performance metrics (R², adjusted R², and predicted R²) for the response surface methodology (BBD) and machine-learning models (SVR, RFR, GBR, ANN, XGBoost) used in predicting tetracycline removal efficiency.Model R 2 R2 AdjustedR2 PredictedRSM (BBD)0.99300.98600.9615SVR0.99940.99930.9618RFR0.81470.78380.6527GBR0.99390.99290.8392ANN0.99930.99920.9045XGBoost0.99770.99740.7936 Statistical performance metrics (R², adjusted R², and predicted R²) for the response surface methodology (BBD) and machine-learning models (SVR, RFR, GBR, ANN, XGBoost) used in predicting tetracycline removal efficiency. Kinetic adsorption study In adsorption kinetic studies, four complementary rate equations are widely employed (pseudo first order (PFO), pseudo second order (PSO), Elovich, and intraparticle diffusion (IPD)) each illuminating a distinct mechanistic facet. In this work, model fitting was performed using Python, leveraging the SciPy library’s non-linear curve fitting tools to estimate kinetic parameters with high precision, ensuring robust statistical evaluation of each model. The PFO model, first articulated by Lagergren in 1898, assumes that the adsorption rate is proportional to the number of vacant surface sites and hence typifies physisorption on relatively homogeneous interfaces. By contrast, the PSO model of Ho and McKay (1999) relates the rate to the square of the unoccupied sites, implicating chemisorption governed by valence forces or electron exchange. The Elovich equation, originally derived to describe gas–solid chemisorption on heterogeneous surfaces, accounts for a logarithmic decrease in sorption energy as coverage increases and is therefore suitable for interfaces bearing a spectrum of active-site energies. Finally, the Weber–Morris IPD model (1963) links uptake to the square root of time, serving as a diagnostic for internal pore diffusion: a linear fit through the origin denotes intraparticle control, whereas finite intercepts reveal additional film-diffusion or surface-reaction resistances57. Juxtaposing these models enables a nuanced dissection of the rate-limiting phenomena operative in tetracycline sequestration by the engineered magnetic chitosan/ZIF-8 beads (Table 6). Table 6Kinetic models used for fitting tetracycline adsorption data, showing their non-linear equations, linearized forms applied for parameter estimation, and associated kinetic constants.ModelNon-linear formLinearized formParameter(s)Pseudo-first order k₁ (min⁻¹)Pseudo-second order k₂ (g mg⁻¹ min⁻¹)Elovich— α, βIPD —, C Kinetic models used for fitting tetracycline adsorption data, showing their non-linear equations, linearized forms applied for parameter estimation, and associated kinetic constants. The kinetic profile tetracycline adsorption onto the magnetic chitosan/ZIF-8 beads based on Table 7, is best represented by the pseudo-second-order (PSO) model, as evidenced by the highest coefficient of determination (R² = 0.991) and the closest agreement between the calculated equilibrium capacity (qe,calc = 27.96 mg g⁻¹) and the experimental value (qe,exp = 24.5 mg g⁻¹). Although the pseudo-first-order (PFO) model also yields a satisfactory correlation (R² = 0.987) with a nearly identical qe,calc (24.16 mg g⁻¹), its slightly lower statistical performance and poorer representation of the adsorption rate at longer contact times confirm that the rate-controlling step cannot be described solely by physical sorption phenomena. Table 7Kinetic parameters and correlation coefficients (R²) for tetracycline adsorption fitted to PFO, PSO, Elovich, and IPD models.Modelqe, exp (mg g⁻¹)qe, calc (mg g⁻¹)Constant(s)R²PFO24.524.16k₁ = 0.035 min⁻¹0.987PSO24.527.96k₂ = 1.57 × 10⁻³ g mg⁻¹ min⁻¹0.991Elovich24.523.9α = 3.20 mg g⁻¹ min⁻¹, β = 0.183 g mg⁻¹0.940IPD24.5—= 1.29 mg g⁻¹ min–1/2, C = 8.23 mg g⁻¹0.799 Kinetic parameters and correlation coefficients (R²) for tetracycline adsorption fitted to PFO, PSO, Elovich, and IPD models. The supremacy of the PSO model suggests that chemisorption, involving valence forces through electron sharing or exchange, governs the overall process. The relatively small kinetic constant (k₂ = 1.57 × 10⁻³ g mg⁻¹ min⁻¹) implies that although surface complexation between tetracycline molecules and the Zn–N coordination sites of ZIF-8 as well as the amine and hydroxyl groups of chitosan is energetically favorable, external mass-transfer resistance within the liquid film is still appreciable. The near-saturation of active sites, reflected in the small deviation between calculated qe and experimental qe, further indicates that the adsorbent operates close to its maximum uptake under the studied conditions. Fitting the Elovich equation (α = 3.20 mg g⁻¹ min⁻¹; β = 0.183 g mg⁻¹; R² = 0.940) corroborates the presence of a heterogeneous energy distribution on the sorbent surface. The high α value denotes a rapid initial uptake attributed to abundant high-energy sites, while the low β value marks a progressive decline in the adsorption rate as these sites become progressively occupied, in accord with the coexistence of meso-/microporous ZIF-8 domains and the more amorphous chitosan matrix. Finally, the intraparticle diffusion (IPD) model displays the weakest correlation (R² = 0.799) and a non-zero intercept (C = 8.23 mg g⁻¹), indicating that pore diffusion (kid = 1.29 mg g⁻¹ min⁻½) is not the exclusive rate-limiting step. Instead, adsorption proceeds through a succession of stages: bulk transport, film diffusion, rapid chemisorption onto external sites, and slower diffusion into the interior micro- and mesopores. The combined evidence therefore supports a multi-stage mechanism in which chemisorption dominates but is preceded and followed by diffusive resistances at different length scales. Equilibrium isotherm analysis The equilibrium adsorption behavior of tetracycline onto the magnetic Fe₃O₄–chitosan/ZIF-8 beads was evaluated using triplicate-mean equilibrium data obtained at 25 °C, pH 8.5, 180 min, and an adsorbent dosage of 50 mg L⁻¹, while the initial tetracycline concentration was varied from 10 to 50 mg L⁻¹. The equilibrium concentration was calculated from the measured removal efficiency according to , and the equilibrium adsorption capacity was then obtained from the mass-balance relationship . Based on these calculations, the equilibrium concentration ranged from 5.36 to 38.23 mg L⁻¹, while the corresponding adsorption capacity ranged from 92.78 to 242.72 mg g⁻¹. The equilibrium data were fitted using the nonlinear forms of the Langmuir and Freundlich isotherm models (Eqs. 1, 2): As summarized in Table 8, the Langmuir model provided the better fit to the experimental equilibrium data, with and RMSE = 10.56 mg g⁻¹, compared with the Freundlich fit . The Langmuir parameters yielded a maximum monolayer capacity of 326.13 mg g⁻¹ and a Langmuir constant of 0.0864 L mg⁻¹. In addition, the calculated dimensionless separation factor fell within 0.188–0.536 over the investigated concentration range, confirming favorable adsorption. These results indicate that, within the studied equilibrium window, tetracycline uptake is described more adequately by a predominantly monolayer-type adsorption regime on a finite population of accessible sites. Nevertheless, the Freundlich constant remains highly informative: since \:0<1/n<1, the adsorption is favorable and the surface cannot be regarded as ideally homogeneous. This interpretation is fully consistent with the hybrid nature of the present adsorbent, in which chitosan amino/hydroxyl groups, Fe₃O₄ hydroxylated domains, and ZIF-8 Zn–imidazolate sites coexist and provide adsorption sites with non-identical local environments. Accordingly, the equilibrium results suggest that although the overall adsorption behavior in the tested concentration range is better represented by Langmuir-type site saturation, the non-ideal surface heterogeneity inferred from the Freundlich exponent remains compatible with the multi-site and multi-interaction adsorption mechanism proposed from FTIR and kinetic analyses. Table 8Isotherm parameters for tetracycline adsorption onto magnetic Fe₃O₄–chitosan/ZIF-8 beads.ModelParameter 1Parameter 2Additional parameterR²RMSELangmuir(qmax = 326.13) mg g⁻¹(KL = 0.0864) L mg⁻¹(RL = 0.188–0.536)0.963810.56Freundlich(KF = 57.27)(n = 2.42)(1/n = 0.413)0.894518.02 Isotherm parameters for tetracycline adsorption onto magnetic Fe₃O₄–chitosan/ZIF-8 beads. Proposed adsorption mechanism Tetracycline uptake by the Fe₃O₄–chitosan/ZIF-8 beads is most plausibly governed by a synergistic multi-site mechanism rather than by a single electrostatic pathway. At the optimized condition of the present study (pH 8.5), tetracycline exists in a pH-dependent amphoteric form, while chitosan undergoes partial deprotonation because its apparent pKa is close to 6.5; accordingly, the adsorption process should not be interpreted as simple attraction between a uniformly positive surface and an anionic solute. Instead, the dominant contribution appears to arise from the cooperative action of: (i) hydrogen bonding between tetracycline oxygen-containing functionalities and the hydroxyl/amino groups of chitosan as well as Fe₃O₄ surface hydroxyls; (ii) π–π interactions between the conjugated aromatic moieties of tetracycline and the imidazolate framework of ZIF-8; (iii) Lewis acid–base / surface complexation interactions involving accessible Zn sites in ZIF-8 and Fe-containing interfacial sites; and (iv) pore-filling and diffusion-assisted capture within the hierarchically porous bead network. This interpretation is directly supported by the present experimental evidence: FTIR after adsorption shows broadening and intensification of the O–H/N–H region together with perturbation of the Zn–N and Fe–O bands, indicating the participation of hydrogen-bonding and metal-centered interfacial interactions; the marked decrease in surface area and pore accessibility after adsorption indicates substantial occupation of the accessible pore structure; the pseudo-second-order kinetic fit (R² = 0.991) points to adsorption dominated by specific surface interactions; and the nonzero intraparticle-diffusion intercept confirms that internal diffusion contributes to uptake but is not the sole rate-limiting step. Moreover, the preserved ZIF-8 and Fe₃O₄ diffraction features after synthesis and reuse indicate that the adsorption event occurs primarily through surface/interfacial association within a structurally stable hybrid framework, rather than through framework collapse or irreversible bulk-phase transformation. Taken together, these findings support a chemisorption-dominated yet diffusion-assisted mechanism in which chitosan provides polar binding groups, ZIF-8 contributes porosity and π-/Zn-mediated affinity, and Fe₃O₄ supplies supplementary hydroxylated binding environments while enabling rapid magnetic recovery. Reusability Figure 10 illustrates that tetracycline removal by the magnetic chitosan/ZIF-8 beads decreases progressively over successive cycles. After each adsorption run, the beads were recovered magnetically and regenerated by sequential rinses with 50 mL of 0.01 M NaOH for 10 min under gentle stirring, 50 mL of ethanol–water (30:70 v/v) for 5 min, and three deionized-water washes to neutral pH, followed by vacuum drying at 50 °C for 30 min. In the initial cycles, removal drops from 74.04% in the first cycle (taken as 100% baseline) to 72.39% in the second cycle, which corresponds to about 97.8% of the first cycle’s capacity, and then to 70.71% in the third cycle, corresponding to about 95.5% of the first cycle’s capacity. This decline is mainly linked to incomplete desorption of strongly bound tetracycline molecules that remain on high-affinity sites even after regeneration. FTIR spectra support this, showing persistent shifts in the Zn–N (750 cm⁻¹) and Fe–O (570 cm⁻¹) bands and broadened O–H/N–H features after washing, indicating residual surface complexes that limit available sites. Removal efficiency (%) of tetracycline for the top five experimental runs, highlighting the highest adsorption performance achieved by the magnetic chitosan/ZIF-8 beads. By the fourth cycle, removal efficiency decreases to 67.84%, equivalent to about 91.6% of the initial cycle’s performance, coinciding with signs of gradual pore blockage. Nitrogen sorption data reveal decreases in specific surface area and mesopore volume, suggesting partial retention of adsorbate within pores and at pore entrances, hindering diffusion and reducing effective surface availability. The nonzero intercept in the intraparticle-diffusion model further indicates that transport resistances become more pronounced as residues accumulate. In the fifth cycle, the removal reaches 63.19%, which is about 85.4% of the first cycle’s capacity, with the remaining loss partly attributable to subtle changes in surface chemistry from repeated exposure to alkaline and hydroalcoholic rinses. Such treatments can slightly modify the protonation state of chitosan and alter the coordination environment at ZIF-8/Fe₃O₄ interfaces, marginally weakening hydrogen bonding and electrostatic interactions. Nevertheless, XRD patterns confirm that both the sodalite ZIF-8 lattice and spinel Fe₃O₄ phase remain intact without peak broadening, and BET data indicate only minor textural losses. Retaining over 85% of the initial removal capacity after five adsorption–regeneration cycles demonstrates that the composite remains structurally stable and practically reusable through simple magnetic separation, washing, and drying. Quantitative comparison A direct inspection of Table 9 indicates that the present Fe₃O₄–chitosan/ZIF-8 beads occupy an intermediate yet technically defensible position within the current tetracycline-adsorption landscape. Although the absolute uptake is lower than that of highly engineered ZIF-8/chitosan benchmarks and certain extensively functionalized magnetic chitosan derivatives, the current system remains superior to several low-cost chitosan-based and ferrite–chitosan adsorbents and, importantly, delivers this performance while using purified industrial-grade chitosan as the polymeric matrix rather than a highly optimized specialty precursor. Equally important, cross-study ranking based solely on removal percentage or qmax can be misleading, because several apparently superior systems operate at substantially higher adsorbent dosages or rely on more elaborate post-functionalization strategies. From a practical standpoint, therefore, the merit of the present work lies not in claiming the highest capacity reported to date, but in demonstrating that a magnetically recoverable bead-form composite prepared through a comparatively simple aqueous route can still provide acceptable tetracycline removal, experimentally consistent uptake, and reusable operation while integrating low-cost feedstock selection, structural robustness, and data-driven process optimization into a single platform. Table 9Quantitative comparison of the present Fe₃O₄–chitosan/ZIF-8 beads with representative tetracycline adsorbents containing chitosan, magnetic iron oxide/ferrite, and/or ZIF-8.AdsorbentPrincipal component(s)Best reported tetracycline performancePractical positioningRef.This workIndustrial-grade chitosan + Fe₃O₄ + ZIF-874% removal; qe, exp = 24.5 mg g⁻¹; 63.19% removal after 5 cyclesMagnetically recoverable bead architecture; aqueous synthesis; process optimized by RSM/ML–Spherical chitosan-modified bentonite hydrogelChitosanqmax = 39.49 mg g⁻¹; 89.43% removal at 5 g L⁻¹ dosageLow-cost hydrogel with easy solid–liquid separation, but without magnetic recovery or MOF porosity 58 Ethylenediamine-modified magnetic chitosan (EMMCS-G)Chitosan + Fe₃O₄94% removal; qmax = 84 mg g⁻¹Higher uptake achieved after additional covalent/amine functionalization 59 CuCoFe₂O₄@Chitosan magnetic nanohybridChitosan + magnetic ferrite93.07% removal at 5 mg L⁻¹; adsorption capacity increased from 1.133 to 4.041 mg g⁻¹ as initial concentration increased from 5 to 30 mg L⁻¹Good removal only at very dilute feed; low capacity relative to most composite systems 60 CS/N-zeolite/Fe₃O₄/MOF-808 magnetic aerogelChitosan + Fe₃O₄ + MOF99.11% removal; qmax = 31.69 mg g⁻¹Very high removal, but obtained at a substantially higher adsorbent dosage (1 g L⁻¹) 61 ZIF-8–chitosan composite beadsChitosan + ZIF-8qmax = 495.04 mg g⁻¹; >90% removal retained after 10 cyclesHigh-capacity benchmark based on a strongly ZIF-8-enriched chitosan bead platform 62 Quantitative comparison of the present Fe₃O₄–chitosan/ZIF-8 beads with representative tetracycline adsorbents containing chitosan, magnetic iron oxide/ferrite, and/or ZIF-8. 74% removal; qe, exp = 24.5 mg g⁻¹; 63.19% removal after 5 cycles qmax = 39.49 mg g⁻¹; 89.43% removal at 5 g L⁻¹ dosage 94% removal; qmax = 84 mg g⁻¹ 99.11% removal; qmax = 31.69 mg g⁻¹ Conclusion This investigation culminated in the successful fabrication and in-depth characterization of an advanced magnetic chitosan/ZIF-8 composite adsorbent engineered for the efficient sequestration of tetracycline from aqueous environments. The research employed a rational materials design strategy encompassing the purification of industrial-grade chitosan, precise coprecipitation synthesis of Fe₃O₄ nanoparticles, and controlled generation of ZIF-8 nanocrystals, followed by their assembly into hierarchically porous hybrid beads via ionic gelation. Structural, morphological, and surface textural analyses conclusively demonstrated preserved ZIF-8 crystallinity, homogeneous distribution of Fe₃O₄ domains, and significantly enhanced mesoporosity, collectively underpinning the composite’s high adsorption efficacy. Comprehensive adsorption experiments under varied physicochemical conditions elucidated the strong dependence of removal efficiency on pH, initial tetracycline concentration, catalyst loading, and temperature. Detailed kinetic evaluations revealed that the adsorption process is best described by a pseudo-second-order model. The hybrid beads exhibited multilayer adsorption behavior with near-complete utilization of the active sites. Optimization of the adsorption process through a Box–Behnken response surface methodology, integrated with advanced machine learning algorithms, yielded predictive models with superior accuracy and generalization capabilities compared to conventional RSM formulations. The magnetic composite demonstrated excellent recyclability, retaining more than 60% of its initial adsorption capacity after five consecutive cycles, with structural integrity preserved as evidenced by XRD and BET analyses. Supplementary Information Below is the link to the electronic supplementary material. Supplementary Material 1 Author contributions M.A., L.V., and M.S. did the Investigation.M.A. did the data curation, formal analysis, and visualization.L.V. was the supervisor and wrote and edited the main article.M.S. was the advisor. All authors reviewed the manuscript. Data availability The data supporting the findings of this study are available from the corresponding author upon reasonable request. Declarations Competing interests The authors declare no competing interests. Footnotes Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. References Associated Data Supplementary Materials Supplementary Material 1 Data Availability Statement The data supporting the findings of this study are available from the corresponding author upon reasonable request.