Method for preventing text stream order transformation attack

A text flow and sequence technology, applied in text database query, unstructured text data retrieval, digital data protection, etc., can solve problems such as destroying sequence information, sequence attacks, and reducing model effectiveness, achieving strong scalability and performance Best, Portable Results

Active Publication Date: 2021-08-27
BEIHANG UNIV
View PDF4 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the self-attention mechanism cannot capture the order information in the sequence alone, so it is necessary to add position encoding to fully represent the sequence
However, such position encoding is only a trigonometric function combined with order information, so it only needs to destroy the linearity of the trigonometric function in the position encoding, and it can effectively destroy the order information in the text to reduce the effectiveness of the model.
[0003] Therefore, the current mainstream natural language processing models based on transformer improvements need to use the linearity of trigonometric functions to obtain order information, but such encodings are subject to order attacks, and through research and experiments, we have found that Several methods for generating adversarial examples for sequential encoding. Such adversarial examples can effectively reduce the effectiveness of the model and are not easily detected by humans. The conclusion is that a means of preventing such attacks is currently needed to enhance the security of the model , which is of great significance to the security issues of the mainstream natural language processing model application
[0004] As mentioned above, the current mainstream natural language processing has added sequence coding that utilizes the linearity of trigonometric functions. Attacking sequence coding can easily reduce the accuracy of natural language processing models, but there is no complete targeting of flow sequence. How to defend against attacks

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
  • Method for preventing text stream order transformation attack
  • Method for preventing text stream order transformation attack
  • Method for preventing text stream order transformation attack

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0024] The following is a preferred embodiment of the present invention and the technical solutions of the present invention are further described in conjunction with the accompanying drawings, but the present invention is not limited to this embodiment.

[0025] The present invention proposes a method for preventing text flow sequence transformation attacks, and learns the optimal sequence probability distribution for resisting attacks through EM algorithm, and finally prevents the attack sequence encoding of the adversarial samples against flow sequence attacks, so as to prevent text flow sequence attacks effect, to achieve design goals and application goals.

[0026] The method includes the following parts and processes:

[0027] Natural language processing model based on randomized sequence encoding: Based on the original transformer model, use the randomized sequence as the key to generate sequence encoding, and use the generated sequence encoding as the encoding for reco...

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 method for preventing a text stream order transformation attack through a method in the field of artificial intelligence. The method comprises three steps: learning randomized sequence probability distribution based on an EM algorithm; generating a randomized sequence key. The training and deployment of the method need to build a running environment comprising pytorch and a dependency library. The optimal sequence probability distribution for resisting the attack is learned through the EM algorithm, and finally an adversarial sample aiming at the stream order attack is incapable of accurately attacking an order code, thereby achieving the effect of preventing the text stream order attack. The method disclosed by the invention has the technical effects that the attack resisting performance is optimal, and the attack intensity of other text attacks can also be weakened.

Description

technical field [0001] The invention relates to the field of artificial intelligence, in particular to a method for preventing text flow sequence transformation attacks. Background technique [0002] Nowadays, natural language processing has been widely used in real life, such as machine translation, automatic summarization, question answering system, etc. The current mainstream natural language processing models such as Bert (Bidirectional Encoder Representation from Transformers) and its variants are all improved based on the Transformer model, mainly relying on its efficient self-attention mechanism and long-term dependency alignment capabilities. However, the self-attention mechanism cannot capture the order information in the sequence alone, so it is necessary to add positional encoding to fully represent the sequence. However, such a position encoding is only a trigonometric function combined with order information, so it only needs to destroy the linearity of the tri...

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): G06F16/33G06F21/60G06F40/126G06F40/44G06F40/58
CPCG06F16/3344G06F16/3346G06F21/602G06F40/126G06F40/44G06F40/58
Inventor 李建欣周号益张帅何铭睿陈天宇
Owner BEIHANG UNIV
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products