Each model presents a trade-off between expressivity, computational complexity, and interpretability. The choice of model for Open Set Learning depends on the underlying data distribution and the required rejection confidence.

A distance-based approach further refines the rejection mechanism by computing the Mahalanobis distance

$$D_M(\mathbf{x}, \mu_c, \Sigma_c) = \sqrt{(\mathbf{x} - \mu_c)^T \Sigma_c^{-1} (\mathbf{x} - \mu_c)} \quad (8.30)$$

and rejecting samples that satisfy

$$\min_{c} D_M(\mathbf{x}, \mu_c, \Sigma_c) > \delta. \quad (8.31)$$

An alternative Bayesian formulation considers the posterior probability of a sample belonging to a known class:

$$P(y \in \mathcal{Y}_{\text{train}} | \mathbf{x}) = \frac{\sum_{c=1}^{C} P(\mathbf{x} | y = c)P(y = c)}{P(\mathbf{x})}. \quad (8.32)$$

Defining a prior probability $P(y^* \notin \mathcal{Y}_{\text{train}}) = \alpha$, a Bayesian rejection model classifies a sample as unknown if

$$P(y^* \notin \mathcal{Y}_{\text{train}} | \mathbf{x}) = 1 - P(y \in \mathcal{Y}_{\text{train}} | \mathbf{x}) > \alpha. \quad (8.33)$$

By leveraging a combination of margin constraints, likelihood estimation, and probabilistic modeling, open set learning provides a rigorous mathematical framework for handling unknown distributions while maintaining classification performance on known data. The continued development of theoretical models and practical algorithms in this domain is essential for deploying reliable machine learning systems in real-world scenarios where distributional shifts and novel categories are unavoidable.

## 8.1 Literature Review of Deep Neural Network-based Open Set Learning

Open Set Learning (OSL) is a crucial area of machine learning that extends traditional classification by accounting for the presence of unknown classes in real-world applications. One of the seminal works in this domain is Scheirer et al.'s (2012) [1215] which introduced the concept of open space risk. The authors proposed the 1-vs-Set Machine, a classifier that minimizes empirical and open space risk, making it effective in identifying previously unseen categories. Following this, Bendale and Boult (2015) [1216] extended the framework to open world learning, wherein models must identify unknown categories and incrementally incorporate them into their learning process. Their Nearest Non-Outlier (NNO) algorithm provided a mechanism to dynamically learn from evolving data distributions. Another significant contribution came from Busto and Gall (2017) [1217] which focused on adapting models when the target domain contained classes not present in the source domain. Their Assign-and-Transform Iterative (ATI) method iteratively classified target samples as either belonging to a known class or as unknown, refining the learning process.

The challenge of domain adaptation in open set scenarios was further addressed by Saito et al. (2018) [1218] where adversarial training was used to align known class features while ensuring that unknown class features remained distinguishable. Their approach improved generalization across datasets with shifting distributions. Expanding on the theoretical foundations of OSL, Geng et al. (2020) [1219] provided a structured taxonomy of existing methods, evaluating their relative strengths and weaknesses. This survey has become a key reference for researchers entering the field. A novel approach to learning class boundaries in an open set scenario was proposed by Chen et al. (2020) [1221]. They introduced the concept of Reciprocal Points, which helped define
the extra-class space for each known category, reducing misclassification of unknowns. This work significantly improved decision boundary learning for open set classification.

<table><caption>Table 8.1: Summary of Contributions to Open Set Learning (OSL)</caption><thead><tr><td>Author(s)</td><td>Contribution</td></tr></thead><tbody><tr><td>Scheirer et al. (2012) [1215]</td><td>Introduced the concept of open space risk and proposed the 1-vs-Set Machine classifier, which minimizes both empirical and open space risk to identify unseen categories.</td></tr><tr><td>Bendale and Boult (2015) [1216]</td><td>Extended the framework to open world learning with the Nearest Non-Outlier (NNO) algorithm, allowing incremental learning from evolving data.</td></tr><tr><td>Busto and Gall (2017) [1217]</td><td>Proposed the Assign-and-Transform Iterative (ATI) method for domain adaptation when the target domain includes unknown classes not present in the source.</td></tr><tr><td>Saito et al. (2018) [1218]</td><td>Used adversarial training to align features of known classes and distinguish unknowns, improving generalization in open set domain adaptation scenarios.</td></tr><tr><td>Geng et al. (2020) [1219]</td><td>Offered a comprehensive taxonomy and theoretical framework for Open Set Learning methods, becoming a foundational survey in the field.</td></tr><tr><td>Chen et al. (2020) [1221]</td><td>Introduced Reciprocal Points to define extra-class space and improve the separation between known and unknown classes.</td></tr></tbody></table>

Few-shot learning in open set recognition presents additional complexities, as limited labeled data makes it difficult to differentiate between known and unknown categories. Addressing this, Liu et al. (2020) [1222] introduced the PEELER algorithm, which integrates meta-learning and entropy maximization to enhance recognition capabilities. Another innovative approach came from Kong and Ramanan (2021) [1223] where Generative Adversarial Networks (GANs) were leveraged to synthesize diverse open-set examples. This method helped in explicitly modeling the open space, improving classifier robustness. Advancing the theoretical aspects, Fang et al. (2021) [1224] provided generalization bounds for open set learning and introduced the Auxiliary Open-Set Risk (AOSR) algorithm, ensuring robust decision-making under open-world conditions.

Active learning, which involves selecting the most informative samples for labeling, was linked to open set recognition by Mandivarapu et al. (2022) [1225]. They proposed a framework where unknown instances were queried and incorporated into the learning process, making the classifier more adaptive to novel data. The impact of semi-supervised learning on OSL was explored by Engelbrecht and du Preez (2020) [1226]. They combined positive and unlabeled learning, improving model robustness when training data contained unknown categories. Similarly, Zhou et al. (2024) [1235] introduced a contrastive learning framework that used an unknown score to separate known and unknown instances more effectively.

Another fundamental challenge in open set recognition is handling distributional shifts, which was rigorously analyzed by Shao et al. (2022) [1227]. Their work addressed scenarios where class distributions evolved between training and testing, ensuring that OSL models could generalize despite such shifts. Theoretical underpinnings of OSL were further explored by Park et al. (2024) [1228] which provided insights into how neural networks distinguish between known and unknown
classes using Jacobian-based metrics. Open set recognition also extends to object detection, as demonstrated by Liu et al. (2022) [1230] which developed a hybrid model that utilized both labeled and unlabeled data for detecting unknown objects in complex visual scenes.

Abouzaid et al. (2023) [1236] present a cost-effective alternative to conventional vector network analyzers by leveraging a D-band Frequency-Modulated Continuous-Wave (FMCW) radar system combined with deep learning models for material characterization, where the integration of an open-set recognition technique allows the system to reject measurements from unknown materials that were not encountered during training, ensuring enhanced reliability and robustness in practical applications; their work demonstrates how deep learning, when coupled with domain-specific hardware, can improve classification confidence in real-world settings where unknown materials may appear frequently. Similarly, Cevikalp et al. (2023) [1237] proposed a novel approach that effectively unifies anomaly detection and open set recognition by approximating class acceptance regions with compact hypersphere models, providing a clear separation between known and unknown instances, where their method improves the generalization capability of OSL models by explicitly defining decision boundaries that allow the model to reject unseen samples with greater confidence, bridging a crucial gap between two previously distinct problem domains and offering a new perspective on how class boundaries should be defined in high-dimensional spaces; their work emphasizes the importance of modeling uncertainty in classification tasks to improve the identification of unknown samples in real-world applications.

Palechor et al. (2023) [1238] highlight a critical limitation in current open-set classification research—namely, that existing evaluations are often performed on small-scale, low-resolution datasets that do not accurately reflect real-world challenges—so they introduce three large-scale open-set protocols built using subsets of ImageNet, where these protocols vary in terms of similarity between known and unknown classes to provide a more realistic assessment of open-set recognition models; furthermore, they propose a novel validation metric designed to evaluate a model’s ability to both classify known samples and correctly reject unknown ones, thus contributing significantly to the standardization of open-set evaluation methodologies and setting new benchmarks for future research in this domain, where their large-scale approach helps bridge the gap between academic research and practical deployment scenarios by providing a more realistic evaluation framework. Lastly, Cen et al. (2023) [1240] delve into the concept of Unified Open-Set Recognition (UOSR), which not only aims to reject unknown samples but also to handle known samples that are misclassified by the model, where they analyze the distribution of uncertainty scores and find that misclassified known samples exhibit uncertainty distributions similar to those of truly unknown samples, highlighting a fundamental limitation of existing open-set classifiers; they further explore how different training settings—such as pre-training and outlier exposure—affect UOSR performance, and they propose the FS-KNNS method for few-shot UOSR settings, which achieves state-of-the-art performance across multiple evaluation conditions, demonstrating that a unified framework capable of handling both unknown rejection and misclassification is necessary for real-world applications where classification errors can have significant consequences.

<table><caption>Table 8.2: Summary of Additional Contributions to Open Set Learning (OSL)</caption><thead><tr><th>Authors (Year)</th><th>Citation Key</th><th>Contribution / Summary</th></tr></thead><tbody><tr><td>Liu et al. (2020)</td><td>[1222]</td><td>Introduced the PEELER algorithm combining meta-learning and entropy maximization for few-shot open set recognition.</td></tr><tr><td>Kong and Ramanan (2021)</td><td>[1223]</td><td>Used GANs to generate diverse open-set examples, improving classifier robustness by explicitly modeling the open space.</td></tr><tr><td colspan="3">Continued on next page</td></tr></tbody></table>
<table><caption>Table 8.2 – continued from previous page</caption><thead><tr><td>Authors (Year)</td><td>Citation Key</td><td>Contribution / Summary</td></tr></thead><tbody><tr><td>Fang et al. (2021)</td><td>[1224]</td><td>Proposed generalization bounds and the Auxiliary Open-Set Risk (AOSR) algorithm for robust decision-making in open-world conditions.</td></tr><tr><td>Mandivarapu et al. (2022)</td><td>[1225]</td><td>Linked active learning with open set recognition by querying unknown instances for improved adaptivity.</td></tr><tr><td>Engelbrecht and du Preez (2020)</td><td>[1226]</td><td>Proposed a semi-supervised OSL model using positive and unlabeled learning to increase robustness to unknowns.</td></tr><tr><td>Zhou et al. (2024)</td><td>[1235]</td><td>Introduced a contrastive learning framework with an "unknown score" to enhance known-unknown separation.</td></tr><tr><td>Shao et al. (2022)</td><td>[1227]</td><td>Analyzed distributional shifts between training and testing phases, improving OSL generalization.</td></tr><tr><td>Park et al. (2024)</td><td>[1228]</td><td>Provided theoretical insights on distinguishing known and unknowns using Jacobian-based metrics in neural networks.</td></tr><tr><td>Liu et al. (2022)</td><td>[1230]</td><td>Developed a hybrid OSL object detection model combining labeled and unlabeled data for complex visual scenes.</td></tr><tr><td>Abouzaid et al. (2023)</td><td>[1236]</td><td>Used D-band FMCW radar with deep learning and open-set recognition for reliable material characterization.</td></tr><tr><td>Cevikalp et al. (2023)</td><td>[1237]</td><td>Unified anomaly detection and OSL using compact hypersphere models to define decision boundaries.</td></tr><tr><td>Palechor et al. (2023)</td><td>[1238]</td><td>Proposed large-scale ImageNet-based open-set protocols and a new validation metric for realistic OSL evaluation.</td></tr><tr><td>Cen et al. (2023)</td><td>[1240]</td><td>Introduced FS-KNNS for few-shot Unified Open-Set Recognition, analyzing uncertainty distributions and pretraining impacts.</td></tr></tbody></table>

Huang et al. (2022) [1241] introduce a novel approach that leverages semantic reconstruction to bridge the gap between known and unknown classes by focusing on class-specific feature recovery, enabling more robust rejection of out-of-distribution samples. Complementarily, Wang et al. (2022) [1242] propose an Area Under the Curve (AUC)-optimized objective function that directly improves open-set recognition performance by training deep networks to balance the trade-off between closed-set classification and unknown sample detection, providing a novel perspective on learning decision boundaries in an end-to-end manner. Additionally, Alliegro et al. (2022) [1243] present a benchmark dataset tailored for 3D open-set learning, evaluating deep learning architectures on object point cloud classification where previously unseen object categories must be identified and rejected, highlighting the need for better feature representations in 3D data. Meanwhile, Grieggs et al. (2021) [1244] propose a unique application of OSL in the context of handwriting recognition, demonstrating how human perception can be leveraged to identify errors in automatic transcription systems when encountering unfamiliar handwriting styles, further expanding the applicability of OSL methodologies beyond traditional classification problems.
The intersection of open-set learning and object detection has also received attention, with Liu et al. (2022) [1230] introducing a semi-supervised framework that leverages labeled and unlabeled data to improve object detection models in open-world settings where new object categories emerge post-training, making their method highly relevant for real-world surveillance and autonomous driving applications. Similarly, Grcić et al. (2022) [1245] proposed a hybrid approach that combines traditional anomaly detection with deep feature learning to improve open-set performance in dense prediction tasks such as semantic segmentation. Moreover, Moon et al. (2022) [1246] introduced a simulator that generates synthetic samples mimicking the characteristics of unknown instances, allowing models to improve their robustness against unfamiliar data distributions. Meanwhile, Kuchibhotla et al. (2022) [1248] addressed the problem of incrementally learning new unknown categories, proposing a framework that adapts dynamically to new unseen data without requiring retraining, making it well-suited for applications like autonomous agents and continual learning scenarios.

Another critical research direction is open-set image generation, explored by Katsumata et al. (2022) [1249] where they propose a Generative Adversarial Network (GAN)-based framework for semi-supervised image synthesis, ensuring that generated images align with both known class distributions and the potential feature spaces of unknown samples, bridging the gap between generative modeling and open-set classification. Bao et al. (2022) [1250] extend OSL into the domain of temporal action recognition, developing a method that detects and localizes previously unseen human actions in video sequences, an essential capability for video surveillance and activity monitoring. Dietterich and Guyer (2022) [1251] conducted a theoretical analysis of why deep networks struggle with open-set generalization, proposing that model behavior is largely dictated by the level of feature familiarity during training, thereby highlighting the importance of designing architectures that explicitly account for feature generalization beyond closed-set learning.

<table><caption>Table 8.3: Summary of Additional Contributions to Open Set Learning (OSL)</caption><thead><tr><td>Authors (Year)</td><td>Main Contribution</td></tr></thead><tbody><tr><td>Huang et al. (2022) [1241]</td><td>Propose a semantic reconstruction approach that focuses on class-specific feature recovery, enhancing rejection of out-of-distribution samples by bridging the gap between known and unknown classes.</td></tr><tr><td>Wang et al. (2022) [1242]</td><td>Introduce an AUC-optimized objective function that trains deep networks to balance closed-set accuracy and unknown detection, improving open-set decision boundary learning.</td></tr><tr><td>Alliegro et al. (2022) [1243]</td><td>Present a benchmark dataset for 3D open-set learning in object point cloud classification, emphasizing the need for improved 3D feature representation.</td></tr><tr><td>Grieggs et al. (2021) [1244]</td><td>Apply OSL to handwriting recognition by leveraging human perception to identify transcription errors from unfamiliar handwriting styles, expanding OSL beyond classification.</td></tr><tr><td>Liu et al. (2022) [1230]</td><td>Propose a semi-supervised framework for open-world object detection using both labeled and unlabeled data, enabling dynamic adaptation to emerging object classes.</td></tr><tr><td>Grcić et al. (2022) [1245]</td><td>Combine anomaly detection and deep feature learning to enhance open-set semantic segmentation performance in dense prediction tasks.</td></tr><tr><td>Moon et al. (2022) [1246]</td><td>Introduce a simulator for generating synthetic unknown samples to improve model robustness against unfamiliar data distributions.</td></tr></tbody></table>
<table><thead><tr><td>Authors (Year)</td><td>Main Contribution</td></tr></thead><tbody><tr><td>Kuchibhotla et al. (2022) [1248]</td><td>Develop an incremental learning framework for adapting to new unknown categories without retraining, suitable for continual learning and autonomous systems.</td></tr><tr><td>Katsumata et al. (2022) [1249]</td><td>Propose a GAN-based framework for semi-supervised open-set image generation that aligns synthesized images with both known and unknown class features.</td></tr><tr><td>Bao et al. (2022) [1250]</td><td>Extend OSL to temporal action recognition by detecting and localizing unseen human actions in video, applicable to surveillance and activity monitoring.</td></tr><tr><td>Dietterich and Guyer (2022) [1251]</td><td>Provide a theoretical analysis of why deep networks fail in open-set generalization, attributing it to feature familiarity levels and proposing architectural considerations.</td></tr></tbody></table>

Long-tailed and class imbalance issues are further addressed by Cai et al. (2022) [1253] where they propose a method for localizing unfamiliar samples in long-tailed distributions by leveraging feature similarity measures to identify and reject outliers, providing an important step towards integrating OSL with long-tailed classification problems. Similarly, Wang et al. (2022) [1254] present a framework that generalizes open-world learning paradigms to specific user-defined tasks, improving model adaptability by considering the dynamics of real-world data distributions. Zhang et al. (2022) [1256] introduce an architecture search algorithm optimized for OSL, demonstrating that network design itself plays a crucial role in determining a model's ability to reject unknown instances, thus contributing a new perspective to the development of OSL-optimized deep learning architectures. Lu et al. (2022) [1257] present a prototype-based approach that enhances open-set rejection by mining robust feature prototypes from known classes, refining decision boundaries by ensuring that unknown samples are adequately separated from learned class distributions. Their work aligns closely with recent efforts in prototype learning for anomaly detection and open-world learning, reinforcing the importance of well-structured feature representations in OSL.

The following five papers collectively advance the field of Open Set Learning (OSL) by addressing key challenges in recognizing known classes while rejecting unknown or out-of-distribution (OOD) samples. Xia et al. (2021) [1258] propose an Adversarial Motorial Prototype Framework (AMPF), leveraging adversarial learning to refine class prototypes and explicitly model uncertainty boundaries, offering strong theoretical grounding but facing instability in training. Kong and Ramanan (2021) [1259] introduce OpenGAN, which generates synthetic OOD data via GANs, improving generalization but requiring auxiliary OOD data for optimal performance. Huang et al. (2021) [1260] take a semi-supervised approach in Trash to Treasure, using cross-modal matching to mine useful OOD samples from unlabeled data, though this depends on multi-modal availability. Wang et al. (2021) [1262] present an energy-based model (EBM) for uncertainty calibration, providing a principled confidence measure without OOD data but at higher computational cost. Lastly, Zhang and Ding (2021) [1263] adapt prototypical matching for zero-shot segmentation with open-set rejection, offering efficiency but relying on pre-defined class embeddings. These works highlight diverse strategies—adversarial learning, generative modeling, multi-modal mining, energy-based uncertainty, and metric-based rejection—each with unique trade-offs in stability, data requirements, and scalability.

A comparative analysis reveals that generative approaches (OpenGAN, AMPF) excel in synthesizing or refining unknown-class representations but often suffer from training instability or data dependency. In contrast, discriminative methods (Huang et al. (2021) [1260], Xia et al. (2021) [1258]) leverage existing data more efficiently but may struggle with feature overlap or modality constraints. The energy-based framework stands out for its theoretical robustness in uncertainty quantification but lacks computational efficiency. Future directions could integrate these paradigms—e.g., com-
bining generative synthetic data with energy-based calibration or extending contrastive learning to reduce multi-modal reliance. Additionally, bridging zero-shot learning (Zhang and Ding (2021) [1263]) with open-set recognition (Wang et al. (2021) [1262]) could yield more scalable solutions for real-world open-world scenarios.

<table><caption>Table 8.4: Summary of Contributions to Open Set Learning (OSL)</caption><thead><tr><td>Authors (Year)</td><td>Main Contribution</td></tr></thead><tbody><tr><td>Cai et al. (2022) [1253]</td><td>Propose a method to localize unfamiliar samples in long-tailed dis- tributions using feature similarity measures, enabling outlier rejec- tion and integrating OSL with long-tailed classification.</td></tr><tr><td>Wang et al. (2022) [1254]</td><td>Present a framework for adapting open-world learning to user- defined tasks, enhancing model adaptability to dynamic real-world data distributions.</td></tr><tr><td>Zhang et al. (2022) [1256]</td><td>Introduce an architecture search algorithm tailored to OSL, high- lighting the importance of network design in effectively rejecting unknown instances.</td></tr><tr><td>Lu et al. (2022) [1257]</td><td>Develop a prototype-based method that refines decision boundaries and improves open-set rejection by mining robust feature proto- types from known classes.</td></tr><tr><td>Xia et al. (2021) [1258]</td><td>Propose the Adversarial Motorial Prototype Framework (AMPF), using adversarial learning to refine class prototypes and explicitly model uncertainty boundaries.</td></tr><tr><td>Kong and Ra- manan (2021) [1259]</td><td>Introduce OpenGAN, which uses GANs to synthesize OOD data for improving generalization, although requiring auxiliary OOD data.</td></tr><tr><td>Huang et al. (2021) [1260]</td><td>Present a semi-supervised cross-modal method (Trash to Treasure) for mining OOD samples from unlabeled data, with dependency on multi-modal data availability.</td></tr><tr><td>Wang et al. (2021) [1262]</td><td>Develop an energy-based model (EBM) for uncertainty calibration that offers principled confidence measures without OOD data, al- beit with high computational cost.</td></tr><tr><td>Zhang and Ding (2021) [1263]</td><td>Adapt prototypical matching for zero-shot segmentation with open- set rejection, achieving efficiency but relying on pre-defined class embeddings.</td></tr></tbody></table>

Girish et al. (2021) [1264] propose a framework for discovering and attributing GAN-generated images in an open-world context, leveraging contrastive learning and unsupervised clustering to identify novel synthetic sources. This work is pivotal in extending open-set learning to generative models, where unknown sources must be incrementally detected. Similarly, Wang et al. (2021) [1265] tackle open-world video object segmentation by introducing a benchmark for dense, uniden- tified object segmentation, emphasizing the need for models to reject unknown objects while in- crementally learning new categories. Their approach combines uncertainty estimation with spatio- temporal consistency, providing a robust baseline for dynamic open-world settings. Cen et al. (2021) [1266] further advance this direction by integrating deep metric learning into semantic seg- mentation, proposing a prototype-based mechanism to distinguish known and unknown classes through margin-based feature separation. Their work bridges open-set recognition and dense pre- diction, demonstrating significant improvements in unknown class rejection.

Wu et al. (2021) [1267] introduce NGC, a unified framework for learning with open-world noisy data, combining noise robustness with open-set rejection via graph-based label propagation and
uncertainty-aware sample selection. This work is particularly rigorous in its theoretical analysis of noise tolerance in open-set scenarios. Bastan et al. (2021) [1268] explore large-scale open-set logo detection, employing hierarchical clustering and outlier-aware loss functions to handle real-world open-set noise. Their empirical results highlight the scalability challenges in open-set detection. Saito et al. (2021) [1269] propose OpenMatch, a semi-supervised learning method that enforces consistency regularization while explicitly handling outliers, offering a principled way to integrate open-set robustness into semi-supervised pipelines. Finally, Esmaeilpour et al. (2022) [1270] extend CLIP for zero-shot open-set detection, leveraging vision-language pretraining to recognize novel categories without labeled examples. Their work underscores the potential of multimodal models in open-world settings but also exposes limitations in fine-grained unknown class discrimination. Collectively, these papers advance open-set learning through novel architectures, benchmarks, and theoretical insights, though challenges remain in scalability, noise robustness, and generalizability to real-world open-ended environments.

Chen et al. (2021) [1272] introduce Adversarial Reciprocal Points Learning, which leverages adversarial optimization to create reciprocal points that define decision boundaries for known classes while rejecting unknowns through a novel geometric margin constraint. This approach is theoretically grounded in metric learning and adversarial robustness, demonstrating superior performance on benchmark datasets. Similarly, Guo et al. (2021) [1273] propose a Conditional Variational Capsule Network, combining capsule networks with conditional variational autoencoders to model complex data distributions, enabling better uncertainty quantification for open-set scenarios. Their work extends the theoretical framework of variational inference to hierarchical feature representations, improving discriminability between known and unknown classes. Bao et al. (2021) [1274] explore Evidential Deep Learning for action recognition, employing subjective logic to model epistemic uncertainty explicitly. Their method provides a probabilistic interpretation of open-set recognition, offering robustness against outliers in video data. Meanwhile, Sun et al. (2021) [1275] introduce M2IOSR, which maximizes mutual information between input data and latent representations to enhance feature discriminability. Their information-theoretic approach ensures compact class-specific manifolds while maintaining separability from unknown samples, supported by rigorous bounds on mutual information optimization. Hwang et al. (2021) [1276] tackle Open-Set Panoptic Segmentation, proposing an exemplar-based approach that leverages prototype learning to distinguish known and unknown objects in segmentation tasks. Their method combines metric learning with panoptic segmentation, providing a novel way to handle open-set scenarios in dense prediction tasks. Finally, Balasubramanian et al. (2021) [1278] focus on real-world applications, combining deep learning with ensemble methods for detecting unknown traffic scenarios. Their work emphasizes practical robustness, using ensemble diversity to improve uncertainty estimation in safety-critical environments.

