search
HomeTechnology peripheralsAIUsing one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module

Zero-shot learning (Zero-Shot Learning) focuses on classifying categories that have not appeared during the training process. Zero-shot learning based on semantic description is implemented through pre-defined high-order semantic information for each category. Knowledge transfer from seen class to unseen class. Traditional zero-shot learning only needs to identify unseen classes in the test phase, while generalized zero-shot learning (GZSL) needs to identify both visible and unseen classes. Its evaluation indicators are the average accuracy of visible classes and the average accuracy of unseen classes. Harmonic average of accuracy.

A common zero-shot learning strategy is to use visible class samples and semantics to train a conditional generation model from semantic space to visual sample space, and then generate unseen classes with the help of unseen class semantics pseudo-samples, and finally use visible class samples and unseen class pseudo-samples to train the classification network. However, learning a good mapping relationship between two modalities (semantic modality and visual modality) usually requires a large number of samples (refer to CLIP), which cannot be achieved in traditional zero-shot learning environments. Therefore, the visual sample distribution generated using unseen class semantics usually deviates from the real sample distribution, which means the following two points: 1. The unseen class accuracy obtained by this method is limited. 2. When the average number of pseudo-samples generated per class for unseen classes is equivalent to the average number of samples for each class for visible classes, there is a large difference between the accuracy of unseen classes and the accuracy of visible classes, as shown in Table 1 below.

Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module

#We found that even if we only learn the mapping of semantics to category center points, we can also map unseen class semantics Copying a single sample point multiple times and then participating in classifier training can also achieve an effect close to using a generative model. This means that the unseen pseudo-sample features generated by the generative model are relatively homogeneous to the classifier.

Previous methods usually cater to GZSL evaluation metrics by generating a large number of unseen class pseudo-samples (although a large number of samples is not helpful for unseen class inter-class discrimination) ). However, this re-sampling strategy has been proven in the field of long-tail learning to cause the classifier to overfit on some features, which is pseudo-unseen that deviates from the real sample. class characteristics. This situation is not conducive to the identification of real samples of seen and unseen classes. So, can we abandon this resampling strategy and instead use the offset and homogeneity of generating pseudo-samples of unseen classes (or the class imbalance between seen classes and unseen classes) as inductive bias? What about classifier learning?

Based on this, weproposed a plug-and-play classifier module that can improve generative zero-shot learning by just modifying one line of code. The effect of the method. Only 10 pseudo-samples are generated per unseen class to achieve SOTA level. Compared with other generative zero-sample methods, the new method has a huge advantage in computational complexity. Research members are from Nanjing University of Science and Technology and Oxford University.

Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module


  • Paper: https://arxiv.org/abs/2204.11822
  • Code: https://github.com/cdb342/IJCAI-2022-ZLA

This article uses the consistent training and testing goals as a guide to derive the variational lower bound of the generalized zero-shot learning evaluation index. The classifier modeled in this way can avoid using the re-adoption strategy and prevent the classifier from overfitting on the generated pseudo samples and adversely affecting the recognition of real samples. The proposed method can make the embedding-based classifier effective in the generative method framework and reduce the classifier's dependence on the quality of generated pseudo samples.

Method

1. Introducing parameterized prior

We decided to start with the loss function of the classifier. Assuming that the class space has been completed by generated pseudo-samples of unseen classes, the previous classifier is optimized with the goal of maximizing global accuracy:

Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier moduleUsing one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module

Where Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module is the global accuracy, Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module represents the classifier output, Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module represents the sample distribution, Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module is the corresponding label of sample X. The evaluation index of GZSL is:

Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier moduleUsing one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module

Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module and Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier moduleRepresents visible class and unseen class collections respectively. The inconsistency between training objectives and testing objectives means that previous classifier training strategies did not take into account the differences between seen and unseen classes. Naturally, we try to achieve consistent results between training and testing goals by deriving Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module. After derivation, we got its lower bound:

Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module

where Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module represents the visible class - the unseen class prior, It has nothing to do with the data and is adjusted as a hyperparameter in the experiment. Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module represents the internal prior of the visible class or the unseen class, which is replaced by the frequency of the visible class sample or the uniform distribution during the implementation process. By maximizing the lower bound of Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module, we obtain the final optimization goal:

Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module

Thus, our classification The modeling objectives have undergone the following changes compared to the previous ones:

Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module

Fitting the posterior probability by using cross-entropyUsing one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module, we get the classifier loss as:

Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module

This is similar to the logic adjustment (Logit Adjustment) in long-tail learning, so we call it zero-sample logic adjustment (ZLA). So far, we have implemented the introduction of parameterized priors to implant the category imbalance between seen classes and unseen classes as inductive bias into classifier training, and only need to add additional bias terms to the original logits in the code implementation. can achieve the above effects.

Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module

#2. Introducing semantic prior

So far, the core of zero-sample migration is semantic prior. ) only plays a role in the training generator and pseudo-sample generation stages. The identification of unseen classes depends entirely on the quality of the generated unseen class pseudo-samples. Obviously, if semantic priors can be introduced in the classifier training stage, it will help to identify unseen classes. In the field of zero-shot learning, there is a class of embedding-based methods that can achieve this function. However, this type of method is similar to the knowledge learned by the generative model, that is, the connection between semantics and vision (semantic-visual link), which led to the direct introduction of the previous generative framework (refer to the paper f-CLSWGAN) based on The embedded classifier cannot achieve better results than the original (unless the classifier itself has better zero-shot performance). Through the ZLA strategy proposed in this paper, we are able to change the role that the generated pseudo-samples of unseen classes play in classifier training. From the original provision of invisible class information to the current adjustment of the decision boundary between invisible classes and visible classes, we can introduce semantic priors in the classifier training stage. Specifically, we use a prototype learning method to map the semantics of each category into a visual prototype (i.e., classifier weight), and then model the adjusted posterior probability as the cosine similarity between the sample and the visual prototype. Degree (cosine similarity), that is,

Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module

where Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module is the temperature coefficient. In the testing phase, samples are predicted to correspond to the category of the visual prototype with the greatest cosine similarity.

Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module

Experiment

We combine the proposed classifier with the basic WGAN to generate 10 samples in each unseen class The effect is comparable to SoTAs. In addition, we inserted it into the more advanced CE-GZSL method to improve the initial effect without changing other parameters (including the number of generated samples).

Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module

In ablation experiments, we compared a generation-based prototype learner with a pure prototype learner. We found that the last ReLU layer is critical to the success of a pure prototype learner because zeroing out negative numbers increases the similarity of the category prototype to unseen class features (unseen class features are also ReLU activated). However, setting some values ​​to zero also limits the expression of the prototype, which is not conducive to further recognition performance. Using pseudo-unseen class samples to compensate for unseen class information can not only achieve higher performance when using RuLU, but also achieve further performance transcendence without a ReLU layer.

Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module

In another ablation study, we compared a prototype learner to an initial classifier. The results show that the prototype learner has no advantage over the initial classifier when generating a large number of unseen class samples. When using the ZLA technology proposed in this article, the prototype learner shows its superiority. As mentioned before, this is because both the prototype learner and the generative model are learning semantic-visual connections, so the semantic information is difficult to fully utilize. ZLA enables the generated unseen class samples to adjust the decision boundary instead of just providing unseen class information, thereby activating the prototype learner.

Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module

The above is the detailed content of Using one line of code to greatly improve the effect of zero-shot learning methods, Nanjing University of Technology & Oxford propose a plug-and-play classifier module. For more information, please follow other related articles on the PHP Chinese website!

Statement
This article is reproduced at:51CTO.COM. If there is any infringement, please contact admin@php.cn delete
Are You At Risk Of AI Agency Decay? Take The Test To Find OutAre You At Risk Of AI Agency Decay? Take The Test To Find OutApr 21, 2025 am 11:31 AM

This article explores the growing concern of "AI agency decay"—the gradual decline in our ability to think and decide independently. This is especially crucial for business leaders navigating the increasingly automated world while retainin

How to Build an AI Agent from Scratch? - Analytics VidhyaHow to Build an AI Agent from Scratch? - Analytics VidhyaApr 21, 2025 am 11:30 AM

Ever wondered how AI agents like Siri and Alexa work? These intelligent systems are becoming more important in our daily lives. This article introduces the ReAct pattern, a method that enhances AI agents by combining reasoning an

Revisiting The Humanities In The Age Of AIRevisiting The Humanities In The Age Of AIApr 21, 2025 am 11:28 AM

"I think AI tools are changing the learning opportunities for college students. We believe in developing students in core courses, but more and more people also want to get a perspective of computational and statistical thinking," said University of Chicago President Paul Alivisatos in an interview with Deloitte Nitin Mittal at the Davos Forum in January. He believes that people will have to become creators and co-creators of AI, which means that learning and other aspects need to adapt to some major changes. Digital intelligence and critical thinking Professor Alexa Joubin of George Washington University described artificial intelligence as a “heuristic tool” in the humanities and explores how it changes

Understanding LangChain Agent FrameworkUnderstanding LangChain Agent FrameworkApr 21, 2025 am 11:25 AM

LangChain is a powerful toolkit for building sophisticated AI applications. Its agent architecture is particularly noteworthy, allowing developers to create intelligent systems capable of independent reasoning, decision-making, and action. This expl

What are the Radial Basis Functions Neural Networks?What are the Radial Basis Functions Neural Networks?Apr 21, 2025 am 11:13 AM

Radial Basis Function Neural Networks (RBFNNs): A Comprehensive Guide Radial Basis Function Neural Networks (RBFNNs) are a powerful type of neural network architecture that leverages radial basis functions for activation. Their unique structure make

The Meshing Of Minds And Machines Has ArrivedThe Meshing Of Minds And Machines Has ArrivedApr 21, 2025 am 11:11 AM

Brain-computer interfaces (BCIs) directly link the brain to external devices, translating brain impulses into actions without physical movement. This technology utilizes implanted sensors to capture brain signals, converting them into digital comman

Insights on spaCy, Prodigy and Generative AI from Ines MontaniInsights on spaCy, Prodigy and Generative AI from Ines MontaniApr 21, 2025 am 11:01 AM

This "Leading with Data" episode features Ines Montani, co-founder and CEO of Explosion AI, and co-developer of spaCy and Prodigy. Ines offers expert insights into the evolution of these tools, Explosion's unique business model, and the tr

A Guide to Building Agentic RAG Systems with LangGraphA Guide to Building Agentic RAG Systems with LangGraphApr 21, 2025 am 11:00 AM

This article explores Retrieval Augmented Generation (RAG) systems and how AI agents can enhance their capabilities. Traditional RAG systems, while useful for leveraging custom enterprise data, suffer from limitations such as a lack of real-time dat

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment