## 4 Materials and Methods
### Proto-MAML
#### 4.3.2 Proto-MAML Training Within a BERT-Enhanced QA Framework

Table 11: Detailed Complexity, Technical Reasoning, and Comparative Performance for Proto-MAML and Related Models. The results presented in Table 11 highlight the distinct advantages of Proto-MAML when compared with other state-of-the-art approaches. This discussion underscores the efficiency, scalability, and adaptability of Proto-MAML in the context of automated vulnerability detection and correction while also providing a nuanced critique of the limitations observed for alternative models. The emphasis on computational complexity, required data samples, and real-world applicability further illustrates why Proto-MAML integrated with BERT emerges as a superior solution for the QA task. To begin, SySeVR [27] demonstrates a significant computational burden due to its reliance on ASTs and PDGs. AST introduces \(O(n^{2})\) complexity, requiring extensive iterations to analyze syntactic relationships, while PDG elevates this to \(O(n^{3})\) through its modeling of semantic dependencies. Although these graph-based structures provide semantic context, their heavy reliance on labeled data hinders the scalability of the model. Furthermore, the incorporation of LSTM and BGRU models exacerbates these inefficiencies, often leading to gradient loss when processing large inputs. In contrast, Proto-MAML sidesteps these limitations through its BERT-based transformer architecture. The self-attention mechanism enables it to capture complex relationships with a reduced complexity of \(O(n\log n)\). The proposed approach achieved an F1-score of 97.5% for C and C++, significantly outperforming the 85.8% achieved by SySeVR, thus offering a scalable and computationally efficient alternative. Building upon this, BBVD [29] incorporates RoBERTa and MobileBERT to reduce the complexity to \(O(n^{2})\) through leveraging smaller parameter sets and vocabularies. However, its performance is diminished in scenarios involving mixed human and technical language, and its reliance on multiple attention layers and dense operations introduces further computational demands. Proto-MAML surpasses these limitations by employing dual meta-learning cycles that dynamically adjust parameters without the need for exhaustive fine-tuning. With an F1-score of 97.5%, Proto-MAML offers a more streamlined computational framework and outperforms the 95.42% achieved by BBVD. Transitioning to VulDefend, [30] this model employs probabilistic embedding transformations (PET) combined with RoBERTa and FSL. Although it has been demonstrated to be efficient in low-data scenarios, its probabilistic nature fails to capture intricate relationships within vulnerable code. The resulting complexity of \(O(n^{2})\) further limits its capacity to adapt to unseen patterns. Proto-MAML addresses these challenges through structured meta-learning cycles that dynamically characterize dependencies at both the token and output levels. This adaptability enabled Proto-MAML to achieve an accuracy of 97.5%, significantly exceeding the 89.9% achieved by VulDefend. The limitations of graph-based models become even more evident when considering VulDeeLocator, [28] which combines AST, SSA, an RNN, and LSTM, resulting in an overall complexity of \(O(n^{4})\). The AST introduces \(O(n^{2})\) complexity for syntactic analysis, while SSA and RNN add \(O(n^{3})\) and \(O(n^{2})\), respectively. These inefficiencies are further compounded by a dependency on high-quality labeled data. Proto-MAML, leveraging prototype-based learning and global meta-learning optimization, circumvents these challenges entirely. Achieving 97.1% accuracy, Proto-MAML closely matched the performance of this model while maintaining a significantly lower complexity of \(O(n\log n)\). In a similar vein, SeqTrans, as discussed in [31], relies on NMT and BS to map secure to insecure code. While BS evaluates multiple token candidates with \(O(n)\) operations per token, the sequential evaluation of entire data sets increases the overall complexity to \(O(n^{2})\).