Zero-shot learning (ZSL) aims to train deep neural networks to recognize objects from unseen classes, starting from a semantic description of the concepts. Neuro-symbolic (NeSy) integration refers to a class of techniques that incorporate symbolic knowledge representation and reasoning with the learning capabilities of deep neural networks. However, to date, few studies have explored how to leverage NeSy techniques to inject prior knowledge during the training process to boost ZSL capabilities. Here, we present Fuzzy Logic Prototypical Network (FLPN) that formulates the classification task as prototype matching in a visual-semantic embedding space, which is trained by optimizing a NeSy loss. Specifically, FLPN exploits the Logic Tensor Network (LTN) framework to incorporate background knowledge in the form of logical axioms by grounding a first-order logic language as differentiable operations between real tensors. This prior knowledge includes class hierarchies (classes and macroclasses) along with robust high-level inductive biases. The latter allow, for instance, to handle exceptions in class-level attributes and to enforce similarity between images of the same class, preventing premature overfitting to seen classes and improving overall performance. % CHECK: original sentence had no verb ("Both class-level and attribute-level prototypes through an attention mechanism ...") FLPN learns both class-level and attribute-level prototypes, the latter through an attention mechanism specialized for either convolutional- or transformer-based backbones. FLPN achieves state-of-the-art performance on the GZSL benchmarks AWA2 and SUN, matching or exceeding the performance of competing algorithms with minimal computational overhead. The code is available at https://github.com/FrancescoManigrass/FLPN
Figures & tables
Figure 1: The Fuzzy Logic Prototype Network (FLPN) architecture is composed of two main components: the feature extractor and the prototypical network. The feature extractor can be either a CNN (Resnet-101 in our experiments) or a Visual Transformer (ViT). The prototypical networks ( ΠθC , ΠθM , ΠθA ) integrate input images and the class ( a ), macroclass ( amacro ), and attribute ( aeye ) labels into a single embedding space, which in LTN terminology grounds the symbols in the embedding space. Building on this embedding space, various predicates, such as isOfClass , isOfClassmasked , and isOfMacro are defined as class membership functions. In addition, the hasAttribute predicate is used to detect specific attributes in images. These predicates constitute the foundational elements of the knowledge base, denoted K , within the LTN framework. The training objective (loss function) is formulated to optimize the satisfiability or truth value of K . The symbols ⊕ and ⊙ denote the addition and multiplication operations, respectively.
Connective
LTN
logLTN
¬
1−σ(a)
log(1−elog(σ(a)))
∧
σ(a)∗σ(b)
log(σ(a))+log(σ(b))
∨
σ(a)+σ(b)−σ(a)∗σ(b)
α1C+log(n1∑i=1nelog(ασ(ai))−C)
→
1−σ(a)+σ(a)∗σ(b)
a→b⇔¬a∨b
∀
1−(n1∑i=1n(1−σ(a)i)p)p1
n1∑i=1nlog(σ(a)i)
∃
(n1∑i=1nσ(a)ip)p1
α1C+log(n1∑i=1nelog(ασ(ai))−C)
Table 1: Grounding of logical connectives and aggregators ( p≥1 ). In the existential quantifier, C=max(αlog(σ(x)i)) . σ is the activation function.
AWA2
CUB
SUN
Model
T1
U
S
H
T1
U
S
H
T1
U
S
H
Embedding-based methods
Proto-LTN [ 32 ] †
67.6
32.0
83.7
46.2
48.8
20.8
54.3
30.0
60.4
20.4
36.8
26.2
DEM [ 49 ]
67.1
30.5
86.4
45.1
51.7
19.6
57.9
29.2
61.9
20.5
34.3
25.6
VSE [ 51 ]
84.4
45.6
88.7
60.2
71.9
39.5
68.9
50.2
-
-
-
-
TCN [ 24 ]
71.2
61.2
65.8
63.4
59.5
52.6
52.0
52.3
61.5
31.2
37.3
34.0
Table 2: We compare our approach to the current state of the art on the AWA2, CUB, and SUN datasets for both GZSL and ZSL settings. We separately analyze CNN-based and transformer-based backbones to provide a head-to-head evaluation of different methods. The results are categorized into four groups: embedding-based, end-to-end embedding-based (separately for CNN and ViT backbones), and generative. Models marked with the † symbol are explicitly based on a NeSy approach. We highlight the best and second-best method for each metric, separately for CNN and ViT-based architectures. For FLVN and FLPN, we report the mean, standard deviation and best results (in parenthesis) over three repetitions.
Table 3: Ablation study: effect of different axioms in the K on the performance, for both CNN (top rows) and ViT (bottom rows) backbones, on Awa2 and CUB.
Figure 2: The class-level feature distribution on AWA2 dataset for FLPN with the ResNet-101 (a-d) and ViT (e-h) backbones is represented using t-SNE. The models in plots (a), (c), (e), and (g) contain a knowledge base Kr composed only of ϕclass and ϕmasked , whereas the knowledge base in the remaining plots includes all the axioms. The likelihood scores generated by the model for every class were utilized to produce these representations.
Figure 3: Attribute-level feature distribution for FLPN on AWA2 (a-b) and CUB (c-d) datasets represented using t-SNE.
Figure 4: Attention maps for randomly selected examples and attributes from AWA2 with ViT (a-f) and ResNet101 (g-l) backbones.
Zero-shot learning lets models recognize classes or solve tasks absent from task-specific training examples by using semantic descriptions or pretrained knowledge.
Zero-shot learning (ZSL) aims to recognize the unseen classes in the open-world guided by the side-information (e.g., attributes). Its key task is how to infer the latent semantic knowledge between visual and attribute features on seen classes, and thus conducting a desirable semantic knowledge transfer from seen classes to unseen ones. Prior works simply utilize unidirectional attention within a weakly-supervised manner to learn the spurious and limited latent semantic representations, which fail to effectively discover the intrinsic semantic knowledge (e.g., attribute semantic) between visual and attribute features. To solve the above challenges, we propose a mutually causal semantic distillation network (termed MSDN++) to distill the intrinsic and sufficient semantic representations for ZSL. MSDN++ consists of an attribute→visual causal attention sub-net that learns attribute-based visual features, and a visual→attribute causal attention sub-net that learns visual-based attribute features. The causal attentions encourages the two sub-nets to learn causal vision-attribute associations for representing reliable features with causal visual/attribute learning. With the guidance of semantic distillation loss, the two mutual attention sub-nets learn collaboratively and teach each other throughout the training process. Extensive experiments on three widely-used benchmark datasets (e.g., CUB, SUN, AWA2, and FLO) show that our MSDN++ yields significant improvements over the strong baselines, leading to new state-of-the-art performances.
Shiming Chen, Shuhuang Chen, Guo-Sen Xie +1
Huazhong University of Science and Technology, Wuhan, China · National Anti-Counterfeit Engineering Research Center, Wuhan, Chna · Nanjing University of Science and Technology, Nanjing, China
Large pre-trained models have become foundational components of modern machine learning systems. Yet adapting these models to novel categories typically requires examples from the target distribution. In many domains, however, such data are unavailable. Zero-shot learning (ZSL) permits recognition under these limitations through relying on auxiliary semantic information such as textual descriptions. We introduce CAST (Closed-form Analytic Semantic Transfer), a training-free, image-free framework for extending a pre-trained classifier to previously unseen classes through weight injection. We provide a theoretical foundation for CAST and derive a finite-sample error decomposition that identifies the semantic extrapolation residualρu. The residual is a computable, model-agnostic measure and provides a principled criterion for dataset curation and benchmark design. Experiments on standard zero-shot learning benchmarks demonstrate that CAST matches or exceeds existing image-free approaches and approaches the performance of few-shot adaptation methods, while requiring neither iterative optimization nor examples from the target distribution.
William Heyden, Habib Ullah, Muhammad Salman Siddiqui +1
Faculty of Science and Technology (REALTEK) Norwegian University of Life Sciences NMBU 1430 Ås, Norway
Zero-shot learning (ZSL) aims to recognize unseen classes without visual instances. However, existing methods usually assume clean labels, overlooking real-world label noise and ambiguity, which degrades performance. To bridge this gap, we propose the Dynamic Visual-semantic Alignment (DVSA), a robust ZSL framework for learning from ambiguous labels. DVSA uses a bidirectional visual-semantic alignment module with attention to mutually calibrate visual features and attribute prototypes, and a contrastive optimization grounded in Mutual Information (MI) at the attribute level to strengthen discriminative, semantically consistent attributes. In addition, a dynamic label disambiguation mechanism iteratively corrects noisy supervision while preserving semantic consistency, narrowing the instance-label gap, and improving generalization. Extensive experiments on standard benchmarks verify that DVSA achieves stronger performance under ambiguous supervision.
Jiangnan Li, Linqing Huang, Xiaowen Yan +3
College of Computer Science and Technology, Qingdao University · School of Computer Science, Shanghai JiaoTong University · Key Laboratory of Computing Power Network and Information Security, Ministry of Education, Shandong Computer Science Center, Qilu University of Technology (Shandong Academy of Sciences)