<table><caption>Table 8.5: Summary of Key Contributions to Open Set Recognition (OSR)</caption><thead><tr><td>Author(s)</td><td>Main Contribution</td></tr></thead><tbody><tr><td>Girish et al. [1264]</td><td>Propose a framework for detecting GAN-generated images using contrastive learning and clustering to discover novel synthetic sources in open-world scenarios.</td></tr><tr><td>Wang et al. [1265]</td><td>Introduce a benchmark for open-world video object segmentation combining uncertainty estimation and spatiotemporal consistency to reject unknowns and learn new categories.</td></tr><tr><td>Cen et al. [1266]</td><td>Use deep metric learning with prototype-based margin separation to improve open-set semantic segmentation by distinguishing known and unknown classes.</td></tr></tbody></table>
<table><tr><td>Wu et al. [1267]</td><td>Present NGC, a framework combining graph-based label propagation and uncertainty-aware sample selection for robust learning under noisy and open-world conditions.</td></tr><tr><td>Bastan et al. [1268]</td><td>Address large-scale open-set logo detection using hierarchical clustering and outlier-aware loss to manage noisy real-world open-set data.</td></tr><tr><td>Saito et al. [1269]</td><td>Propose OpenMatch, a semi-supervised learning approach that integrates consistency regularization with open-set outlier rejection.</td></tr><tr><td>Esmaeilpour et al. [1270]</td><td>Extend CLIP to zero-shot open-set detection, leveraging vision-language models to detect novel categories without labeled data, but note limitations in fine-grained unknown discrimination.</td></tr><tr><td>Chen et al. [1272]</td><td>Introduce Adversarial Reciprocal Points Learning using adversarial optimization to define class boundaries while rejecting unknowns via a geometric margin constraint.</td></tr><tr><td>Guo et al. [1273]</td><td>Develop a Conditional Variational Capsule Network combining capsules and VAEs for hierarchical uncertainty modeling in open-set recognition.</td></tr><tr><td>Bao et al. [1274]</td><td>Apply Evidential Deep Learning and subjective logic to explicitly model epistemic uncertainty in video-based action recognition.</td></tr><tr><td>Sun et al. [1275]</td><td>Propose M2IOSR, an information-theoretic model that maximizes mutual information for compact, separable class manifolds and robust unknown rejection.</td></tr><tr><td>Hwang et al. [1276]</td><td>Address open-set panoptic segmentation using prototype learning to distinguish known and unknown objects, integrating metric learning in dense prediction.</td></tr><tr><td>Balasubramanian et al. [1278]</td><td>Focus on real-world detection of unknown traffic scenarios using ensemble diversity to improve uncertainty estimation and robustness.</td></tr></table>

Salomon et al. (2020) [1285] propose Siamese networks for open-set face recognition in small galleries, leveraging metric learning to distinguish known from unknown classes effectively. Similarly, Jia and Chan (2021) [1284] introduce the MMF loss, extending traditional feature learning by incorporating margin-based constraints to enhance discriminability in open-set scenarios. Their follow-up work (Jia and Chan, 2022) [1283] presents a self-supervised de-transformation autoencoder that learns robust representations by reconstructing original images from augmented views, improving generalization to unknown classes. These approaches emphasize representation learning but differ in their mechanisms—metric learning vs. margin-based losses vs. self-supervised reconstruction—highlighting the trade-offs between discriminative power and generalization. Meanwhile, Yue et al. (2021) [1282] tackle open-set and zero-shot recognition through counterfactual reasoning, generating synthetic unknowns to refine decision boundaries. Their method bridges OSR and zero-shot learning by leveraging generative models, offering a unified perspective on handling unseen categories. Cevikalp et al. (2021) [1281] propose a deep polyhedral conic classifier, formulating OSR as a compact geometric problem where classes are modeled as convex cones, enabling both closed-set accuracy and open-set robustness. Zhou et al. (2021) [1280] take a different approach by learning "placeholder" prototypes for potential unknown classes during training, dynamically adjusting decision boundaries to accommodate novel test-time instances. Their method explicitly models uncertainty, contrasting with the geometric rigidity of polyhedral classifiers. Lastly, Jang and Kim (2023) [1279] present a teacher-explorer-student (TES) paradigm, where an "explorer"
network identifies challenging open-set samples to guide the student's learning process. This tripartite framework introduces a novel meta-learning aspect to OSR, emphasizing adaptive exploration over static modeling.

Sun et al. (2020) [1287] propose a Conditional Gaussian Distribution Learning (CGDL) method, which models class-conditional distributions to improve open-set recognition by leveraging uncertainty estimation. Similarly, Perera et al. (2020) [1288] introduce a hybrid generative-discriminative framework that combines variational autoencoders (VAEs) with discriminative classifiers to enhance feature separation between known and unknown classes. Meanwhile, Ditria et al. (2020) [1289] present OpenGAN, a generative adversarial network (GAN) variant designed to generate outliers that improve open-set detection by training the discriminator to reject synthetic unknowns. These works collectively emphasize the importance of probabilistic modeling and generative techniques in distinguishing between in-distribution and out-of-distribution samples, while also addressing scalability and generalization challenges in real-world applications. Further expanding the scope of OSL, Geng and Chen (2020) [1290] propose a collective decision framework that aggregates multiple classifiers to improve robustness in open-set scenarios, demonstrating the benefits of ensemble-based uncertainty quantification. Jang and Kim (2020) [1291] develop a One-vs-Rest deep probability model that explicitly estimates the probability of a sample belonging to an unknown class, offering a computationally efficient alternative to traditional threshold-based methods. Lastly, Zhang et al. (2020) [1292] explore hybrid models that combine discriminative and generative components, achieving state-of-the-art performance by jointly optimizing feature learning and open-set rejection. These studies highlight a trend toward hybrid architectures that integrate multiple learning paradigms to enhance open-set robustness.

<table><caption>Table 8.6: Summary of Key Contributions to Open Set Recognition (OSR)</caption><thead><tr><td>Author(s)</td><td>Main Contribution</td></tr></thead><tbody><tr><td>Salomon et al. [1285]</td><td>Apply metric learning to distinguish known from unknown classes in open-set face recognition with small galleries.</td></tr><tr><td>Jia and Chan [1284]</td><td>Incorporate margin-based constraints into feature learning to improve discriminability in OSR.</td></tr><tr><td>Jia and Chan [1283]</td><td>Learn robust representations through reconstruction of original images from augmented views to generalize to unknowns.</td></tr><tr><td>Yue et al. [1282]</td><td>Generate synthetic unknowns to refine decision boundaries using counterfactual reasoning, bridging OSR and zero-shot learning.</td></tr><tr><td>Cevikalp et al. [1281]</td><td>Model known classes as convex cones using a deep polyhedral conic classifier to enable open-set robustness.</td></tr><tr><td>Zhou et al. [1280]</td><td>Learn placeholder prototypes for potential unknown classes during training to dynamically adjust decision boundaries.</td></tr><tr><td>Jang and Kim [1279]</td><td>Introduce a teacher-explorer-student (TES) meta-learning framework where an explorer guides the student using challenging open-set samples.</td></tr><tr><td>Sun et al. [1287]</td><td>Propose a Conditional Gaussian Distribution Learning (CGDL) method to model class-conditional distributions for uncertainty-based OSR.</td></tr></tbody></table>
<table><tr><td>Perera et al. [1288]</td><td>Combine variational autoencoders (VAEs) with discriminative classifiers in a hybrid framework to separate known and unknown classes.</td></tr><tr><td>Ditria et al. [1289]</td><td>Present OpenGAN, which generates synthetic outliers to improve open-set detection by training the discriminator to reject unknowns.</td></tr><tr><td>Geng and Chen [1290]</td><td>Propose a collective decision framework that aggregates multiple classifiers to improve robustness in open-set scenarios.</td></tr><tr><td>Jang and Kim [1291]</td><td>Develop a One-vs-Rest deep probability model to estimate the probability of a sample belonging to an unknown class.</td></tr><tr><td>Zhang et al. [1292]</td><td>Explore hybrid models that combine discriminative and generative components for joint optimization of feature learning and OSR.</td></tr></table>

Shao et al. (2020) [1293] tackle adversarial vulnerabilities in OSR with Open-set Adversarial Defense, proposing a defense mechanism that integrates open-set robustness into adversarial training, ensuring resilience against both adversarial attacks and unknown class intrusions. These works collectively advance OSR by refining feature learning and decision boundaries, though they differ in their emphasis on hybrid architectures, latent space optimization, and adversarial robustness. Yu et al. (2020) [1294] introduce a Multi-Task Curriculum Framework for Open-Set Semi-Supervised Learning, dynamically balancing supervised and unsupervised learning to progressively handle unknown classes, demonstrating strong performance in mixed-label settings. Miller et al. (2021) [1295] propose Class Anchor Clustering, a distance-based loss function that enforces compact class-specific clusters while maintaining separation, improving open-set classification by directly optimizing feature space geometry. Jia and Chan (2021) [1296] contribute MMF, a loss extension that enhances feature discriminability in OSR by jointly minimizing intra-class variance and maximizing inter-class separation. Finally, Oliveira et al. (2020) [1300] extend OSR to dense prediction tasks with Fully Convolutional Open Set Segmentation, introducing uncertainty-aware mechanisms to reject unknown pixels in segmentation, a novel application of open-set principles.

Yang et al. (2020) [1301] propose S2OSC, a holistic semi-supervised framework that integrates consistency regularization and entropy minimization to enhance open set classification, demonstrating robustness in handling both labeled and unlabeled data. Similarly, Sun et al. (2020) [1302] leverage conditional probabilistic generative models to estimate the likelihood of samples belonging to known classes, using uncertainty thresholds to reject unknowns, thus providing a probabilistic foundation for open set recognition. Yang et al. (2020) [1303] introduce the Convolutional Prototype Network (CPN), which learns discriminative prototypes for known classes and employs a distance-based rejection mechanism, achieving state-of-the-art performance on benchmark datasets. Dhamija et al. (2020) [1304] highlight the understudied challenge of open set detection in object recognition, proposing an evaluation framework that underscores the limitations of current object detectors in rejecting unknown classes. Their work calls for a paradigm shift in designing detection systems to account for open-world assumptions. Meyer and Drummond (2019) [1305] emphasize metric learning as a pivotal tool for open set recognition in robotic vision, demonstrating its efficacy in active learning scenarios where unknown classes are incrementally discovered. Oza and Patel (2019) [1306] present a multi-task learning approach that jointly optimizes classification and reconstruction tasks, leveraging autoencoders to model the latent space of known classes and detect outliers. Yoshihashi et al. (2019) [1307] propose Classification-Reconstruction Learning (CROSR), which combines discriminative and generative learning to improve open set performance by reconstructing input samples and using reconstruction error as a secondary cue for rejection.
Malalur and Jaakkola (2019) [1308] propose an alignment-based matching network that leverages metric learning for one-shot classification and OSR, emphasizing the importance of feature alignment in distinguishing known from unknown classes. Similarly, Schlachter et al. (2019) [1309] introduce intra-class splitting, a technique that refines decision boundaries by decomposing known classes into sub-clusters, thereby improving open-set discriminability. Meanwhile, Imoscopi et al. (2019) [1310] investigate speaker identification, demonstrating that discriminatively trained neural networks can effectively reject unknown speakers by optimizing confidence thresholds. These works collectively highlight the role of discriminative training and refined feature representations in OSR. On the other hand, Mundt et al. (2019) [1311] challenge the necessity of generative models for out-of-distribution detection, showing that deep neural network uncertainty measures—such as softmax entropy and Monte Carlo dropout—can achieve competitive performance without explicit generative modeling. This finding suggests that discriminative approaches, when properly calibrated, can suffice for open-set scenarios.

<table><caption>Table 8.7: Summary of Key Contributions to Open Set Recognition (OSR)</caption><thead><tr><td>Author(s)</td><td>Main Contribution</td></tr></thead><tbody><tr><td>Shao et al. [1293]</td><td>Developed Open-set Adversarial Defense by integrating OSR robustness into adversarial training, enabling resilience to both adversarial and unknown-class intrusions.</td></tr><tr><td>Yu et al. [1294]</td><td>Proposed a Multi-Task Curriculum Framework for semi-supervised OSR, balancing supervised and unsupervised learning to progressively handle unknown classes.</td></tr><tr><td>Miller et al. [1295]</td><td>Introduced Class Anchor Clustering, a distance-based loss to form compact class clusters while maximizing inter-class separation in the feature space.</td></tr><tr><td>Jia and Chan [1296]</td><td>Proposed MMF loss to enhance intra-class compactness and inter-class separation, improving discriminative feature learning in OSR.</td></tr><tr><td>Oliveira et al. [1300]</td><td>Extended OSR to semantic segmentation via Fully Convolutional Open Set Segmentation with uncertainty-aware pixel-wise rejection.</td></tr><tr><td>Yang et al. [1301]</td><td>Proposed S2OSC, a semi-supervised OSR framework combining consistency regularization and entropy minimization to exploit both labeled and unlabeled data.</td></tr><tr><td>Sun et al. [1302]</td><td>Used conditional probabilistic generative models to estimate likelihoods and reject unknowns based on uncertainty thresholds.</td></tr><tr><td>Yang et al. [1303]</td><td>Introduced Convolutional Prototype Network (CPN), learning prototypes for known classes and using distance-based rejection for OSR.</td></tr><tr><td>Dhamija et al. [1304]</td><td>Highlighted limitations in open set detection for object recognition and introduced an evaluation framework stressing real-world challenges.</td></tr><tr><td>Meyer and Drummond [1305]</td><td>Advocated for metric learning in robotic vision OSR, emphasizing active learning and incremental unknown class discovery.</td></tr><tr><td colspan="2">Continued on next page</td></tr></tbody></table>
<table><caption>Table 8.7 – continued from previous page</caption><thead><tr><td>Author(s)</td><td>Main Contribution</td></tr></thead><tbody><tr><td>Oza and Patel [1306]</td><td>Proposed a multi-task learning method using autoencoders for joint classification and reconstruction to detect outliers in OSR.</td></tr><tr><td>Yoshihashi et al. [1307]</td><td>Introduced CROSR, which combines classification and reconstruction to use reconstruction error as a cue for open set rejection.</td></tr><tr><td>Malalur and Jaakkola [1308]</td><td>Proposed an alignment-based matching network using metric learning for one-shot OSR with focus on feature alignment.</td></tr><tr><td>Schlachter et al. [1309]</td><td>Developed intra-class splitting to improve decision boundaries by subdividing known classes into more refined subclusters.</td></tr><tr><td>Imoscopi et al. [1310]</td><td>Focused on speaker identification in OSR using confidence thresholds in discriminatively trained neural networks.</td></tr><tr><td>Mundt et al. [1311]</td><td>Showed that uncertainty-based methods like softmax entropy and Monte Carlo dropout can rival generative models in OSR.</td></tr></tbody></table>

Liu et al. (2019) [1313] tackle large-scale, long-tailed recognition in an open world, proposing a de-coupled learning framework that balances head and tail class performance while rejecting unknown samples—a critical advancement for practical deployment. Perera and Patel (2019) [1314] focus on deep transfer learning for novelty detection, leveraging pre-trained models to identify multiple unknown classes, thus bridging the gap between OSR and transfer learning. Finally, Xiong et al. (2019) [1315] shift the focus from classification to counting, presenting a spatial divide-and-conquer approach that transitions from open-set to closed-set object counting, demonstrating the versatility of OSR principles beyond traditional recognition tasks.

Yang et al. (2019) [1316] explore open-set human activity recognition using micro-Doppler signatures, leveraging the distinct radar-based motion patterns to differentiate known from unknown activities, thus demonstrating the applicability of open-set methods in sensor-based domains. Similarly, Oza and Patel (2019) [1317] propose C2AE, a class-conditioned autoencoder that learns discriminative latent representations by reconstructing input samples conditioned on their class, effectively separating known and unknown samples through reconstruction error thresholds. This work is particularly notable for its integration of generative and discriminative learning, providing a robust framework for open-set recognition in computer vision. Liu et al. (2018) [1318] take a theoretical approach, introducing PAC guarantees for open category detection, ensuring probabilistic bounds on detection errors—a crucial contribution for safety-critical applications. Venkataram et al. (2018) [1319] adapt convolutional neural networks (CNNs) for open-set text classification, employing prototype-based rejection mechanisms, highlighting the adaptability of deep learning models to textual open-set scenarios. Meanwhile, Hassen and Chan (2018) [1320] propose a neural-network-based representation learning method that explicitly models uncertainty, improving open-set robustness by learning decision boundaries that account for unseen data distributions.

Further expanding the scope, Shu et al. (2018) [1321] investigate open-world classification, introducing a framework for discovering unseen classes incrementally, which bridges open-set recognition and continual learning. Dhamija et al. (2018) [1322] address "agnostophobia" (fear of the unknown) in deep networks by proposing loss functions that penalize overconfidence on unknown samples, enhancing model calibration in open-set environments. Finally, Zheng et al. (2018) [1324]
explore open-set adversarial examples, revealing vulnerabilities in open-set systems and proposing defenses against adversarial attacks that exploit unknown-class detection mechanisms.

<table><caption>Table 8.8: Summary of Key Contributions in Open Set Recognition and Related Tasks</caption><thead><tr><td>Author(s)</td><td>Main Contribution</td></tr></thead><tbody><tr><td>Liu et al. [1313]</td><td>Proposed a decoupled learning framework for large-scale, long-tailed recognition that improves balance across head and tail classes while rejecting unknowns.</td></tr><tr><td>Perera and Patel [1314]</td><td>Explored deep transfer learning for novelty detection using pre-trained models to identify multiple unknown classes.</td></tr><tr><td>Xiong et al. [1315]</td><td>Presented a spatial divide-and-conquer framework for open-set to closed-set object counting, applying OSR concepts to counting tasks.</td></tr><tr><td>Yang et al. [1316]</td><td>Applied open-set recognition to human activity recognition using micro-Doppler radar signatures to distinguish known and unknown movements.</td></tr><tr><td>Oza and Patel [1317]</td><td>Introduced C2AE, a class-conditioned autoencoder that separates known and unknown samples using reconstruction error thresholds.</td></tr><tr><td>Liu et al. [1318]</td><td>Provided PAC-based theoretical guarantees for open category detection, offering bounds on detection error.</td></tr><tr><td>Venkataram et al. [1319]</td><td>Adapted CNNs for open-set text classification using prototype-based rejection mechanisms.</td></tr><tr><td>Hassen and Chan [1320]</td><td>Proposed a representation learning technique that models uncertainty to improve robustness to unknown data.</td></tr><tr><td>Shu et al. [1321]</td><td>Developed a framework for open-world classification, enabling discovery of new classes incrementally.</td></tr><tr><td>Dhamija et al. [1322]</td><td>Tackled overconfidence on unknowns by designing loss functions that reduce incorrect high-confidence predictions.</td></tr><tr><td>Zheng et al. [1324]</td><td>Investigated adversarial attacks in open-set systems and proposed defenses to enhance unknown-class detection reliability.</td></tr></tbody></table>

Neal et al. (2018) [1325] introduce a novel approach using counterfactual image generation to simulate unknown classes, enhancing model robustness by exposing classifiers to synthetic outliers during training. Similarly, Rudd et al. (2017) [1326] propose the Extreme Value Machine (EVM), leveraging extreme value theory (EVT) to model the probability of sample inclusion, providing a theoretically grounded method for open set recognition. Vignotto and Engelke (2018) [1327] further refine EVT-based approaches by comparing Generalized Pareto Distribution (GPD) and Generalized Extreme Value (GEV) classifiers, demonstrating their effectiveness in modeling tail distributions for open set scenarios. Meanwhile, Cardoso et al. (2017) [1328] explore weightless neural networks, which rely on probabilistic memory structures rather than traditional weight updates, offering a unique solution for open set recognition that avoids retraining and adapts dynamically to new data. These works collectively advance the theoretical foundations of open set learning, with EVT-based methods and synthetic data generation emerging as dominant paradigms.

Adversarial and generative techniques also play a pivotal role in open set learning, as evidenced by
several studies. Rozsa et al. (2017) [1329] compare Softmax and Openmax in adversarial settings, revealing Openmax's superior robustness due to its ability to reject uncertain samples. Shu et al. (2017) [1330] extend open set principles to text classification with DOC, a deep learning framework that estimates the probability of a document belonging to an unknown class by modeling semantic boundaries. Generative approaches are further explored by Ge et al. (2017) [1331], who introduce Generative Openmax, synthesizing unknown class samples to improve multi-class open set classification. Complementing this, Yu et al. (2017) [1332] employ adversarial sample generation to create realistic outliers, training classifiers to distinguish known from unknown categories effectively.

A controversial perspective was presented by Vaze et al. (2021) [1231]. They argued that well-trained closed-set classifiers could perform open set recognition without specialized modifications, challenging existing methodologies. In addition to individual papers, several surveys and repositories have played crucial roles in advancing OSL research. Barcina-Blanco et al. (2023) [1232] provided an extensive literature review, identifying gaps and future directions in OSL, particularly its connections to out-of-distribution detection and uncertainty estimation. A curated collection of papers and resources by iCGY96 on GitHub [1233], which serves as a valuable knowledge repository for researchers.

<table><caption>Table 8.9: Summary of Key Contributions in Open Set Learning Literature</caption><thead><tr><td>Author(s)</td><td>Main Contribution</td></tr></thead><tbody><tr><td>Neal et al. [1325]</td><td>Introduced counterfactual image generation to simulate unknown classes and improve classifier robustness using synthetic outliers.</td></tr><tr><td>Rudd et al. [1326]</td><td>Proposed the Extreme Value Machine (EVM), leveraging EVT to model sample inclusion probabilities for open set recognition.</td></tr><tr><td>Vignotto and Engelke [1327]</td><td>Compared GPD and GEV classifiers for EVT-based modeling of tail distributions in open set recognition.</td></tr><tr><td>Cardoso et al. [1328]</td><td>Explored weightless neural networks using probabilistic memory structures, enabling dynamic adaptation to new data without retraining.</td></tr><tr><td>Rozsa et al. [1329]</td><td>Compared Softmax and Openmax under adversarial conditions, showing Openmax's superior ability to reject uncertain samples.</td></tr><tr><td>Shu et al. [1330]</td><td>Developed DOC, a deep open classification framework for text, modeling semantic boundaries to detect unknown classes.</td></tr><tr><td>Ge et al. [1331]</td><td>Introduced Generative Openmax, synthesizing unknown class samples to improve multi-class open set classification.</td></tr><tr><td>Yu et al. [1332]</td><td>Used adversarial sample generation to train classifiers for distinguishing between known and unknown categories.</td></tr><tr><td>Vaze et al. [1231]</td><td>Claimed well-trained closed-set classifiers can inherently perform open set recognition without specific modifications.</td></tr><tr><td>Barcina-Blanco et al. [1232]</td><td>Provided a comprehensive literature review on OSL, highlighting its ties to out-of-distribution detection and uncertainty estimation.</td></tr><tr><td colspan="2">Continued on next page</td></tr></tbody></table>
<table><caption>Table 8.9 – continued from previous page</caption><thead><tr><td>Author(s)</td><td>Main Contribution</td></tr></thead><tbody><tr><td>iCGY96 (GitHub) [1233]</td><td>Curated a repository of papers and resources for open set learning research.</td></tr></tbody></table>

Finally, while not explicitly about OSL, advances in topological deep learning have implications for open set scenarios. The Wikipedia article on "Topological Deep Learning" [1234] discusses how topological representations—such as graphs, simplicial complexes, and hypergraphs—can improve the ability of deep learning models to handle complex data structures. Understanding these mathematical foundations could lead to new techniques for open set classification by leveraging topological features to distinguish known from unknown data distributions.

These 20 contributions represent a broad spectrum of advancements in Open Set Learning, ranging from foundational theory to practical applications across diverse domains. The field continues to evolve, with researchers developing more robust methods to handle real-world uncertainties where unknown categories must be identified dynamically.

## 8.2 Literature Review of Traditional Machine Learning Open Set Learning

### 8.2.1 Foundational Theoretical Frameworks of Open Set Recognition

Open Set Recognition (OSR) challenges the classical closed-world assumption in classification tasks, where classifiers assume that test samples belong to a fixed set of known classes. A key theoretical contribution in this regard comes from Scheirer et al. (2012 [1215], 2014 [1340]), who formalized the concept of open space risk and introduced the Probability of Inclusion and Compact Abating Probability (CAP) models. These models rely on the notion that probability estimates should decay as one moves away from known training samples in the feature space. Their pioneering work provided a probabilistic bounding framework to mitigate open space risk, which is the risk of labeling samples in the space far from known training data. Their extended formulation in Scheirer et al. (2014) [1340] and Jain et al. (2014) [1341] offered a theoretical model for bounding decision regions using Weibull-calibrated decision functions, which underpinned later algorithmic strategies in OSR. These early efforts shifted the focus of machine learning from closed-world generalization to bounded-risk decision-making under unknown classes, laying the groundwork for the development of risk-aware open set classifiers.

