[ { "authors": [ "Ce Zhou", "Qian Li", "Chen Li", "Jun Yu", "Yixin Liu", "Guangjing Wang", "Kai Zhang", "Cheng Ji", "Qiben Yan", "Lifang He", "Hao Peng", "Jianxin Li", "Jia Wu", "Ziwei Liu", "Pengtao Xie", "Caiming Xiong", "Jian Pei", "Philip S. Yu", "Lichao Sun" ], "survey_title": "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT", "year": "2023", "date": "2023-02-18T20:51:09Z", "category": "cs.AI", "abstract": " Pretrained Foundation Models (PFMs) are regarded as the foundation for various downstream tasks with different data modalities. A PFM (e.g., BERT, ChatGPT, and GPT-4) is trained on large-scale data which provides a reasonable parameter initialization for a wide range of downstream applications. In contrast to earlier approaches that utilize convolution and recurrent modules to extract features, BERT learns bidirectional encoder representations from Transformers, which are trained on large datasets as contextual language models. Similarly, the Generative Pretrained Transformer (GPT) method employs Transformers as the feature extractor and is trained using an autoregressive paradigm on large datasets. Recently, ChatGPT shows promising success on large language models, which applies an autoregressive language model with zero shot or few shot prompting. The remarkable achievements of PFM have brought significant breakthroughs to various fields of AI in recent years. Numerous studies have proposed different methods, datasets, and evaluation metrics, raising the demand for an updated survey. This study provides a comprehensive review of recent research advancements, challenges, and opportunities for PFMs in text, image, graph, as well as other data modalities. The review covers the basic components and existing pretraining methods used in natural language processing, computer vision, and graph learning. Additionally, it explores advanced PFMs used for different data modalities and unified PFMs that consider data quality and quantity. The review also discusses research related to the fundamentals of PFMs, such as model efficiency and compression, security, and privacy. Finally, the study provides key implications, future research directions, challenges, and open problems in the field of PFMs. Overall, this survey aims to shed light on the research of the PFMs on scalability, security, logical reasoning ability, cross-domain learning ability, and the user-friendly interactive ability for artificial general intelligence. ", "structure": [ { "id": "160c6790-e92e-4d72-a546-5d2f900ac104", "title": "root", "level": "root", "subsections": [ "92692f3f-5d0b-4b5b-92dc-708a1b94dbd5", "5b0bdffe-fb02-409c-9a32-2a9ca46fae77", "c043d8a4-ac81-470e-a27d-0a13ffaae1ac", "81242bcb-042c-4bf0-9ebe-f6cb44a94843", "238ea228-7a56-4a7f-a4df-2e79b3065bd3", "f9872e6b-da5b-4455-8e22-b3eac29cee8a", "4e7df0ae-6f27-4db8-94cf-15c255b077e4", "bff33ab9-dc91-49d5-b524-ed2d9a01f149", "90d7385e-341b-4735-9bff-17abb31ffdc4", "e28e7bc1-61ac-4024-be2b-2259d31465ae", "8cba48d4-e174-4a7a-afb3-8ba526649a63", "720be46a-69c4-42e1-a410-af6829c488a7", "1224d99a-6f33-4a1f-8309-c4a5655141c1", "2f7164de-3a58-4a21-ac2f-e8e2ec66800e", "a3fada64-fc86-4ec8-a16c-f5e9675e7655", "99f4cfea-bdc9-409b-976b-dcdca4dfb1e0" ], "parent_id": null, "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ] ], "content": "", "cites": [], "cite_extract_rate": 0, "origin_cites_number": 0 }, { "id": "92692f3f-5d0b-4b5b-92dc-708a1b94dbd5", "title": "Introduction", "level": "section", "subsections": [ "73693802-7c4a-4924-a44d-b558714f64f9", "ec4ad3eb-4813-4807-93c2-dcc827dc64d7" ], "parent_id": "160c6790-e92e-4d72-a546-5d2f900ac104", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "Introduction" ] ], "content": "\\label{Section 1}\nPretrained Foundation Models (PFMs) are regarded as essential and significant components of Artificial Intelligence (AI) in the era of big data. The foundation model is first named in~, which means a broader class of models and their functions. PFMs are extensively studied in the three major AI fields: natural language processing (NLP)~, computer vision (CV)~ and graph learning (GL)~. PFMs are powerful general models that are effective in various fields or across fields. They have demonstrated great potential in learning feature representations in various learning tasks, such as text classification~, text generation~, image classification~, object detection~, and graph classification~. \nPFMs show superior performance for training on multiple tasks with large-scale corpus and fine-tuning it to similar small-scale tasks, making it possible to initiate rapid data processing.", "cites": [ 1458, 1550, 2464, 1445 ], "cite_extract_rate": 0.4444444444444444, "origin_cites_number": 9 }, { "id": "73693802-7c4a-4924-a44d-b558714f64f9", "title": "PFMs and Pretraining", "level": "subsection", "subsections": [], "parent_id": "92692f3f-5d0b-4b5b-92dc-708a1b94dbd5", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "Introduction" ], [ "subsection", "PFMs and Pretraining" ] ], "content": "PFMs are built upon the pretraining technique, which aims to train a general model using large amounts of data and tasks that can be fine-tuned easily in different downstream applications.\nThe idea of pretraining originates from transfer learning~ in CV tasks. Recognizing the effectiveness of pretraining in the field of CV, people have begun to use pretraining technology to enhance model performance in other areas. When pretraining techniques are applied to the NLP domain, well-trained language models (LMs) can capture rich knowledge beneficial for downstream tasks, such as long-term dependencies, hierarchical relationships, etc. In addition, the significant advantage of pretraining in the NLP field is that training data can be derived from any unlabeled text corpus, that is, there is an unlimited amount of training data in the pretraining process.\nEarly pretraining is a static technique, such as NNLM~ and Word2vec~, but static methods were difficult to adapt to different semantic environments. Therefore, dynamic pretraining techniques are proposed, such as BERT~, XLNet~, etc.\nFig.~\\ref{history_evolution} depicts the history and evolution of PFMs in the NLP, CV, and GL domains. The PFMs based on the pretraining technique use large corpora to learn generic semantic representations. With the introduction of these pioneering works, various PFMs have emerged and been applied to downstream tasks and applications.\nA great example of PFM application is ChatGPT\\footnote{\\url{https://openai.com/blog/chatgpt/}}. ChatGPT is fine-tuned from the generative pretrained transformer GPT-3.5, which was trained on a blend of text and code~. ChatGPT applies reinforcement learning from human feedback (RLHF) , which has become a promising way to align large language models (LLMs) with a human's intent~. The surprisingly superior performance of ChatGPT may lead to a tipping point for a shift of training paradigm for each type of PFMs -- applying \\textit{instruction aligning} techniques, e.g., reinforcement learning (RL), prompt tuning , and chain-of-thought (COT) , to move towards artificial general intelligence. \nWe focus on reviewing PFMs for text, image, and graph, which is a relatively mature research taxonomy.\nFor text, it is a multi-purpose LM to predict the next word or character in a sequence. For example, PFMs can be used for machine translation, question-answering systems, topic modeling, sentiment analysis, etc.\nFor image, it is similar to PFMs on text, which uses huge datasets to train a big model suitable for many CV tasks. For graphs, a similar pretraining idea is also applied to obtain PFMs, which are used for many downstream tasks. Apart from the PFMs for a specific data domain, we also review and state some other advanced PFMs, such as the PFMs for speech, video, and cross-domain data, and multimodal PFMs. An exemplary illustration is the GPT-4 model, as described by OpenAI~, which is a massive multimodal language model that can process both text and image inputs and generate text outputs. GPT-4 has demonstrated human-level performance on various professional and academic evaluation tasks. \nMoreover, there is a growing trend in PFMs that deals with multimodal data, known as unified PFMs. This term refers to models that can handle different types of data such as text, images, and audio. In this regard, we provide a definition of unified PFMs and a review of the current state-of-the-art models in recent research. Notable examples include OFA~, UNIFIED-IO~, FLAVA~, BEiT-3~, and others.\nAccording to the features of existing PFMs, we conclude that the PFMs have the following two major advantages. First, minor fine-tuning is required to enhance the model performance on downstream tasks. Second, the PFMs have already been vetted on the quality aspect. Instead of building a model from scratch to solve a similar problem, we can apply PFMs to task-related datasets. \nThe great promise of PFMs has inspired a wealth of related work to focus on the model efficiency~, security~ and compression~.\n\\begin{figure*}[!t]\n \\centering\n \\includegraphics[width=1\\linewidth]{pictures/times.pdf}\n \\caption{The history and evolution of PFMs.}\n \\label{history_evolution}\n\\end{figure*}", "cites": [ 679, 1354, 2465, 1150, 2472, 2466, 9115, 364, 1578, 2470, 7165, 8466, 2467, 2469, 7465, 8536, 2471, 11, 2468, 7579, 7, 1582, 1557 ], "cite_extract_rate": 0.8518518518518519, "origin_cites_number": 27 }, { "id": "ec4ad3eb-4813-4807-93c2-dcc827dc64d7", "title": "Contribution and Organization", "level": "subsection", "subsections": [], "parent_id": "92692f3f-5d0b-4b5b-92dc-708a1b94dbd5", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "Introduction" ], [ "subsection", "Contribution and Organization" ] ], "content": "There are several survey studies~ that have reviewed the pretrained models for some specific areas such as text generation~, visual transformer~, objection detection~.\nBommasani et.al.~ summarize the opportunities and risks of the foundation model. However, existing works did not achieve a comprehensive review of PFMs in different areas (e.g., CV, NLP, GL, Speech, Video) and different aspects such as pretraining tasks, efficiency, efficacy, and privacy.\nIn this survey, we specifically track the evolution of PFMs in the NLP domain, as well as how pretraining is transferred to and adopted by CV and GL.\nCompared with other surveys, there is no comprehensive introduction and analysis of existing PFMs from all three fields.\nUnlike reviews of previous pretrained models, we summarize existing models ranging from traditional models to PFMs with recent works in the three domains.\nTraditional models emphasize static feature learning. \nDynamic PFMs give an introduction to structures, which is the mainstream research.\nWe further present some other research for PFMs, including other advanced and unified PFMs, model efficiency and compression, security, and privacy. Finally, we summarize future research challenges and open problems in different domains. We also comprehensively present the related evaluation metrics and datasets \\textbf{in Appendix~\\ref{Evaluation_Metrics} and~\\ref{datasets}}.\nIn summary, the main contributions are as follows:\n\\begin{itemize}\n \\item We present a solid and up-to-date review of the development of PFM in NLP, CV, and GL. Over the review, we discuss and provide insights about the generalized PFM design and pretraining methodology among the three major application domains.\n \\item We summarize the development of PFMs in other multimedia areas such as speech and video. Besides, we discuss advanced topics about PFMs, including unified PFMs, model efficiency and compression, and security and privacy.\n \\item Through the review of PFMs in various modalities for different tasks, we discuss the main challenges and opportunities for future research of very large models in the big data era, which guides a new generation of collaborative and interactive intelligence based on PFMs.\n\\end{itemize}\nThe rest of the survey is organized as follows. \nSection~\\ref{Section 2} introduces the basic components.\nSections~\\ref{Section 3},~\\ref{Section 4} and~\\ref{Section 5} summarize the existing PFMs in NLP, CV and GL, respectively.\nSections~\\ref{Section 6},~\\ref{Section 7} introduce other advanced research for PFMs, including advanced and unified PFMs, model efficiency and compression, as well as security and privacy, respectively. \nFurthermore, we summarize the main challenges for PFMs in Section~\\ref{Section 11} before concluding the survey in Section~\\ref{Section 12}.", "cites": [ 1458, 7518, 1550, 2464, 1445 ], "cite_extract_rate": 0.8333333333333334, "origin_cites_number": 6 }, { "id": "5b0bdffe-fb02-409c-9a32-2a9ca46fae77", "title": "Basic Components", "level": "section", "subsections": [ "a96c9b0e-9d71-4bee-bf0c-0428d07e4d1b", "c55e9e0c-cebe-4c51-b0e5-ff280adb44b6", "235dfd2e-07af-44e0-9efe-f1d9c2ab1fa0" ], "parent_id": "160c6790-e92e-4d72-a546-5d2f900ac104", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "Basic Components" ] ], "content": "\\label{Section 2}\nThe general conceptual architecture of PFMs is shown in Fig.~\\ref{fig:ptm_concepts}. The PFMs are huge neural network models, which are all about neural information processing. The specific designs of PFMs vary according to the data modality and task requirements in different areas. Transformer is a mainstream model architecture design for PFMs in many areas such as NLP and CV. Training large models need to have various datasets for model pretraining. After training the PFMs, the model should be fine-tuned to satisfy downstream requirements such as efficacy, efficiency, and privacy. In this section, we introduce the basic model architectures, concepts, and settings of PFMs in NLP, CV, and GL domains. For the introduction of a more detailed component, please refer to \\textbf{Appendix~\\ref{Components}}.\n\\begin{figure*}\n \\centering\n \\includegraphics[width=1\\linewidth]{figures/ptm_concepts.png}\n \\caption{The general conceptual architecture of PFMs: data, model, and system.}\n \\label{fig:ptm_concepts}\n\\end{figure*}", "cites": [], "cite_extract_rate": 0, "origin_cites_number": 0 }, { "id": "a96c9b0e-9d71-4bee-bf0c-0428d07e4d1b", "title": "Transformer for PFMs", "level": "subsection", "subsections": [], "parent_id": "5b0bdffe-fb02-409c-9a32-2a9ca46fae77", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "Basic Components" ], [ "subsection", "Transformer for PFMs" ] ], "content": "The Transformer~ is an innovative architecture that facilitates the transfer of weighted representation knowledge between various neural units. It relies solely on attention mechanisms and doesn't use recurrent or convolutional architectures. The attention mechanism is a crucial component of the Transformer as it assigns weights to all the encoded input representations and learns the most important part of the input data. The output of the attention is obtained by taking the weighted sum of the values, and the weights are calculated using the compatibility function of the query with the corresponding key~. Numerous attention mechanisms~ have been developed in large models. For instance, in natural language processing, self-attention is created to connect various positions in a single sequence for generating a representation of the same sequence. Transformer leverages a mask matrix to provide an attention mechanism based on self-attention, in which the mask matrix specifies which words can ``see'' each other.\nTransformer is an important structure for PFMs in NLP, CV, and GL areas. For NLP, the Transformer can help solve the long-range dependency issues when processing sequential input data. For example, the GPT-3~ is a generative model based on the transformer. For CV, the Vision Transformer (ViT)~ is proposed to represent an image to a series of image patches, which is similar to a series of word embeddings. For GL, the Graph Transformer Networks (GTN)~ are employed to learn new graph structures and powerful node representations without domain knowledge. Transformers become scalable enough to drive ground-breaking capabilities for PFMs thanks to the transformer structures to achieve higher parallelization. The ViT-22B model~, for instance, has about 22B parameters, and the largest language models can have upwards of 100B parameters (e.g., GPT-3 has 175B and PaLM~ has 540B parameters).", "cites": [ 679, 1183, 8558, 732, 1554, 7095, 38 ], "cite_extract_rate": 1.0, "origin_cites_number": 7 }, { "id": "c55e9e0c-cebe-4c51-b0e5-ff280adb44b6", "title": "Learning Mechanisms for PFMs", "level": "subsection", "subsections": [ "6e0a316a-8315-4a82-a294-df9888be65f4" ], "parent_id": "5b0bdffe-fb02-409c-9a32-2a9ca46fae77", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "Basic Components" ], [ "subsection", "Learning Mechanisms for PFMs" ] ], "content": "Deep learning models in CV have been shown a large margin to outperform traditional learning models in most tasks, including the common classification, recognition, detection, and segmentation tasks and the specific matching, tracking, and sequence prediction. These learning methods are not only available in CV, but also in NLP and GL.", "cites": [], "cite_extract_rate": 0, "origin_cites_number": 0 }, { "id": "6e0a316a-8315-4a82-a294-df9888be65f4", "title": "Supervised Learning", "level": "paragraph", "subsections": [ "eea11e17-003c-434f-907f-f15b237f21fb", "062ede80-ae72-4098-9831-c64491ef5acc", "617935ef-4797-40ad-a087-3911a068620b", "4c08a6e4-0707-49aa-9c1d-4324cd96dc7b" ], "parent_id": "c55e9e0c-cebe-4c51-b0e5-ff280adb44b6", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "Basic Components" ], [ "subsection", "Learning Mechanisms for PFMs" ], [ "paragraph", "Supervised Learning" ] ], "content": "Suppose we are given a training dataset $\\bm X$ containing $\\{(\\bm{x}_i, y_i)\\}_{i=1}^{n}$ to represent the original data in training dataset, where $\\bm{x}_i$ denotes the $i$-th training sample, and $y_i$ denotes the corresponding label. The complete network is to learn a function $f(\\bm{x};\\bm \\theta)$ by minimizing the objective function as follows.\n\\begin{equation}\n \\mathop{\\arg\\min}_{\\bm \\theta} \\ \\ \\frac{1}{n}\\sum\\nolimits_{i=1}^{n}{\\mathcal{L}(f(\\bm{x}_i;\\bm \\theta),y_i)}\n +\\lambda\\Omega(\\bm\\theta),\n\\end{equation}\nwhere $\\mathcal{L}$ and $\\Omega$ represent the predefined loss function and a regularization term, respectively. The function $f$ has a nested form like\n\\begin{equation}\n\\begin{aligned}\n \\bm h_{1}(\\bm{x}_i)&=g(\\bm{x}_i^\\top\\bm{\\omega}_1+b_1), \\\\ \\bm h_{l+1}(\\bm{x}_i)&=g(\\bm h_l(\\bm{x}_i)^\\top\\bm{\\omega}_l+b_l), \n l = 1, 2, \\cdots, N\n\\end{aligned}\n\\end{equation}\nwhere $l$ is the index of layer in deep learning model and $N$ is the number of layers, which means that $\\bm\\theta = \\{\\bm\\omega_l,b_l, l = 1, 2, \\cdots, N\\}$.", "cites": [], "cite_extract_rate": 0, "origin_cites_number": 0 }, { "id": "eea11e17-003c-434f-907f-f15b237f21fb", "title": "Semi-Supervised Learning", "level": "paragraph", "subsections": [], "parent_id": "6e0a316a-8315-4a82-a294-df9888be65f4", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "Basic Components" ], [ "subsection", "Learning Mechanisms for PFMs" ], [ "paragraph", "Supervised Learning" ], [ "paragraph", "Semi-Supervised Learning" ] ], "content": "Assume we are given another unlabelled dataset $\\bm Z = \\{\\bm z_i\\}_{i=1}^{m}$ in addition to the previous dataset with human labels. If we want to utilize both datasets to learn an ideal network, the learning process can be formulated as\n\\begin{equation}\n \\mathop{\\arg\\min}_{\\bm\\theta} \\ \\ \\frac{1}{n}\\sum\\nolimits_{i=1}^n{\\mathcal{L}(f(\\bm x_i;\\bm\\theta),y_i) + \\\\ \n \\frac{1}{m}\\sum\\nolimits_{i=1}^m{\\mathcal{L}^{\\prime}(f^{\\prime}(\\bm{z}_i;\\bm\\theta^{\\prime}),R(\\bm z_i, \\bm X))}} + \\lambda\\Omega(\\bm\\theta),\n\\end{equation}\nwhere $R$ is a relation function defining the targets for unlabelled data, and then these pseudo-labels are integrated into the end-to-end training process. $f^{\\prime}$ is an encoder to learn a new representation for the original data in the dataset $\\bm Z$. Specifically, if there is no label to any data in the training process, we can learn from the properties inside the data itself via the internal distance or the designed pretext tasks, which are known as unsupervised learning and self-supervised learning(SSL), respectively. The latter is our main focus discussed in detail in Section~\\ref{sec:Learning by Generation}.", "cites": [], "cite_extract_rate": 0, "origin_cites_number": 0 }, { "id": "062ede80-ae72-4098-9831-c64491ef5acc", "title": "Weakly-Supervised Learning", "level": "paragraph", "subsections": [], "parent_id": "6e0a316a-8315-4a82-a294-df9888be65f4", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "Basic Components" ], [ "subsection", "Learning Mechanisms for PFMs" ], [ "paragraph", "Supervised Learning" ], [ "paragraph", "Weakly-Supervised Learning" ] ], "content": "The weakly-supervised method is the balance between fully-supervised learning and SSL according to the dependence on human labels. The SSL designs special pretext tasks \nto serve as the supervised learning, but the fully supervised learning\nutilizes existing labels attached to the data. However, both of them can learn good visual features and perform well on specific downstream tasks. Suppose there are inaccurate $K$ labels for the dataset, and any label can be attached to a data sample. Thus, we denote the true label of image ${\\bm x}_i$ as ${\\bm y}_i\\in\\{0,1\\}^K, i=1,2,\\cdots,n$, and any entry of ${\\bm y}_i$ could be $0$ or $1$. Here we need to minimize the total $nK$ loss terms\n, which are formulated as follows.\n\\begin{equation}\n \\mathop{\\arg\\min}_{\\bm\\theta} \\ \\ \\frac{1}{nK}\\sum\\nolimits_{i=1}^n\\sum\\nolimits_{k=1}^K{\\mathcal{L}(f(\\bm x_i;\\bm\\theta),y_i^k)} + \\lambda\\Omega(\\bm\\theta),\n\\end{equation}\nwhere $\\left[y_i^1, y_i^2, \\cdots, y_i^K\\right] = {\\bm y}_i$, and $\\mathcal{L}$ could be a loss function suitable for binomial classification problem. For any entry in ${\\bm y}_i$, computing the loss function of the one-versus-all binomial classification is needed.", "cites": [], "cite_extract_rate": 0, "origin_cites_number": 0 }, { "id": "617935ef-4797-40ad-a087-3911a068620b", "title": "Self-Supervised Learning", "level": "paragraph", "subsections": [], "parent_id": "6e0a316a-8315-4a82-a294-df9888be65f4", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "Basic Components" ], [ "subsection", "Learning Mechanisms for PFMs" ], [ "paragraph", "Supervised Learning" ], [ "paragraph", "Self-Supervised Learning" ] ], "content": "SSL utilizes the information in the data itself to learn essential feature representations for different tasks. By applying the self-defined pseudo labels, it can avoid the cost of manually labeling large datasets for PFMs. In NLP, the language models can be trained by predicting masked characters, words, or sentences. Variational autoencoder (VAE) and generative adversarial network (GAN) are two types of generative SSL methods, which are to reconstruct the data itself. Besides, contrastive learning, as a type of discriminative SSL method, is widely applied in CV, NLP, and GL. The main idea of contrastive learning is to learn the prior knowledge distribution of the data itself with the aid of various methods such as data augmentation. In this way, contrastive learning can learn a model that makes similar instances closer in the projected space, and dissimilar instances farther apart in the projected space. Here we show a simple version of contrastive loss: \n\\begin{equation}\n \\mathcal{L}_\\text{c}(\\mathbf{x}_i, \\mathbf{x}_j, \\theta) = m \\| f_\\theta(\\mathbf{x}_i) - f_\\theta(\\mathbf{x}_j) \\|^2_2 \\\\ + (1-m)\\max(0, \\epsilon - \\|f_\\theta(\\mathbf{x}_i) - f_\\theta(\\mathbf{x}_j)\\|_2)^2\n\\label{eq:contrastive}\n\\end{equation}\nwhere $m$ is 1 if two samples have the same label, otherwise 0, and $\\epsilon$ is the upper bound distance.", "cites": [], "cite_extract_rate": 0, "origin_cites_number": 0 }, { "id": "4c08a6e4-0707-49aa-9c1d-4324cd96dc7b", "title": "Reinforcement Learning", "level": "paragraph", "subsections": [], "parent_id": "6e0a316a-8315-4a82-a294-df9888be65f4", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "Basic Components" ], [ "subsection", "Learning Mechanisms for PFMs" ], [ "paragraph", "Supervised Learning" ], [ "paragraph", "Reinforcement Learning" ] ], "content": "RL is another type of learning paradigm that models the learning process as a sequential interaction between an agent and an environment, where a RL agent seeks to learn an optimal policy for sequential decision-making problems. Specifically, at each time interaction step $t$, the agent receives a state $s_t$ in a state space $\\mathcal{S}$, and selects an action $a_t$ from an action space $\\mathcal{A}$, following a policy $\\pi_{\\theta}(a_t|s_t): \\mathcal{A}\\rightarrow\\mathcal{S}$ parameterized by $\\theta$. \nThen the agent receives a scalar immediate reward $r_t=r(s_t,a_t)$ and the next state $s_{t+1}$ according to the environment dynamics, where $r(s,a)$ is the reward function. \nFor each episode, this process continues until the agent reaches a terminal state. After an episode is finished, the RL agent will restart to begin a new episode. \nThe return for each state is discounted, accumulated reward with the discount factor $\\gamma \\in (0,1]$,\n$R_t=R(s_t,a_t)= \\sum_{k=0}^{\\infty} \\gamma^k r_{t+k}.$\nThe agent aims to maximize the expectation of such long-term return from each state, \n\\begin{equation}\n \\max_{\\theta}{\\mathbb{E}_{s_t}[R_t|s_t,a_t=\\pi_{\\theta}(s_t)]}.\n\\end{equation}", "cites": [], "cite_extract_rate": 0, "origin_cites_number": 0 }, { "id": "235dfd2e-07af-44e0-9efe-f1d9c2ab1fa0", "title": "Pretraining Tasks for PFMs", "level": "subsection", "subsections": [ "956e2ed7-ba51-44b2-9c84-7c69ea7faa9f", "8b882e93-190e-4264-b9b4-fa6f2a75f940", "c78479fb-b493-4590-9b94-3b5ad65aab94" ], "parent_id": "5b0bdffe-fb02-409c-9a32-2a9ca46fae77", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "Basic Components" ], [ "subsection", "Pretraining Tasks for PFMs" ] ], "content": "Pretraining is an initialization framework, which generally needs to be used in conjunction with fine-tuning downstream tasks.\nIn the scheme of pretraining and finetuning, the parameters of the model are trained on pre-set tasks to capture specific attributes, structure, and community information. The pretrained features can assist downstream tasks, provide sufficient information, and speed up the convergence of the model.", "cites": [], "cite_extract_rate": 0, "origin_cites_number": 0 }, { "id": "956e2ed7-ba51-44b2-9c84-7c69ea7faa9f", "title": "Pretraining Tasks for NLP", "level": "subsubsection", "subsections": [], "parent_id": "235dfd2e-07af-44e0-9efe-f1d9c2ab1fa0", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "Basic Components" ], [ "subsection", "Pretraining Tasks for PFMs" ], [ "subsubsection", "Pretraining Tasks for NLP" ] ], "content": "The pretraining tasks can be divided into five categories according to the learning methods: Mask Language Modeling (MLM), Denoising AutoEncoder (DAE), Replaced Token Detection (RTD), Next Sentence Prediction (NSP), Sentence Order Prediction (SOP). \nRTD, NSP, and SOP are contrastive learning methods, which assume that the observed samples are more semantically similar than the random samples. \n\\textbf{Mask Language Modeling (MLM).} MLM erases some words randomly in the input sequence and then predicts these erased words during pretraining. Typical examples include BERT~ and SpanBERT~.\n\\textbf{Denoising AutoEncoder (DAE).} DAE is used to add noise to the original corpus and reconstruct the original input using the corpus containing noise. BART~ is a representative example.\n\\textbf{Replaced Token Detection (RTD).} RTD is a discriminant task that determines whether the LM has replaced the current token. This task is introduced in ELECTRA~. By training the model to distinguish whether a token has been replaced or not, the model can acquire language knowledge.\n\\textbf{Next Sentence Prediction (NSP).} In order to make the model understand the correlation between the two sentences and capture sentence-level representations, a NSP task is introduced. The PFM inputs two sentences from different documents and checks whether the order of the sentences is correct. A typical example is BERT.\n\\textbf{Sentence Order Prediction (SOP).} Different from NSP, SOP uses two contiguous fragments from a document as positive samples and the exchange order of the two fragments as negative samples. The PFMs can better model the correlation between sentences, such as ALBERT~.", "cites": [ 2473, 1150, 1557, 7 ], "cite_extract_rate": 0.8, "origin_cites_number": 5 }, { "id": "8b882e93-190e-4264-b9b4-fa6f2a75f940", "title": "Pretraining Tasks for CV", "level": "subsubsection", "subsections": [], "parent_id": "235dfd2e-07af-44e0-9efe-f1d9c2ab1fa0", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "Basic Components" ], [ "subsection", "Pretraining Tasks for PFMs" ], [ "subsubsection", "Pretraining Tasks for CV" ] ], "content": "There are many pretraining tasks created for CV to learn the feature space, which is based on SSL. It utilizes pretext tasks that contain human-designed labels, like jigsaw puzzles or the comparison of various patches from images. This enables the generalization of learned representations to a range of downstream tasks.\n\\textbf{Specific Pretext Task.}\nA pretext task also referred to as a predefined task, is created for the encoder networks to perform during the pretraining phase. The network is trained by predicting the answer to a special pretext task. Based on particular features of the data, pseudo labels are generated for the fictitious task. Then, using guided learning techniques, the encoder networks are trained to solve the pretext task. For example, inpainting aims to pretrain models by predicting the missed center part.\n\\textbf{Frame Order Learning Task.} Learning frame order from videos involves frame processing through time steps, which can serve as the pretraining task for CV. This issue usually relates to completing pretextual exercises that can aid in the acquisition of visual temporal representations.\n\\textbf{Data Generation Task.} The representational capabilities within the generative adversarial networks (GANs) can also be used in the pretraining tasks. Projecting data back into the latent space, as demonstrated by BiGANs~, is helpful for auxiliary supervised discrimination tasks by acting as feature representations.\n\\textbf{Data Reconstruction Task.} Since the images can be divided into patches inspired by the natural language, some pretraining tasks for NLP can also be used in CV, e.g., the autoencoder-based masked prediction. The original image is first divided into a few patches and discrete visual tokens are used to encode each patch. The visual tokens from the masked patches are outputted in the second stage to match the corresponding visual tokens from the fixed tokenizer.\n\\textbf{Miscellaneous.} To train the PFMs in CV, additional pretraining tasks are suggested. For instance, based on contrastive learning, encoder networks are used for pretraining on various data augmentation. The parameters are trained by maximizing the distance between negative pairs (e.g., pairs with different labels) and minimizing the distance between positive pairs (e.g., pairs with the same labels). To pretrain the parameters of the backbone network, the DeepClustering~ method divides the representations into various clusters and labels these clusters as supervised signals.", "cites": [ 9095, 9094 ], "cite_extract_rate": 1.0, "origin_cites_number": 2 }, { "id": "c78479fb-b493-4590-9b94-3b5ad65aab94", "title": "Pretraining Tasks for GL", "level": "subsubsection", "subsections": [], "parent_id": "235dfd2e-07af-44e0-9efe-f1d9c2ab1fa0", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "Basic Components" ], [ "subsection", "Pretraining Tasks for PFMs" ], [ "subsubsection", "Pretraining Tasks for GL" ] ], "content": "The pre-set tasks in GL are similar to other pretext tasks. However, they can be supervised or unsupervised depending on the design. According to the pretraining purpose and potential motivation in GL, such tasks can be divided into the following categories:\n\\textbf{Graph Information Completion.}\nThis task refers to firstly masking part of the information in the input graph, and then recovering the masked information based on the analysis of the remaining information distribution.\nSimilar tasks also exist in CV and NLP, and their goals are to fill in hidden pixels or words, respectively.\n\\textbf{Graph Property Prediction.}\nDifferent from directly modeling the information of the input graph, this task aims to provide a variety of self-supervised signals by mining the potential properties of the input graph.\nSpecifically, on the one hand, it considers node attributes, local substructure, and connectivity information to provide predictive regression tasks; on the other hand, it assigns pseudo-labels to nodes through information such as clusters, structure density, and attribute similarity to provide classification tasks.\n\\textbf{Graph Consistency Analysis.}\nThe goal of this task is to maximize the consistency between samples with similar semantic information in the graph embedding and minimize the agreement between samples with unrelated semantic information.\nIn the actual scenario, it can be divided into consistency analysis of context/self/cross-scale according to different model training strategies.\n\\textbf{Miscellaneous.}\nCompared with using only one pretext task, some methods have designed some integration mechanisms to incorporate the advantages of multiple pretext tasks into a unified framework.\nBesides, some graph data in specific fields have unique self-supervised signals with practical significance that can be used for pretraining under targeted design.\nIn summary, the transformer is an important component of the large model architecture, which helps learn the important features and mine intrinsic structure in data. Different learning mechanisms can be used for training PFMs according to the datasets and specific tasks. Especially, SSL is a promising mechanism to learn knowledge embeddings from the data considering the large scale of unlabeled data in various areas. RL provides a new way to fine-tune the PFMs for downstream tasks by optimizing a policy (model) against the reward model. How to design effective and efficient tasks for PFMs to master the knowledge behind the data is an important research topic.", "cites": [], "cite_extract_rate": 0, "origin_cites_number": 0 }, { "id": "c043d8a4-ac81-470e-a27d-0a13ffaae1ac", "title": "PFMs for Natural Language Processing", "level": "section", "subsections": [ "95e3c15e-351a-4fa1-a960-f999e1a0eb56", "715c9697-d21b-45c6-b488-83c39de09bb8", "c73ddc0a-1477-4bcd-be5e-b0d9f7ea2690", "0a4121f5-6ae9-4717-8c66-33026e52d366", "1d6edf07-e612-4411-b731-77aa6ec24303", "27592066-82ce-425a-a3d0-612df6fceb81" ], "parent_id": "160c6790-e92e-4d72-a546-5d2f900ac104", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "PFMs for Natural Language Processing" ] ], "content": "\\label{Section 3}\nNLP is a research field that integrates linguistics and computer science. Its main research tasks include part-of-speech tagging, named entity recognition, semantic role labeling, machine translation, question answering, sentiment analysis, text summarization, text classification, relationship extraction, event extraction, etc. \nThe idea of PFM first gained popularity in NLP. Then CV and GL adopt the promising pretraining technology.\nThe PFM trains on a large benchmark dataset and is fine-tuned on the primary task dataset to obtain a model which can solve new similar tasks.\nIt models syntactic and semantic representations of words simultaneously and changes the representation of polysemous words dynamically according to different input contexts. PFM learns a rich knowledge of grammar and semantic reasoning with better results. \nNumerous PFMs have been proposed in the past few years, as shown in \\textbf{Table~\\ref{text}}. \nIn this section, we first introduce word representation learning models including the autoregressive language model (LM), contextual LM, and permuted LM. \nThen, we present the neural network architectures for the PFM designing method and the masking designing method. Besides, we summarize boosting methods for enhancing model performance, multi-task learning, and different downstream tasks. Finally, we introduce the instruction-aligning methods, e.g. RLHF and Chain-of-Thoughts, which are applied in PFMs, such as ChatGPT, to provide outputs that more closely match human preferences and are less harmful.", "cites": [], "cite_extract_rate": 0, "origin_cites_number": 0 }, { "id": "95e3c15e-351a-4fa1-a960-f999e1a0eb56", "title": "Word Representations Methods", "level": "subsection", "subsections": [ "52fdf3e9-1a6e-40a4-a385-dab0848a2c75" ], "parent_id": "c043d8a4-ac81-470e-a27d-0a13ffaae1ac", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "PFMs for Natural Language Processing" ], [ "subsection", "Word Representations Methods" ] ], "content": "Many large-scale pretrained models have achieved better performance than humans in question answering, machine reading comprehension, and natural language reasoning, which indicates that the current construction approach of PFMs is practical.\nThe existing pretraining LMs are mainly divided into three branches according to the word representations approach: \\emph{(1) autoregressive LM, (2) contextual LM, and (3) permuted LM}. The word prediction direction and contextual information are the most important factors among these three branches.", "cites": [], "cite_extract_rate": 0, "origin_cites_number": 0 }, { "id": "52fdf3e9-1a6e-40a4-a385-dab0848a2c75", "title": "Autoregressive Language Model", "level": "paragraph", "subsections": [ "4e905948-4656-4583-bcd3-ea4d62f36d7d", "6f4b628d-0f75-4948-a123-10026b7e2d15" ], "parent_id": "95e3c15e-351a-4fa1-a960-f999e1a0eb56", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "PFMs for Natural Language Processing" ], [ "subsection", "Word Representations Methods" ], [ "paragraph", "Autoregressive Language Model" ] ], "content": "The autoregressive LM predicts the next possible word based on the preceding word or the last possible word based on the succeeding word. \nIt is selected as a feature extractor and text representations are extracted from the former words.\nThus, it has better performance in NLG tasks such as text summarization and machine translation. \nFor a sequence, $T=[w_{1}, w_{2}, \\ldots, w_{N}]$, the probability of a given word calculated as follows:\n\\begin{equation}\np\\left(w_{1}, w_{2}, \\ldots, w_{N}\\right)=\\prod_{i=1}^{N} p\\left(w_{i} \\mid w_{1}, w_{2}, \\ldots, w_{i-1}\\right),\n\\end{equation}\nwhere $i>1$ and $N$ is the length of the input sequence.\nThe GPT~ adopts a two-stage method of self-supervised pretraining and supervised fine-tuning and uses stacked Transformer~ as its decoder.\nAs a follow-up, the OpenAI team continues to expand GPT, proposes the GPT-2~ and increases the number of stacked Transformer layers to 48 layers. The total number of parameters reached 1.5 billion. GPT-2 also introduces multi-task learning~.\nThe GPT-2 has a considerable model capacity and can be adjusted for different task models rather than fine-tuning them. However, GPT-2 also uses an autoregressive LM. Therefore, it improves the performance of the model without increasing the cost dramatically. Due to the lack of contextual modeling ability with a one-way Transformer, the main performance improvement of GPT-2 comes from the combined effect of multi-task pretraining, super-large datasets, and super-large models.\nTask-based datasets for fine-tuning are still needed for specific downstream tasks.\nIncreasing the training scale of the LM can lead to a significant enhancement in task-independent performance. Hence, GPT-3~ was developed, which features a model size of 175 billion parameters and is trained with 45 Terabytes of data. This enables it to exhibit good performance without the need for fine-tuning for specific downstream tasks.", "cites": [ 679, 38 ], "cite_extract_rate": 0.4, "origin_cites_number": 5 }, { "id": "4e905948-4656-4583-bcd3-ea4d62f36d7d", "title": "Contextual Language Model", "level": "paragraph", "subsections": [], "parent_id": "52fdf3e9-1a6e-40a4-a385-dab0848a2c75", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "PFMs for Natural Language Processing" ], [ "subsection", "Word Representations Methods" ], [ "paragraph", "Autoregressive Language Model" ], [ "paragraph", "Contextual Language Model" ] ], "content": "The autoregressive LM only uses the information above or below and cannot use the information above and below at the same time. ELMO~ only uses bi-directional Long Short-Term Memory (LSTM), which is a concatenation of two unidirectional LSTMs in backward and forward.\nThe contextual LM predictions are based on contextual words.\nIt uses a Transformer encoder, and the upper and lower layers of the model are all directly connected to each other due to the self-attention mechanism.\nFor a sequence of words $T$, the probability of a given word calculates as follows\n\\begin{equation}\np\\left(w_{1}, w_{2}, \\ldots, w_{N}\\right)=\\prod_{i=1}^{N} p\\left(w_{i} \\mid w_{1}, w_{2}, \\ldots, w_{N}\\right).\n\\end{equation}\nBERT~ uses a stacked multi-layer bi-directional Transformer as the basic structure, and WordPiece~ as a word segmentation method. The model input consists of three parts: word embedding, segment embedding, and position embedding.\nIt uses a bi-directional Transformer as a feature extractor, which offsets the defect of ELMO and GPT. \nHowever, the shortcomings of BERT are also not to be ignored. The bidirectional Transformer structure does not eliminate the constraints of the self-encoding model. Its vast number of model parameters are very unfriendly to devices with low computing resources and are challenging to deploy and apply.\nFurthermore, the hidden language modeling in pretraining will lead to inconsistencies with the input of the model in the fine-tuning stage.\nMost PFMs need more training tasks and a larger corpus.\nAiming at the problem of insufficient training, Liu et al.~ propose the RoBERTa. It uses a larger batch size and unlabeled data. Furthermore, it trains the model for a longer time, removes the NSP task, and adds long sequence training. In processing text input, different from BERT, Byte Pair Encoding (BPE)~ is adopted for word segmentation. BPE uses a different mask mode for each input sequence, even if the input sequence is the same.", "cites": [ 207, 826, 8385, 8559, 7 ], "cite_extract_rate": 1.0, "origin_cites_number": 5 }, { "id": "6f4b628d-0f75-4948-a123-10026b7e2d15", "title": "Permuted Language Model", "level": "paragraph", "subsections": [], "parent_id": "52fdf3e9-1a6e-40a4-a385-dab0848a2c75", "prefix_titles": [ [ "title", "A Comprehensive Survey on Pretrained Foundation Models: A History from BERT to ChatGPT" ], [ "section", "PFMs for Natural Language Processing" ], [ "subsection", "Word Representations Methods" ], [ "paragraph", "Autoregressive Language Model" ], [ "paragraph", "Permuted Language Model" ] ], "content": "The modeling method with a contextual LM can be regarded as the autoencoding model. However, due to the inconsistency in the training stage and fine-tuning stage, the performance of the autoencoding model is poor in the Natural Language Generation (NLG) task.\nPermuted LM aims to combine the advantages of the autoregressive LM and the autoencoder LM.\nIt improves the defects of the two models to a great extent and can be used as a basic idea for the construction of future pretraining target tasks.\nFor a given input sequence $T=[w_{1},w_{2}...\n,w_{N}]$, the formal representation of the target function of the permuted LM is as follows\n\\begin{equation}\n\\max _{\\theta} \\mathbb{E}_{z \\sim Z_{N}}\\left[\\sum_{t=1}^{N} \\log p_{\\theta}\\left(x_{z_{T=t}} \\mid x_{z_{T