## 4 Methodology
### Doa-Bpnn Model
Step1: Find the optimal solution within the group as the guiding solution:  
\[X_{q,best}^{t}=\arg\max_{X_{i}^{t}\in Q_{q}}F(X_{i}^{t}) \tag{9}\]  
where \(F(X_{i}^{t})\) is the fitness value of individual \(X_{i}\), representing the validation accuracy. The population of dreams is divided into 5 groups, following the original DOA formulation, to balance exploration diversity and convergence stability. Step 2: Calculate the number of forgetting dimension based on the current iteration and group number:  
\[k_{q}(t)=[1+(D-1)\cdot(1-\frac{t}{T_{d}})\cdot(\frac{5-q}{5})] \tag{10}\]  
where \(D\) is the total number of parameter dimensions, \(t\) is the current iteration, \(T_{d}\) is the total number of iteration in the exploration phase, and \(q\in\{0,1,2,3,4\}\) represents the group index. Step 3: For each individual \(X_{i}^{t}\) in \(G_{q}\), apply the memory strategy to preserve the optimal structure in the group:  
\[X_{i}^{t+1}=X_{q,best}^{t} \tag{11}\]Step 4: Randomly select \(k_{q}(t)\) dimensions to form the forgetting index set \(\Omega_{forget}\), then perform random forgetting with probability \(u\) and dream sharing with probability \(1-u\). Only the dimensions in \(\Omega_{forget}\) are modified, while other dimensions remain unchanged:  
\[X_{i}^{t+1}(j)= \begin{cases}U(lb_{j},ub_{j}),&\text{if }j\in\Omega_{forget}\\ X_{i}^{t+1}(j),&\text{else}\end{cases}  \tag{12}\]  
\[X_{i}^{t+1}(j)= \begin{cases}X_{i}^{t}(j),&\text{if }j\in\Omega_{forget},r\
eq i \\ X_{i}^{t+1}(j),&\text{else}\end{cases}  \tag{13}\]  
where \(r\) is the index of another randomly selected individual from population. Step 5: Combine the memory part and forgetting part to update the individual's position:  
\[X_{i}^{t+1}=clip(X_{i}^{t+1},lb,ub) \tag{14}\]  
When the number of iterations reaches the threshold value \(T_{d}\), the DOA-BPNN enters the exploitation phase, where the focus shifts to fine-tuning the global optimal solution. The steps are as follows:  
Step 6: Determine the current global optimal solution:  
\[X_{best}^{t}=\arg\max_{X_{i}\in X_{1},X_{2},\ldots,X_{Npp}}F(X_{i}) \tag{15}\]  
Step 7: As iterations continue, gradually decrease the forgetting dimension number to enhance local search for the current optimal solution:  
\[k_{r}(t)=[1+(k_{max}-1)\cdot(1-\frac{t-T_{d}}{T_{max}-T_{d}})] \tag{16}\]  
where \(k_{max}=\lfloor k\cdot D\rfloor\) represents the maximum number of forgetting dimensions. Considering the typical parameter scale of BPNN, we set \(k=2\%\), which provides a balanced exploration-exploitation trade-off. Step 8: Apply memory strategy, with all representatives based on the global optimal solution:  
\[X_{i}^{t+1}=X_{best}^{t} \tag{17}\]  
Step 9: Randomly select \(k_{r}(t)\) dimensions to form a forgetting index set \(\Omega_{forget}\), and apply the corresponding forgetting strategy. Only the dimensions in \(\Omega_{forget}\) are modified, while other dimensions remain unchanged:  
\[X_{i}^{t+1}(j)= \begin{cases}X_{best}^{t}(j),&\text{if }j\in\Omega_{forget}\\ X_{i}^{t+1}(j),&\text{else}\end{cases}  \tag{18}\]  
Step 10: Similar to the exploration phase, the individual's position is then processed using the clipping mechanism described in Equation (14). During the above parameter updates, boundary constraint clips are always used to ensure that the update solution remains within the valid search space. A key innovation of our DOA-BP implementation is the \"optimize-while-training\" mechanism, where each dream (solution) undergoes a brief training phase before fitness evaluation:  
\[W_{i}^{t+1}=\text{BP-Train}(W_{i}^{t},D_{train},lr=0.001) \tag{19}\]where BP-Train represents one epoch of backpropagation training using Adam optimizer with learning rate \(\eta=0.001\). This mechanism allows each dream to undergo local improvement through gradient descent, before being evaluated and subjected to the DOA operations, creating a synergy between gradient-based and gradient-free optimization. The workflow of the proposed DOA-BPNN scheme is depicted in Algorithm 1.