### 8.2.2 Sparse and Hyperplane-Based Models for OSR

Building on these theoretical advances, Zhang and Patel (2017) [1342] proposed a sparse representation-based model for open set recognition, leveraging the observation that reconstruction residuals of samples from unknown classes tend to be higher when approximated by sparse combinations of known-class samples. This aligns conceptually with manifold-based learning, where unknown samples lie outside the manifold of known classes. Complementing this, Cevikalp (2016) [1343] introduced the Best Fitting Hyperplane (BFH) model that constructs hyperplanes to tightly encapsulate class manifolds, rejecting samples that lie beyond class-specific thresholds. The use of convex polyhedral conic classifiers by Cevikalp et al. (2017) [1344] is particularly noteworthy because it geometrically defines decision boundaries using polyhedral cones, enabling fine-grained modeling of class-specific subspaces with controlled inclusion properties. These methods marked a shift toward geometric modeling of decision boundaries and introduced a family of classifiers that reject
unknown samples not by probability estimation, but through geometric conformity, paving the way
for structural inductive biases in OSR.

8.2.3 Support Vector and Nearest Neighbor Approaches

A particularly impactful contribution to the OSR field is the Specialized Support Vector Machines (SSVM) model by Júnior et al. (2016) [1333], which extends the binary nature of conventional SVMs by incorporating open space risk directly into the objective function through a modified loss. SSVMs enforce margin constraints that not only separate known classes but also maximize rejection capability for samples outside the known class distributions. This framework refines the application of kernel methods to OSR, combining margin maximization with bounded decision regions. Complementarily, the Nearest Neighbors Distance Ratio (NNDR) model by Júnior et al. (Machine Learning, 2017) [1334] presents a non-parametric alternative by exploiting the ratio of distances between the first and second nearest neighbors in feature space to determine class membership confidence. NNDR's simplicity allows it to be easily adapted across domains, though its effectiveness heavily depends on the embedding space quality. Together, SSVM and NNDR form a methodological dichotomy—parametric versus non-parametric—offering flexibility in addressing domain-specific constraints in OSR.

8.2.4 Domain Transfer and Zero-shot Learning Integration

Dong et al. (2022) [1335] tackled the Open Set problem from a probabilistic domain separation perspective, integrating ideas from Generalized Zero-Shot Learning (GZSL). Their approach explicitly learns latent domain variables that disentangle the semantic space (representing class attributes or names) from the visual feature space. The core insight lies in representing open set uncertainty as a distributional mismatch between the source and target domains, introducing Bayesian inference mechanisms to model both intra-class and inter-class variabilities. This probabilistic modeling allows for adaptive thresholds based on estimated epistemic uncertainty, distinguishing between known and unknown domains. This direction is crucial for scenarios where semantic information is available (as in GZSL) but the supporting visual exemplars are missing, representing a convergence between domain generalization and OSR. The conceptual blend of OSR with domain separation and transfer learning pushes the field beyond traditional boundaries into multi-domain recognition problems.

8.2.5 Application-Centric Advances: Face Recognition and Text Classification

While many OSR studies focus on general object recognition, specific domains have benefited
from customized adaptations. Vareto et al. (2017) [1336] addressed the open set face recognition
problem using hashing-based functions, constructing compact binary embeddings that preserve
inter-class distances while maximizing intra-class compactness. These binary representations allow
efficient retrieval while facilitating open set rejection by thresholding Hamming distances. In text
classification, Fei and Liu (2016) [1337] proposed a model that breaks the closed world assumption
by introducing an open set text classifier based on clustering in semantic embedding space followed
by probabilistic scoring of cluster affinity. Their work was among the earliest to show that textual
open set recognition requires different inductive biases than visual data, such as attention to lexical
sparsity and semantic drift. These domain-specific contributions highlight the adaptability of OSR
principles to diverse tasks, demonstrating that open set rejection mechanisms must be finely tuned
to the structure of the data modality in question.
### 8.2.6 Ensemble and Fusion-Based Enhancements

An important trend in recent OSR research is the integration of multiple recognition cues. Neira et al. (2018) [1339] proposed a data-fusion framework for OSR by combining multiple classifiers trained on distinct data representations or modalities. Their fusion strategy uses confidence-weighted voting, in which each classifier's decision is weighted by its estimated confidence or risk, leading to a more robust rejection of unknowns. This ensemble-style method addresses the single-view limitations of earlier OSR models and promotes redundancy-aware classification, enhancing performance particularly in noisy or high-dimensional feature spaces. The core innovation here lies not merely in aggregation but in leveraging differential openness across models, exploiting the fact that some classifiers are more sensitive to open space regions than others. This line of research is critical for real-world deployment, where multiple sensor modalities or feature embeddings are often available, and the combined information must be integrated in a risk-aware, rejection-capable manner. It also paves the way for hybrid OSL systems combining symbolic reasoning, neural inference, and uncertainty quantification.

## 8.3 Mahalanobis Distance

The Mahalanobis distance is a fundamental metric in Open Set Learning (OSL), where the primary objective is to correctly classify known samples while rigorously rejecting unknown samples. Given a feature space $\mathbb{R}^d$, let the data distribution of known classes be characterized by a mean feature vector and a covariance structure. The Mahalanobis distance is an extension of the Euclidean distance that takes into account correlations between different feature dimensions and properly normalizes for variance in different directions of the feature space. If $\mathbf{x} \in \mathbb{R}^d$ is a given feature vector extracted from a trained deep neural network and $\mu_c \in \mathbb{R}^d$ represents the mean feature vector of a particular class $c$, then the covariance matrix $\Sigma \in \mathbb{R}^{d \times d}$ describes the spread of features around their respective class means. The Mahalanobis distance of the feature vector $\mathbf{x}$ from the mean representation of class $c$ is given by

$$D_M(\mathbf{x}, c) = \sqrt{(\mathbf{x} - \mu_c)^\top \Sigma^{-1} (\mathbf{x} - \mu_c)} \quad (8.34)$$

This metric effectively measures how many standard deviations away the point $\mathbf{x}$ is from the mean $\mu_c$ when considering the full covariance structure. The inverse covariance matrix $\Sigma^{-1}$ accounts for correlations between different feature dimensions, ensuring that directions of high variance contribute less to the distance measurement, while directions of low variance contribute more. If the covariance matrix $\Sigma$ is diagonal, the Mahalanobis distance reduces to a normalized Euclidean distance, with each feature being scaled by the inverse of its standard deviation. Explicitly, if

$$\Sigma = \mathrm{diag}(\sigma_1^2, \sigma_2^2, \dots, \sigma_d^2), \quad (8.35)$$

then

$$D_M(\mathbf{x}, c) = \sqrt{\sum_{i=1}^{d} \frac{(x_i - \mu_{c,i})^2}{\sigma_i^2}} \quad (8.36)$$

However, in high-dimensional feature spaces where correlations exist between different feature components, the full covariance matrix must be considered. The primary utility of Mahalanobis distance in Open Set Learning stems from its ability to identify samples that deviate significantly from the known class distributions. The decision rule for classification in Open Set Learning using Mahalanobis distance is defined as follows: for a given test sample $\mathbf{x}$, the predicted label $\hat{y}$ is assigned based on

$$\hat{y} = \arg \min_{c \in \mathcal{K}} D_M(\mathbf{x}, c), \quad (8.37)$$
where $\mathcal{K}$ is the set of known classes. However, in Open Set Learning, the classification decision must also incorporate a rejection criterion for unknown samples. This is accomplished by introducing a rejection threshold $\tau$, such that if

$$ \min_{c \in \mathcal{K}} D_M(\mathbf{x}, c) > \tau, \qquad (8.38) $$

then $\mathbf{x}$ is rejected as an unknown sample. The threshold $\tau$ is typically determined based on the distribution of Mahalanobis distances computed from the training set. Specifically, if the Mahalanobis distances of training samples follow a Gaussian distribution

$$ D_M(\mathbf{x}, c) \sim \mathcal{N}(\mu_D, \sigma_D^2), \qquad (8.39) $$

then the threshold $\tau$ can be set as

$$ \tau = \mu_D + \lambda \sigma_D, \qquad (8.40) $$

where $\lambda$ is a hyperparameter controlling the rejection sensitivity. A larger value of $\lambda$ increases the likelihood of rejecting unknown samples but may also lead to the rejection of some in-distribution samples. Conversely, a smaller $\lambda$ results in fewer rejections, potentially increasing the misclassification of unknown samples as known ones. In high-dimensional feature spaces, the covariance matrix $\Sigma$ may become singular or ill-conditioned, making the direct computation of $\Sigma^{-1}$ unstable. To address this, a regularized covariance estimate is often employed:

$$ \Sigma_{\lambda} = \Sigma + \lambda \mathbf{I}, \qquad (8.41) $$

where $\lambda > 0$ is a small regularization parameter, ensuring numerical stability. The corresponding regularized Mahalanobis distance is then given by

$$ D_M^{\lambda}(\mathbf{x}, c) = \sqrt{(\mathbf{x} - \boldsymbol{\mu}_c)^{\top} \boldsymbol{\Sigma}_{\lambda}^{-1} (\mathbf{x} - \boldsymbol{\mu}_c)}. \qquad (8.42) $$

This formulation ensures robust covariance estimation and improves the generalization ability of the Mahalanobis distance metric. In deep Open Set Learning settings, feature representations obtained from neural networks may not be perfectly Gaussian, necessitating additional adaptation techniques. One approach is to learn feature embeddings such that Mahalanobis distance becomes more effective for Open Set Recognition. If $f_{\theta}: \mathbb{R}^d \to \mathbb{R}^d$ is a neural network feature extractor parameterized by $\theta$, then the loss function can be augmented to explicitly minimize intra-class Mahalanobis distances while maximizing inter-class separability:

$$ \mathcal{L}_M = \sum_{(x,y) \in \mathcal{D}_{\text{train}}} D_M(f_{\theta}(\mathbf{x}), y). \qquad (8.43) $$

Furthermore, in order to improve the rejection of out-of-distribution samples, an auxiliary dataset $\mathcal{D}_{OOD}$ containing unknown samples can be used. The out-of-distribution loss is given by

$$ \mathcal{L}_{OOD} = \sum_{\mathbf{x} \in \mathcal{D}_{OOD}} \max(0, \tau - \min_{c \in \mathcal{K}} D_M(f_{\theta}(\mathbf{x}), c)). \qquad (8.44) $$

This enforces a constraint that encourages the Mahalanobis distance of unknown samples to remain above the rejection threshold $\tau$, improving the ability of the model to detect unknown samples. The combined objective function used in Open Set Learning can then be formulated as

$$ \mathcal{L} = \mathcal{L}_M + \lambda_{OOD} \mathcal{L}_{OOD}, \qquad (8.45) $$

where $\lambda_{OOD}$ is a balancing hyperparameter. In addition to the rejection-based approach, Mahalanobis distance can be integrated with probabilistic modeling techniques such as Gaussian mixture models (GMMs) for better open set decision boundaries. Given a mixture model with C Gaussian components, the probability of a feature vector $\mathbf{x}$ belonging to class c is computed as

$$ P(c | \mathbf{x}) = \frac{\pi_c N(\mathbf{x} | \boldsymbol{\mu}_c, \boldsymbol{\Sigma}_c)}{\sum_{c' \in \mathcal{K}} \pi_{c'} N(\mathbf{x} | \boldsymbol{\mu}_{c'}, \boldsymbol{\Sigma}_{c'})}, \qquad (8.46) $$
where $\pi_c$ is the prior probability of class c and

$$N(\mathbf{x} | \boldsymbol{\mu}_c, \boldsymbol{\Sigma}_c) = \frac{1}{(2\pi)^{d/2} |\boldsymbol{\Sigma}_c|^{1/2}} \exp \left( -\frac{1}{2} (\mathbf{x} - \boldsymbol{\mu}_c)^{\top} \boldsymbol{\Sigma}_c^{-1} (\mathbf{x} - \boldsymbol{\mu}_c) \right) \quad (8.47)$$

is the Gaussian density function. This formulation enables a soft probabilistic decision rule for Open Set Learning. The Mahalanobis distance, due to its statistical foundation, provides a rigorous means of identifying unknown samples in Open Set Learning by leveraging class-specific feature distributions. Its ability to incorporate covariance structures makes it significantly more robust than Euclidean distance, leading to improved open set classification performance in high-dimensional spaces.

# 8.4 Literature Review of Bayesian Formulation in Open Set Learning

Open Set Learning (OSL) aims to handle scenarios where the model encounters unseen classes during inference. A Bayesian approach provides a principled probabilistic framework for quantifying uncertainty and distinguishing known from unknown instances. This involves incorporating prior knowledge, likelihood estimation, and posterior inference to make robust predictions under open-set conditions.

## 8.4.1 Literature Review of Bayesian Neural Networks (BNNs) for OSL

Gal and Ghahramani (2016, ICML) [1345] pioneered dropout as Bayesian approximation, showing that MC dropout during inference approximates variational inference in deep networks, enabling scalable uncertainty estimation. Lakshminarayanan et al. (2017, NeurIPS) [1346] demonstrated that deep ensembles outperform MC dropout in OOD detection by marginalizing over multiple model instantiations. Rudd et al. (2017, IEEE TPAMI) [1347] introduced the Extreme Value Machine (EVM), using extreme value theory to model tail distributions of class scores for open-set rejection. Malinin and Gales (2018, NeurIPS) [1348] proposed Prior Networks, which explicitly parameterize Dirichlet distributions over logits to separate distributional and data uncertainty. Liu et al. (2020, NeurIPS) [1349] designed an energy-based OOD detector that bypasses density estimation by leveraging the logit space of BNNs. Chen et al. (2021, ICLR) [1350] unified Bayesian online learning with OSL, enabling incremental adaptation to novel classes via variational inference. Nandy et al. (2020, NeurIPS) [1351] maximized the representation gap between known and unknown classes by joint optimization of discriminative and uncertainty objectives. Mukhoti et al. (2021, ICML) [1353] calibrated BNNs for OSL using gradient-based uncertainty regularization. Kristiadi et al. (2020, NeurIPS) [1354] showed that spectral normalization in BNNs improves OOD detection by enforcing distance-awareness. Ovadia et al. (2019, NeurIPS) [1355] benchmarked BNNs under dataset shift, revealing critical trade-offs between accuracy and uncertainty calibration in OSL.

**Key Insight:** BNNs excel in scalability and integration with deep learning but often rely on approximations that may underestimate uncertainty.

## 8.4.2 Literature Review of Dirichlet-Based Uncertainty for OSL

Sensoy et al. (2018, NeurIPS) [1356] formulated Evidential Deep Learning (EDL), treating predictions as subjective opinions under Dempster-Shafer theory, with Dirichlet concentrations encoding uncertainty. Bendale and Boult (2016, CVPR) [1357] introduced OpenMax, replacing softmax with Weibull-calibrated Dirichlet scores to reject unknowns. Oza and Patel (2019, CVPR) [1306]
proposed C2AE, a class-conditioned autoencoder that uses reconstruction error and Dirichlet uncertainty for OSL. Yoshihashi et al. (2019, CVPR) [1307] combined VAEs with Dirichlet priors to jointly optimize classification and reconstruction for open-set robustness. Kong and Ramanan (2021, ICCV) [1223] developed OpenGAN, where Dirichlet uncertainty guides GANs to synthesize adversarial unknowns. Neal et al. (2018, ECCV) [1325] generated counterfactual unknowns using Dirichlet-based sampling to augment training data. Zhang et al. (2020, ECCV) [1292] hybridized Dirichlet models with discriminative classifiers, achieving SOTA on open-set benchmarks. Charoenphakdee et al. (2021, ICML) [1360] analyzed Dirichlet calibration under label noise, improving OSL reliability. Hendrycks et al. (2019, NeurIPS) [1361] used Dirichlet-based confidence thresholds to detect anomalies. Vaze et al. (2022, CVPR) [1362] generalized EVM to few-shot OSL by integrating meta-learning with Dirichlet uncertainty.

**Key Insight:** Dirichlet methods provide interpretable uncertainty but require careful calibration to avoid overconfidence.

### 8.4.3 Literature Review of Gaussian Processes (GPs) for OSL

Geng et al. (2020, IEEE TPAMI) [1219] surveyed GP-based OSL, highlighting their non-parametric flexibility for uncertainty quantification. Liu et al. (2020, NeurIPS) [1363] proposed distance-aware deep kernels, enabling GPs to scale to high-dimensional data while preserving uncertainty metrics. Van Amersfoort et al. (2020, ICML) [1364] combined GPs with deep feature extractors for deterministic uncertainty estimation. Smith and Gal (2018, UAI) derived GP-based adversarial detection bounds, proving robustness in OOD settings. Fort et al. (2019, NeurIPS) [1366] linked deep ensembles to GP posteriors, unifying ensemble and Bayesian nonparametric approaches. Sun et al. (2019, ICLR) [1368] bridged GPs and BNNs via functional variational inference, improving OOD generalization. Ober et al. (2021, ICML) [1367] identified pitfalls of deep kernel GPs in OSL, advocating for spectral normalization. Bradshaw et al. (2017, AISTATS) [1369] used sparse GPs to enable scalable open-world recognition. Daxberger et al. (2021, NeurIPS) [1370] enhanced GP uncertainty with Laplace approximations for deep learning. Kapoor et al. (2022, JMLR) [1371] developed GP-based active learning for OSL, optimizing query strategies for unknown class discovery.

**Key Insight:** GPs offer gold-standard uncertainty quantification but face computational bottlenecks in high dimensions.

### 8.4.4 Literature Review of Variational Autoencoders (VAEs) and Bayesian Generative Models

Pidhorskyi et al. (2018, NeurIPS) [1372] proposed adversarial autoencoders (AAEs) with probabilistic novelty detection via reconstruction likelihood. Schlegl et al. (2017, MICCAI) [1373] introduced AnoGAN, using latent space traversals for medical OOD detection. Xiao et al. (2020, NeurIPS) [1374] defined likelihood regret, a theoretically grounded OOD score comparing local latent densities. Nalisnick et al. (2019, ICLR) [1375] exposed VAEs' failure modes, showing that OOD data can attain high likelihoods. Choi et al. (2018, NeurIPS) [1376] improved VAEs using WAIC-scored ensembles for anomaly detection. Denouden et al. (2018, NeurIPS Workshop) [1377] augmented VAEs with Mahalanobis distance in latent space for robust OOD detection. Kirichenko et al. (2020, NeurIPS) [1378] proved that normalizing flows fail in OOD detection without task-specific inductive biases. Serra et al. (2020, ICML) [1379] trained VAEs with input complexity measures to distinguish novelty. Morningstar et al. (2021, ICLR) [1380] proposed density-supervised VAEs, jointly optimizing likelihood and discriminative boundaries. Ruff et al. (2021, JMLR) [1381] unified deep one-class classification with VAE-based generative models.
**Key Insight:** VAEs excel in generative novelty detection but struggle with likelihood-based metrics; hybrid approaches are often necessary.

### 8.4.5 Critical Synthesis

BNNs dominate practical OSL due to scalability but approximate true posteriors. Dirichlet methods offer interpretability but need calibration. GPs provide theoretical rigor but are computationally expensive. VAEs enable generative OSL but require auxiliary metrics (e.g., likelihood regret).

**Future Directions:** Hybrid architectures (e.g., BNNs + GPs), tighter PAC-Bayesian bounds, and calibration-aware training are promising avenues. These Bayesian approaches collectively advance OSL by unifying uncertainty quantification with adaptive learning.

## 8.5 Analysis of Bayesian Formulation in Open Set Learning

We have to use Bayesian Decision Theory in Open Set Learning. In the Bayesian framework, given an input $\mathbf{x} \in \mathbb{R}^d$, the goal is to estimate the posterior probability of class membership:

$$P(y | \mathbf{x}, \mathcal{D}) \qquad (8.48)$$

where $y$ belongs to the set of known classes $\mathcal{Y}_{\text{known}}$, and $\mathcal{D} = \{(\mathbf{x}_i, y_i)\}_{i=1}^N$ represents the training data. The Bayesian formulation considers a prior distribution $P(y)$ over classes and updates it using the likelihood $P(\mathbf{x} | y)$ via Bayes' theorem:

$$P(y | \mathbf{x}, \mathcal{D}) = \frac{P(\mathbf{x} | y)P(y)}{P(\mathbf{x})} \qquad (8.49)$$

where the evidence term is given by marginalization over all known classes:

