Inverse input optimization for tuning two-ply yarn processing parameters using feedforward neural network Authors: Habib Amiri Savadroodbari, Mohsen Rezahasani, Mohammad Javad Abghary, Aliasghar Alamdar Yazdi Published: 2026 ABSTRACT In this study, inverse input optimization (IIO) was employed as a simple, efficient, and novel approach for tuning industrial processes, specifically for optimizing two-ply cotton yarn parameters using a feedforward artificial neural network (ANN). Initially, the ANN model was trained using experimental data to capture the nonlinear relationship between yarn process parameters and tenacity. After training, all network weights and biases were fixed, and the embedded knowledge of the ANN was exploited to guide optimization. Using the IIO framework, input parameters were iteratively adjusted within the normalized design space based on the deviation between the predicted output and a predefined target. The adjustments were guided by a numerical gradient estimation, combined with an adaptive update rate and momentum term to balance exploration and exploitation. Sensitivity analysis using the Garson weight method (GWM) indicated that the twist direction of the two-ply yarn is the most influential factor, contributing 32.61% to the predicted tenacity. Applying IIO, the optimal yarn parameters were identified as first- and second-ply twists of 1000 TPM, a two-ply twist of 790 TPM, and a Z-twist direction, increasing yarn tenacity from 28.72 cN/tex for the initial sample to 35.62 cN/tex for the optimized sample. While the Genetic Algorithm (GA) achieved a minimum cost value similar to that obtained by IIO (approximately 3.8 × 10⁻⁵), IIO required only 271 function evaluations compared to 1020 for GA, demonstrating significantly higher computational efficiency. These findings establish IIO as a simple, low-cost, and competitive optimization strategy for industrial processing. Introduction After food, clothing is one of the most fundamental human needs, supplied by the textile industry. With rapid population growth and the increasing global demand for textile products, improving quality and production efficiency has become a strategic priority, particularly in the context of intensifying international competition. Optimizing production processes and enhancing product performance are therefore essential for achieving sustainable competitive advantage. Among fibrous structures, yarn is the most fundamental element, as it largely determines the durability, performance, and overall quality of end products such as fabrics, apparel, and carpets1. The mechanical and physical properties of yarn directly affect the functional behavior and service life of textile products, as the in fabric behavior of yarns in both knitted and woven structures plays a key role in governing the overall mechanical response and durability2,3. Consequently, optimizing yarn manufacturing parameters not only enhances yarn strength and quality but also improves the durability and performance of textile end products4. The application of advanced scientific and technological approaches for precise control of spinning process parameters can thus significantly enhance the efficiency and competitiveness of the textile production chain. Yarns are generally classified according to fiber type, spinning method such as ring, rotor, or air-jet spinning and their structural arrangement. From a structural perspective, they are typically categorized as single, two-ply or multi-ply, cable or cord, complex or core-spun, and novelty or fancy yarns, each exhibiting distinct properties that influence the performance of the resulting textile products5. Yarn plying, primarily used in short-staple spinning, combines two or more single yarns through twisting to enhance yarn quality. Plied yarns (shown in Fig. 1) exhibit higher tensile strength, higher evenness, fewer imperfection, and greater abrasion resistance than single yarns, contributing to better fabric appearance. Additionally, when used as warp yarns, plied structures can often eliminate yarn sizing and fabric desizing steps, reducing production costs and increasing manufacturing efficiency4,6. Over the past two decades, researchers and industry practitioners, particularly in the textile sector, have increasingly adopted artificial intelligence (AI) techniques or intelligent optimization approaches to fine-tune production system parameters, aiming to enhance product quality and operational efficiency7–10. Among these approaches, metaheuristic algorithms are recognized as some of the most prominent and widely applied methods for solving complex industrial problems. Inspired by natural phenomena, these techniques include genetic algorithms (GA)11, particle swarm optimization (PSO)12, grey wolf optimization (GWO)13, and related methods. One of the most widely used algorithms for solving optimization problems in engineering is GA, which was invented by Holland11 based on Darwin’s theory and, unlike traditional optimization methods, is a robust and global approach14,15. According to Darwin’s theory, members of a population in nature compete for survival and reproduction, and the weaker individuals are eliminated in this competition16. In practice, and particularly in solving engineering problems, these procedures are implemented by defining appropriate mathematical and probabilistic functions, which enable the algorithms to explore the solution space efficiently, and converge toward optimal or near-optimal solutions. In the field of two-ply yarns, the majority of existing studies are experimental in nature and primarily rely on trial-and-error approaches to adjust process parameters and examine their effects on yarn properties, such as tensile strength, hairiness, and abrasion resistance17–20. However, in the field of single-ply spun yarns, numerous studies have been conducted on optimizing spinning process parameters using metaheuristic algorithms, particularly GA. Das et al.21 utilized GA to determine the optimal combination of cotton fiber properties for improving key yarn characteristics such as tenacity and unevenness. Ghosh et al.22 conducted a multi-objective optimization using the Non-dominated Sorting Genetic Algorithm II (NSGA-II) to simultaneously maximize ring cotton yarn strength while minimizing the quality level of raw materials consumed. Similarly, Dashti et al.23 applied GA to identify the optimal proportions of input materials required for producing ring cotton yarn with desired strength at minimum production cost. Furthermore, Chakraborty and Diyaley9 implemented various evolutionary algorithms to optimize multiple yarn properties including strength, hairiness, unevenness, and imperfection index in both ring and rotor spinning systems. Majumdar et al.24 also employed GA to optimize cotton fiber properties within a prescriptive yarn engineering framework aimed at achieving targeted yarn performance. Recently, Savadroodbari et al.25–27 investigated the modeling of 100% polyester spun yarn properties and the optimization of key parameters in the spinning process. They demonstrated that, owing to the nonlinear and complex relationships between spinning process variables and yarn characteristics, conventional regression models often fail to achieve satisfactory predictive accuracy. Consequently, they adopted artificial neural network (ANN) models as an AI-based approach to predict yarn properties with high precision. In addition, ANN was incorporated into the optimization framework in conjunction with a GA, where it served as part of the objective function to evaluate the fitness of solutions generated by the GA across successive generations until the optimal operating conditions were obtained. ANN is computational framework inspired by biological neural systems, comprising interconnected processing elements capable of modeling highly complex input–output relationships28. Their main advantages include inherent nonlinearity, which enables effective handling of real-world nonlinear problems. Also adaptability, allowing continuous learning from new data and strong generalization capability, enabling reliable prediction for previously unseen data29. As highlighted in the review of previous studies on parameter optimization and the improvement of yarn properties, most research has employed GA and ANN as modeling and process optimization tools. Although metaheuristic algorithms particularly GA as an intelligent search technique have demonstrated satisfactory performance in optimizing and enhancing product quality and functional properties, they are associated with considerable computational cost and implementation complexity. This is primarily due to the use of multiple mathematical and probabilistic operators throughout the optimization procedure. Furthermore, successful optimization in any industrial process requires, at the outset, the development of a reliable predictive model capable of accurately evaluating the fitness or cost of each candidate solution generated by the optimization algorithm. In this context, ANN models are commonly incorporated into the objective function owing to their strong capability in capturing nonlinear relationships between independent variables (e.g., yarn parameters) and dependent variables (e.g., yarn properties). However, coupling ANN models with metaheuristic optimization algorithms further increases computational burden and implementation complexity, particularly in large-scale industrial problems. Therefore, unlike previous studies, the present research proposes a novel, distinct, and simplified approach for optimizing the parameters of two-ply yarn to enhance its tensile strength in terms of tenacity. This method, referred to as inverse input optimization (IIO), removes the necessity of coupling the trained ANN model with a metaheuristic algorithm such as GA. Rather than incorporating the ANN into an external optimization framework as a mere objective-function evaluator, the proposed approach directly leverages the predictive capability and embedded knowledge of the trained network. Specifically, the learned input–output relationship of the ANN is utilized to iteratively adjust the input variables namely, the two-ply yarn parameters through simple numerical computations in order to maximize the predicted tenacity, thereby eliminating the need for any metaheuristic search procedure. Tenacity of two-ply yarn is defined as the specific stress corresponding to the maximum force on the force–elongation curve and is obtained by normalizing this maximum force with respect to the linear density of the yarn30. To achieve the main objective of this study, a dataset comprising 100 experimental measurements of two-ply yarn tenacity was first developed under controlled laboratory conditions. The dataset was generated by systematically varying the key structural parameters of the two-ply yarn, including the twist level of the single yarns forming the two-ply structure, the twist level of the two-ply yarn, and the twist direction of the two-ply yarn. Subsequently, an ANN model was developed to predict the tenacity of the two-ply yarn based on these input parameters. In the optimization stage, the proposed IIO approach was implemented using the trained ANN model. The performance of the IIO method was then compared with that of the GA in terms of the achieved objective function value, as well as implementation complexity and computational cost. Fig. 1Schematic depiction of the structural arrangements of single-ply, two-ply, and three-ply yarn structures. Schematic depiction of the structural arrangements of single-ply, two-ply, and three-ply yarn structures. Materials and characterization method To produce two-ply yarns and evaluate their tensile properties, 30 Ne cotton single yarns were first spun from 1.2 Ne cotton roving using an SDL laboratory ring spinning machine (Shirley Technologies). All spinning parameters were kept constant except for the twist level. The single yarns were produced with Z-twist at four different twist levels including 830, 950, 1050, and 1200 TPM, as summarized in Table 1. Two-ply yarns were subsequently produced using a simple and cost-effective laboratory twisting technique based on a manual twisting device (Fig. 2). This setup, originally designed as a yarn twist tester, was adapted in the present study for the fabrication of two-ply yarns with controlled twist levels and directions. The method enabled the rapid preparation of a sufficiently large number of specimens without the need for industrial-scale equipment. In this procedure, two single yarns were aligned in parallel and clamped between the fixed and movable jaws of the device. The required ply twist was then introduced manually by rotating the handle in either the S or Z direction, which simultaneously rotated the movable jaw and generated the two-ply yarn structure. The applied twist level was continuously monitored using the built-in counters for both S and Z twist directions, ensuring good accuracy, repeatability, and consistency among the produced samples. In total, 100 two-ply yarn samples were produced by varying four independent parameters, as presented in Table 1. The experimental plan was developed using Design-Expert 13 software based on a reduced factorial Design of Experiments (RFDOE) of the D-optimality type, incorporating 45 additional points to enhance the design space coverage. This approach reduced the total number of experimental runs from 160 (corresponding to a full factorial design) to 100, while maintaining an efficient, informative, and representative exploration of the experimental domain. The adopted RFDOE strategy ensured a systematic and well-distributed sampling of the factor space, thereby improving the quality and reliability of the resulting dataset for modeling purposes. Consequently, the obtained dataset provides a robust foundation for input–output modeling and supports the development of predictive models with improved generalization capability, particularly for unseen data within the defined design space. In this study, Yarn tenacity was defined as the response variable. Because twist direction is a discrete parameter, it was numerically encoded to facilitate its inclusion in quantitative modeling. Specifically, a value of − 1 was assigned to S-twist and + 1 to Z-twist. This encoding enabled the incorporation of twist direction into subsequent modeling and optimization analyses. Tensile testing was performed to determine the tenacity of the produced two-ply yarns using an Instron testing machine operating under the constant rate of elongation (CRE) principle. Each specimen was tested at a gauge length of 500 mm, with the crosshead speed adjusted to obtain a target breaking time of 20 ± 3 s. For each sample, ten measurements were conducted, and the mean value was reported as the yarn tenacity. Table 1Independent parameters and corresponding levels considered in the production of two-ply yarn.ParameterCodeUnitLevelTwist of first single yarn \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}_{1}$$\end{document} m− 183095010501200-Twist of second single yarn \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}_{2}$$\end{document} m− 183095010501200-Twist of two-ply yarn \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}_{3}$$\end{document} m− 1450550650750850Twist direction of two-ply yarn \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}_{4}$$\end{document} -S (-1)Z (+ 1)--- Table 1Independent parameters and corresponding levels considered in the production of two-ply yarn.ParameterCodeUnitLevelTwist of first single yarn \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}_{1}$$\end{document} m− 183095010501200-Twist of second single yarn \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}_{2}$$\end{document} m− 183095010501200-Twist of two-ply yarn \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}_{3}$$\end{document} m− 1450550650750850Twist direction of two-ply yarn \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}_{4}$$\end{document} -S (-1)Z (+ 1)--- Independent parameters and corresponding levels considered in the production of two-ply yarn. Fig. 2Manually operated twisting device used in the laboratory for two-ply yarn preparation. Manually operated twisting device used in the laboratory for two-ply yarn preparation. Data preparation Data normalization In many engineering systems, input and output parameters are commonly defined over different numerical ranges. Parameters with larger magnitudes or wider intervals may dominate the modeling procedure, leading to biased input–output relationships and reduced predictive stability. Consequently, normalization constitutes a fundamental preprocessing step in modeling and optimization to ensure balanced contributions from all parameters31. In the present study, all input parameters related to the structural characteristics of the two-ply yarn, along with yarn tenacity as the output parameter, were normalized prior to model development using Eq. (1)32–34. The normalization procedure mapped the data into a predefined interval of 0.1 to 0.9. In Eq. (1), a and b represent the lower (0.1) and upper (0.9) bounds of the normalization range, respectively. This transformation preserves the intrinsic information and distribution patterns of the dataset while reducing scale-induced numerical bias, thereby enhancing computational stability, convergence performance, and the overall robustness of the modeling and optimization framework.1\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{x}_{n}=\left(b-a\right)\frac{x-{x}_{min}}{{x}_{max}-{x}_{min}}+a$$\end{document} Data partitioning In modeling and function approximation research, it is widely accepted that experimental datasets should be partitioned into three distinct subsets including training, validation, and testing. The training subset is utilized to estimate the unknown model parameters, such as the weights and biases in ANN models. The validation subset serves to supervise the learning process and control model complexity, thereby reducing the risk of overfitting, particularly in data-driven approaches. The testing subset is kept entirely separate and is used solely for the independent assessment of the predictive capability of the developed models35. Following this standard framework, the 100 experimental observations related to the tenacity of cotton two-ply yarns were partitioned into training, validation, and testing sets according to a 70:15:15 ratio. This partitioning scheme ensures a balanced and representative allocation of samples across subsets, facilitating efficient model calibration and objective performance evaluation. As a result, the reliability, generalization ability, and overall robustness of the modeling outcomes are significantly improved. Modeling of two-ply yarn tenacity Model accuracy evaluation criteria Accurately evaluating the performance of predictive models requires the selection of a suitable assessment metric. An effective metric should reflect how well the model performs both during the training phase, when it learns patterns from the available data, and during the testing phase, when its predictions are validated against unseen observations. In this work, the total goodness function (TGF), presented in Eq. (2), was adopted to quantify the overall performance of the developed models in forecasting the tenacity of cotton two-ply yarn. The effectiveness and reliability of TGF have been well-documented in previous research36–38. By integrating information from training and testing stages, TGF provides a comprehensive evaluation, capturing not only predictive accuracy but also the model’s ability to generalize to new data.2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:TGF=\frac{1}{N}\sum\:_{i=1}^{3}{n}_{i}({{R}^{2}}_{i}+{e}^{-{MSE}_{i}})$$\end{document} In the above equation, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{{R}^{2}}_{i}$$\end{document} represents the coefficient of determination for the i-th model evaluation set, which may correspond to the training, validation, or testing data. The parameter \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:MS{E}_{i}$$\end{document} denotes the mean squared error for the same set, while \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{n}_{i}$$\end{document} indicates the number of data samples in that set. The symbol N stands for the total number of samples in the entire dataset used in the analysis. Modeling using ANN Feedforward artificial neural networks are among the most commonly used ANN architectures in engineering applications due to their ability to approximate complex nonlinear relationships between input and output variables. In a feedforward network, information flows in a single direction from the input layer, through one or more hidden layers, to the output layer. This simplicity makes feedforward ANNs a suitable baseline for predicting process-dependent properties such as the tenacity of cotton two-ply yarn39. Feedforward ANNs are particularly suitable when the relationships between input and output variables are complex and nonlinear, situations where traditional regression models may provide limited predictive accuracy. In the present study, an initial statistical analysis was performed on the independent parameters related to cotton two-ply yarn to evaluate their variability and potential impact on yarn properties. Analysis of variance (ANOVA) in Table 2 indicated that all four parameters have a statistically significant effect on tenacity (P < 0.05), confirming their important roles in determining the mechanical performance of two-ply yarn. Table 2ANOVA for the effects of different terms on the tenacity of two-ply yarn.SourceDFS.SM.SP-value \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}_{1}$$\end{document} 352.11517.3720.0001 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}_{2}$$\end{document} 330.57410.1910.0037 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}_{3}$$\end{document} 461.15515.2890.0000 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}_{4}$$\end{document} 1375.197375.1970.0000Error88185.4822.108-Total99773.825--Note: D.F. indicates the degrees of freedom, S.S. corresponds to the sum of squares, and M.S. stands for the mean squares. Table 2ANOVA for the effects of different terms on the tenacity of two-ply yarn.SourceDFS.SM.SP-value \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}_{1}$$\end{document} 352.11517.3720.0001 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}_{2}$$\end{document} 330.57410.1910.0037 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}_{3}$$\end{document} 461.15515.2890.0000 \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}_{4}$$\end{document} 1375.197375.1970.0000Error88185.4822.108-Total99773.825--Note: D.F. indicates the degrees of freedom, S.S. corresponds to the sum of squares, and M.S. stands for the mean squares. ANOVA for the effects of different terms on the tenacity of two-ply yarn. Note: D.F. indicates the degrees of freedom, S.S. corresponds to the sum of squares, and M.S. stands for the mean squares. Following this preliminary analysis, a multiple linear regression (MLR) model, shown in Eq. (3), was implemented in MATLAB, where the regression coefficients were estimated using the ordinary least squares (OLS) method to quantify the relationship between these parameters and yarn tenacity. While MLR provided insight into general trends, its predictive performance was limited. As shown in Fig. 3, data points for the MLR model deviate noticeably from the ideal fitted line across the training, validation, and test datasets, reflecting the model’s inability to fully capture nonlinear interactions.3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Z\left({X}_{1},\dots\:,{X}_{4}\right)=0.0927+0.1705{X}_{1}+0.1716{X}_{2}+0.2035{X}_{3}+0.3242{X}_{4}$$\end{document} To improve predictive accuracy, a feedforward ANN with two hidden layers was developed. The number of hidden layers and neurons in each layer was optimized using a network search algorithm implemented in MATLAB. The search was performed over architectures with one and two hidden layers, where the number of neurons in each hidden layer was varied between 4 and 11. For each candidate architecture, the model was trained 30 times with 1000 epochs to account for stochastic variability, and the final selection was made based on the TGF metric, which provides a unified scalar measure of model performance across the training, validation, and testing datasets. The finalized network structure comprised four input neurons corresponding to the yarn parameters (X1–X4), a first hidden layer with six neurons, a second hidden layer with four neurons, and a single output neuron representing tenacity (Z), as shown in Fig. 4(a). Both hidden layers employed tangent sigmoid (tansig) activation functions, while the output layer used a pure linear (purelin) activation function. The network was trained using the Levenberg–Marquardt algorithm for 1000 epochs to achieve optimal predictive performance. During training, a validation subset was utilized to monitor generalization performance and to prevent overfitting through MATLAB’s early-stopping mechanism. In this approach, training is automatically terminated when the validation error does not improve for 10 consecutive iterations (Maximum Fail = 10), thereby avoiding over-training and ensuring better generalization ability of the network. Figure 3 illustrates the predictive performance of the MLR and ANN models. While the MLR model exhibits noticeable deviations from the ideal line in all datasets, the ANN model demonstrates remarkable accuracy, with data points closely aligned along the ideal fitted line. The TGF values further emphasize this difference, with 1.9848 for ANN versus 1.7126 for MLR, confirming the superior overall performance of the ANN. These results indicate that, following the preliminary analysis of the independent parameters and evaluation using MLR, feedforward ANNs can accurately capture the nonlinear relationships influencing the tenacity of cotton two-ply yarn. Consequently, the ANN model is not only more precise but also reliable and effective for use in the IIO optimization approach or in combination with meta-heuristic algorithms, such as GA, to optimize and enhance the tenacity of two-ply yarn. Fig. 3Predictive performance of the MLR and ANN models for cotton two-ply yarn tenacity across the training (a,b), validation (c,d), and testing (e,f) datasets. Predictive performance of the MLR and ANN models for cotton two-ply yarn tenacity across the training (a,b), validation (c,d), and testing (e,f) datasets. Sensitivity analysis To assess the influence of individual input parameters on the ANN model predictions, the Garson weight method (GWM) was employed. This approach distributes the connection weights of the trained neural network from the input layer through the hidden layers to the output layer, thereby quantifying the relative contribution of each input variable to the network’s output. By analyzing the weighted paths in this manner, GWM allows the identification of the most influential factors governing the predicted response40–42. Using this method, a sensitivity analysis was performed for the tenacity prediction of cotton two-ply yarn, as described in Eq. (4). The results, illustrated in Fig. 4(b), show that the twist direction of the two-ply yarn is the most critical parameter, accounting for 32.61% of the predicted tenacity. This highlights its dominant contribution compared to the other input variables in determining the mechanical performance of two-ply yarns.4\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{RI}_{i}\left(\%\right)=\frac{{\sum\:}_{j=1}^{n{H}_{1}}\sum\:_{k=1}^{n{H}_{2}}\left[\frac{\left|{W}_{ij}\right|\left|{V}_{jk}\right|\left|{S}_{kp}\right|}{\sum\:_{l=1}^{{n}_{I}}\left|{W}_{lj}\right|}\right]}{\sum\:_{i=1}^{{n}_{I}}{\sum\:}_{j=1}^{n{H}_{1}}\sum\:_{k=1}^{n{H}_{2}}\left[\frac{\left|{W}_{ij}\right|\left|{V}_{jk}\right|\left|{S}_{kp}\right|}{\sum\:_{l=1}^{{n}_{I}}\left|{W}_{lj}\right|}\right]}\times\:100$$\end{document} Fig. 4(a) Architecture of the developed ANN model; (b) relative importance of the input parameters for predicting the tenacity of two-ply yarn. (a) Architecture of the developed ANN model; (b) relative importance of the input parameters for predicting the tenacity of two-ply yarn. Optimization of two-ply yarn parameters Optimization using IIO approach General framework of the IIO In this study, the Inverse Input Optimization (IIO) approach was employed to determine the optimal combination of two-ply yarn process parameters for improving yarn tenacity. The previously trained ANN (introduced earlier) remains fixed during optimization, serving as a deterministic surrogate model that maps input parameters to predicted tenacity. After training, all network weights and biases are kept constant, and the ANN knowledge is exploited without further modification. Unlike conventional methods that combine ANNs with metaheuristic algorithms, the proposed approach leverages the internal structure of the trained network to perform gradient-based optimization in the input space, thereby reducing computational complexity and the number of function evaluations. Instead of updating network weights, the IIO iteratively adjusts the input vector, with optimization occurring in the input space rather than the ANN parameter space. The process starts by randomly generating a candidate input vector within the normalized design domain. The ANN predicts the corresponding normalized tenacity of two-ply yarn, and the deviation from a predefined target guides iterative adjustments of the inputs toward the optimum. By tuning parameters such as the update rate, momentum, and decay factor (discussed in detail later), the IIO approach balances exploration and exploitation, avoiding premature convergence to local minima while ensuring stable convergence toward the optimal solution. Mathematical formulation and implementation procedure In the present work, the optimization target was set to 0.99 on the normalized output scale, representing a level of two-ply yarn tenacity slightly beyond the maximum value observed in the experimental dataset. This choice was intended to guide the global optimization process toward improved performance conditions. It should be emphasized that all input variables during the optimization process were strictly constrained within the normalized interval of 0.1–0.9, corresponding to the experimental training domain. Therefore, the optimization search was conducted entirely within the trained input space, and no extrapolation was performed in the input variables. The target value was defined only as an optimization objective to explore potentially superior parameter combinations within the feasible design space that may not have been directly represented in the available experimental dataset. The IIO algorithm was implemented in MATLAB, and the mathematical formulation corresponding to one full optimization iteration is presented in Eqs. (5)–(16). The procedure starts with the forward propagation of the fixed ANN. Equation (5) expresses the overall nonlinear mapping from the input parameters to the network output through the weighted summation and bias terms across the hidden and output layers. where the normalized inputs \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}_{i,k}$$\end{document} in each iteration k, bias terms \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{b}_{j}^{\left(1\right)}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{b}_{p}^{\left(3\right)}$$\end{document}and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{b}_{q}^{\left(2\right)}$$\end{document}, weights \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{W}_{ij}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{S}_{qp}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{V}_{jq}$$\end{document}, activation functions \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{f}^{\left(1\right)}$$\end{document}, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{f}^{\left(2\right)}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{f}^{\left(3\right)}$$\end{document} are used to compute the output value \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{Z}_{p,k}$$\end{document} in each iteration k. Equation (6) defines the tansig activation function applied in the hidden layers, introducing nonlinearity into the model. Equation (7) represents the linear (purelin) activation function used in the output layer. Prior to this step, an initial input vector is randomly generated within the normalized design domain, where the continuous variables are sampled from a uniform distribution in the interval (0.1, 0.9), while the two-ply yarn twist direction is treated as a discrete parameter taking one of two predefined normalized values. This ensures a feasible and unbiased starting point while accounting for the mixed continuous–discrete nature of the design parameters.5\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{Z}_{p,k}={f}^{\left(3\right)}\left(\sum\:_{q=1}^{{n}_{H2}}{S}_{qp}{f}^{\left(2\right)}\right(\sum\:_{j=1}^{{n}_{H1}}{V}_{jq}{f}^{\left(1\right)}\left(\sum\:_{i=1}^{{n}_{I}}{W}_{ij}{X}_{i,k}+{b}_{j}^{\left(1\right)}\right)+{b}_{q}^{\left(2\right)})+{b}_{p}^{\left(3\right)})$$\end{document}6\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:tansig\left(Y\right)=\frac{2}{\left(1+{e}^{-2Y}\right)}-1=y$$\end{document}7\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:purelin\left(Z\right)=Z$$\end{document} In the IIO-based optimization framework, the cost function, as defined in Eq. (8), represents the objective to be minimized at each iteration. It is formulated to measure the discrepancy between the ANN predicted output \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{Z}_{p,k}$$\end{document} and a predefined target \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{d}_{p}$$\end{document} (equal with 0.99), while the evaluated quantity \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{E}_{p,k}$$\end{document} represents the value of the cost function at iteration k, quantifying the squared difference between \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{Z}_{p,k}$$\end{document} and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{d}_{p}$$\end{document}. The output error signal \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{e}_{p,k}$$\end{document}, given in Eq. (9), is computed as the difference between the predicted output \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{Z}_{p,k}$$\end{document} and the target \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{d}_{p}$$\end{document}, and it also corresponds to the derivative of the cost function with respect to \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{Z}_{p,k}$$\end{document}. This term is used to guide the iterative modification of the input vector. the magnitude of \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{e}_{p,k}$$\end{document} determines the extent of input adjustments. Its sign indicates the direction, progressively steering the inputs toward achieving the desired target performance \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{d}_{p}$$\end{document}.8\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{E}_{p,k}=\frac{1}{2}({Z}_{p,k}-{d}_{p}{)}^{2}$$\end{document}9\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\frac{\partial\:{E}_{p,k}}{\partial\:{Z}_{p,k}}=e}_{p,k}=({Z}_{p,k}-{d}_{p})$$\end{document} In Eqs. (10)–(13), the IIO approach implements a numerical gradient-based strategy to iteratively adjust the input vector toward the desired target output. Specifically, Eq. (11) approximates the derivative of the network output with respect to each input using the central difference method43, where the trained ANN function, denoted as \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{F}_{p}$$\end{document} (Eq. (10)), is evaluated at slightly perturbed input values separated by a small finite-difference stepsize (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\epsilon\:$$\end{document}). This provides a numerical estimate of the local slope of the output in the input space without altering the network weights. Equation (12), the chain rule is applied to combine the output error signal defined as the difference between the target and the predicted output with the computed numerical gradient, yielding the derivative of the error with respect to each input. Since the present study uses a linear activation function in the output layer, Eq. (13) further simplifies this relation by recognizing that the derivative of the output error signal with respect to the network output is unity. Therefore, the derivative of the error with respect to the inputs is equal to the output gradient.10\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{F}_{p}\left({X}_{k}\right)={Z}_{p,k}$$\end{document}11\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\frac{\partial\:{Z}_{p,k}}{\partial\:{X}_{i,k}}=\:\frac{{F}_{p}\left({X}_{k}+\epsilon\:{e}_{i}\right)-{F}_{p}\left({X}_{k}-\epsilon\:{e}_{i}\right)}{2\epsilon\:}$$\end{document}12\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\frac{\partial\:{e}_{p,k}}{{\partial\:X}_{i,k}}=\frac{\partial\:{e}_{p,k}}{\partial\:{Z}_{p,k}} \cdot \frac{\partial\:{Z}_{p,k}}{{\partial\:X}_{i,k}}$$\end{document}13\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\frac{\partial\:{e}_{p,k}}{{\partial\:X}_{i,k}}=\frac{\partial\:{Z}_{p,k}}{{\partial\:X}_{i,k}}$$\end{document} In the subsequent optimization steps, the input vector is iteratively adjusted within the IIO framework according to Eqs. (14)–(16). The required change for each input, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\varDelta\:{X}_{i,k}$$\end{document}, is computed as the product of the output error signal and the numerically estimated gradient of the network output with respect to that input, ensuring that the adjustment magnitude is proportional to the deviation from the target, as described in Eq. (14). The input vector is then updated for the next iteration by applying these changes and incorporating a momentum term, µ, which scales the previous input adjustment to reduce oscillations and improve convergence stability, as shown in Eq. (15). The update rate η at each iteration is defined to decay exponentially from its initial value η₀, controlled by the decay factor α, so that larger corrections occur in early iterations while progressively smaller, more precise updates are applied as the algorithm approaches the target, as specified in Eq. (16). Here, \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\eta\:}_{0}$$\end{document} represents the initial update rate and \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\alpha\:$$\end{document} determines how quickly \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\eta\:$$\end{document} decreases with iteration, ensuring controlled convergence. Also For the discrete input variable representing the twist direction of two-ply yarn, continuous updates obtained during optimization were mapped back to the allowable discrete normalized states after each iteration to ensure physically meaningful input values during ANN evaluation. The parameter settings of the IIO approach used for optimizing the tenacity of two-ply yarn are presented in Table 3.14\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\varDelta\:{X}_{i,k}={e}_{p,k}\frac{\partial\:{Z}_{p,k}}{{\partial\:X}_{i,k}}$$\end{document}15\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{X}_{i,k+1}={X}_{i,k}-\eta\:\varDelta\:{X}_{i,k}+\mu\:(\varDelta\:{X}_{i,k-1})$$\end{document}16\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:{\eta\:}_{k}={\eta\:}_{0}\bullet\:{e}^{-\alpha\:k}$$\end{document} Table 3Settings of the IIO for optimizing two-ply yarn parameters.ParameterValueInitial update rate0.7Decay factor0.05Momentum coefficient0.7Finite-difference stepsize1e-3Maximum iterations30 Table 3Settings of the IIO for optimizing two-ply yarn parameters.ParameterValueInitial update rate0.7Decay factor0.05Momentum coefficient0.7Finite-difference stepsize1e-3Maximum iterations30 Settings of the IIO for optimizing two-ply yarn parameters. Through this procedure, and by appropriately tuning the IIO control parameters, the optimization process is effectively guided toward the desired target output. In the context of optimization problems, exploration refers to the algorithm’s ability to broadly search the input space to avoid being trapped in suboptimal regions, whereas exploitation denotes the focused refinement of promising solutions to accelerate convergence toward a global optimum44–46. Within the proposed IIO framework, the adaptive update rate governs the balance between exploration and exploitation, allowing larger adjustments in early iterations for a wide-ranging search and progressively smaller adjustments in later iterations for precise local refinement. The momentum term further improves the search dynamics by maintaining directional information across iterations, enabling the input vector to overcome local minima and preventing premature convergence. Additionally, the finite-difference step size plays a critical role in controlling the sensitivity of the numerical gradient. larger step sizes promote exploration by smoothing minor irregularities in the error surface, while smaller step sizes enhance gradient accuracy and strengthen exploitation during the final convergence phase. Therefore, through the coordinated effects of the adaptive update rate, momentum, and finite-difference step size, the proposed optimization framework achieves a dynamic balance between exploration and exploitation, ensuring robust convergence to the global optimum while effectively mitigating the risk of entrapment in local minima. Optimization using GA and implementation procedure The GA is a widely applied optimization method recognized for its capability to minimize a cost function by producing diverse chromosomes through crossover and mutation operations47–49. Each chromosome consists of genes that represent specific combinations of input parameters, which are selected probabilistically from a population. The algorithm proceeds iteratively until a predefined stopping criterion is satisfied, ultimately determining the optimal chromosome. Through this iterative mechanism, GA is particularly effective in obtaining optimal solutions for complex engineering and industrial optimization problems50–52. In this study, the GA was employed for optimizing the two-ply yarn parameters and compared with the IIO approach. The GA was implemented in MATLAB. A cost function similar to that used in IIO approach was adopted, with the same objective, where the trained ANN model for two-ply yarn tenacity was coupled into the GA as part of the cost function to evaluate the fitness of each chromosome. The GA operates iteratively to minimize the objective function defined in Eq. (17), subject to the design variables as given in Eq. (18). For a fair comparison with the IIO method, the maximum number of generations in GA was set to 30, matching the maximum iterations of IIO. The other GA settings used for this optimization are summarized in Table 4. Using this configuration, GA evaluates chromosomes probabilistically through crossover and mutation operations, iteratively converging toward the optimal solution.17\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:Minimize:\:f\left(\overrightarrow{x}\right)=\frac{1}{2}(Z\left(\overrightarrow{x}\right)-0.99{)}^{2}$$\end{document}18\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\:\overrightarrow{x}=\left\{{X}_{1},{X}_{2},{X}_{3},{X}_{4}\right\}$$\end{document} Table 4Settings of the GA for optimizing two-ply yarn parameters.ParameterValue/typeMaximum generations30Population size30Creation functionUniform randomCrossover functionArithmeticCrossover fraction0.8Mutation functionGaussianMutation fraction0.3Mutation rate0.25Selection functionRoulette wheel Table 4Settings of the GA for optimizing two-ply yarn parameters.ParameterValue/typeMaximum generations30Population size30Creation functionUniform randomCrossover functionArithmeticCrossover fraction0.8Mutation functionGaussianMutation fraction0.3Mutation rate0.25Selection functionRoulette wheel Settings of the GA for optimizing two-ply yarn parameters. Analysis and discussion of results Optimization results using IIO and GA In this study, the performance of the IIO and GA approaches was compared for the optimization of two-ply cotton yarn parameters to enhance yarn tenacity, as illustrated in Fig. 5. For a fair comparison, both IIO and GA were independently executed ten times, and the best-performing run from each algorithm was selected for comparison. In addition, to assess the robustness of the proposed IIO framework with respect to different initial conditions, ten independent runs of the IIO algorithm were performed using randomly generated initial candidate vectors. From these runs, the best-performing solution was selected for reporting and comparison with GA. The optimized process parameters and corresponding tenacity values obtained from these runs are presented in Table 5. The results showed that all runs converged to very similar solutions, with predicted tenacity values ranging from 35.02 to 35.62 cN/tex, indicating stable convergence behavior. The mean predicted tenacity across the 10 independent runs was 35.37 cN/tex, with a standard deviation of 0.24 cN/tex and a coefficient of variation (CV) of 0.68%, further confirming the robustness of the proposed IIO method and its ability to consistently avoid entrapment in local minima. The initial sample had first- and second-ply yarn twists of 1050 TPM, a two-ply twist of 650 TPM, and an S-twist direction. After optimization, both IIO and GA converged to the same optimal parameters, consisting of first- and second-ply yarn twists of 1000 TPM, a two-ply twist of 790 TPM, and a Z-twist direction. As presented in Table 6, the yarn tenacity increased from 28.72 cN/tex for the initial sample to a predicted optimized value of 35.62 cN/tex. Experimental validation of the optimized sample yielded a tenacity of 35.81 cN/tex with a standard deviation of 1.07 and a coefficient of variation of 2.99%, showing very good agreement with the ANN prediction. Furthermore, both optimization methods achieved nearly identical minimum cost values of approximately 3.8 × 10⁻⁵, indicating comparable optimization performance. As shown in Fig. 5, the evolution of the cost function over 30 iterations for IIO and 30 generations for GA demonstrates the successful convergence behavior of both methods. From the perspective of computational efficiency, the IIO and GA methods were compared using the Number of Function Evaluations (NFE), defined as the total number of calls made to the trained ANN during the optimization process. In the IIO approach, each iteration involves one forward evaluation of the network together with additional evaluations required for numerical estimation of the gradients with respect to the input variables, where the number of additional evaluations equals twice the number of inputs. Consequently, a total of 271 function evaluations was required over 30 iterations. In contrast, the GA method evaluates the ANN for all individuals in the initial population, as well as for offspring generated through crossover and mutation operations in each generation, resulting in a total of 1020 ANN evaluations throughout the optimization process. The lower NFE obtained by IIO indicates higher computational efficiency for the present optimization problem, allowing convergence to be achieved with substantially fewer ANN evaluations. This efficiency arises from the relatively simple structure of IIO, which directly utilizes gradient information from the trained ANN to guide the search process. Conversely, GA relies on stochastic population-based operators, including selection, crossover, and mutation, which inherently increase both the number of function evaluations and the computational complexity of the optimization procedure. Although the GA parameters, such as population size, crossover rate, and mutation rate, were carefully adjusted to reduce unnecessary evaluations while maintaining optimization performance, the method still required a considerably larger number of ANN evaluations to effectively explore the search space. However, the lower NFE of IIO should not be interpreted as an absolute indication of overall optimization superiority, since the two algorithms are fundamentally different in their search strategies. GA performs a population-based stochastic exploration of the solution space, and its higher NFE is intrinsically associated with broader global search capability and a lower probability of premature convergence to local optima. In contrast, IIO follows a gradient-guided search trajectory that primarily emphasizes computational efficiency. Nevertheless, the adaptive exponentially decaying update rate and the momentum term incorporated into the IIO framework provide a degree of balance between exploration and exploitation. Specifically, larger update steps during the early iterations promote broader exploration of the feasible region, whereas progressively smaller updates near convergence improve local refinement and solution stability. Therefore, the NFE comparison presented in this study should be interpreted primarily as a measure of relative computational efficiency for the considered optimization problem, rather than as a universal indication of the superiority of one optimization algorithm over another. Using NFE as a measure of computational effort is particularly appropriate because it directly reflects the number of expensive ANN evaluations performed, independent of hardware or software variations. Unlike elapsed time, which can be influenced by processor speed and memory access, NFE provides a hardware-independent measure of the algorithm’s efficiency. Overall, the results demonstrate that IIO exhibits high capability in solving industrial optimization problems, achieving high-quality solutions with lower computational complexity and reduced computational effort, as reflected in the significantly lower number of function evaluations while maintaining comparable cost values. Fig. 5Performance of IIO and GA during optimization of two-ply yarn parameters. Performance of IIO and GA during optimization of two-ply yarn parameters. Table 5Results of ten IIO runs with random initial candidate vectors for two-ply yarn optimization.RunOptimized levelsOptimized valueTwist of first single-ply yarnTwist of second single-ply yarnTwist of two-ply yarnTwist directionTenacity110001000790235.6229291006764235.4739571003775235.57411401013781235.51512001086666235.09612001200492235.02712001000681235.128989998731235.16911201010800235.541010961008789235.60 Table 5Results of ten IIO runs with random initial candidate vectors for two-ply yarn optimization.RunOptimized levelsOptimized valueTwist of first single-ply yarnTwist of second single-ply yarnTwist of two-ply yarnTwist directionTenacity110001000790235.6229291006764235.4739571003775235.57411401013781235.51512001086666235.09612001200492235.02712001000681235.128989998731235.16911201010800235.541010961008789235.60 Results of ten IIO runs with random initial candidate vectors for two-ply yarn optimization. Table 6Comparison of the tenacity values for the initial samples, predicted optimized, and experimentally optimized samples.Sample typeTenacity value (cN/tex)Standard deviationCoefficient of variation (%)Initial28.721.334.63Predicted optimized35.62--Actual optimized35.811.072.99 Table 6Comparison of the tenacity values for the initial samples, predicted optimized, and experimentally optimized samples.Sample typeTenacity value (cN/tex)Standard deviationCoefficient of variation (%)Initial28.721.334.63Predicted optimized35.62--Actual optimized35.811.072.99 Comparison of the tenacity values for the initial samples, predicted optimized, and experimentally optimized samples. Effect of input parameters on two-ply yarn tenacity Figure 6 illustrates the influence of the two-ply yarn parameters on yarn tenacity, which corresponds to the tensile strength under applied load. The impact of each parameter was examined individually using the outputs of the trained ANN model, while the remaining parameters were held constant at their optimal values determined through the IIO optimization approach. This one-at-a-time analysis enhances the interpretability of the ANN by reducing its black-box nature53. By revealing the relationships captured within the network, this approach provides valuable insights into the effects of each parameter, making the model a more informative tool for yarn performance evaluation. According to Fig. 6a,b, as the twist of the single yarns that make up the two-ply yarn increases, the tenacity initially rises with moderate twist levels, then decreases when the twist becomes high. In general, increasing the twist to an optimal point strengthens the bonding between fibers by enhancing fiber-to-fiber friction within the single yarn structure, which improves the tenacity of the two-ply yarn. However, exceeding this optimal twist subjects the fibers to excessive lateral pressure, causing fiber breakage and consequently reducing the tenacity of both the single yarns and the resulting two-ply yarn. As shown in Fig. 6c, increasing the twist level of the two-ply yarn initially results in a noticeable improvement in tenacity. During this stage, and under the condition that the twist direction of the constituent single yarns remains Z, part of the applied ply twist is effectively transferred into the single yarn structure. This transfer enhances fiber packing density and inter-fiber friction, leading to improved structural integrity and consequently higher tensile strength of the two-ply yarn. However, beyond a certain twist threshold, further increase in ply twist causes excessive twist penetration into the single yarns. This leads to an undesired rise in lateral compressive stresses within the yarn structure, which may induce localized fiber deformation and damage. As a result, the tenacity begins to decline, indicating the presence of an optimum twist level for maximum mechanical performance. Figure 6d illustrates the influence of ply twist direction on yarn tenacity. A clear improvement in tenacity is observed when the ply twist direction is changed from S to Z. Since the single yarns used in this study possess an initial Z twist, applying a Z twist at the ply level produces a so-called “twist-over-twist” configuration3. In this configuration, the ply twist acts in the same direction as the pre-existing twist of the single yarns, resulting in an effective increase in intra-yarn twist intensity. This enhances fiber cohesion, improves load transfer between fibers, and ultimately increases the tensile strength of the two-ply yarn. In contrast, applying an S twist partially counteracts the original Z twist of the single yarns, leading to a reduction in effective fiber cohesion and a corresponding decrease in tenacity. It should be emphasized that the selection of ply twist direction should be guided by the intended end-use requirements. While S twist may be advantageous in applications where reduced residual torque and improved dimensional stability are desired, Z ply twist is more suitable when maximizing tensile strength is the primary objective, as it significantly enhances the structural compactness of the yarn even though it may result in higher residual torque. Overall, the analysis of the ANN model results for the two-ply yarn, combined with the trend-based assessment of how its structural parameters influence tenacity, confirms the reliability of the proposed ANN modeling and IIO optimization approach. The agreement between the model predictions and the observed relationships between parameters and tenacity highlights the robustness and effectiveness of the IIO method for optimizing industrial process parameters, especially in yarn manufacturing applications. Fig. 6Effect of individual cotton two-ply yarn parameters on the tenacity using the trained ANN model. Effect of individual cotton two-ply yarn parameters on the tenacity using the trained ANN model. Conclusion and future directions In this study, the Inverse Input Optimization (IIO) approach was employed as a simple, novel and efficient alternative for tuning industrial process parameters, directly leveraging the knowledge embedded in a trained feedforward ANN rather than coupling the network with conventional optimization algorithms. The IIO and GA approaches were employed to optimize two-ply cotton yarn parameters for improving yarn tenacity. The optimization identified the optimal levels as first- and second two-ply twists of 1000 TPM, a two-ply twist of 790 TPM, and a Z-twist direction. Using these optimized settings, the yarn tenacity increased from 28.72 cN/tex for the initial sample to 35.62 cN/tex for the optimized sample. Both methods achieved nearly identical minimum cost values of approximately 3.8 × 10⁻⁵, indicating comparable solution quality. From a computational perspective, the IIO algorithm proved significantly more efficient. Over 30 iterations, IIO required only 271 function evaluations, whereas GA, even when carefully configured with population size, crossover rate, mutation rate, and selection strategy to achieve complete optimization with minimal evaluations, required 1020 function evaluations to converge. This highlights IIO ability to exploit the gradient information of the trained ANN to guide input updates, reducing computational complexity while maintaining high-quality optimization results. Overall, the results confirm that the IIO-based optimization framework is a highly effective approach for industrial optimization problems, enabling substantial improvements in yarn tenacity with lower computational effort and simpler implementation compared to probabilistic metaheuristic methods. The method’s balance between exploration and exploitation, achieved through the adaptive update rate, momentum term, decay factor, and finite-difference gradient estimation, ensures robust convergence to the global optimum while mitigating the risk of entrapment in local minima. For future research, this approach can be extended to multi-objective optimization by training an ANN with multiple outputs, allowing simultaneous optimization of several yarn properties with adjustable weights for each objective. Furthermore, while this study employed an ANN with two hidden layers, further work is required to evaluate the method’s performance and limitations when applied to deeper networks. Such studies would enhance the robustness and competitiveness of the IIO-based optimization framework relative to advanced metaheuristic algorithms in complex industrial applications.