## 3 Overview of Machine Learning  
ML is a subfield of AI in which the knowledge to perform a target task is learnt from data. ML can be applied to various tasks, such as regression and classification [23]. An ML system consists of multiple steps as illustrated in Figure 3 (top), some of which can be omitted depending the type of the target task, the nature of the data, and the property of the ML model. In IONM, the ML system often takes (serial) evoked potentials and EMG signals as input. The preprocessing step transforms and normalizes the data to make it easier to process in subsequent steps. The feature extraction step converts the data into vector representation, from which the ML model produces the prediction result. In IONM, the ML model predicts discriminating altered signals, postoperative neurologic deficit, or postoperative functional gain. Optionally, the postprocessing step refines or reformats the prediction results. There are various ML models. Linear models are widely used for numerical data analysis owing to their simplicity and interpretability. However, more sophisticated methods, such as neural networks, support vector machines (SVMs), and decision trees (DTs), are also frequently used in medical data analysis [24]. In particular, tree-based ensemble techniques such as random forests and extreme gradient boosting (XG-Boost) have exhibited excellent performances in numerical data analysis. In recent years, deep learning has attracted considerable attention owing to its outstanding performance [25]. Deep learning is based on neural networks and is particularly effective in analyzing complex data, such as images, text, and time-series data [26; 27]. The training algorithms adjust the parameters or structure of the model to optimize a learning objective as shown in Figure 3 (bottom). Widely used learning criteria include loss minimization and likelihood maximization. In supervised learning, the model learns from the ground truth labels specified by human experts. The training algorithm minimizes loss, such as cross-entropy or the mean squared error, that reflects the difference between the model output and the ground truth [28]. Further, unsupervised learning is used to learn data distribution or specific tasks, such as clustering and reproduction, without labels [29]. In recent years, self-supervised learning has been widely used for learning feature representations from a large volume of unlabeled data [30]. In self-supervised learning, the model achieves knowledge for multiple tasks through artificially defined tasks whose ground truth can be derived from the data itself, e.g., predicting the next data from the past data and filling in the masked part of the data. Reinforcement learning trains a model that interacts with the environment. The model then performs actions that affect the environment, and the environment rewards the model's actions. The training algorithm optimizes the model to select the actions that maximize the expected reward. Figure 3: A general framework for training and applying ML models. The bottom figure illustrates supervised learning using ground truth labels. The validation and performance evaluation of ML models is crucial in their application to the field of medicine [28]. For evaluation, the primary metric for classification tasks is accuracy, which is the fraction of correctly classified samples among all test samples. Precision and recall are widely used for detection and identification tasks. Precision is the fraction of retrieved instances that were relevant, while recall is the fraction of relevant instances that were retrieved. The FI-score, defined as the harmonic mean of precision and recall, is used to measure the balanced performance of the model [31]. In general, researchers divide data into three non-overlapping subsets with different purposes: training, validation, and testing. The training set is used only to train the model, and the validation set is used to determine hyperparameters and select a model.