$$P(\mathbf{x}) = \sum_{y' \in \mathcal{Y}_{\text{known}}} P(\mathbf{x} | y')P(y'). \qquad (8.50)$$

For open-set scenarios, an additional unknown class $y_u$ is introduced, leading to:

$$P(y | \mathbf{x}, \mathcal{D}) = \frac{P(\mathbf{x} | y)P(y)}{P(\mathbf{x}) + P(\mathbf{x} | y_u)P(y_u)} \qquad (8.51)$$

where $P(y_u)$ is the prior probability of encountering an unknown class. If $P(y_u)$ is too low, the model may overcommit to known classes. We have to model the Likelihood via Generative Distributions. To estimate $P(\mathbf{x} | y)$, a Bayesian model assumes a parametric likelihood such as a Gaussian mixture:

$$P(\mathbf{x} | y = k) = \sum_{j=1}^{M_k} \pi_j^{(k)} \mathcal{N}(\mathbf{x} | \boldsymbol{\mu}_j^{(k)}, \boldsymbol{\Sigma}_j^{(k)}). \qquad (8.52)$$

The parameters $\boldsymbol{\theta} = \{\pi_j^{(k)}, \boldsymbol{\mu}_j^{(k)}, \boldsymbol{\Sigma}_j^{(k)}\}$ are inferred using Maximum A Posteriori (MAP) estimation:

$$P(\boldsymbol{\theta} | \mathcal{D}) \propto P(\mathcal{D} | \boldsymbol{\theta})P(\boldsymbol{\theta}). \qquad (8.53)$$

By integrating out uncertainty in parameters, a Bayesian predictive distribution is obtained:

$$P(y | \mathbf{x}, \mathcal{D}) = \int P(y | \mathbf{x}, \boldsymbol{\theta})P(\boldsymbol{\theta} | \mathcal{D})d\boldsymbol{\theta}. \qquad (8.54)$$
For open-set detection, if the posterior entropy

$$H(y | \mathbf{x}, \mathcal{D}) = - \sum_{y \in \mathcal{Y}_{\text{known}}} P(y | \mathbf{x}, \mathcal{D}) \log P(y | \mathbf{x}, \mathcal{D}) \quad (8.55)$$

exceeds a threshold, the sample is classified as unknown. Bayesian Neural Networks can also be used for Open Set Learning. A Bayesian neural network (BNN) introduces a prior distribution over the network parameters $\mathbf{w}$, leading to a posterior distribution:

$$P(\mathbf{w} | \mathcal{D}) = \frac{P(\mathcal{D} | \mathbf{w}) P(\mathbf{w})}{P(\mathcal{D})} \quad (8.56)$$

The predictive posterior for a test input $\mathbf{x}$ is then given by:

$$P(y | \mathbf{x}, \mathcal{D}) = \int P(y | \mathbf{x}, \mathbf{w}) P(\mathbf{w} | \mathcal{D}) d\mathbf{w}. \quad (8.57)$$

Since this integral is intractable, approximation techniques such as Variational Inference (VI) or Monte Carlo Dropout are used. In VI, the posterior is approximated by a parametric distribution $q_{\phi}(\mathbf{w})$:

$$\min_{\phi} D_{\text{KL}}(q_{\phi}(\mathbf{w}) \parallel P(\mathbf{w} | \mathcal{D})) \quad (8.58)$$

which results in an evidence lower bound (ELBO):

$$\mathcal{L}(\phi) = \mathbb{E}_{q_{\phi}(\mathbf{w})} [\log P(\mathcal{D} | \mathbf{w})] - D_{\text{KL}}(q_{\phi}(\mathbf{w}) \parallel P(\mathbf{w})). \quad (8.59)$$

Predictions are made using multiple stochastic forward passes, yielding an uncertainty estimate through variance:

$$\mathbb{V}[P(y | \mathbf{x}, \mathcal{D})]. \quad (8.60)$$

High variance corresponds to greater epistemic uncertainty, signaling an open-set sample. There are several Bayesian Nonparametric Methods for Open Set Learning. Bayesian nonparametric models, such as Gaussian Processes (GPs), provide an alternative approach. A GP places a prior over functions:

$$f(\mathbf{x}) \sim \mathcal{GP}(m(\mathbf{x}), k(\mathbf{x}, \mathbf{x}')). \quad (8.61)$$

The posterior mean and variance for a new point $\mathbf{x}_*$ given training data $\mathcal{D}$ are:

$$\mu_* = k_*^{\top} (K + \sigma^2 I)^{-1} \mathbf{y} \quad (8.62)$$

$$\sigma_*^2 = k(\mathbf{x}_*, \mathbf{x}_*) - k_*^{\top} (K + \sigma^2 I)^{-1} k_* \quad (8.63)$$

If $\sigma_*^2$ is large, the sample is flagged as unknown. Let's now discuss the Bayesian Open Set Recognition with Dirichlet Distributions. A Bayesian framework can incorporate Dirichlet distributions for modeling class probabilities:

$$P(\mathbf{p} | \boldsymbol{\alpha}) = \frac{\Gamma(\sum_i \alpha_i)}{\prod_i \Gamma(\alpha_i)} \prod_{i=1}^{K} p_i^{\alpha_i - 1}. \quad (8.64)$$

For open-set detection, an unknown class component is introduced, leading to an augmented Dirichlet prior:

$$P(\mathbf{p} | \boldsymbol{\alpha}, \alpha_u) \propto \prod_{i=1}^{K} p_i^{\alpha_i - 1} \cdot (1 - \sum_{i=1}^{K} p_i)^{\alpha_u - 1}. \quad (8.65)$$

If the posterior probability mass assigned to the unknown component is significant, the sample is rejected as open-set.

In conclusion, A Bayesian approach to Open Set Learning provides a principled uncertainty quantification mechanism, distinguishing unknown from known samples by leveraging posterior probabilities, entropy-based rejection criteria, and epistemic uncertainty estimates. The use of Bayesian Neural Networks, Gaussian Processes, and Dirichlet distributions enables robust open-set recognition, improving model reliability in real-world applications.
## 8.6 Gaussian Mixture Model (GMM)

In generative modeling, the open set learning problem is fundamentally rooted in the estimation of the likelihood function $P(x | y)$, where $x \in \mathbb{R}^d$ represents an observed data sample in a $d$-dimensional feature space, and $y$ is a discrete class label. The Gaussian Mixture Model (GMM) is an ideal candidate for modeling this likelihood function due to its ability to approximate arbitrary density functions as a superposition of Gaussian components. Formally, the GMM models the conditional density function $P(x | y)$ as a weighted sum of multivariate normal distributions:

$$P(x | y) = \sum_{k=1}^{K} \pi_{k}^{(y)} \mathcal{N}(x | \mu_{k}^{(y)}, \Sigma_{k}^{(y)}). \qquad (8.66)$$

where each Gaussian component $k$ for class $y$ is parameterized by a mean vector $\mu_k^{(y)} \in \mathbb{R}^d$, a covariance matrix $\Sigma_k^{(y)} \in \mathbb{R}^{d \times d}$, and a mixture weight $\pi_k^{(y)}$ satisfying the normalization constraint:

$$\sum_{k=1}^{K} \pi_{k}^{(y)} = 1, \quad 0 \le \pi_{k}^{(y)} \le 1. \qquad (8.67)$$

The probability density function of each multivariate normal component is given explicitly by:

$$\mathcal{N}(x | \mu_k^{(y)}, \Sigma_k^{(y)}) = \frac{1}{(2\pi)^{d/2} |\Sigma_k^{(y)}|^{1/2}} \exp \left( -\frac{1}{2} (x - \mu_k^{(y)})^T \Sigma_k^{(y)^{-1}} (x - \mu_k^{(y)}) \right). \qquad (8.68)$$

By expanding the quadratic form in the exponent, the probability density function can be rewritten in terms of Mahalanobis distance:

$$\mathcal{N}(x | \mu_k^{(y)}, \Sigma_k^{(y)}) = \frac{1}{(2\pi)^{d/2} |\Sigma_k^{(y)}|^{1/2}} \exp \left( -\frac{1}{2} \sum_{i=1}^{d} \sum_{j=1}^{d} (x_i - \mu_{ki}^{(y)}) \Sigma_k^{(y)^{-1}} (x_j - \mu_{kj}^{(y)}) \right). \qquad (8.69)$$

The total log-likelihood of the data under the GMM model is given by:

$$\log P(x | y) = \log \sum_{k=1}^{K} \pi_{k}^{(y)} \mathcal{N}(x | \mu_{k}^{(y)}, \Sigma_{k}^{(y)}). \qquad (8.70)$$

Direct computation of the log-sum can lead to numerical instability, which is mitigated using the **log-sum-exp trick**:

$$\log P(x | y) = m + \log \sum_{k=1}^{K} \pi_{k}^{(y)} \exp \left( -\frac{1}{2} (x - \mu_{k}^{(y)})^{T} \Sigma_{k}^{(y)^{-1}} (x - \mu_{k}^{(y)}) - m \right), \qquad (8.71)$$

where

$$m = \max_k \left\{ -\frac{1}{2} (x - \mu_k^{(y)})^T \Sigma_k^{(y)^{-1}} (x - \mu_k^{(y)}) \right\} \qquad (8.72)$$

is chosen to stabilize exponentiation. For open set recognition, an input sample $x$ is classified as an out-of-distribution (OOD) sample if its likelihood $P(x | y)$ falls below a predefined threshold $\tau$, i.e.,

$$\log P(x | y) < \tau \Rightarrow x \text{ is out-of-distribution.} \qquad (8.73)$$

An alternative formulation leverages Bayesian inference to determine the most probable class $y^*$ given an observed sample $x$. Using Bayes' theorem,

$$P(y | x) = \frac{P(x | y)P(y)}{\sum_{y'} P(x | y')P(y')}, \qquad (8.74)$$
where $P(y)$ is the prior probability of class $y$, which is often assumed uniform over the set of known classes. The most probable class is then determined via the maximum a posteriori (MAP) estimation:

$$y^* = \arg\max_y P(y | x). \qquad (8.75)$$

If $P(y^* | x)$ is below a rejection threshold $\eta$, the sample is assigned to an unknown category:

$$P(y^* | x) < \eta \Rightarrow x \text{ is out-of-distribution.} \qquad (8.76)$$

The training of the Gaussian Mixture Model parameters $\{\mu_k^{(y)}, \Sigma_k^{(y)}, \pi_k^{(y)}\}$ is performed using the Expectation-Maximization (EM) algorithm. Given a dataset $\{x_1, x_2, \dots, x_N\}$, the **E-step** computes the posterior responsibility of each Gaussian component:

$$r_k^{(y)}(x_i) = \frac{\pi_k^{(y)} \mathcal{N}(x_i | \mu_k^{(y)}, \Sigma_k^{(y)})}{\sum_{j=1}^{K} \pi_j^{(y)} \mathcal{N}(x_i | \mu_j^{(y)}, \Sigma_j^{(y)})}. \qquad (8.77)$$

In the **M-step**, the parameters are updated as follows:

$$\mu_k^{(y)} = \frac{\sum_{i=1}^{N} r_k^{(y)}(x_i) x_i}{\sum_{i=1}^{N} r_k^{(y)}(x_i)} \qquad (8.78)$$

$$\Sigma_k^{(y)} = \frac{\sum_{i=1}^{N} r_k^{(y)}(x_i)(x_i - \mu_k^{(y)})(x_i - \mu_k^{(y)})^T}{\sum_{i=1}^{N} r_k^{(y)}(x_i)} \qquad (8.79)$$

$$\pi_k^{(y)} = \frac{1}{N} \sum_{i=1}^{N} r_k^{(y)}(x_i). \qquad (8.80)$$

An alternative approach to OOD detection is based on the **Mahalanobis distance**, which measures the squared deviation of a sample from a Gaussian component:

$$D_M(x, \mu_k^{(y)}, \Sigma_k^{(y)}) = (x - \mu_k^{(y)})^T \Sigma_k^{(y)^{-1}} (x - \mu_k^{(y)}). \qquad (8.81)$$

If $D_M(x, \mu_k^{(y)}, \Sigma_k^{(y)})$ exceeds a predefined threshold $\gamma$, then the sample is classified as OOD:

$$D_M(x, \mu_k^{(y)}, \Sigma_k^{(y)}) > \gamma \Rightarrow x \text{ is out-of-distribution.} \qquad (8.82)$$

The Gaussian Mixture Model provides a theoretically rigorous and computationally efficient approach for open set learning, leveraging probabilistic likelihood estimation, Bayesian inference, and robust distance measures to distinguish in-distribution and out-of-distribution samples. The parameter optimization via Expectation-Maximization ensures maximum likelihood estimation of the mixture components, and the decision criteria based on likelihood thresholds or Mahalanobis distances provide strong theoretical guarantees for identifying unknown samples.

## 8.7 Dirichlet Process Gaussian Mixture Model (DP-GMM)

In generative modeling, the open-set learning problem is fundamentally framed as estimating the conditional likelihood $P(x|y)$ under a **Dirichlet Process Gaussian Mixture Model (DP-GMM)**. The central challenge in open-set learning is to correctly handle data points that may arise from an **unknown category**, meaning that their underlying distribution differs from that of the training data. To achieve this, we employ a nonparametric Bayesian approach that allows for an **unbounded** number of mixture components, ensuring that the model can flexibly introduce new clusters for previously unseen samples. This is accomplished by imposing a **Dirichlet Process (DP) prior** on the mixture component weights, which results in a countably infinite Gaussian
Mixture Model (GMM), effectively allowing the number of clusters to grow dynamically with the data. Given an observed dataset $\mathcal{D} = \{(x_i, y_i)\}_{i=1}^N$, where each $x_i \in \mathbb{R}^d$ represents a sample in a $d$-dimensional feature space and $y_i$ is its corresponding class label, the likelihood estimation problem can be expressed in the form

$$P(x|y) = \sum_{k=1}^{\infty} P(x|z=k, y)P(z=k|y) \qquad (8.83)$$

where $z$ represents a latent variable denoting the cluster assignment. The likelihood $P(x|z=k, y)$ follows a multivariate Gaussian distribution parameterized by cluster-specific mean $\mu_k$ and covariance $\Sigma_k$, given by

$$P(x|z=k, y) = \mathcal{N}(x|\mu_k, \Sigma_k) = \frac{1}{(2\pi)^{d/2}|\Sigma_k|^{1/2}} \exp \left( -\frac{1}{2}(x - \mu_k)^T \Sigma_k^{-1} (x - \mu_k) \right). \qquad (8.84)$$

Since the number of mixture components is unknown, a **Dirichlet Process (DP) prior** is imposed on the cluster assignment probabilities, leading to the hierarchical model

$$G \sim \text{DP}(\alpha, G_0), \quad \theta_k \sim G, \quad x_i|z_i, \theta_{z_i} \sim P(x|\theta_{z_i}), \qquad (8.85)$$

where $G$ is a discrete random probability measure drawn from a Dirichlet Process with **concentration parameter $\alpha > 0$** and base distribution $G_0$, which defines the prior over component parameters. The construction of the DP-GMM is commonly represented using the **stick-breaking process**, where the mixture weights are recursively defined as

$$\pi_k = v_k \prod_{j=1}^{k-1} (1 - v_j), \quad v_k \sim \text{Beta}(1, \alpha) \qquad (8.86)$$

ensuring the normalization constraint

$$\sum_{k=1}^{\infty} \pi_k = 1. \qquad (8.87)$$

Given this formulation, the posterior distribution over cluster assignments follows

$$P(z=k|x, y) = \frac{P(x|z=k, y)P(z=k|y)}{\sum_{j=1}^{\infty} P(x|z=j, y)P(z=j|y)}. \qquad (8.88)$$

The open-set learning problem requires the ability to **identify and appropriately model unseen categories**. This is naturally handled by the **Chinese Restaurant Process (CRP) representation** of the DP, where a new data point $x^*$ is assigned to a **new cluster** with probability

$$P(z^* = K + 1 | x^*, y^*) = \frac{\alpha}{\alpha + N} \qquad (8.89)$$

where $N$ is the total number of previously observed samples. Consequently, the likelihood of an unseen data point under the DP-GMM model expands as

$$P(x^*|y^*) = \sum_{k=1}^{K} P(x^*|z^* = k, y^*)P(z^* = k|y^*) + P(x^*|z^* = K+1, y^*)P(z^* = K+1|y^*). \qquad (8.90)$$

A sample is **classified as OOD** (out-of-distribution) if its **posterior likelihood** falls below a learned threshold $\tau$, which can be determined using a Bayesian uncertainty criterion, leading to the decision rule

$$\text{if } P(x|y) < \tau, \text{ then } x \text{ is classified as OOD.} \qquad (8.91)$$
To further quantify the uncertainty in cluster assignments, the Shannon entropy of the posterior is computed as

$$H(x) = - \sum_{k=1}^{K+1} P(z=k|x, y) \log P(z=k|x, y). \qquad (8.92)$$

A high entropy indicates significant uncertainty, suggesting that the sample does not belong to any of the known categories and should be treated as an open-set example. If entropy exceeds a critical threshold, the sample is automatically assigned to a new cluster, thereby allowing the model to flexibly accommodate previously unseen classes. The hierarchical Bayesian formulation of the DP-GMM further provides a robust probabilistic framework for managing inherent ambiguity in classification by leveraging both the prior knowledge encoded in $G_0$ and the adaptive nature of the Dirichlet Process, which dynamically introduces new components as necessary. From an inference perspective, model parameters ($\mu_k, \Sigma_k$) and mixture proportions $\pi_k$ are estimated using variational inference or Gibbs sampling, where the posterior updates involve integrating over all possible assignments $z$ given the prior over cluster structure. The posterior distribution over mixture components follows

$$P(\mu_k, \Sigma_k | \mathcal{D}) \propto P(\mathcal{D} | \mu_k, \Sigma_k) P(\mu_k, \Sigma_k), \qquad (8.93)$$

where the prior $P(\mu_k, \Sigma_k)$ is typically chosen as a conjugate Normal-Inverse-Wishart (NIW) distribution, ensuring closed-form updates. The resulting Bayesian inference scheme ensures that uncertainty is explicitly quantified at every level of the learning process, making DP-GMM a principled generative model for open-set learning.

## 8.8 Conjugate Normal-Inverse-Wishart (NIW) distribution

In the context of generative modeling, the open set learning problem is rigorously framed as the estimation of the likelihood $P(x|y)$ for a data point $x$ given a class label $y$, where $y$ may belong to either a known class or an unknown class. This problem is addressed by modeling the likelihood $P(x|y)$ under a conjugate Normal-Inverse-Wishart (NIW) distribution, which provides a mathematically tractable and statistically rigorous framework for parameter estimation. The NIW distribution serves as a conjugate prior for the multivariate normal distribution with unknown mean $\mu$ and covariance $\Sigma$, enabling closed-form updates of the posterior distribution given observed data. The NIW distribution is parameterized by hyperparameters $\mu_0, \lambda, \Psi$, and $\nu$, where $\mu_0 \in \mathbb{R}^d$ is the prior mean, $\lambda > 0$ is a scaling factor for the prior mean, $\Psi \in \mathbb{R}^{d \times d}$ is a symmetric positive definite scale matrix, and $\nu > d - 1$ is the degrees of freedom. The joint probability density function of the NIW distribution is given by:

$$P(\mu, \Sigma | \mu_0, \lambda, \Psi, \nu) = \text{NIW}(\mu, \Sigma | \mu_0, \lambda, \Psi, \nu) = \mathcal{N}(\mu | \mu_0, \frac{1}{\lambda}\Sigma) \cdot W^{-1}(\Sigma | \Psi, \nu), \qquad (8.94)$$

where $\mathcal{N}(\mu | \mu_0, \frac{1}{\lambda}\Sigma)$ is the multivariate normal distribution and $W^{-1}(\Sigma | \Psi, \nu)$ is the inverse-Wishart distribution. The multivariate normal distribution is defined as:

$$\mathcal{N}(\mu | \mu_0, \frac{1}{\lambda}\Sigma) = \frac{1}{(2\pi)^{d/2}|\frac{1}{\lambda}\Sigma|^{1/2}} \exp \left( -\frac{1}{2}(\mu - \mu_0)^T \Sigma^{-1} (\mu - \mu_0) \right), \qquad (8.95)$$

and the inverse-Wishart distribution is defined as:

$$W^{-1}(\Sigma | \Psi, \nu) = \frac{|\Psi|^{\nu/2}}{2^{\nu d/2} \Gamma_d\left(\frac{\nu}{2}\right)} |\Sigma|^{-\left(\nu+d+1\right)/2} \exp\left(-\frac{1}{2}\text{tr}(\Psi\Sigma^{-1})\right), \qquad (8.96)$$

where $\Gamma_d$ is the multivariate gamma function, $d$ is the dimensionality of the data, and tr denotes the trace of a matrix. Given a dataset $\mathcal{D} = \{(x_1, y_1), (x_2, y_2), \dots, (x_N, y_N)\}$, where $x_i \in \mathbb{R}^d$ and
$y_i \in \{1, 2, \dots, K\}$ for known classes or $y_i = K + 1$ for an unknown class, the likelihood $P(x|y)$ is modeled as a multivariate normal distribution with class-specific parameters $\mu_y$ and $\Sigma_y$. These parameters are drawn from the NIW prior distribution:

$$P(\mu_y, \Sigma_y | \mu_0, \lambda, \Psi, \nu) = \text{NIW}(\mu_y, \Sigma_y | \mu_0, \lambda, \Psi, \nu). \qquad (8.97)$$

The posterior distribution of $\mu_y$ and $\Sigma_y$ given the observed data $D_y = \{x_i : y_i = y\}$ is also an NIW distribution, with updated hyperparameters $\mu_y^*$, $\lambda^*$, $\Psi^*$, $\nu^*$. The updated hyperparameters are derived as:

$$\mu_y^* = \frac{\lambda \mu_0 + N_y \bar{x}_y}{\lambda + N_y}, \qquad (8.98)$$

$$\lambda^* = \lambda + N_y, \qquad (8.99)$$

$$\Psi^* = \Psi + S_y + \frac{\lambda N_y}{\lambda + N_y} (\bar{x}_y - \mu_0)(\bar{x}_y - \mu_0)^T, \qquad (8.100)$$

$$\nu^* = \nu + N_y, \qquad (8.101)$$

where $N_y = |D_y|$ is the number of data points in class $y$, $\bar{x}_y = \frac{1}{N_y} \sum_{x_i \in D_y} x_i$ is the sample mean of the data points in class $y$, and $S_y = \sum_{x_i \in D_y} (x_i - \bar{x}_y)(x_i - \bar{x}_y)^T$ is the scatter matrix for class $y$. The likelihood $P(x|y)$ is obtained by marginalizing over the parameters $\mu_y$ and $\Sigma_y$:

$$P(x|y) = \iint P(x|\mu_y, \Sigma_y)P(\mu_y, \Sigma_y|\mu_0, \lambda, \Psi, \nu) d\mu_y d\Sigma_y. \qquad (8.102)$$

Due to the conjugacy of the NIW prior, this integral can be evaluated analytically, resulting in a multivariate Student's t-distribution:

$$P(x|y) = \mathcal{T}(x|\mu_y^*, \frac{\Psi^*}{\lambda^*(\nu^* - d + 1)}, \nu^* - d + 1), \qquad (8.103)$$

where $\mathcal{T}(x|\mu, \Sigma, \nu)$ is the multivariate Student's t-distribution with mean $\mu$, scale matrix $\Sigma$, and degrees of freedom $\nu$. The multivariate Student's t-distribution is given by:

$$\mathcal{T}(x|\mu, \Sigma, \nu) = \frac{\Gamma\left(\frac{\nu+d}{2}\right)}{\Gamma\left(\frac{\nu}{2}\right) (\nu\pi)^{d/2} |\Sigma|^{1/2}} \left(1 + \frac{1}{\nu}(x-\mu)^T \Sigma^{-1} (x-\mu)\right)^{-(\nu+d)/2}. \qquad (8.104)$$

In the open set learning framework, the likelihood $P(x|y)$ is used to compute the probability that a new data point $x$ belongs to a known class $y$. If $P(x|y)$ falls below a predefined threshold for all known classes $y$, the data point $x$ is classified as belonging to an unknown class. This approach leverages the statistical properties of the NIW distribution and the multivariate Student's t-distribution to provide a rigorous and principled solution to the open set learning problem. The mathematical formulation ensures that the model can effectively distinguish between known and unknown classes while maintaining robustness and interpretability.

## 8.9 Extreme Value Theory (EVT) Models

In generative modeling, the open set learning problem concerns the ability of a model to distinguish between seen and unseen data by estimating the likelihood $P(x|y)$. This problem is fundamentally linked to extreme value theory (EVT), which characterizes the statistical behavior of the tails of probability distributions. EVT provides a rigorous mathematical framework for modeling the behavior of rare events, which is crucial for identifying out-of-distribution (OOD) samples. Given an observed data point $x$ and a class label $y$, the likelihood function $P(x|y)$ exhibits tail properties that can be asymptotically approximated using EVT. This follows from the Fisher-Tippett-Gnedenko
theorem, which states that the maximum of independent and identically distributed (i.i.d.) ran-
dom variables, properly normalized, converges to one of three types of extreme value distributions:
Gumbel, Fréchet, or Weibull. The key observation in open set recognition is that samples from
an unknown class exhibit extreme deviations in their likelihood estimates, which can be rigorously
modeled through EVT-based tail fitting.

The first step in this formulation is to define a log-likelihood function, which quantifies the prob-
ability of observing a sample given a particular class. Let the log-likelihood function be given
by

$$
L(\mathbf{x}) = \log P(\mathbf{x}|y) \tag{8.105}
$$

where $L(\mathbf{x})$ captures the statistical relationship between the observed data and the conditional
density function. In EVT-based approaches, one considers the distribution of extreme values of
$L(\mathbf{x})$, specifically in the lower tail, since OOD samples tend to have significantly lower likelihoods.
The fundamental result from EVT states that for a sufficiently large number of independent ob-
servations, the limiting distribution of the minimum values follows a Generalized Extreme Value
(GEV) distribution, given by

$$
F(z; \xi, \mu, \sigma) = \begin{cases} \exp\left(-\left(1 + \frac{\xi(z-\mu)}{\sigma}\right)^{-1/\xi}\right), & \xi \neq 0 \\ \exp\left(-e^{-(z-\mu)/\sigma}\right), & \xi = 0 \end{cases} \tag{8.106}
$$

where $\xi$ is the shape parameter, $\mu$ is the location parameter, and $\sigma$ is the scale parameter. In the context of likelihood estimation, the limiting behavior of $L(\mathbf{x})$ follows a Generalized Pareto Distribution (GPD), which describes the excess over a given threshold. The probability density function (PDF) of the GPD is given by

$$
g(z; \xi, \beta) = \begin{cases} \frac{1}{\beta} \left(1 + \frac{\xi z}{\beta}\right)^{-1-1/\xi}, & \xi \neq 0, z > 0 \\ \frac{1}{\beta} e^{-z/\beta}, & \xi = 0, z > 0 \end{cases} \quad (8.107)
$$

where $z = L_{\max} - L(\mathbf{x})$ represents the deviation from the maximum likelihood observed in training data. The fundamental insight from EVT is that for sufficiently high thresholds, the distribution of these deviations converges to the GPD. This allows us to estimate the probability that a given likelihood falls below a certain threshold $\tau$ using

$$
P(L(\mathbf{x}) < \tau) = 1 - \left(1 + \frac{\xi(\tau - \mu)}{\sigma}\right)^{-1/\xi} \quad (8.108)
$$

which provides a principled way of defining OOD detection thresholds. A sample **x** is considered
to be OOD if

$$
P(\mathbf{x}|y) < \tau \tag{8.109}
$$

where $\tau$ is selected based on the EVT-derived confidence interval. Given a set of training samples
$\{\mathbf{x}_i\}_{i=1}^N$ from a known class, one can fit the EVT parameters by solving the maximum likelihood
estimation (MLE) problem

$$
\hat{\xi}, \hat{\sigma} = \arg \max_{\xi, \sigma} \sum_{i=1}^{N} \log g(L_{\max} - L(\mathbf{x}_i); \xi, \sigma). \quad (8.110)
$$

This provides an optimal estimate of the tail parameters, ensuring that the EVT model accurately
represents the behavior of extreme likelihood values. Once the parameters are estimated, one can
compute a dynamic threshold for rejecting OOD samples by solving

$$
\tau = \mu + \frac{\sigma}{\xi} \left( \left( \frac{1-p}{N} \right)^{-\xi} - 1 \right) \quad (8.111)
$$
where $p$ is the desired false positive rate for in-distribution samples. The EVT-based formulation allows for a probabilistic characterization of whether a given sample belongs to a known or unknown class, rather than relying on heuristics. To incorporate this within a Bayesian framework, the posterior probability of a class given an observation is computed using Bayes' theorem as

$$P(y|\mathbf{x}) = \frac{P(\mathbf{x}|y)P(y)}{P(\mathbf{x})} \qquad (8.112)$$

Since EVT provides a distributional form for $P(\mathbf{x})$ under extreme value behavior, one can estimate the denominator using the cumulative probability function of the GPD:

$$P(\mathbf{x}) = \sum_{y'} P(\mathbf{x}|y')P(y'). \qquad (8.113)$$

Replacing $P(\mathbf{x}|y)$ with the EVT-derived approximation, the posterior can be rewritten as

$$P(y|\mathbf{x}) = \frac{\left(1 + \frac{\xi(L(\mathbf{x}) - \mu)}{\sigma}\right)^{-1/\xi} P(y)}{\sum_{y'} \left(1 + \frac{\xi(L(\mathbf{x}) - \mu)}{\sigma}\right)^{-1/\xi} P(y')} \qquad (8.114)$$

This formulation ensures that as $L(\mathbf{x})$ moves further into the tail, the posterior probability of all known classes decreases, leading to a natural rejection mechanism for OOD samples. An alternative approach to likelihood estimation involves using a logistic function to approximate the EVT threshold behavior, given by

$$P(\mathbf{x}|y) \approx \frac{1}{1 + e^{-\alpha(L(\mathbf{x}) - \tau)}} \qquad (8.115)$$

where $\alpha$ is a scale parameter controlling the steepness of the probability drop-off. The EVT-based model ensures that open set detection is grounded in rigorous statistical principles, as opposed to ad-hoc thresholding methods. The theoretical justification of EVT-based likelihood estimation follows from the asymptotic stability of the GPD under maximum domain of attraction conditions, ensuring that the fitted distribution remains valid for new samples. Consequently, the EVT-based formulation provides a robust and theoretically sound approach to estimating likelihoods under generative models, enabling principled open set recognition.

## 8.10 Bayesian Neural Networks (BNNs)

In generative modeling, the open set learning problem is fundamentally framed in terms of estimating the likelihood $P(x|y)$ under Bayesian Neural Networks (BNNs) because the Bayesian framework allows for a principled quantification of uncertainty. Open set learning requires the model to be aware of its epistemic uncertainty—uncertainty arising from a lack of knowledge about the data distribution. This is crucial for distinguishing between in-distribution (ID) data and out-of-distribution (OOD) data, a problem that traditional deterministic neural networks struggle with. The Bayesian formulation mitigates this issue by considering an entire distribution over model parameters $\theta$, rather than a single point estimate. The posterior distribution over the parameters given the dataset $\mathcal{D} = \{(x_i, y_i)\}_{i=1}^N$ is given by Bayes' theorem as

$$P(\theta|\mathcal{D}) = \frac{P(\mathcal{D}|\theta)P(\theta)}{P(\mathcal{D})}, \qquad (8.116)$$

where $P(\mathcal{D}|\theta)$ is the likelihood function, $P(\theta)$ is the prior over the network parameters, and $P(\mathcal{D})$ is the marginal likelihood (also known as the model evidence), which ensures proper normalization. Since the marginal likelihood is intractable in deep neural networks due to the high-dimensional
integral over all possible parameter configurations, approximate inference techniques such as variational inference, Monte Carlo methods (e.g., Hamiltonian Monte Carlo or Stochastic Gradient Langevin Dynamics), or Laplace approximations are employed to obtain an approximation to the posterior distribution. Given this posterior, the Bayesian predictive distribution for a new input $x^*$ conditioned on a class label $y^*$ is obtained by marginalizing over $\theta$:

$$P(x^*|y^*) = \int P(x^*|y^*, \theta)P(\theta|\mathcal{D}) d\theta. \qquad (8.117)$$

This integral encodes both aleatoric uncertainty (due to inherent noise in the data) and epistemic uncertainty (due to lack of knowledge). Since this integral is computationally intractable for high-dimensional parameter spaces, it is typically approximated via Monte Carlo integration using an ensemble of sampled parameters $\theta_m \sim P(\theta|\mathcal{D})$:

$$P(x^*|y^*) \approx \frac{1}{M} \sum_{m=1}^{M} P(x^*|y^*, \theta_m). \qquad (8.118)$$

A fundamental property of Bayesian models in the context of open set learning is that the variance of the predictive distribution provides a direct measure of epistemic uncertainty. The predictive mean and variance are given by

$$\mathbb{E}[x^*|y^*, \mathcal{D}] = \int x^* P(x^*|y^*, \theta)P(\theta|\mathcal{D}) d\theta, \qquad (8.119)$$

$$\mathrm{Var}[x^*|y^*, \mathcal{D}] = \int x^{*2} P(x^*|y^*, \theta)P(\theta|\mathcal{D}) d\theta - (\mathbb{E}[x^*|y^*, \mathcal{D}])^2. \qquad (8.120)$$

For inputs $x^*$ that are outside the training distribution, the variance of the predictive distribution is expected to be significantly higher because the posterior over $\theta$ is conditioned only on the observed training data and lacks information about unseen samples. This property allows Bayesian models to naturally detect OOD data by thresholding on predictive uncertainty. To model the conditional likelihood $P(x|y)$, generative Bayesian models introduce latent variables $z$ to capture underlying structure in the data:

$$P(x|y, \theta) = \int P(x|z, \theta)P(z|y, \theta) dz. \qquad (8.121)$$

Since direct inference over the latent variable posterior $P(z|x, y, \theta)$ is intractable, variational inference approximates it with a variational distribution $q(z|x, y, \phi)$, leading to the Evidence Lower Bound (ELBO):

$$\log P(x|y) \geq \mathbb{E}_{q(z|x,y,\phi)}[\log P(x|z,\theta)] - D_{\mathrm{KL}}(q(z|x,y,\phi)||P(z|y,\theta)). \qquad (8.122)$$

Here, $D_{\mathrm{KL}}(q||p)$ denotes the Kullback-Leibler divergence, which enforces regularization by minimizing the difference between the approximate posterior and the true prior. In practice, deep generative models such as Variational Autoencoders (VAEs), Normalizing Flows, and Deep Energy-Based Models leverage Bayesian formulations to learn structured representations of $P(x|y)$ in high-dimensional spaces. From a Bayesian decision-theoretic perspective, the total uncertainty in a prediction is measured using the predictive entropy:

$$H(x^*|y^*) = - \int P(x^*|y^*, \theta) \log P(x^*|y^*, \theta) d\theta. \qquad (8.123)$$

Decomposing this entropy into aleatoric and epistemic components via mutual information, the epistemic uncertainty is captured by the expected Kullback-Leibler divergence between individual parameter-conditioned predictions and the full posterior predictive distribution:

$$\mathrm{MI}[x^*, \theta|y^*] = \mathbb{E}_{P(\theta|\mathcal{D})} [D_{\mathrm{KL}}(P(x^*|y^*, \theta)||P(x^*|y^*))]. \qquad (8.124)$$
Higher epistemic uncertainty indicates that the model is less confident in its prediction due to insufficient training data, which is a key indicator of an OOD sample. By setting an uncertainty threshold, a Bayesian classifier can reject predictions on OOD data, effectively implementing an open set classifier.

Bayesian neural networks thus provide a mathematically rigorous solution to the open set learning problem by naturally incorporating uncertainty through posterior inference over model parameters, leveraging predictive distributions to measure epistemic uncertainty, and applying principled probabilistic inference techniques such as variational approximations and Monte Carlo integration. The estimation of $P(x|y)$ in this framework allows the model to dynamically adjust its confidence in predictions and provide robust detection of OOD samples by analyzing likelihood distributions.

## 8.11 Support Vector Models

In the context of generative modeling, the open set learning problem is rigorously formalized as the estimation of the conditional likelihood $P(x|y)$ under Support Vector Machines (SVMs) by employing advanced probabilistic frameworks, optimization theory, and statistical learning principles. The objective is to model the distribution of data $x$ conditioned on class labels $y$, where $y$ may belong to a known set of classes $\mathcal{Y} = \{1, 2, \dots, K\}$ or an unknown class $y \notin \mathcal{Y}$. This necessitates a mathematically precise formulation that integrates discriminative learning with probabilistic reasoning to handle both known and unknown classes. The likelihood $P(x|y)$ is derived from Bayes' theorem, which decomposes the conditional probability as:

$$P(x|y) = \frac{P(y|x)P(x)}{P(y)}, \qquad (8.125)$$

where $P(y|x)$ is the posterior probability of class $y$ given $x$, $P(x)$ is the marginal distribution of $x$, and $P(y)$ is the prior probability of class $y$. Under the SVM framework, the posterior $P(y|x)$ is modeled using a discriminant function $f_y(x)$, which is optimized to separate classes while maximizing the margin. The optimization problem for learning $f_y(x)$ is formulated as:

$$\min_{f_y, \xi} \frac{1}{2} \|f_y\|_{\mathcal{H}}^2 + C \sum_{i=1}^{N} \xi_i, \qquad (8.126)$$

subject to the constraints:

$$y_i f_y(x_i) \geq 1 - \xi_i, \quad \xi_i \geq 0, \quad \forall i = 1, \dots, N, \qquad (8.127)$$

where $\|f_y\|_{\mathcal{H}}$ denotes the norm of $f_y$ in the reproducing kernel Hilbert space (RKHS) $\mathcal{H}$, $C$ is a regularization parameter controlling the trade-off between margin maximization and classification error, and $\xi_i$ are slack variables accounting for misclassifications. The discriminant function $f_y(x)$ is expressed as:

$$f_y(x) = \mathbf{w}_y^T \phi(x) + b_y, \qquad (8.128)$$

where $\mathbf{w}_y$ is the weight vector in the feature space, $\phi(x)$ is a feature mapping function, and $b_y$ is the bias term. To extend this framework to open set learning, the likelihood $P(x|y)$ is augmented with a rejection mechanism to handle unknown classes. This is achieved by introducing a class-specific threshold $\tau_y$, such that:

$$P(x|y) = \begin{cases} \frac{P(y|x)P(x)}{P(y)} & \text{if } f_y(x) \ge \tau_y, \\ 0 & \text{otherwise.} \end{cases} \qquad (8.129)$$
The threshold $\tau_y$ is determined by minimizing the empirical risk on a validation set $D_{\text{val}} = \{(x_i, y_i)\}_{i=1}^M$, formalized as:

$$ \tau_y = \arg \min_{\tau} \sum_{i=1}^{M} \mathbb{I}(f_y(x_i) < \tau) \cdot L(y_i, \text{unknown}), \qquad (8.130) $$

where $\mathbb{I}(\cdot)$ is the indicator function, and $L(y_i, \text{unknown})$ is the loss incurred when an instance from an unknown class is misclassified as belonging to class $y$. This ensures that the model rejects instances from unknown classes with high confidence. The likelihood $P(x|y)$ is further refined using kernel methods, which enable SVMs to operate in a high-dimensional feature space. The kernel function $k(x, x')$ is defined as:

$$ k(x, x') = \langle \phi(x), \phi(x') \rangle_{\mathcal{H}}, \qquad (8.131) $$

where $\langle \cdot, \cdot \rangle_{\mathcal{H}}$ denotes the inner product in the RKHS $\mathcal{H}$. The discriminant function $f_y(x)$ in the kernelized form is given by:

$$ f_y(x) = \sum_{i=1}^{N} \alpha_i y_i k(x_i, x) + b_y, \qquad (8.132) $$

where $\alpha_i$ are the Lagrange multipliers obtained from solving the dual optimization problem:

$$ \max_{\alpha} \sum_{i=1}^{N} \alpha_i - \frac{1}{2} \sum_{i=1}^{N} \sum_{j=1}^{N} \alpha_i \alpha_j y_i y_j k(x_i, x_j), \qquad (8.133) $$

subject to the constraints:

$$ 0 \le \alpha_i \le C, \quad \sum_{i=1}^{N} \alpha_i y_i = 0. \qquad (8.134) $$

The kernelized discriminant function allows the model to capture complex decision boundaries in the input space. The likelihood $P(x|y)$ is then estimated by combining the kernelized discriminant function with the rejection mechanism:

$$ P(x|y) = \begin{cases} \frac{\exp(f_y(x))}{\sum_{y' \in y} \exp(f_{y'}(x))} & \text{if } f_y(x) \ge \tau_y, \\ 0 & \text{otherwise.} \end{cases} \qquad (8.135) $$

This formulation ensures that the model assigns high likelihood to instances from known classes while rejecting instances from unknown classes. The overall objective is to maximize the log-likelihood of the observed data under the model:

$$ \mathcal{L}(\theta) = \sum_{i=1}^{N} \log P(x_i|y_i; \theta), \qquad (8.136) $$

where $\theta$ represents the parameters of the model, including $\mathbf{w}_y$, $b_y$, and $\tau_y$. To further enhance the rigor, the optimization problem is regularized using a penalty term $\Omega(\theta)$ to prevent overfitting:

$$ \min_{\theta} -\mathcal{L}(\theta) + \lambda \Omega(\theta), \qquad (8.137) $$

where $\lambda$ is a regularization parameter, and $\Omega(\theta)$ is typically chosen as the $L_2$-norm of the parameters:

$$ \Omega(\theta) = \|\mathbf{w}_y\|_2^2 + \|b_y\|_2^2. \qquad (8.138) $$

This ensures that the model generalizes well to unseen data while maintaining discriminative power.

In conclusion, the open set learning problem under SVMs is rigorously framed as the estimation of $P(x|y)$ through a combination of probabilistic modeling, kernel methods, and optimization. The discriminant function $f_y(x)$ is optimized to separate known classes while incorporating a rejection mechanism for unknown classes, ensuring robust performance in open set scenarios. The likelihood $P(x|y)$ is derived using Bayes' theorem and refined through kernelized discriminant functions, resulting in a mathematically precise and computationally tractable framework for open set learning.
## 8.12 Support Vector Data Description

In the context of generative modeling, the open set learning problem is rigorously formalized under the Support Vector Data Description (SVDD) framework by constructing a probabilistic model for the likelihood $P(x|y)$ through the optimization of a hypersphere that encapsulates the data distribution of class $y$. The hypersphere is defined by its center $\mathbf{a} \in \mathbb{R}^d$ and radius $R \in \mathbb{R}_+$, which are determined by solving a constrained optimization problem that minimizes the volume of the sphere while ensuring that the majority of the training data $\mathbf{x}_i \in \mathcal{X}$ for class $y$ lie within or close to the sphere. The primal optimization problem is formulated as:

$$ \min_{R, \mathbf{a}, \xi_i} R^2 + C \sum_{i=1}^{N} \xi_i, \qquad (8.139) $$

subject to the constraints:

$$ \|\mathbf{x}_i - \mathbf{a}\|^2 \leq R^2 + \xi_i, \quad \xi_i \geq 0, \quad \forall i = 1, 2, \dots, N, \qquad (8.140) $$

where $\xi_i \in \mathbb{R}_+$ are slack variables that permit deviations from the strict boundary, $C \in \mathbb{R}_+$ is a regularization parameter that balances the trade-off between the sphere's volume and the penalty for outliers, and $N$ is the cardinality of the training set. The likelihood $P(x|y)$ is modeled as a function of the squared Euclidean distance $\|\mathbf{x} - \mathbf{a}\|^2$, which quantifies the deviation of a test point $\mathbf{x}$ from the center $\mathbf{a}$. Specifically, the likelihood is expressed as:

$$ P(x|y) = \frac{1}{Z} \exp \left( - \frac{\|\mathbf{x} - \mathbf{a}\|^2}{\sigma^2} \right), \qquad (8.141) $$

where $Z$ is a normalization constant ensuring that $\int P(x|y) d\mathbf{x} = 1$, and $\sigma \in \mathbb{R}_+$ is a scaling parameter that governs the rate of decay of the likelihood as the distance from the center increases. The distance $\|\mathbf{x} - \mathbf{a}\|^2$ is computed in a feature space induced by a kernel function $K: \mathcal{X} \times \mathcal{X} \to \mathbb{R}$, which allows for non-linear decision boundaries. The kernelized distance is given by:

$$ \|\mathbf{x} - \mathbf{a}\|^2 = K(\mathbf{x}, \mathbf{x}) - 2 \sum_{i=1}^{N} \alpha_i K(\mathbf{x}, \mathbf{x}_i) + \sum_{i=1}^{N} \sum_{j=1}^{N} \alpha_i \alpha_j K(\mathbf{x}_i, \mathbf{x}_j), \qquad (8.142) $$

where $\alpha_i \in \mathbb{R}_+$ are the Lagrange multipliers obtained from the dual formulation of the SVDD optimization problem. The dual problem is derived by introducing Lagrange multipliers $\alpha_i$ and $\gamma_i$ for the inequality constraints, resulting in the following Lagrangian:

$$ \mathcal{L}(R, \mathbf{a}, \xi_i, \alpha_i, \gamma_i) = R^2 + C \sum_{i=1}^{N} \xi_i - \sum_{i=1}^{N} \alpha_i (R^2 + \xi_i - \|\mathbf{x}_i - \mathbf{a}\|^2) - \sum_{i=1}^{N} \gamma_i \xi_i. \qquad (8.143) $$

By setting the derivatives of the Lagrangian with respect to $R$, $\mathbf{a}$, and $\xi_i$ to zero, the dual optimization problem is obtained as:

$$ \max_{\alpha_i} \sum_{i=1}^{N} \alpha_i K(\mathbf{x}_i, \mathbf{x}_i) - \sum_{i=1}^{N} \sum_{j=1}^{N} \alpha_i \alpha_j K(\mathbf{x}_i, \mathbf{x}_j), \qquad (8.144) $$

subject to the constraints:

$$ 0 \leq \alpha_i \leq C, \quad \sum_{i=1}^{N} \alpha_i = 1. \qquad (8.145) $$

The solution to the dual problem yields the Lagrange multipliers $\alpha_i$, which are used to compute the center $\mathbf{a}$ as:

$$ \mathbf{a} = \sum_{i=1}^{N} \alpha_i \mathbf{x}_i. \qquad (8.146) $$
The radius $R$ is determined by selecting any support vector $\mathbf{x}_k$ for which $0 < \alpha_k < C$, and computing:

$$R^2 = \|\mathbf{x}_k - \mathbf{a}\|^2 = K(\mathbf{x}_k, \mathbf{x}_k) - 2 \sum_{i=1}^{N} \alpha_i K(\mathbf{x}_k, \mathbf{x}_i) + \sum_{i=1}^{N} \sum_{j=1}^{N} \alpha_i \alpha_j K(\mathbf{x}_i, \mathbf{x}_j). \quad (8.147)$$

The likelihood $P(x|y)$ is then used to classify a test point $\mathbf{x}$ as belonging to the open set if the likelihood falls below a threshold $\tau \in \mathbb{R}_+$, which is determined based on the desired trade-off between false positives and false negatives. The decision rule is formalized as:

$$\text{Classify } \mathbf{x} \text{ as open set if } P(x|y) < \tau. \qquad (8.148)$$

The threshold $\tau$ can be estimated using cross-validation or other statistical techniques to optimize the model's performance. This formulation provides a rigorous and mathematically sound framework for open set learning, combining principles from optimization, kernel methods, and probabilistic modeling to estimate the likelihood $P(x|y)$ and distinguish between known and unknown classes in a principled manner. The SVDD-based approach ensures that the model generalizes well to unseen data while maintaining computational efficiency and robustness to outliers.
# 9 Zero-Shot Learning

Zero-shot learning (ZSL) is a machine learning paradigm in which a model is trained to recognize classes that were not present in the training data by leveraging auxiliary semantic information. Let $\mathcal{X}$ denote the input space (e.g., images or texts) and $\mathcal{Y}_s = \{y_1, \dots, y_K\}$ the set of seen classes available during training. The goal is to generalize to a disjoint set of unseen classes $\mathcal{Y}_u = \{y_{K+1}, \dots, y_{K+L}\}$, where $\mathcal{Y}_s \cap \mathcal{Y}_u = \emptyset$. This is achieved through a semantic embedding space $\mathcal{Z}$, which encodes class descriptions (e.g., attributes, word vectors, or textual prompts) and bridges the gap between seen and unseen classes.

The training objective involves learning a mapping $f_{\theta}: \mathcal{X} \to \mathcal{Z}$ from inputs to the semantic space, alongside a compatibility function $F: \mathcal{Z} \times \mathcal{Z} \to \mathbb{R}$ that scores the alignment between input embeddings and class prototypes. For a sample $x \in \mathcal{X}$ with class $y \in \mathcal{Y}_s$, the model minimizes the following loss:

$$ \mathcal{L}(\theta) = \sum_{(x,y) \in \mathcal{D}_s} \ell(F(f_{\theta}(x), \psi(y)), y), $$

where $\psi: \mathcal{Y}_s \cup \mathcal{Y}_u \to \mathcal{Z}$ maps classes to their fixed or learnable semantic embeddings (e.g., $\psi(y_k) = \mathbf{W}\mathbf{a}_k$ for attribute vectors $\mathbf{a}_k$), $\mathbf{y}$ is the one-hot encoded label, and $\ell$ is a cross-entropy or margin-based loss. At inference, the model predicts the class of an input $x$ by maximizing compatibility over all possible classes:

$$ \hat{y} = \arg \max_{y \in \mathcal{Y}_u} F(f_{\theta}(x), \psi(y)). $$

In generalized zero-shot learning (GZSL), the model must classify inputs from both seen and unseen classes ($\mathcal{Y}_s \cup \mathcal{Y}_u$), posing additional challenges due to bias toward seen classes. To mitigate this, a calibration function $g: \mathbb{R} \to \mathbb{R}$ is often applied to logits:

$$ \hat{y} = \arg \max_{y \in \mathcal{Y}_s \cup \mathcal{Y}_u} g(F(f_{\theta}(x), \psi(y))), $$

where $g$ adjusts scores to balance seen and unseen class predictions (e.g., via entropy regularization or temperature scaling). The semantic transfer is governed by the structure of $\mathcal{Z}$: if $\mathcal{Z}$ is a linear space (e.g., word2vec), the model relies on geometric relationships (e.g., $\psi(y_{\text{unseen}}) \approx \sum_i w_i \psi(y_{\text{seen}})$). For nonlinear embeddings (e.g., CLIP), a joint vision-language space ensures that $f_{\theta}(x)$ and $\psi(y)$ are aligned through contrastive learning:

$$ \mathcal{L}_{\text{contrastive}} = - \log \frac{\exp(F(f_{\theta}(x), \psi(y))/\tau)}{\sum_{y' \in \mathcal{B}} \exp(F(f_{\theta}(x), \psi(y'))/\tau)}, $$

where $\tau$ is a temperature hyperparameter and $\mathcal{B}$ is a batch of negative samples. Theoretical guarantees for ZSL depend on the coverage of $\psi(\mathcal{Y}_u)$ by the convex hull of $\psi(\mathcal{Y}_s)$ in $\mathcal{Z}$, ensuring that unseen classes are semantically reachable via combinations of seen classes.

For complex class hierarchies, ZSL leverages knowledge graphs $\mathcal{G} = (\mathcal{V}, \mathcal{E})$, where nodes $\mathcal{V}$ represent classes and edges $\mathcal{E}$ encode relations (e.g., "is-a" or "has-property"). The semantic embedding $\psi(y)$ is then a function of graph convolutions:

$$ \psi(y) = \text{GNN}(\mathbf{A}, \mathbf{H}^{(0)}; \phi)_y, $$
where **A** is the adjacency matrix, **H**⁽⁰⁾ are initial node features, and $\phi$ are GNN parameters. This enables multi-hop reasoning, such as inferring that "zebra" is a subclass of "horse" with "stripes." Hybrid approaches combine symbolic (graph-based) and subsymbolic (vector-based) embeddings, with $\mathcal{Z}$ decomposed into orthogonal subspaces for attributes $\mathcal{Z}_{attr}$ and relations $\mathcal{Z}_{rel}$:

$$F(f_{\theta}(x), \psi(y)) = \mathbf{v}^T \text{MLP}([f_{\theta}(x) \oplus \psi_{attr}(y) \oplus \psi_{rel}(y)]),$$

where $\oplus$ denotes concatenation and MLP is a multilayer perceptron. The resulting framework unifies representation learning and logical inference, enabling zero-shot generalization even when $\mathcal{Y}_u$ is only indirectly related to $\mathcal{Y}_s$.

The fundamental limit of ZSL is characterized by the mutual information $I(\mathcal{X}; \mathcal{Y}_u|\mathcal{Y}_s)$ between inputs and unseen classes, conditioned on seen classes. For a fixed $\psi$, the generalization error is bounded by:

$$\epsilon_{ZSL} \le \sqrt{\frac{1}{2} I(\mathcal{X}; \mathcal{Y}_u|\mathcal{Y}_s) + \mathcal{O}(|\mathcal{Z}|/n)},$$

where $n$ is the number of training samples. Open-set variants further distinguish known unknowns ($\mathcal{Y}_u$) from truly novel inputs by thresholding the entropy of $F(f_{\theta}(x), \cdot)$:

$$\text{Reject if } H(F(f_{\theta}(x), \psi(\cdot))) > \gamma,$$

for a threshold $\gamma$. This aligns with the statistical mechanics of few-shot learning, where $\mathcal{Z}$ acts as a low-dimensional manifold encoding the thermodynamic free energy of class discrimination. Thus, ZSL bridges geometric, statistical, and symbolic AI, offering a principled approach to learning beyond observed labels.

## 9.1 Literature Review of Zero-Shot Learning

Zero-shot learning (ZSL) has emerged as a pivotal paradigm in machine learning, enabling models to recognize classes not seen during training by leveraging auxiliary information such as attributes, semantic embeddings, or textual descriptions. The foundational work of Lampert et al. (2009) [1382] introduced attribute-based classification, where classes are described by high-level attributes, and a probabilistic framework is used to infer unseen classes. This approach formalizes ZSL as a transfer learning problem, where knowledge from seen classes $\mathcal{Y}^s$ is transferred to unseen classes $\mathcal{Y}^u$ via a shared semantic space $\mathcal{S}$. The key idea is to learn a mapping $\phi: \mathcal{X} \to \mathcal{S}$ from the input space $\mathcal{X}$ to the semantic space $\mathcal{S}$, followed by a compatibility function $f: \mathcal{S} \times \mathcal{Y} \to \mathbb{R}$ that scores the alignment between embeddings and class labels. Early methods relied on linear projections, as seen in the work of Akata et al. (2013) [1383], who proposed a bilinear compatibility function $f(\phi(x), y) = \phi(x)^T W \psi(y)$, where $\psi(y)$ is the semantic embedding of class $y$ and $W$ is a learned weight matrix.

The literature has since evolved to address critical challenges such as the semantic gap and domain shift. Romera-Paredes and Torr (2015) [1384] proposed an elegant closed-form solution using ridge regression to learn the projection matrix $W$, minimizing $\|WX - S\|^2 + \lambda\|W\|^2$, where $X$ and $S$ are matrices of seen class instances and their attributes, respectively. However, this approach assumes a linear relationship, which is often insufficient. Nonlinear extensions, such as deep neural networks, were introduced by Xian et al. (2017) [1386], who employed a multimodal embedding space to align visual and semantic representations. Their objective function $\mathcal{L} = \sum_{(x,y) \in \mathcal{Y}^s} \max(0, \Delta(y, y') + f(\phi(x), y') - f(\phi(x), y))$ incorporates a margin-based ranking loss to ensure correct class rankings. Concurrently, Zhang et al. (2017) [1387] proposed a generative adversarial network (GAN) framework to synthesize features for unseen classes, formalized as
$\min_G \max_D \mathbb{E}_{x \sim p_{\text{data}}} [\log D(x)] + \mathbb{E}_{z \sim p_z} [\log(1 - D(G(z)))],$ where $G$ generates fake features conditioned on class embeddings.

The domain shift problem, where the projected features of unseen classes deviate from their true distribution, was addressed by Fu et al. (2015) [1388] through transductive learning, leveraging unlabeled unseen class data during training. Their formulation minimizes $\mathcal{L} = \mathcal{L}_{sup} + \lambda \mathcal{L}_{unsup}$, where $\mathcal{L}_{sup}$ is the supervised loss on seen classes and $\mathcal{L}_{unsup}$ regularizes the projection using unseen class instances. Similarly, Kodirov et al. (2017) [1389] proposed a self-training framework with $\mathcal{L} = \|WX - S\|^2 + \lambda\|W\|_{2,1}$, enforcing sparsity to improve generalization. Another line of work focuses on hybrid models, as in the case of Changpinyo et al. (2016) [1390], who combined attribute-based and semantic embedding methods using a joint optimization framework $\min_{W,A} \|WX - AS\|^2 + \lambda_1\|W\|^2 + \lambda_2\|A\|^2$, where $A$ is a matrix mapping attributes to embeddings.

Recent advances have explored graph-based methods to model relationships between classes. Kampffmeyer et al. (2019) [1391] proposed a graph convolutional network (GCN) to propagate information across classes, with the loss $\mathcal{L} = \sum_{i,j} \|f(x_i) - f(x_j)\|^2 A_{ij}$, where $A_{ij}$ is the adjacency matrix encoding class relationships. Similarly, Wang et al. (2018) [1392] introduced a knowledge graph framework to enrich semantic representations, while Li et al. (2019) [1393] leveraged hierarchical class structures to improve ZSL performance. The emergence of large-scale pretrained vision-language models like CLIP (Radford et al., 2021) [1394] has further revolutionized ZSL, enabling zero-shot transfer via natural language prompts. Their contrastive learning objective $\mathcal{L} = - \log \frac{\exp(\phi(x)^T \psi(y)/\tau)}{\sum_{y' \in \mathcal{Y}} \exp(\phi(x)^T \psi(y')/\tau)}$ aligns images and text embeddings in a shared space, achieving state-of-the-art results.

Despite these advancements, challenges remain, such as bias towards seen classes and the need for robust evaluation protocols. Chao et al. (2016) [1395] highlighted the importance of generalized ZSL (GZSL), where the test set includes both seen and unseen classes, and proposed the harmonic mean $H = \frac{2 \cdot acc_s \cdot acc_u}{acc_s + acc_u}$ to balance performance. Verma et al. (2018) [1396] addressed bias mitigation through calibrated stacking, while Huynh and Elhamifar (2020) [1397] proposed a compositional framework for fine-grained ZSL. Theoretical insights from Palatucci et al. (2009) [1398] and Socher et al. (2013) [1399] have also shaped the field, emphasizing the role of semantic spaces in knowledge transfer. The integration of meta-learning (Hariharan and Girshick, 2017) [1400] and few-shot learning (Xian et al., 2018) [1401] has further expanded ZSL's applicability, while emerging paradigms like open-set recognition (Scheirer et al., 2013) [1402] and out-of-distribution detection (Yang et al., 2021) [1403] continue to push its boundaries.

## 9.2 Analysis of Zero-Shot Learning

Zero-Shot learning (ZSL) is a highly sophisticated paradigm in machine learning wherein a model is expected to classify instances from classes it has never encountered during training. Mathematically, we define a set of seen classes $S$ and unseen classes $U$, such that the training set consists of labeled instances $(x, y)$ where $y \in S$, and the test set consists of instances $x'$ where $y' \in U$, with $S \cap U = \emptyset$. The challenge of ZSL lies in leveraging semantic knowledge to generalize beyond the training distribution, necessitating a mapping function $f: X \to Y$ that extends to unseen categories.

The problem can be formulated using an attribute-based representation, where each class $y$ is associated with a high-dimensional semantic embedding $a(y) \in \mathbb{R}^d$, which encodes meaningful relationships between classes. The objective is to learn a function $g: X \to \mathbb{R}^d$ that maps input samples to the same semantic space. Given a new sample $x'$, the predicted class is determined by
minimizing a distance function $d$:

$$ \hat{y} = \arg \min_{y \in U} d(g(x'), a(y)) \qquad (9.1) $$

A common choice for $d$ is the squared Euclidean distance:

$$ d(g(x'), a(y)) = \|g(x') - a(y)\|^2 \qquad (9.2) $$

or the cosine similarity:

$$ d(g(x'), a(y)) = 1 - \frac{\langle g(x'), a(y) \rangle}{\|g(x')\| \|a(y)\|} \qquad (9.3) $$

The function $g$ is often parameterized by a neural network with parameters $\theta$, trained via minimizing a contrastive loss:

$$ \mathcal{L}(\theta) = \sum_{(x,y) \in S} \|g_{\theta}(x) - a(y)\|^2 \qquad (9.4) $$

or a cross-entropy loss in a transformed space:

$$ \mathcal{L}(\theta) = - \sum_{(x,y) \in S} \log \frac{e^{\phi(g_{\theta}(x), a(y))}}{\sum_{y' \in S} e^{\phi(g_{\theta}(x'), a(y'))}} \qquad (9.5) $$

where $\phi$ is a similarity measure, often a bilinear transformation:

$$ \phi(g(x), a(y)) = g(x)^T W a(y) \qquad (9.6) $$

for some learned weight matrix $W$. Generalization to unseen classes depends on the structure of the semantic space, typically constructed using linguistic embeddings (e.g., Word2Vec, GloVe) or manually defined attribute vectors. The effectiveness of ZSL hinges on the assumption that semantic relationships transfer across classes, which can be formalized through a probabilistic model:

$$ P(y|x) \propto P(x|a(y))P(a(y)) \qquad (9.7) $$

where $P(x|a(y))$ is modeled via a generative process:

$$ P(x|a(y)) = \int P(x|z)P(z|a(y))dz \qquad (9.8) $$

with $z$ representing latent features shared across seen and unseen classes. Variational inference is commonly employed to approximate this integral, leading to an evidence lower bound (ELBO):

$$ \log P(x|a(y)) \geq \mathbb{E}_{q(z|x)}[\log P(x|z)] - D_{\text{KL}}(q(z|x)\|P(z|x)) \qquad (9.9) $$

where $q(z|x)$ is an inference network. Zero-shot learning can also be formulated through a linear mapping $W$ such that:

$$ g(x) = Wf(x) \qquad (9.10) $$

where $f(x)$ is a feature extractor (e.g., a deep CNN), and $W$ aligns it with the semantic space. This leads to a ridge regression formulation:

$$ W^* = \arg \min_W \sum_{(x,y) \in S} \|Wf(x) - a(y)\|^2 + \lambda \|W\|^2 \qquad (9.11) $$

solvable via the closed-form solution:

$$ W^* = AF^T(FF^T + \lambda I)^{-1} \qquad (9.12) $$
where A is the matrix of attribute vectors and F is the matrix of extracted features. The zero-shot classification task then reduces to:

$$ \hat{y} = \arg \max_{y \in U} g(x')^T a(y) \qquad (9.13) $$

which assigns the test instance to the nearest class in the semantic space. Generalized zero-shot learning (GZSL) extends this by allowing both seen and unseen classes at test time, requiring a calibrated compatibility function:

$$ \hat{y} = \arg \max_{y \in S \cup U} [g(x')^T a(y) - \gamma \mathbb{I}(y \in S)] \qquad (9.14) $$

where $\gamma$ controls the bias toward seen classes. The choice of semantic space and feature extractor significantly affects performance, as different embedding choices induce different generalization behaviors. Alternative formulations include energy-based models:

$$ E(x, y) = g(x)^T W a(y) + b_y \qquad (9.15) $$

trained via hinge loss:

$$ \mathcal{L} = \sum_{(x,y) \in S} \sum_{y' \neq y} \max(0, 1 - E(x, y) + E(x, y')) \qquad (9.16) $$

or meta-learning approaches that define a task-specific adaptation function:

$$ \theta' = \theta - \alpha \nabla_{\theta} \mathcal{L}_{\text{meta}}(X_{\text{train}}, Y_{\text{train}}) \qquad (9.17) $$

to optimize generalization. These diverse formulations illustrate the intricate mathematical foundation of zero-shot learning, where the interplay between feature extraction, semantic embedding, and transfer mechanisms defines the success of the model in recognizing previously unseen categories.

## 9.3 Energy-based models for Zero-Shot Learning

Energy-based models (EBMs) for zero-shot learning (ZSL) provide a mathematically rigorous framework for learning representations that generalize beyond seen categories by modeling the compatibility between data samples and their semantic attributes. The core principle of EBMs in ZSL is the minimization of an energy function $E(x, y)$, which defines a measure of compatibility between an input sample $x$ and a class label $y$. This function is designed such that correct pairings of $(x, y)$ have lower energy values compared to incorrect pairings. The probability of assigning $x$ to class $y$ is given by the Boltzmann distribution:

$$ P(y|x) = \frac{\exp(-E(x, y))}{\sum_{y'} \exp(-E(x, y'))} \qquad (9.18) $$

where the denominator represents the partition function, ensuring normalization across all possible class labels. This formulation enforces a probabilistic interpretation of the energy function, ensuring that samples are more likely assigned to classes with lower energy. In zero-shot learning, the fundamental challenge is to extend knowledge to unseen classes using auxiliary information, often in the form of semantic embeddings $a(y)$, which encode prior knowledge about each class $y$. The energy function is typically parameterized as a compatibility function between the input $x$ and the semantic representation $a(y)$, formulated as

$$ E(x, y) = -f(x)^T W a(y) \qquad (9.19) $$
where $f(x)$ is a feature extractor mapping $x$ into a latent space, and $W$ is a learnable weight matrix. The objective function is constructed to minimize the energy for correct class-attribute associations while maximizing it for incorrect ones. A contrastive loss is often used to enforce this property:

$$ \mathcal{L} = \sum_{(x,y)} \left[ E(x, y) + \log \sum_{y' \neq y} \exp(-E(x, y')) \right] \qquad (9.20) $$

which penalizes incorrect associations by ensuring the energy of the correct class $y$ is lower than all incorrect alternatives $y'$. To enhance generalization, additional regularization terms are often introduced. A common approach is the margin-based loss:

$$ \mathcal{L}_{\text{margin}} = \sum_{(x,y)} \sum_{y' \neq y} \max(0, \Delta + E(x, y) - E(x, y')) \qquad (9.21) $$

where $\Delta$ is a margin enforcing separation between correct and incorrect classes. This formulation ensures robustness against overfitting to seen classes and enables transfer to unseen classes. To improve stability, energy-based models often employ gradient-based optimization strategies, leveraging backpropagation to refine $W$, $f(x)$, and other parameters. The gradients are computed as

$$ \frac{\partial \mathcal{L}}{\partial W} = \sum_{(x,y)} \left[ \frac{\partial E(x, y)}{\partial W} - \sum_{y'} P(y'|x) \frac{\partial E(x, y')}{\partial W} \right] \qquad (9.22) $$

$$ \frac{\partial \mathcal{L}}{\partial f(x)} = \sum_{(x,y)} \left[ \frac{\partial E(x, y)}{\partial f(x)} - \sum_{y'} P(y'|x) \frac{\partial E(x, y')}{\partial f(x)} \right] \qquad (9.23) $$

where the expectation over incorrect classes ensures optimization is guided towards reducing energy for true class-attribute associations. A crucial aspect of EBMs in ZSL is the use of generative constraints, where the model is regularized using a reconstruction loss to ensure feature consistency across seen and unseen categories. A common approach involves a variational autoencoder (VAE)-based loss:

$$ \mathcal{L}_{\text{VAE}} = \mathbb{E}_{q(z|x)} [-E(x, y) + \lambda D_{\text{KL}}(q(z|x) \parallel p(z))] \qquad (9.24) $$

where $q(z|x)$ is an approximate posterior, and $p(z)$ is a prior distribution. This enforces meaningful latent representations for generalization to unseen classes. To further refine the learned embeddings, contrastive self-supervised techniques can be integrated. The contrastive learning loss is defined as

$$ \mathcal{L}_{\text{contrastive}} = \sum_{x_i, x_j \sim \mathcal{P}(x)} - \log \frac{\exp(E(x_i, x_j)/\tau)}{\sum_{x_k} \exp(E(x_i, x_k)/\tau)} \qquad (9.25) $$

where $\tau$ is a temperature parameter and $\mathcal{P}(x)$ is a positive sample pair distribution. This regularization aligns semantically similar instances, ensuring the energy function learns robust and transferable representations. The inference stage in zero-shot learning using EBMs involves solving an optimization problem to assign a query sample $x$ to the class $y$ that minimizes the energy function:

$$ \hat{y} = \arg \min_{y} E(x, y) \qquad (9.26) $$

where $E(x, y)$ is evaluated for both seen and unseen classes. Since the energy function is trained using both contrastive and probabilistic constraints, it generalizes effectively to novel categories. In summary, EBMs for ZSL leverage compatibility functions, contrastive constraints, and probabilistic formulations to ensure robust zero-shot generalization. The interplay between energy minimization, semantic embeddings, and self-supervised learning techniques provides a mathematically rigorous approach for knowledge transfer across seen and unseen categories.
### 9.3.1 Various Loss function used in Energy-based models for Zero-Shot Learning

Contrastive loss in Energy-based Models (EBMs) for Zero-Shot Learning (ZSL) is designed to ensure that embeddings of similar instances are brought closer together, while embeddings of dissimilar instances are pushed apart. Given a set of input-label pairs $(x, y)$, the energy function $E(x, y)$ is minimized for correct pairs and maximized for incorrect ones. The contrastive loss function can be formulated as

$$ \mathcal{L}_{\text{contrastive}} = \sum_{(x,y)} \left[ \mathbb{I}(y = y^{+}) E(x, y^{+}) + \mathbb{I}(y \neq y^{+}) \max(0, m - E(x, y^{-})) \right] \quad (9.27) $$

where $y^+$ represents the true label, $y^-$ represents a negative label, $\mathbb{I}(\cdot)$ is an indicator function, and $m$ is a margin parameter ensuring sufficient separation between positive and negative pairs. The energy function $E(x, y)$ is typically parameterized using neural networks and optimized via stochastic gradient descent. The gradient updates follow

$$ \nabla_{\theta} \mathcal{L}_{\text{contrastive}} = \sum_{(x,y)} \left[ \mathbb{I}(y = y^{+}) \nabla_{\theta} E(x, y^{+}) - \mathbb{I}(y \neq y^{+}) \nabla_{\theta} \max(0, m - E(x, y^{-})) \right]. \quad (9.28) $$

Margin-based loss extends the contrastive loss by enforcing a stricter separation criterion between positive and negative pairs. The loss function is

$$ \mathcal{L}_{\text{margin}} = \sum_{(x,y)} \left[ E(x, y^{+}) - E(x, y^{-}) + m \right]_{+} \quad (9.29) $$

where $[z]_+ = \max(0, z)$ ensures non-negative loss contributions. This formulation encourages $E(x, y^+)$ to be strictly lower than $E(x, y^-)$ by at least margin $m$. The gradient computation follows

$$ \nabla_{\theta} \mathcal{L}_{\text{margin}} = \sum_{(x,y)} \mathbb{I}(E(x, y^{-}) - E(x, y^{+}) < m) \left[ \nabla_{\theta} E(x, y^{+}) - \nabla_{\theta} E(x, y^{-}) \right]. \quad (9.30) $$

Variational Autoencoder (VAE)-based loss introduces probabilistic modeling into EBMs for ZSL by defining a latent variable $z$ that captures the underlying structure of the data. The energy function is parameterized as

$$ E(x, y, z) = - \log p(x|z) - \log p(z|y) - \log p(y). \quad (9.31) $$

The VAE-based loss is the negative Evidence Lower Bound (ELBO), given by

$$ \mathcal{L}_{\text{VAE}} = \mathbb{E}_{q(z|x)} [E(x, y, z)] - D_{\text{KL}}(q(z|x) \| p(z|y)), \quad (9.32) $$

where $q(z|x)$ is the approximate posterior, $p(z|y)$ is the prior, and $D_{\text{KL}}$ denotes the Kullback-Leibler divergence. The gradient updates for training involve

$$ \nabla_{\theta} \mathcal{L}_{\text{VAE}} = \mathbb{E}_{q(z|x)} [\nabla_{\theta} E(x, y, z)] - \nabla_{\theta} D_{\text{KL}}(q(z|x) \| p(z|y)). \quad (9.33) $$

Contrastive learning loss in EBMs for ZSL builds upon the contrastive framework by explicitly constructing positive and negative pairs in an embedding space where similarity is measured. A common formulation is the InfoNCE loss

$$ \mathcal{L}_{\text{contrastive learning}} = - \mathbb{E}_{(x,y)} \log \frac{\exp(-E(x, y))}{\sum_{y' \in \mathcal{Y}} \exp(-E(x, y'))}. \quad (9.34) $$

This formulation ensures that the energy of the correct label $E(x, y)$ is minimized while normalizing across all possible labels. The corresponding gradient updates are

$$ \nabla_{\theta} \mathcal{L}_{\text{contrastive learning}} = \mathbb{E}_{(x,y)} \left[ \nabla_{\theta} E(x, y) - \sum_{y' \in \mathcal{Y}} p(y'|x) \nabla_{\theta} E(x, y') \right], \quad (9.35) $$

where $p(y'|x)$ is the probability of a label under the energy model. Each of these loss functions plays a crucial role in shaping the energy landscape for Zero-Shot Learning, ensuring effective generalization to unseen classes.
### 9.3.2 Generative constraints in Energy-based models for Zero-Shot Learning

Generative constraints in energy-based models (EBMs) for zero-shot learning (ZSL) fundamentally stem from the principle of defining an energy landscape that enforces semantic compatibility between seen and unseen classes while maintaining representational fidelity to underlying data distributions. Given a dataset $\mathcal{D} = \{(x_i, y_i)\}_{i=1}^N$, where $x_i \in \mathbb{R}^d$ represents input features and $y_i \in \mathcal{Y}_S$ belongs to the set of seen classes, the primary objective is to infer meaningful representations for an unseen class set $\mathcal{Y}_U$, such that $\mathcal{Y}_S \cap \mathcal{Y}_U = \emptyset$. The generative constraints in EBMs introduce an energy function $E(x, y; \theta)$, parameterized by $\theta$, that assigns low energy to compatible $(x, y)$ pairs and high energy to incompatible ones, ensuring that the generative structure generalizes across class distributions.

$$E(x, y; \theta) = -f_{\theta}(x)^{\top} g_{\theta}(y), \qquad (9.36)$$

where $f_{\theta}(x)$ is the feature extractor mapping inputs to an embedding space, and $g_{\theta}(y)$ is the semantic mapping function capturing class-level knowledge. Zero-shot generalization is imposed via a generative constraint that enforces energy-based regularization between seen and unseen class distributions, expressed as

$$\mathbb{E}_{(x,y)\sim p_S(x,y)}[E(x, y; \theta)] \approx \mathbb{E}_{(x,y)\sim p_U(x,y)}[E(x, y; \theta)], \qquad (9.37)$$

where $p_S(x, y)$ and $p_U(x, y)$ are the joint distributions over seen and unseen data, respectively. This constraint ensures that the energy landscape maintains generalizability by aligning unseen class embeddings with seen class statistics. The generative constraints can be explicitly incorporated via an adversarial loss term that minimizes the Kullback-Leibler (KL) divergence between seen and unseen class distributions in the latent space:

$$\mathcal{L}_{\text{gen}} = D_{\text{KL}}(p_U(z)\|p_S(z)), \qquad (9.38)$$

where $z = f_{\theta}(x)$ represents the latent feature encoding. Since direct estimation of $p_U(z)$ is intractable, it is typically approximated using a generative model $q_{\phi}(z|y)$, leading to the variational formulation:

$$\mathcal{L}_{\text{gen}} = \mathbb{E}_{y \sim p_U(y)} \left[ \mathbb{E}_{z \sim q_{\phi}(z|y)} \log \frac{q_{\phi}(z|y)}{p_S(z)} \right]. \qquad (9.39)$$

This enforces a shared latent space between seen and unseen distributions, facilitating knowledge transfer in a generative manner. A key generative constraint in EBMs is the entropy-based regularization, which ensures that the energy landscape does not collapse into degenerate solutions. The entropy of the conditional distribution $p(y|x; \theta) \propto e^{-E(x,y;\theta)}$ is maximized via

$$\mathcal{L}_{\text{entropy}} = -\mathbb{E}_{p(x)} \sum_{y} p(y|x; \theta) \log p(y|x; \theta), \qquad (9.40)$$

which prevents the model from overfitting to seen classes by enforcing a smooth energy manifold. This is further complemented by a contrastive loss enforcing inter-class separability:

$$\mathcal{L}_{\text{contrast}} = \mathbb{E}_{(x,y)\sim p_S(x,y)} \sum_{y' \neq y} e^{E(x,y';\theta) - E(x,y;\theta)}. \qquad (9.41)$$

Together, these constraints regularize the energy function such that the generative structure captures semantic transferability between seen and unseen categories. Another fundamental generative constraint involves aligning class prototypes with their corresponding semantic representations through a structural loss

$$\mathcal{L}_{\text{proto}} = \sum_{y \in \mathcal{Y}_S \cup \mathcal{Y}_U} \|g_{\theta}(y) - \mathbb{E}_{p(x|y)}[f_{\theta}(x)]\|^2. \qquad (9.42)$$
This ensures that the learned embeddings remain consistent with high-level class descriptions, enabling robust generalization to unseen categories. A further refinement of the generative constraint is the incorporation of a marginal energy regularization term, enforcing stability across variations in input perturbations:

$$ \mathcal{L}_{\text{marginal}} = \mathbb{E}_{(x,y)\sim p_S(x,y)} \left[ \max_{x' \sim \mathcal{B}(x)} (E(x', y; \theta) - E(x, y; \theta)) \right], \quad (9.43) $$

where $\mathcal{B}(x)$ denotes a local perturbation neighborhood of $x$. This encourages energy invariance within class-consistent transformations, further reinforcing generalization properties. Finally, the overall training objective for EBMs in zero-shot learning integrates the aforementioned generative constraints into a single optimization problem:

$$ \min_{\theta} \mathcal{L}_{\text{total}} = \mathcal{L}_{\text{contrast}} + \lambda_1 \mathcal{L}_{\text{gen}} + \lambda_2 \mathcal{L}_{\text{entropy}} + \lambda_3 \mathcal{L}_{\text{proto}} + \lambda_4 \mathcal{L}_{\text{marginal}}, \quad (9.44) $$

where $\lambda_1, \lambda_2, \lambda_3$, and $\lambda_4$ are hyperparameters balancing the contributions of different generative constraints. This structured formulation ensures that the learned energy function captures meaningful relationships across both seen and unseen classes, enabling zero-shot generalization through robust energy-based generative modeling.

### 9.3.3 Use of Inference in Energy-based models for Zero-Shot Learning

Energy-based models (EBMs) provide a principled framework for zero-shot learning (ZSL) by defining a scalar energy function $E(x, y)$ that assigns compatibility scores to input data samples $x$ and output labels $y$. The core idea of inference in energy-based models for zero-shot learning is to leverage a structured energy landscape that captures semantic relationships between seen and unseen classes. This enables generalization to novel classes without requiring explicit training examples for them. The inference process is governed by the minimization of energy functions that encode both data likelihood and constraints imposed by semantic knowledge transfer mechanisms.

Mathematically, given a dataset $\mathcal{D} = \{(x_i, y_i)\}_{i=1}^N$ consisting of training examples with inputs $x_i \in \mathcal{X}$ and their corresponding class labels $y_i \in \mathcal{Y}_{\text{seen}}$, the goal of zero-shot inference is to predict labels $y^* \in \mathcal{Y}_{\text{unseen}}$ for new inputs. The energy function is typically defined as

$$ E(x, y) = -f_{\theta}(x, y) \quad (9.45) $$

where $f_{\theta}(x, y)$ is a learnable compatibility function parameterized by $\theta$. Inference in EBMs for ZSL is performed by solving the minimization problem

$$ y^* = \arg \min_{y \in \mathcal{Y}_{\text{unseen}}} E(x, y). \quad (9.46) $$

The energy function is often decomposed into different terms capturing multiple constraints, such as semantic consistency, visual-semantic alignment, and regularization. A common formulation incorporates a bilinear compatibility function between input feature representations $\phi(x)$ and class embeddings $\psi(y)$:

$$ E(x, y) = -\phi(x)^T W \psi(y), \quad (9.47) $$

where $W$ is a learnable weight matrix encoding the mapping between the visual and semantic spaces. The inference process then reduces to

$$ y^* = \arg \max_{y \in \mathcal{Y}_{\text{unseen}}} \phi(x)^T W \psi(y). \quad (9.48) $$

Energy minimization for inference can also be formulated as a probabilistic model using the Boltzmann distribution:

$$ P(y|x) = \frac{\exp(-E(x, y))}{\sum_{y' \in \mathcal{Y}} \exp(-E(x, y'))}. \quad (9.49) $$
Inference corresponds to maximum a posteriori (MAP) estimation:

$$y^* = \arg \max_{y \in \mathcal{Y}_{\text{unseen}}} P(y|x). \qquad (9.50)$$

One approach to improve inference performance in ZSL is to introduce additional constraints through a margin-based ranking loss:

$$\sum_{(x,y) \in \mathcal{D}} \sum_{y' \neq y} \max(0, E(x, y) - E(x, y') + \Delta), \qquad (9.51)$$

where $\Delta$ is a margin parameter ensuring that the correct label has a lower energy than incorrect ones. In scenarios where inference involves generative modeling, energy-based models can be coupled with contrastive divergence training. The gradient of the energy function with respect to the input features provides a principled way to update representations:

$$\frac{\partial E(x, y)}{\partial x} = -\frac{\partial f_{\theta}(x, y)}{\partial x}. \qquad (9.52)$$

By leveraging learned semantic embeddings, energy minimization enables inference even in the absence of explicit training data for unseen categories. The effectiveness of energy-based models for zero-shot learning thus fundamentally relies on the quality of the learned energy landscape, ensuring smooth generalization from seen to unseen classes through structured energy minimization.

## 9.4 Meta-learning approaches for Zero-Shot Learning

Meta-learning approaches for zero-shot learning (ZSL) are fundamentally based on the principle of learning to learn, where a model is trained on a set of tasks such that it can generalize to novel tasks it has never encountered before. The primary challenge in zero-shot learning lies in the fact that during inference, the model must classify data samples from categories that were not seen during training. Meta-learning addresses this challenge by acquiring transferable knowledge that allows for rapid adaptation to new categories using minimal additional information. Let $\mathcal{X}$ denote the input space and $\mathcal{Y}$ the label space. Given a training set $\mathcal{D}_{\text{train}} = \{(\mathbf{x}_i, y_i)\}_{i=1}^{N_{\text{train}}}$, where $\mathbf{x}_i \in \mathcal{X}$ and $y_i \in \mathcal{Y}_{\text{train}}$, the objective in zero-shot learning is to classify a test sample $\mathbf{x}^*$ into one of the unseen categories $\mathcal{Y}_{\text{test}}$, such that $\mathcal{Y}_{\text{train}} \cap \mathcal{Y}_{\text{test}} = \emptyset$.

Meta-learning operates by optimizing a function $f_{\theta}$ parameterized by $\theta$ such that it minimizes an expected loss over a distribution of tasks. Each task $\mathcal{T}_i$ is drawn from a distribution $p(\mathcal{T})$, where a task consists of a small support set $S_i = \{(\mathbf{x}_j, y_j)\}_{j=1}^k$ and a query set $Q_i = \{(\mathbf{x}_j, y_j)\}_{j=1}^m$. The meta-objective is to minimize the expected loss over all tasks:

$$\mathbb{E}_{\mathcal{T} \sim p(\mathcal{T})} [\mathcal{L}(f_{\theta}, S, Q)] . \qquad (9.53)$$

A common meta-learning paradigm is the Model-Agnostic Meta-Learning (MAML) approach, which seeks to find an initial set of parameters $\theta$ such that fine-tuning on a new task requires minimal adaptation. Given a task $\mathcal{T}_i$ with support set $S_i$, MAML updates $\theta$ using one or more gradient descent steps:

$$\theta'_{i} = \theta - \alpha \nabla_{\theta} \mathcal{L}_{\mathcal{T}_{i}}(f_{\theta}), \qquad (9.54)$$

where $\alpha$ is the learning rate. The meta-update then optimizes $\theta$ by minimizing the loss over query samples after adaptation:

$$\theta \leftarrow \theta - \beta \sum_{\mathcal{T}_i} \nabla_{\theta} \mathcal{L}_{\mathcal{T}_i}(f_{\theta'_i}), \qquad (9.55)$$

where $\beta$ is the meta-learning rate. Another approach is the meta-embedding strategy, where feature representations are learned to generalize across tasks. Let $\phi(\mathbf{x}; \theta)$ denote an embedding function
mapping inputs to a latent space $\mathbb{R}^d$. The objective is to learn an embedding that maintains a consistent similarity structure across both seen and unseen categories. The compatibility function $F(\mathbf{x}, y; \theta)$ is often modeled as a bilinear compatibility function:

$$F(\mathbf{x}, y) = \phi(\mathbf{x}; \theta)^T W \psi(y), \qquad (9.56)$$

where $\psi(y)$ is a semantic embedding of label $y$, and $W$ is a learned transformation matrix. The model is trained to maximize the compatibility of correct pairs while minimizing that of incorrect pairs, often using a ranking loss:

$$\mathcal{L} = \sum_i \sum_{j \neq i} \max(0, \gamma - F(\mathbf{x}_i, y_i) + F(\mathbf{x}_i, y_j)), \qquad (9.57)$$

where $\gamma$ is a margin hyperparameter. Prototypical networks leverage metric-based meta-learning to learn a space where samples from the same class cluster together. Given a support set $S = \{(\mathbf{x}_i, y_i)\}$, the prototype for class $c$ is computed as the mean embedding of its examples:

$$\mathbf{p}_c = \frac{1}{|S_c|} \sum_{\mathbf{x}_i \in S_c} \phi(\mathbf{x}_i; \theta). \qquad (9.58)$$

A query sample $\mathbf{x}^*$ is classified by computing a distance metric, commonly the squared Euclidean distance:

$$p(y = c | \mathbf{x}^*) = \frac{\exp(-d(\phi(\mathbf{x}^*; \theta), \mathbf{p}_c))}{\sum_{c'} \exp(-d(\phi(\mathbf{x}^*; \theta), \mathbf{p}_{c'}))}. \qquad (9.59)$$

Graph-based meta-learning frameworks construct a graph $G = (V, E)$ where nodes represent categories, and edges encode semantic or structural relationships. Given a graph convolutional network (GCN) with adjacency matrix $A$ and feature matrix $X$, the node embeddings are computed iteratively as:

$$H^{(l+1)} = \sigma(AH^{(l)}W^{(l)}), \qquad (9.60)$$

where $W^{(l)}$ are layer-specific learnable parameters and $\sigma$ is a non-linearity. The final node embeddings serve as classifiers for unseen categories. Bayesian meta-learning introduces uncertainty quantification by modeling the parameters as distributions rather than point estimates. Let $\theta \sim p(\theta)$ be a prior distribution over parameters. The posterior is computed using Bayes' rule:

$$p(\theta|\mathcal{D}) = \frac{p(\mathcal{D}|\theta)p(\theta)}{p(\mathcal{D})}. \qquad (9.61)$$

Inference is performed by marginalizing over the posterior:

$$p(y^*|\mathbf{x}^*, \mathcal{D}) = \int p(y^*|\mathbf{x}^*, \theta)p(\theta|\mathcal{D})d\theta. \qquad (9.62)$$

Approximate inference methods such as variational Bayes or Monte Carlo sampling are used to estimate the integral. Each of these approaches forms the foundation of meta-learning in zero-shot learning, providing a mechanism to generalize across unseen categories using transferable knowledge.

### 9.4.1 Model-Agnostic Meta-Learning (MAML)

Model-Agnostic Meta-Learning (MAML) is a meta-learning algorithm designed to enable fast adaptation of a model to new tasks with minimal training data. The core idea behind MAML is to learn an initial set of parameters $\theta$ that serve as a good starting point for fine-tuning on new tasks using only a few gradient steps. This is particularly useful for zero-shot learning, where a model must generalize to unseen tasks without explicit training on them. Given a distribution over tasks $p(\mathcal{T})$,
each task $\mathcal{T}_i$ consists of a dataset $\mathcal{D}_i = \{(x_{i,j}, y_{i,j})\}_{j=1}^N$. The goal is to find an initialization $\theta$ that minimizes the expected loss across all tasks after adaptation. Formally, the optimization problem can be written as

$$ \min_{\theta} \mathbb{E}_{\mathcal{T} \sim p(\mathcal{T})} [\mathcal{L}_{\mathcal{T}}(U(\theta, \mathcal{T}))] \qquad (9.63) $$

where $U(\theta, \mathcal{T})$ represents the model parameters after adaptation on task $\mathcal{T}$. In the standard supervised learning setting, given a task-specific loss function $\mathcal{L}_{\mathcal{T}}(\theta)$, the adaptation process involves performing one or more gradient descent steps with respect to this loss function. The adapted parameters for task $\mathcal{T}_i$ after one step of gradient descent are

$$ \theta'_{i} = \theta - \alpha \nabla_{\theta} \mathcal{L}_{\mathcal{T}_i}(\theta) \qquad (9.64) $$

where $\alpha$ is the learning rate. The meta-objective is then formulated as

$$ \min_{\theta} \sum_{i} \mathcal{L}_{\mathcal{T}_i}(\theta'_{i}) \qquad (9.65) $$

which involves optimizing the initial parameters $\theta$ to ensure that the adapted parameters $\theta'_{i}$ yield low loss across tasks. This optimization is performed using gradient descent, leading to a second-order gradient update of the form

$$ \theta \leftarrow \theta - \beta \sum_{i} \nabla_{\theta} \mathcal{L}_{\mathcal{T}_i}(\theta - \alpha \nabla_{\theta} \mathcal{L}_{\mathcal{T}_i}(\theta)) \qquad (9.66) $$

where $\beta$ is the meta-learning rate. The second-order term in this update makes MAML computationally expensive, but it allows for more expressive updates. In zero-shot learning, where the model must generalize to tasks without direct exposure to them during meta-training, the effectiveness of MAML is attributed to its ability to produce an initialization that is inherently generalizable. Specifically, if the task distribution $p(\mathcal{T})$ is designed such that the training tasks span a diverse range of possible learning scenarios, then the learned initialization can generalize to unseen tasks by leveraging a smooth loss landscape across task variations. Mathematically, this can be expressed as minimizing the expected task-generalization error

$$ \min_{\theta} \mathbb{E}_{\mathcal{T} \sim p(\mathcal{T})} [\mathbb{E}_{\mathcal{T}' \sim p_{\text{test}}(\mathcal{T}')} \mathcal{L}_{\mathcal{T}'}(U(\theta, \mathcal{T}))] \qquad (9.67) $$

where $p_{\text{test}}(\mathcal{T}')$ represents the distribution over unseen tasks. To approximate this expectation, a common strategy is to incorporate a regularization term that promotes smooth adaptation across task variations, yielding the regularized meta-objective

$$ \min_{\theta} \sum_{i} \mathcal{L}_{\mathcal{T}_i}(\theta'_{i}) + \lambda R(\theta) \qquad (9.68) $$

where $R(\theta)$ is a regularization function that penalizes large gradients or promotes parameter smoothness, and $\lambda$ controls the strength of this regularization. The zero-shot capability of MAML can be further improved by explicitly optimizing for robustness in the presence of distribution shifts. This can be achieved by modifying the meta-objective to incorporate an adversarial worst-case term

$$ \min_{\theta} \max_{\mathcal{T}' \sim p_{\text{adv}}(\mathcal{T}')} \mathcal{L}_{\mathcal{T}'}(U(\theta, \mathcal{T})) \qquad (9.69) $$

where $p_{\text{adv}}(\mathcal{T}')$ represents an adversarially chosen distribution over test tasks. This leads to a minimax optimization problem, ensuring that the learned initialization is robust to extreme variations in task distributions. Additionally, when applied to function approximation problems such as few-shot regression or reinforcement learning, MAML can be interpreted as an implicit form of hierarchical Bayesian inference. In this interpretation, the meta-learned parameters $\theta$ serve as
a prior, and task-specific fine-tuning corresponds to a Bayesian posterior update. This perspective connects MAML with variational inference methods, where the meta-learning process can be rewritten as optimizing the evidence lower bound (ELBO)

$$ \max_{\theta} \mathbb{E}_{\mathcal{T} \sim p(\mathcal{T})} \left[ \log p_{\mathcal{T}}(\mathcal{D}|\theta) - D_{\text{KL}}(q_{\mathcal{T}}(\theta') \| p(\theta)) \right] \quad (9.70) $$

where $q_{\mathcal{T}}(\theta')$ represents the posterior distribution over task-specific parameters and $p(\theta)$ is the learned meta-prior. The KL-divergence term $D_{\text{KL}}$ enforces consistency between the meta-learned initialization and the task-specific updates.

## 9.4.2 Meta-embedding strategy

The meta-embedding strategy for zero-shot learning (ZSL) fundamentally relies on constructing an optimal embedding space where the semantic representations of seen and unseen classes align with feature representations derived from visual or textual modalities. Mathematically, given a set of seen class-label pairs $\{(x_i, y_i)\}_{i=1}^N$, where $x_i \in \mathbb{R}^d$ represents the feature vector extracted from an image (e.g., using a deep convolutional neural network), and $y_i \in \mathcal{Y}_{\text{seen}}$ is the corresponding class label, the objective is to learn a function $f: \mathbb{R}^d \to \mathbb{R}^m$ that maps feature representations to a semantic space where class relationships are preserved. The challenge is to generalize this function to a set of unseen class labels $\mathcal{Y}_{\text{unseen}}$, such that for an unseen sample $x_u$, its embedding $f(x_u)$ aligns closely with the corresponding semantic representation of its true class label.

To achieve this, a semantic embedding space $S \in \mathbb{R}^m$ is constructed, where each class $c$ (both seen and unseen) is represented by a prototype vector $s_c \in \mathbb{R}^m$. The embeddings are often derived from textual descriptions (e.g., word vectors, attribute annotations) and must be aligned with the visual space. This alignment is achieved by learning a compatibility function $\mathcal{F}: \mathbb{R}^d \times \mathbb{R}^m \to \mathbb{R}$ that quantifies the compatibility between an input feature vector $x$ and a class prototype $s_c$. One common choice for $\mathcal{F}$ is a bilinear compatibility function:

$$ \mathcal{F}(x, s_c) = x^T W s_c \quad (9.71) $$

where $W \in \mathbb{R}^{d \times m}$ is a learnable transformation matrix. The objective function for training is then given by a ranking loss that enforces the correct pair $(x, s_y)$ to have a higher compatibility score than incorrect class pairs:

$$ \sum_{i=1}^{N} \sum_{c \neq y_i} \max (0, \gamma - \mathcal{F}(x_i, s_{y_i}) + \mathcal{F}(x_i, s_c)) \quad (9.72) $$

where $\gamma$ is a margin parameter ensuring separation between correct and incorrect matches. To enable generalization to unseen classes, meta-embedding strategies are introduced, where a meta-learned function $\mathcal{G}$ constructs a class prototype dynamically:

$$ s_c = \mathcal{G}(z_c) \quad (9.73) $$

where $z_c$ is a raw class descriptor (e.g., word embeddings, attribute vectors) and $\mathcal{G}$ is a neural network that transforms $z_c$ into a semantically meaningful embedding. The training objective extends to minimizing the discrepancy between predicted and actual prototypes:

$$ \min_{\mathcal{G}} \sum_{c \in \mathcal{Y}_{\text{seen}}} \|\mathcal{G}(z_c) - s_c\|^2 \quad (9.74) $$

so that for unseen classes, $s_c = \mathcal{G}(z_c)$ provides a meaningful representation. This ensures that when an unseen instance $x_u$ is projected into the space, the classification decision:

$$ \hat{y} = \arg \max_{c \in \mathcal{Y}_{\text{unseen}}} \mathcal{F}(x_u, s_c) \quad (9.75) $$
is based on learned semantic relationships rather than direct supervision. Additionally, variational methods can be employed to refine embeddings by incorporating uncertainty estimation via a probabilistic latent space:

$$p(s_c|z_c) = \mathcal{N}(\mu_G(z_c), \Sigma_G(z_c)) \qquad (9.76)$$

where $\mu_G(z_c)$ and $\Sigma_G(z_c)$ are the mean and covariance functions modeled via neural networks. The overall loss function then includes a Kullback-Leibler (KL) divergence term to regularize the learned distributions:

$$\mathcal{L} = \sum_{c \in \mathcal{Y}_{\text{seen}}} \|s_c - \mu_G(z_c)\|^2 + \lambda \sum_{c \in \mathcal{Y}_{\text{seen}}} D_{\text{KL}}(p(s_c|z_c)\|\mathcal{N}(0, I)) \qquad (9.77)$$

where $\lambda$ is a regularization parameter. By integrating these techniques, meta-embedding strategies provide a robust and scalable approach for zero-shot learning, ensuring that unseen class representations align meaningfully with visual features.

### 9.4.3 Metric-based meta-learning

Metric-based meta-learning for Zero-Shot Learning (ZSL) is fundamentally rooted in the concept of learning a function that embeds data points into a space where semantic similarities are preserved, facilitating knowledge transfer from seen to unseen classes. Let $\mathcal{X}$ denote the input space, $\mathcal{Y}$ the label space, and $\mathcal{S} = \{(\mathbf{x}_i, y_i)\}_{i=1}^{N_s}$ be the training set, where $y_i \in \mathcal{Y}_s$, the set of seen class labels. The goal is to learn a function $f: \mathcal{X} \to \mathbb{R}^d$ that maps input instances into an embedding space where classification is performed based on distances to class prototypes, enabling generalization to an unseen class set $\mathcal{Y}_u$ without direct training data.

The embedding function $f(\mathbf{x})$ is parameterized as a deep neural network that learns a transformation from the raw input space to a metric space with a well-defined distance function $d: \mathbb{R}^d \times \mathbb{R}^d \to \mathbb{R}$. One commonly employed distance function is the squared Euclidean distance:

$$d(\mathbf{z}_i, \mathbf{z}_j) = \|\mathbf{z}_i - \mathbf{z}_j\|_2^2 \qquad (9.78)$$

where $\mathbf{z}_i = f(\mathbf{x}_i)$ and $\mathbf{z}_j = f(\mathbf{x}_j)$. Alternatively, cosine similarity is often used for improved generalization:

$$d_{\cos}(\mathbf{z}_i, \mathbf{z}_j) = 1 - \frac{\mathbf{z}_i^\top \mathbf{z}_j}{\|\mathbf{z}_i\| \|\mathbf{z}_j\|} \qquad (9.79)$$

A central component of metric-based meta-learning is the construction of prototypes $\mathbf{c}_y$ for each class, which serve as the representative embeddings for classification. The prototype of a class $y$ is computed as the mean embedding of all support examples belonging to that class:

$$\mathbf{c}_y = \frac{1}{|S_y|} \sum_{(\mathbf{x}_i, y_i) \in S_y} f(\mathbf{x}_i) \qquad (9.80)$$

where $S_y$ is the set of all training instances labeled as $y$. Given a query instance $\mathbf{x}_q$, its class assignment is determined by computing the distance to all class prototypes and selecting the closest one:

$$\hat{y}_q = \arg \min_{y \in \mathcal{Y}_s} d(f(\mathbf{x}_q), \mathbf{c}_y) \qquad (9.81)$$

In the meta-learning paradigm, training occurs episodically, where each episode simulates a ZSL scenario with a small support set $\mathcal{S}$ and a query set $\mathcal{Q}$. The meta-objective minimizes the classification loss over the query set using a nearest-prototype strategy:

$$\mathcal{L}_{\text{meta}} = \sum_{(\mathbf{x}_q, y_q) \in \mathcal{Q}} \ell(y_q, \hat{y}_q) \qquad (9.82)$$
where $\ell$ is typically the cross-entropy loss:

$$ \ell(y_q, \hat{y}_q) = - \log \frac{\exp(-d(f(\mathbf{x}_q), \mathbf{c}_{y_q}))}{\sum_{y' \in \mathcal{Y}_s} \exp(-d(f(\mathbf{x}_q), \mathbf{c}_{y'}))} \qquad (9.83) $$

To enable zero-shot generalization, semantic descriptions of unseen classes, represented as attribute vectors $\mathbf{a}_y \in \mathbb{R}^m$, guide prototype construction. Instead of computing class prototypes directly from samples, they are inferred via a mapping function $g : \mathbb{R}^m \to \mathbb{R}^d$ that aligns semantic and visual spaces:

$$ \mathbf{c}_y = g(\mathbf{a}_y) = W \mathbf{a}_y \qquad (9.84) $$

where $W \in \mathbb{R}^{d \times m}$ is a learnable transformation matrix. The classification decision for an unseen query sample then follows:

$$ \hat{y}_q = \arg \min_{y \in \mathcal{Y}_u} d(f(\mathbf{x}_q), g(\mathbf{a}_y)) \qquad (9.85) $$

Training involves optimizing $f$ and $W$ jointly using episodic meta-learning, ensuring that $f$ learns to generalize from seen to unseen classes by aligning feature embeddings with semantic representations. The meta-learning update follows:

$$ \theta \leftarrow \theta - \eta \nabla_{\theta} \mathcal{L}_{\text{meta}}, \quad W \leftarrow W - \eta \nabla_{W} \mathcal{L}_{\text{meta}} \qquad (9.86) $$

where $\theta$ denotes the parameters of the embedding function $f$, $\eta$ is the learning rate, and gradients are computed over multiple episodes. The effectiveness of metric-based meta-learning in ZSL is enhanced by incorporating contrastive loss:

$$ \mathcal{L}_{\text{contrastive}} = \sum_{i,j} y_{ij} d(\mathbf{z}_i, \mathbf{z}_j) + (1 - y_{ij}) \max(0, \tau - d(\mathbf{z}_i, \mathbf{z}_j)) \qquad (9.87) $$

where $y_{ij}$ is 1 if $\mathbf{x}_i$ and $\mathbf{x}_j$ belong to the same class, 0 otherwise, and $\tau$ is a margin parameter. This loss encourages similar instances to be closer while pushing dissimilar ones apart. Zero-shot generalization relies on the alignment between the semantic space and the learned metric space. Regularization techniques such as distribution calibration adjust the prototype computation by leveraging seen class distributions:

$$ \mathbf{c}_y = \lambda g(\mathbf{a}_y) + (1 - \lambda) \frac{1}{|\mathcal{N}_y|} \sum_{y' \in \mathcal{N}_y} \mathbf{c}_{y'} \qquad (9.88) $$

where $\mathcal{N}_y$ is a set of semantically similar seen classes to $y$, and $\lambda$ controls the balance between semantic projection and distribution calibration. By iteratively refining the metric space and semantic alignment, metric-based meta-learning enables effective zero-shot classification, where new classes are recognized based on learned semantic-visual correspondences without requiring additional samples. The integration of episodic training, prototype-based classification, contrastive learning, and semantic projection ensures that the learned model generalizes robustly to unseen categories.

### 9.4.4 Graph-based meta-learning

Graph-based meta-learning for zero-shot learning (ZSL) fundamentally relies on constructing a graph representation of semantic relationships between classes and leveraging meta-learning techniques to transfer knowledge from seen classes to unseen ones. Given a set of training classes $C_s$ and a set of unseen classes $C_u$ with $C_s \cap C_u = \emptyset$, the core idea is to embed both visual and semantic information into a structured graph $G = (V, E)$, where nodes $V$ represent class prototypes and edges $E$ encode relationships among them. The objective is to learn a function $f: \mathcal{X} \to \mathcal{Y}$ that can generalize to $C_u$ despite lacking direct visual training examples.
Let each class $c \in \mathcal{C} = \mathcal{C}_s \cup \mathcal{C}_u$ be represented by a feature vector $\mathbf{z}_c \in \mathbb{R}^d$, typically derived from word embeddings such as Word2Vec or GloVe. The task is to learn a classifier $g(\mathbf{x}) = \arg \max_c P(c|\mathbf{x})$, where $P(c|\mathbf{x})$ is the probability of an input sample $\mathbf{x}$ belonging to class $c$. The underlying principle of the graph-based approach is to propagate information across the graph structure using message passing frameworks such as Graph Neural Networks (GNNs). The node feature update at layer $t$ is given by

$$ \mathbf{h}_c^{(t)} = \sigma \left( \sum_{c' \in \mathcal{N}(c)} w_{cc'} \mathbf{W}^{(t)} \mathbf{h}_{c'}^{(t-1)} + \mathbf{b}^{(t)} \right) \qquad (9.89) $$

where $\mathbf{h}_c^{(t)}$ is the feature representation of class $c$ at layer $t$, $\mathcal{N}(c)$ denotes the neighboring classes, $w_{cc'}$ is an edge weight encoding semantic similarity between class $c$ and $c'$, and $\sigma$ is a nonlinear activation function such as ReLU. The parameters $\mathbf{W}^{(t)}$ and $\mathbf{b}^{(t)}$ are learned via backpropagation. To transfer knowledge, meta-learning is employed by training the model on a sequence of meta-tasks $\mathcal{T}_i = (S_i, Q_i)$, where $S_i$ is the support set and $Q_i$ is the query set. The meta-learning objective is to minimize the expected loss across tasks:

$$ \min_{\theta} \sum_{i} \mathbb{E}_{\mathcal{T}_i} [\mathcal{L}(g_{\theta}(S_i), Q_i)] \qquad (9.90) $$

where $g_{\theta}$ is the classifier parameterized by $\theta$ and $\mathcal{L}$ is the classification loss. The classifier is optimized via an episodic training strategy, which mimics the zero-shot setting by holding out certain classes during training. Specifically, we define a parameterized distance metric $d_{\phi}(\mathbf{x}, \mathbf{h}_c)$ for classification, such as cosine similarity

$$ d_{\phi}(\mathbf{x}, \mathbf{h}_c) = \frac{\mathbf{x}^T \mathbf{h}_c}{\|\mathbf{x}\| \|\mathbf{h}_c\|} \qquad (9.91) $$

or a Mahalanobis distance

$$ d_{\phi}(\mathbf{x}, \mathbf{h}_c) = (\mathbf{x} - \mathbf{h}_c)^T \mathbf{\Sigma}^{-1} (\mathbf{x} - \mathbf{h}_c) \qquad (9.92) $$

where $\mathbf{\Sigma}$ is a learned covariance matrix capturing intra-class variations. The final classification decision is made via a softmax layer

$$ P(c|\mathbf{x}) = \frac{\exp(d_{\phi}(\mathbf{x}, \mathbf{h}_c))}{\sum_{c' \in \mathcal{C}} \exp(d_{\phi}(\mathbf{x}, \mathbf{h}_{c'}))} \qquad (9.93) $$

To improve generalization to unseen classes, the model incorporates a regularization term based on the graph Laplacian $\mathbf{L} = \mathbf{D} - \mathbf{A}$, where $\mathbf{D}$ is the degree matrix and $\mathbf{A}$ is the adjacency matrix of the class graph. The regularization enforces smoothness in feature representations across the graph

$$ \mathcal{L}_{\text{reg}} = \sum_{c, c'} w_{cc'} \|\mathbf{h}_c - \mathbf{h}_{c'}\|^2 \qquad (9.94) $$

Thus, the final objective function combines classification loss and regularization

$$ \mathcal{L} = \sum_{i} \mathbb{E}_{\mathcal{T}_i} [\mathcal{L}_{\text{class}}(g_{\theta}(S_i), Q_i)] + \lambda \mathcal{L}_{\text{reg}} \qquad (9.95) $$

where $\lambda$ is a trade-off parameter. To refine embeddings, contrastive learning can be employed by defining a contrastive loss

$$ \mathcal{L}_{\text{contrast}} = - \sum_{(c, c^+)} \log \frac{\exp(d_{\phi}(\mathbf{h}_c, \mathbf{h}_{c^+}))}{\sum_{c' \in \mathcal{C}} \exp(d_{\phi}(\mathbf{h}_c, \mathbf{h}_{c'}))} \qquad (9.96) $$
where $(c, c^+)$ are semantically similar class pairs. The model is trained using stochastic gradient descent with updates

$$ \theta \leftarrow \theta - \eta \nabla_{\theta} \mathcal{L} \qquad (9.97) $$

where $\eta$ is the learning rate. The learned class representations are then used to classify unseen class samples by assigning them to the nearest prototype

$$ c^* = \arg \max_{c} P(c|\mathbf{x}) \qquad (9.98) $$

By leveraging the structured class graph, propagating knowledge through message passing, and optimizing via meta-learning, this approach enables robust zero-shot classification even when visual samples from unseen classes are unavailable.

### 9.4.5 Bayesian meta-learning

Bayesian meta-learning for zero-shot learning (ZSL) is fundamentally rooted in the probabilistic inference framework, where the goal is to infer the posterior distribution over tasks given a set of prior experiences. Let $\mathcal{T} = \{T_i\}_{i=1}^N$ denote a set of tasks, where each task $T_i$ consists of a dataset $D_i = \{(\mathbf{x}_{ij}, y_{ij})\}_{j=1}^{m_i}$, with $\mathbf{x}_{ij} \in \mathbb{R}^d$ being the input feature and $y_{ij}$ the corresponding label. The fundamental Bayesian formulation models the posterior over a hypothesis $h$, which is parametrized by a latent variable $\mathbf{z}$, as

$$ p(h|D, \mathcal{T}) = \int p(h|\mathbf{z})p(\mathbf{z}|D, \mathcal{T})d\mathbf{z}. \qquad (9.99) $$

In Bayesian meta-learning, we assume that the task distribution follows a hierarchical generative model. Given a hyperprior distribution $p(\mathbf{z})$, the task-specific parameters $\theta_i$ are sampled conditionally on $\mathbf{z}$ as

$$ \theta_i \sim p(\theta|\mathbf{z}), \qquad (9.100) $$

where $\theta_i$ are the task-specific parameters for $T_i$. The likelihood of observing dataset $D_i$ given $\theta_i$ is then

$$ p(D_i|\theta_i) = \prod_{j=1}^{m_i} p(y_{ij}|\mathbf{x}_{ij}, \theta_i). \qquad (9.101) $$

For meta-learning, we define a posterior distribution over $\mathbf{z}$ conditioned on all observed tasks:

$$ p(\mathbf{z}|\mathcal{T}) \propto p(\mathcal{T}|\mathbf{z})p(\mathbf{z}), \qquad (9.102) $$

where

$$ p(\mathcal{T}|\mathbf{z}) = \prod_{i=1}^{N} \int p(D_i|\theta_i)p(\theta_i|\mathbf{z})d\theta_i. \qquad (9.103) $$

For zero-shot learning, where a new task $T_*$ with dataset $D_*$ is encountered without labeled examples, the goal is to infer the posterior predictive distribution

$$ p(y_*|\mathbf{x}_*, \mathcal{T}) = \int p(y_*|\mathbf{x}_*, \theta_*)p(\theta_*|\mathcal{T})d\theta_* \qquad (9.104) $$

A variational Bayesian approach approximates $p(\mathbf{z}|\mathcal{T})$ using a variational distribution $q(\mathbf{z})$, typically assumed to be Gaussian:

$$ q(\mathbf{z}) = \mathcal{N}(\mathbf{z}|\mu, \Sigma). \qquad (9.105) $$

The variational objective is to minimize the KL divergence

$$ \mathcal{L} = D_{\text{KL}}(q(\mathbf{z})\|p(\mathbf{z}|\mathcal{T})), \qquad (9.106) $$
which expands to the evidence lower bound (ELBO)

$$ \mathcal{L} = \mathbb{E}_{q(\mathbf{z})} \left[ \sum_{i=1}^{N} \log p(D_i|\mathbf{z}) \right] - D_{\text{KL}}(q(\mathbf{z}) \| p(\mathbf{z})). \qquad (9.107) $$

For amortized inference, we introduce an encoder $q(\mathbf{z}|D)$, parameterized as a neural network, such that

$$ q(\mathbf{z}|D) = \mathcal{N}(\mu(D), \Sigma(D)). \qquad (9.108) $$

During inference, for a new task $T_*$, the posterior predictive distribution is given by marginalizing out $\mathbf{z}$:

$$ p(y_*|\mathbf{x}_*, \mathcal{T}) = \int p(y_*|\mathbf{x}_*, \mathbf{z})q(\mathbf{z}|\mathcal{T})d\mathbf{z}. \qquad (9.109) $$

Using Monte Carlo approximation, the integral can be estimated as

$$ p(y_*|\mathbf{x}_*, \mathcal{T}) \approx \frac{1}{K} \sum_{k=1}^{K} p(y_*|\mathbf{x}_*, \mathbf{z}_k), \qquad (9.110) $$

where $\mathbf{z}_k \sim q(\mathbf{z}|\mathcal{T})$. The function $p(y_*|\mathbf{x}_*, \mathbf{z})$ is modeled using a deep neural network $f_\theta(\mathbf{x}_*, \mathbf{z})$, which outputs a probability distribution over classes. For zero-shot learning, the classifier must generalize to unseen classes by leveraging the inferred latent structure. This is achieved by incorporating semantic embeddings $\mathbf{e}(y)$ that define a probability distribution over labels:

$$ p(y|\mathbf{x}, \mathbf{z}) \propto \exp(\mathbf{e}(y)^T f_\theta(\mathbf{x}, \mathbf{z})). \qquad (9.111) $$

This formulation enables the model to predict classes that were never observed in the training set by mapping the latent variable $\mathbf{z}$ to a space shared across seen and unseen classes. The final optimization objective for meta-learning is

$$ \mathcal{L}_{\text{meta}} = \sum_{i=1}^{N} \mathbb{E}_{q(\mathbf{z}|D_i)} [\log p(D_i|\mathbf{z})] - D_{\text{KL}}(q(\mathbf{z}|D_i) \| p(\mathbf{z})). \qquad (9.112) $$

Through this Bayesian hierarchical approach, zero-shot learning emerges as a byproduct of inferring a shared structure across tasks, allowing for principled generalization to unseen distributions.
# 10 Neural Network Basics

Neural networks are parameterized function approximators that map input data $\mathbf{x} \in \mathbb{R}^d$ to outputs $\mathbf{y} \in \mathbb{R}^m$ through a composition of nonlinear transformations. At their core, they consist of layers of neurons, where each layer $l$ applies an affine transformation followed by an elementwise activation function $\sigma_l : \mathbb{R} \to \mathbb{R}$. For a network with $L$ layers, the forward pass is recursively defined as:

$$ \mathbf{h}^{(0)} = \mathbf{x}, \quad \mathbf{h}^{(l)} = \sigma_l(\mathbf{W}^{(l)}\mathbf{h}^{(l-1)} + \mathbf{b}^{(l)}) \quad \text{for } 1 \le l \le L-1, $$

with the final output $\mathbf{y} = \mathbf{W}^{(L)}\mathbf{h}^{(L-1)} + \mathbf{b}^{(L)}$. Here, $\mathbf{W}^{(l)} \in \mathbb{R}^{n_l \times n_{l-1}}$ and $\mathbf{b}^{(l)} \in \mathbb{R}^{n_l}$ are the weight matrix and bias vector for layer $l$, and $n_l$ denotes the number of neurons in that layer. The activation functions $\sigma_l$ (e.g., ReLU, sigmoid, or tanh) introduce nonlinearity, enabling the network to approximate complex functions. The universal approximation theorem states that for any continuous function $f: K \subset \mathbb{R}^d \to \mathbb{R}^m$ and $\epsilon > 0$, there exists a single-hidden-layer network with sufficient width $n_1$ such that:

$$ \sup_{\mathbf{x} \in K} \|f(\mathbf{x}) - \mathbf{y}(\mathbf{x})\| < \epsilon. $$

The parameters $\theta = \{\mathbf{W}^{(l)}, \mathbf{b}^{(l)}\}_{l=1}^L$ are learned by minimizing a loss function $\mathcal{L}(\theta)$ (e.g., cross-entropy for classification or mean squared error for regression) over a dataset $\mathcal{D} = \{(\mathbf{x}_i, \mathbf{y}_i)\}_{i=1}^N$. This is achieved via gradient descent, which updates the parameters iteratively as:

$$ \theta_{t+1} = \theta_t - \eta \nabla_{\theta} \mathcal{L}(\theta_t), $$

where $\eta$ is the learning rate. The gradients are computed using backpropagation, an application of the chain rule from calculus. For a loss $\mathcal{L}$, the gradient with respect to the weights of layer $l$ is:

$$ \nabla_{\mathbf{W}^{(l)}} \mathcal{L} = (\nabla_{\mathbf{h}^{(l)}} \mathcal{L}) \sigma_l'(\mathbf{z}^{(l)}) \mathbf{h}^{(l-1)T}, \quad \mathbf{z}^{(l)} = \mathbf{W}^{(l)}\mathbf{h}^{(l-1)} + \mathbf{b}^{(l)}, $$

where $\sigma_l'$ is the derivative of the activation function, and $\nabla_{\mathbf{h}^{(l)}} \mathcal{L}$ is propagated backward from layer $l+1$. The learning process can be interpreted as a dynamical system in parameter space, where the trajectory $\theta(t)$ follows the gradient flow:

$$ \frac{d\theta(t)}{dt} = -\nabla_{\theta} \mathcal{L}(\theta(t)). $$

Different neural architectures impose specific inductive biases through their structure. Convolutional neural networks (CNNs) leverage weight sharing and local connectivity for spatial invariance, where each layer applies a convolution operation:

$$ \mathbf{h}_{i,j,k}^{(l)} = \sigma_l \left( \sum_{m=1}^{c_{l-1}} \sum_{u,v} \mathbf{W}_{u,v,k,m}^{(l)} \mathbf{h}_{i+u,j+v,m}^{(l-1)} + \mathbf{b}_k^{(l)} \right), $$

with $\mathbf{W}^{(l)} \in \mathbb{R}^{k \times k \times c_{l-1} \times c_l}$ being the convolutional kernel of size $k \times k$. Recurrent neural networks (RNNs) process sequential data by maintaining a hidden state $\mathbf{h}_t$ at each timestep:

$$ \mathbf{h}_t = \sigma (\mathbf{W}_h \mathbf{h}_{t-1} + \mathbf{W}_x \mathbf{x}_t + \mathbf{b}), $$
capturing temporal dependencies. Self-attention mechanisms, as in transformers, compute dynamic feature interactions via scaled dot-products:

$$ \text{Attention}(\mathbf{Q}, \mathbf{K}, \mathbf{V}) = \text{softmax} \left( \frac{\mathbf{Q}\mathbf{K}^T}{\sqrt{d_k}} \right) \mathbf{V}, $$

where $\mathbf{Q}, \mathbf{K}, \mathbf{V}$ are learned linear projections of the input. These architectures exemplify how neural networks encode domain-specific priors through their compositional structure and parameterization.

The expressivity of a neural network is governed by its depth $L$ and width $\{n_l\}_{l=1}^L$. For a ReLU network, the number of linear regions in its input-output mapping grows exponentially with depth, enabling piecewise linear approximations of high-dimensional functions. The loss landscape $\mathcal{L}(\theta)$ is non-convex, yet in overparameterized regimes (where the number of parameters exceeds the number of training samples), gradient descent often converges to global minima despite the presence of saddle points. This is partially explained by the neural tangent kernel (NTK) theory, which shows that in the infinite-width limit, the kernel matrix $\mathbf{H} \in \mathbb{R}^{N \times N}$ remains constant during training:

$$ \mathbf{H}_{ij} = \langle \nabla_{\theta} y(\mathbf{x}_i), \nabla_{\theta} y(\mathbf{x}_j) \rangle, $$

and the dynamics simplify to linearized gradient flow. The interplay between architecture, initialization, and optimization defines the practical success of neural networks in approximating intricate data distributions.

## 10.1 Literature Review of Neural Network Basics

Goodfellow et. al. (2016) [120] wrote one of the most comprehensive books on deep learning, covering the theoretical foundations of neural networks, optimization techniques, and probabilistic models. It is widely used in academic courses and research. Haykin (2009) [122] explained neural networks from a signal processing perspective, covering perceptrons, backpropagation, and recurrent networks with a strong mathematical approach. Schmidhuber (2015) [123] gave a historical and theoretical review of deep learning architectures, including recurrent neural networks (RNNs), convolutional neural networks (CNNs), and long short-term memory (LSTM). Bishop (2006) [124] gave a Bayesian perspective on neural networks and probabilistic graphical models, emphasizing the statistical underpinnings of learning. Poggio and Smale (2003) [125] established theoretical connections between neural networks, kernel methods, and function approximation. LeCun (2015) [126] discusses the principles behind modern deep learning, including backpropagation, unsupervised learning, and hierarchical feature extraction. Cybenko (1989) [60] proved the universal approximation theorem, demonstrating that a neural network with a single hidden layer can approximate any continuous function. Hornik et. al. (1989) [58] extended Cybenko's theorem, proving that multilayer perceptrons (MLPs) are universal function approximators. Pinkus (1999) [62] gave a rigorous mathematical discussion on neural networks from the perspective of approximation theory. Tishby and Zaslavsky (2015) [127] introduced the information bottleneck framework for understanding deep neural networks, explaining how networks learn to compress and encode information efficiently.

## 10.2 Perceptrons and Artificial Neurons

The perceptron is the simplest form of an artificial neural network, operating as a binary classifier. It computes the linear combination $z$ of the input features $\vec{x} = [x_1, x_2, \dots, x_n]^T \in \mathbb{R}^n$ and a corresponding weight vector $\vec{w} = [w_1, w_2, \dots, w_n]^T \in \mathbb{R}^n$, augmented by a bias term $b \in \mathbb{R}$. This can be expressed as

$$ z = \vec{w}^T \vec{x} + b = \sum_{i=1}^{n} w_i x_i + b. \qquad (10.1) $$
To determine the output, this value is passed through the step activation function, defined mathematically as

$$ \phi(z) = \begin{cases} 1, & z \ge 0, \\ 0, & z < 0. \end{cases} \qquad (10.2) $$

Thus, the perceptron's decision-making process can be expressed as

$$ y = \phi(\vec{w}^T \vec{x} + b), \qquad (10.3) $$

where $y \in \{0, 1\}$. The equation $\vec{w}^T \vec{x} + b = 0$ defines a hyperplane in $\mathbb{R}^n$, which acts as the decision boundary. For any input $\vec{x}$, the classification is determined by the sign of $\vec{w}^T \vec{x} + b$, specifically $y = 1$ if $\vec{w}^T \vec{x} + b \ge 0$ and $y = 0$ otherwise. Geometrically, this classification corresponds to partitioning the input space into two distinct half-spaces. To train the perceptron, a supervised learning algorithm adjusts the weights $\vec{w}$ and the bias $b$ iteratively using labeled training data $\{(\vec{x}_i, y_i)\}_{i=1}^m$, where $y_i$ represents the ground truth. When the predicted output $y_{\text{pred}} = \phi(\vec{w}^T \vec{x}_i + b)$ differs from $y_i$, the weight vector and bias are updated according to the rule

$$ \vec{w} \leftarrow \vec{w} + \eta(y_i - y_{\text{pred}})\vec{x}_i, \qquad (10.4) $$

and

$$ b \leftarrow b + \eta(y_i - y_{\text{pred}}), \qquad (10.5) $$

where $\eta > 0$ is the learning rate. Each individual weight $w_j$ is updated as

$$ w_j \leftarrow w_j + \eta(y_i - y_{\text{pred}})x_{ij}. \qquad (10.6) $$

For a linearly separable dataset, the Perceptron Convergence Theorem asserts that the algorithm will converge to a solution after a finite number of updates. Specifically, the number of updates is bounded by

$$ \frac{R^2}{\gamma^2}, \qquad (10.7) $$

where $R = \max_i \|\vec{x}_i\|$ is the maximum norm of the input vectors, and $\gamma$ is the minimum margin, defined as

$$ \gamma = \min_i \frac{y_i(\vec{w}^T \vec{x}_i + b)}{\|\vec{w}\|}. \qquad (10.8) $$

The limitations of the perceptron, particularly its inability to solve linearly inseparable problems such as the XOR problem, necessitate the extension to artificial neurons with non-linear activation functions. A popular choice is the sigmoid activation function

$$ \phi(z) = \frac{1}{1 + e^{-z}}, \qquad (10.9) $$

which maps $z \in \mathbb{R}$ to the continuous interval $(0, 1)$. The derivative of the sigmoid function, essential for gradient-based optimization, is

$$ \phi'(z) = \phi(z)(1 - \phi(z)). \qquad (10.10) $$

Another widely used activation function is the hyperbolic tangent $\tanh(z)$, defined as

$$ \tanh(z) = \frac{e^z - e^{-z}}{e^z + e^{-z}}, \qquad (10.11) $$

with derivative

$$ \tanh'(z) = 1 - \tanh^2(z). \qquad (10.12) $$
ReLU, or Rectified Linear Unit, is defined as

$$ \phi(z) = \max(0, z), \qquad (10.13) $$

with derivative

$$ \phi'(z) = \begin{cases} 1, & z > 0, \\ 0, & z \le 0. \end{cases} \qquad (10.14) $$

These non-linear activations enable the network to approximate non-linear decision boundaries, a capability absent in the perceptron. Artificial neurons form the building blocks of multi-layer perceptrons (MLPs), where neurons are organized into layers. For an L-layer network, the input $\vec{x}$ is transformed layer by layer. At layer l, the output is

$$ \vec{z}^{(l)} = \phi^{(l)}(\vec{W}^{(l)} \vec{z}^{(l-1)} + \vec{b}^{(l)}), \qquad (10.15) $$

where $\vec{W}^{(l)} \in \mathbb{R}^{n_l \times n_{l-1}}$ is the weight matrix, $\vec{b}^{(l)} \in \mathbb{R}^{n_l}$ is the bias vector, and $\phi^{(l)}$ is the activation function. The network's output is

$$ \hat{\vec{y}} = \phi^{(L)}(\vec{W}^{(L)} \vec{z}^{(L-1)} + \vec{b}^{(L)}). \qquad (10.16) $$

The Universal Approximation Theorem guarantees that MLPs with sufficient neurons and non-linear activations can approximate any continuous function $f: \mathbb{R}^n \to \mathbb{R}^m$ to arbitrary precision. Formally, for any $\epsilon > 0$, there exists an MLP $g(\vec{x})$ such that

$$ \|f(\vec{x}) - g(\vec{x})\|_{\infty} < \epsilon \qquad (10.17) $$

for all $\vec{x} \in \mathbb{R}^n$. Training an MLP minimizes a loss function $L$ that quantifies the error between predicted outputs $\hat{\vec{y}}$ and ground truth labels $\vec{y}$. For regression, the mean squared error is

$$ L = \frac{1}{m} \sum_{i=1}^{m} \| \hat{y}_i - \vec{y}_i \|^2, \qquad (10.18) $$

and for classification, the cross-entropy loss is

$$ L = -\frac{1}{m} \sum_{i=1}^{m} \left[ \hat{y}_i^T \log \hat{y}_i + (1 - \hat{y}_i)^T \log(1 - \hat{y}_i) \right]. \qquad (10.19) $$

Optimization uses stochastic gradient descent (SGD), updating parameters $\Theta = \{\vec{W}^{(l)}, \vec{b}^{(l)}\}_{l=1}^L$ as

$$ \Theta \leftarrow \Theta - \eta \nabla_{\Theta} L. \qquad (10.20) $$

Gradients are computed via backpropagation:

$$ \frac{\partial L}{\partial \vec{W}^{(l)}} = \delta^{(l)} \vec{z}^{(l-1)T}, \qquad (10.21) $$

where $\delta^{(l)}$ is the error signal at layer $l$, recursively calculated as

$$ \delta^{(l)} = (\vec{W}^{(l+1)T} \delta^{(l+1)}) \circ \phi^{(l)}(\vec{z}^{(l)}). \qquad (10.22) $$

This recursive structure, combined with chain rule applications, efficiently propagates error signals from the output layer back to the input layer.

Artificial neurons and their extensions have thus provided the foundation for modern deep learning. Their mathematical underpinnings and computational frameworks are instrumental in solving a wide array of problems, from classification and regression to complex decision-making. The interplay of linear algebra, calculus, and optimization theory in their formulation ensures that these networks are both theoretically robust and practically powerful.