Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Text adversarial sample generation method and system, computer equipment and storage medium

A technology against samples and texts, applied in computer components, computing, neural learning methods, etc., can solve the problems of low modification rate, easy filtering of confrontation samples, and difficulty in achieving ideal results with high modification rate, and achieve low destructiveness Effect

Pending Publication Date: 2022-02-25
GUANGZHOU UNIVERSITY
View PDF0 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0003] However, both methods have certain limitations
Among them, the first method uses spelling mistakes to generate perturbations, successfully generates adversarial samples at a low modification rate, and does not affect human understanding of the text, but this method is vulnerable to spell checking mechanisms. Adversarial examples are easily filtered
The second method is to optimize the approximation by continuously optimizing the randomly generated adversarial samples to generate a strong attack sample, which can achieve effective attacks in short texts, but it is difficult to achieve ideal results in long texts with high modification rates.
In addition, this method replaces important words with synonyms, and grammatical errors are still difficult to avoid
[0004] As far as the current adversarial sample generation technology is concerned, it is difficult to guarantee the correctness of words, grammatical correctness, and semantic integrity of the original text, and most of the existing research focuses on short texts, and the effectiveness of attack methods cannot be guaranteed in long texts.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Text adversarial sample generation method and system, computer equipment and storage medium
  • Text adversarial sample generation method and system, computer equipment and storage medium
  • Text adversarial sample generation method and system, computer equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0065] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0066] see figure 1 , a text adversarial sample generation method based on attack words to guide sentence generation proposed in the first embodiment of the present invention, which includes steps S10-S50:

[0067] Step S10, acquiring a data set, performing tf-idf score calculation on words in the data set, and obtaining a part-of-speech dic...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a text adversarial sample generation method and system, computer equipment and a storage medium. The method comprises the following steps: performing tf-idf score calculation on words in an obtained data set to obtain a part-of-speech dictionary of the data set and attack word sets corresponding to different tags; selecting an attack word set corresponding to the tag of the original sample from the data set, and selecting a word with the highest attack score from the attack word set as an attack word; according to a preset sentence template, selecting syntactic rules corresponding to the part-of-speech of the attack word, and selecting the words corresponding to the rules from the part-of-speech dictionary, so that the words and the attack word jointly form sentences conforming to the syntactic rules; according to a preset adding condition, adding the sentence into the original sample to obtain a new sample; and performing multiple rounds of iterative calculation on the new sample according to a preset iterative condition to obtain an adversarial sample. The method can avoid spelling and grammar errors, has low modification rate and high aggressiveness, and improves the attack efficiency.

Description

technical field [0001] The present invention relates to the technical field of adversarial sample generation, in particular to a text adversarial sample generation method, system, computer equipment and storage medium based on attack words to guide sentence generation. Background technique [0002] Currently, deep learning models are widely used in many fields, such as computer vision, natural language processing, and speech recognition. At the same time, the security of deep learning models has also been greatly challenged. Academic research on text adversarial attacks has developed rapidly in recent years, and there are many research results. Currently, representative text generation technologies with cutting-edge development and good attack effects include using gradient information to filter out words that have a great impact on model classification results, and pass Methods for generating textual adversarial examples by making typos corrupt these words and methods for ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F40/289G06F40/253G06K9/62G06N3/04G06N3/08
CPCG06F40/289G06F40/253G06N3/08G06N3/045G06F18/214
Inventor 张欢顾钊铨谢禹舜谭昊谢文嵘王泽世朱梓萁王乐唐可可张登辉李默涵田志宏
Owner GUANGZHOU UNIVERSITY
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products