# Enhancing Air Quality Prediction with an Adaptive PSO-Optimized CNN-Bi-LSTM Model
## 3 Model Introduction
### PSO Based on Adaptive Inertia Weight  
Particle Swarm Optimization (PSO), a groundbreaking method in computational intelligence, was ingeniously conceived by [PERSON] and [PERSON] in 1995 [36], inspired by the elegant coordination and foraging dynamics observed in bird flocking. Characterized by its sleek simplicity and universal applicability, PSO stands out for its capacity to navigate complex optimization terrains without necessitating domain-specific preliminaries. This trait has fueled significant academic curiosity and research. This versatility has propelled its application across various disciplines and challenges [37], marking it as a versatile tool for solving optimization problems. At the heart of the PSO algorithm lies a metaphorical swarm of particles, each embodying a potential solution candidate within the search space. Figure 7: Structure of CNN-Bi-LSTM. These particles are assessed based on their 'fitness'--a measure determined by the objective function being optimized. As the algorithm iteratively progresses, particles dynamically recalibrate their velocities and modify their positions through a harmonious blend of individual learning from their best-known positions and collective wisdom garnered from the swarm's globally discovered optimal locations. At any given instant \(t+1\), the velocity and position updating equations for the \(dt\)th dimension of the \(ith\) particle in the PSO algorithm are articulated as follows:  
\[v_{id}(t+1)=\omega v_{id}(t)+c_{1}r_{1d}(t)(p_{id}(t)-x_{id}(t))+c_{2}r_{2d}(t) \Big{(}p_{gd}(t)-x_{id}(t)\Big{)}\]  
\[x_{id}(t+1)=x_{id}(t)+v_{id}(t+1)\]  
In the PSO framework, \(v_{id}\) and \(x_{id}\) respectively represent the velocity and position of a particle. The \(\omega\) represents the inertia weight, which influences the particle's momentum and ability to explore the search space. The coefficients \(c_{1}\) and \(c_{2}\), known as acceleration factors, embody cognitive and social components, guiding the particle toward its personal best position \(P_{id}\) and the swarm's global best position \(P_{gd}\), respectively. The variables \(r_{1d}\) and \(r_{2d}\) are two independent random numbers uniformly distributed in the interval \([0,1]\). Adding these stochastic elements introduces a degree of randomness to the algorithm's evolutionary process. This inherent uncertainty not only allows the algorithm to explore the search space more thoroughly but also dramatically enhances the potential of the algorithm to determine the optimal solution to the problem. In the PSO, the inertia weight \(\omega\) is pivotal for modulating the influence of a particle's past velocity on its present velocity. This inertia weight is critical in harmonizing the algorithm's local and global search capabilities. A higher \(\omega\) value augments the algorithm's proficiency in global optimization, whereas a lower value enhances local optimization capabilities [38]. The concept of an adaptive inertia weight entails initiating the algorithm with a higher inertia weight to bolster the global search potential, thereby enabling particles to traverse a more extensive search space [39; 40; 41; 42]. As the iterations progress, the inertia weight is methodically reduced to enhance the local search capability, allowing particles to identify more precise solutions. This dynamic adjustment of weights during the algorithm's operation is designed to optimize both the convergence rate and the quality of the solution. By adapting the approach to balance the varying requirements of exploration and exploitation at different phases, the algorithm aims to maintain a continual equilibrium between local and global searches. This balance is crucial for facilitating the identification of the global optimal solution. The cosine decreasing inertia weight strategy aims to introduce a more nuanced control over the exploration-exploitation balance throughout the optimization process in Particle Swarm Optimization (PSO) [43], adapting better to the inherently nonlinear nature of complex optimization landscapes.