Methods, computer systems, and non-transitory computer-readable media for training a graph-to-text generation network
By using a combination of dual affine attention scores and depth-first traversal algorithms to train a graph-to-text generation network, the problem of losing structural information when generating output is solved, and more accurate text generation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TENCENT AMERICA LLC
- Filing Date
- 2021-03-19
- Publication Date
- 2026-05-19
AI Technical Summary
Existing graph-to-text generation models are prone to losing the core structural information of the input graph when generating the output.
We employ a dual affine attention score and a depth-first traversal-based algorithm, using two types of autoencoder loss values to focus on different aspects of the input graph, reconstructing ternary relations and linearized sequences to train a graph-to-text generation network.
It effectively preserves the structural information of the input graph, improving the accuracy and fidelity of the generated text.
Smart Images

Figure CN115315733B_ABST
Abstract
Description
[0001] Cross-reference to related applications This application claims the benefit of priority to U.S. Application No. 16 / 883,475, filed May 26, 2020, which is incorporated herein by reference in its entirety. Technical Field
[0002] This disclosure relates generally to the field of computing, and more specifically to methods for training graph-to-text generation networks, computer systems, and nontransitory computer-readable media. Background Technology
[0003] Graph-to-text generation aims to produce sentences that preserve the meaning of the input graph. Text generation tasks can take graph structures as input, such as semantic graphs, knowledge graphs (KGs), and database tables. For example, Abstract Semantic Representation (AMR) to text generation can produce sentences that preserve the meaning of the input AMR graph, which can consist of a set of concepts and their relationships. Similarly, KG to text generation can produce sentences representing KGs, which can contain global factual information about entities and their relationships. Summary of the Invention
[0004] Implementations relate to methods, systems, and computer-readable media for training graph-to-text generation networks. According to one aspect, a method for training a graph-to-text generation network is provided. The method may include receiving encoded graph information corresponding to a target sentence; decoding the encoded graph information based on dual affine attention scores; and determining one or more loss values based on the decoded information, thereby training the graph-to-text generation network by minimizing one or more loss values.
[0005] According to another aspect, a computer system for training a graph-to-text generation network is provided. The computer system may include one or more processors, one or more computer-readable memories, one or more computer-readable tangible storage devices, and program instructions stored on at least one of the one or more storage devices, the program instructions being executable by at least one of the one or more processors via at least one of the one or more memories, thereby enabling the computer system to perform a method. The method may include receiving encoded graph information corresponding to a target sentence; decoding the encoded graph information based on dual affine attention scores; and determining one or more loss values based on the decoded information, thereby training the graph-to-text generation network by minimizing one or more loss values.
[0006] According to another aspect, a computer-readable medium is provided for training a graph-to-text generation network. The computer-readable medium may include one or more computer-readable storage devices and program instructions stored on at least one of the one or more tangible storage devices, the program instructions being executable by a processor. The program instructions, executable by the processor, perform a method that may accordingly include receiving encoded graph information corresponding to a target sentence, decoding the encoded graph information based on dual affine attention scores, and determining one or more loss values based on the decoded information, thereby training the graph-to-text generation network by minimizing one or more loss values.
[0007] The above method can more accurately preserve the structural information of the input graph. Attached Figure Description
[0008] These and other objects, features, and advantages will become apparent from the following detailed description of illustrative embodiments, which will be read in conjunction with the accompanying drawings. The various features in the drawings are not to scale, as the illustrations are intended to clearly facilitate understanding by those skilled in the art in conjunction with the detailed description. In the drawings:
[0009] Figure 1 A networked computer environment according to at least one embodiment is illustrated;
[0010] Figure 2 It is a block diagram of a procedure for training a graph-to-text generation network according to at least one embodiment;
[0011] Figure 3 This is an operation flowchart illustrating the operations performed by a program for training a graph-to-text generation network according to at least one embodiment;
[0012] Figure 4 It is based on at least one embodiment. Figure 1 A block diagram depicting the internal and external components of a computer and server;
[0013] Figure 5 It includes, according to at least one embodiment. Figure 1 A block diagram illustrating a cloud computing environment for a computer system; and
[0014] Figure 6 It is based on at least one embodiment. Figure 5 A block diagram illustrating the functional layers of an illustrative cloud computing environment. Detailed Implementation
[0015] Detailed embodiments of the claimed structures and methods are disclosed herein; however, it is to be understood that the disclosed embodiments are merely illustrative of the claimed structures and methods, which can be implemented in various forms. Such structures and methods may be implemented in many different forms and should not be construed as limited to the exemplary embodiments set forth herein. Rather, these exemplary embodiments are provided so that this disclosure will be comprehensive and complete, and will fully convey the scope to those skilled in the art. Details of well-known features and techniques are omitted in the description to avoid unnecessarily obscuring the presented embodiments.
[0016] The implementations generally relate to the field of computation, and more specifically to natural language processing. The exemplary implementations described below provide systems, methods, and program products for training graph-to-text generation networks, etc. Therefore, some implementations have the capability to improve the computational domain by allowing improved training of graph-to-text generation networks based on different types of autoencoding losses, each focusing independently on different aspects of the input graph to prevent the loss of structural information associated with the input graph.
[0017] As previously mentioned, graph-to-text generation aims to produce sentences that preserve the meaning of the input graph. Text generation tasks can take graph structures as input, such as semantic graphs, knowledge graphs (KGs), and database tables. For example, AMR-to-text generation can produce sentences that preserve the meaning of the input AMR graph, which can consist of a set of concepts and their relationships. Similarly, KG-to-text generation can produce sentences representing a KG, which can contain global factual information about entities and their relationships. However, some graph-to-text models may lose core structural information about the input graph when generating output. Therefore, it would be advantageous to utilize richer training signals that can guide the model to preserve input information. In particular, two types of autoencoding losses can be used, each focusing separately on different aspects (i.e., views) of the input graph. The losses can then be backpropagated to better calibrate the model via multi-task training.
[0018] In this document, aspects are described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer-readable media according to various embodiments. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer-readable program instructions.
[0019] Now refer to Figure 1 A functional block diagram of a networked computing environment is shown, illustrating a graphics-to-text generation system 100 (hereinafter referred to as the "System") for training graphics-to-text generation networks. It should be understood that... Figure 1This illustration provides only one possible implementation and does not imply any limitation on the environment in which different implementations can be carried out. Many modifications can be made to the depicted environment based on design and implementation requirements.
[0020] System 100 may include computer 102 and server computer 114. Computer 102 may communicate with server computer 114 via communication network 110 (hereinafter referred to as "network"). Computer 102 may include processor 104 and software program 108 stored on data storage device 106. Computer 102 is capable of interfacing with a user and communicating with server computer 114. Reference will be made below. Figure 4 The computer 102 discussed may include internal components 800A and external components 900A, and the server computer 114 may include internal components 800B and external components 900B. The computer 102 may be, for example, a mobile device, telephone, personal digital assistant, netbook, laptop computer, tablet computer, desktop computer, or any type of computing device capable of running programs, accessing networks, and accessing databases.
[0021] As shown below Figure 5 and Figure 6 The server computer 114 discussed herein can also operate in cloud computing service models such as Software as a Service (SaaS), Platform as a Service (PaaS), or Infrastructure as a Service (IAS). The server computer 114 can also reside in cloud computing deployment models such as private clouds, community clouds, public clouds, or hybrid clouds.
[0022] A server computer 114, which can be used to train a graph-to-text generation network, is capable of running a graph-to-text generation program 116 (hereinafter referred to as the "program") that can interact with a database 112. Below is about... Figure 3 The graphic-to-text generation method will be described in more detail below. In one embodiment, computer 102 may operate as an input device including a user interface, while program 116 may run primarily on server computer 114. In an alternative embodiment, program 116 may run primarily on one or more computers 102, while server computer 114 may be used to process and store data used by program 116. It should be noted that program 116 may be a standalone program or may be integrated into a larger graphic-to-text generation program.
[0023] However, it should be noted that in some cases, processing of program 116 can be distributed between computer 102 and server computer 114 in any ratio. In another embodiment, program 116 can operate on more than one computer, server computer, or a combination of computers and server computers, such as multiple computers 102 communicating with a single server computer 114 across network 110. In another embodiment, for example, program 116 can operate on multiple server computers 114 communicating with multiple client computers across network 110. Alternatively, the program can operate on a network server communicating with both servers and multiple client computers across a network.
[0024] Network 110 may include wired connections, wireless connections, fiber optic connections, or combinations thereof. Typically, network 110 may be any combination of connections and protocols supporting communication between computer 102 and server computer 114. Network 110 may include various types of networks, such as, for example, Local Area Networks (LANs), Wide Area Networks (WANs) such as the Internet, telecommunications networks such as Public Switched Telephone Networks (PSTNs), wireless networks, public switched networks, satellite networks, cellular networks (e.g., Fifth Generation (5G) networks, Long-Term Evolution (LTE) networks, Third Generation (3G) networks, Code Division Multiple Access (CDMA) networks, etc.), Public Land Mobile Networks (PLMNs), Metropolitan Area Networks (MANs), private networks, self-organizing networks, intranets, fiber-optic-based networks, etc., and / or combinations of these or other types of networks.
[0025] supply Figure 1 The number and arrangement of devices and networks shown are for illustrative purposes. In practice, similar arrangements may exist. Figure 1 The equipment and / or network shown is compared to additional equipment and / or networks, fewer equipment and / or networks, different equipment and / or networks, or equipment and / or networks with different arrangements. Furthermore, Figure 1 The two or more devices shown can be implemented within a single device, or Figure 1The single device shown can be implemented as multiple distributed devices. Additionally or alternatively, a group of devices in system 100 (e.g., one or more devices) can perform one or more functions described as being performed by another group of devices in system 100.
[0026] Reference Figure 2 A block diagram 200 depicts a graphics-to-text generation system. Figure 2 It can be used with Figure 1 The exemplary embodiments depicted are described below. Accordingly, the graphics-to-text generation system may include an encoder-decoder 202 and a language modeling loss module 204, etc. According to one embodiment, the graphics-to-text generation system may be located in computer 102 ( Figure 1 According to an alternative implementation, the graphics-to-text generation system may be located on server computer 114. Figure 1 The encoder-decoder 202 can be configured to receive input graph data 206 and calculate an attention score for the input graph data 206, which can be used by the language modeling loss module 204.
[0027] The language modeling loss module 204 can output loss values L1 and L2 based on ternary relations and linearized graphs, respectively. Loss values L1 and L2 can be generated by reconstructing multiple views of the input graph, where each view represents a different aspect of the input. By using loss values L1 and L2 based on different aspects of the input graph, the model can be used to more accurately preserve the structural information of the input graph.
[0028] The first loss value, L1, can be generated by reconstructing triples based on biaffine attention scores. Each input graph can be partitioned into a set of triples, whereby each triple can contain a pair of nodes and their labeled relationships. Pre-generated alignments between graph nodes and target words can be used to... Figure 3 The tuple is obtained on the target sentence. The output can contain several labeled arcs, where each arc connects a pair of words. While each arc can represent a local relation, the combination of arcs can also suggest the global input structure. In AMR-to-text generation, an aligner can be used to link AMR nodes to words. For knowledge graphs, alignment can be generated through rule-based matching or entity linking systems. The resulting structure with labeled arcs connecting word pairs can resemble a dependency tree. A deep biaffine model can be used to predict this structure based on the decoder state.
[0029] Complementing the first loss value L1 used to reconstruct the local information of each underlying triplet, a second loss value L2 can be used to predict the entire graph as a linearized sequence. To minimize the loss of graph structural information caused by linearization, a depth-first traversal-based algorithm can be employed, which can insert brackets to preserve the graph's extent. It is understood that while the original graph can be predicted directly without loss of structural information, each type of graph can have its own analytical algorithm due to its unique properties (e.g., directed vs. undirected, rooted vs. unrooted, etc.). Therefore, linearization can be used for most types of graphs. Given a linearized graph represented as a sequence of tokens, where each token can be a graph node, edge marker, or inserted brackets, a standard converter decoder can be used to generate the sequence.
[0030] Now refer to Figure 3 The flowchart 300 illustrates the operations performed by the program used to train the graph-to-text generation network. Figure 3 It can be used with Figure 1 and Figure 2 To describe. As mentioned earlier, the graphics-to-text generation program 116 ( Figure 1 It can quickly and effectively determine the relationship between one or more entities in a sentence.
[0031] At position 302, the encoded graph information corresponding to the target sentence is received. The encoded graph may contain structural information that can be expected to be preserved. During operation, server computer 114 ( Figure 1 Graphics to text generation program 116 ( Figure 1 It can receive 206 input image data. Figure 2 According to one implementation, the communication network 110 can be used to access the computer 102 (…). Figure 1 ) Receive input image data 206. According to an alternative implementation, it can be obtained from database 112 ( Figure 1 Retrieve input graph data 206 from the database.
[0032] At position 304, the encoded graph information is decoded based on the dual affine attention score. The dual affine attention score can be used to align the input graph data with the target sentence. During operation, the encoder-decoder 202 ( Figure 2 ) can calculate the input graph data 206 ( Figure 2 The attention score of the input graph data 206 ( Figure 2 Map back to the target sentence.
[0033] At point 306, one or more loss values are determined based on the decoded information, wherein the graph-to-text generation network is trained by minimizing one or more loss values. The first loss value is generated by reconstructing one or more ternary relations based on biaffine attention scores, and the second loss value predicts the graph as a linearized sequence. In operation, the language modeling loss module 204 can compute loss values L1 and L2 based on the attention scores of the input graph data 206. Loss values L1 and L2 can be used to train the graph-to-text generation network by feeding these loss values as input to the network.
[0034] Understandable. Figure 3 This illustration provides only one possible implementation and does not imply any limitations on how different implementations can be achieved. Many modifications can be made to the depicted environment based on design and implementation requirements.
[0035] Figure 4 According to the illustrative implementation method Figure 1 Block diagram 400 depicts the internal and external components of a computer. It should be understood that... Figure 4 This illustration provides only one possible implementation and does not imply any limitation on the environment in which different implementations can be carried out. Many modifications can be made to the depicted environment based on design and implementation requirements.
[0036] Computer 102 ( Figure 1 ) and server computer 114 ( Figure 1 ) can include Figure 4 The internal components 800A, 800B and the corresponding groups of external components 900A, 900B are shown. Each group of internal components 800A, 800B includes one or more processors 820 on one or more buses 826, one or more computer-readable RAMs 822 and one or more computer-readable ROMs 824, one or more operating systems 828 and one or more computer-readable tangible storage devices 830.
[0037] Processor 820 is implemented in hardware, firmware, or a combination of hardware and software. Processor 820 is a Central Processing Unit (CPU), Graphics Processing Unit (GPU), Accelerated Processing Unit (APU), microprocessor, microcontroller, Digital Signal Processor (DSP), Field-Programmable Gate Array (FPGA), Application-Specific Integrated Circuit (ASIC), or another type of processing unit. In some implementations, processor 820 includes one or more processors that can be programmed to perform functions. Bus 826 includes components that allow communication between internal components 800A and 800B.
[0038] One or more operating systems 828, software programs 108 ( Figure 1 ) and server computer 114 ( Figure 1 Graphics to text generation program 116 ( Figure 1 The data is stored on one or more corresponding computer-readable tangible storage devices 830 for execution by one or more corresponding processors 820 via one or more corresponding RAMs 822 (which typically include cache memory). Figure 4 In the illustrated embodiments, each of the computer-readable tangible storage devices 830 is a disk storage device of an internal hard disk drive. Alternatively, each of the computer-readable tangible storage devices 830 is a semiconductor storage device such as ROM 824, EPROM, flash memory, optical disc, magneto-optical disc, solid-state disk, compact disc (CD), digital versatile disk (DVD), floppy disk, cassette tape, magnetic tape, and / or another type of non-transitory computer-readable tangible storage device capable of storing computer programs and digital information.
[0039] Each group of internal components 800A, 800B also includes an R / W drive or interface 832 for reading from and writing to one or more portable computer-readable tangible storage devices 936, such as CD-ROMs, DVDs, memory sticks, magnetic tapes, disks, optical discs, or semiconductor storage devices. Such as software programs 108 ( Figure 1 ) and graphics-to-text generation program 116 ( Figure 1The software program can be stored on one or more corresponding portable computer-readable tangible storage devices 936, read via corresponding R / W drives or interfaces 832, and loaded into corresponding hard disk drives 830.
[0040] Each set of internal components 800A and 800B also includes a network adapter or interface 836, such as a TCP / IP adapter card; a wireless Wi-Fi interface card; or a 3G, 4G, or 5G wireless interface card or other wired or wireless communication links. Software program 108 ( Figure 1 ) and server computer 114 ( Figure 1 Graphics to text generation program 116 ( Figure 1 ) can be downloaded from an external computer to computer 102 via a network (such as the Internet, LAN or other, WAN) and a corresponding network adapter or interface 836. Figure 1 The network includes a network adapter or interface 836 and a server computer 114. Software program 108 and a graphics-to-text generation program 116 on server computer 114 are loaded from the network adapter or interface 836 into the corresponding hard disk drive 830. The network may include copper wire, fiber optic, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers.
[0041] Each set of external components 900A, 900B may include a computer display detector 920, a keyboard 930, and a computer mouse 934. External components 900A, 900B may also include a touchscreen, virtual keyboard, touchpad, pointing device, and other human-machine interface devices. Each set of internal components 800A, 800B also includes a device driver 840 connected to the computer display detector 920, keyboard 930, and computer mouse 934. Device driver 840, R / W driver or interface 832, and network adapter or interface 836 include hardware and software (stored in storage device 830 and / or ROM 824).
[0042] It should be understood in advance that although this disclosure includes a detailed description of cloud computing, the implementation of the teachings described herein is not limited to cloud computing environments. Rather, some implementations can be combined with any other type of computing environment now known or developed in the future.
[0043] Cloud computing is a service delivery model for enabling convenient, on-demand network access to a shared pool of configurable computing resources (such as networks, network bandwidth, servers, processing, storage, storage devices, applications, virtual machines, and services) that can be rapidly provisioned and released with minimal management effort or interaction with service providers. This cloud model may include at least five features, at least three service models, and at least four deployment models.
[0044] The characteristics are as follows:
[0045] On-demand self-service: Cloud consumers can unilaterally and automatically provide computing power, such as server time and network storage, as needed, without requiring manual interaction with service providers.
[0046] Extensive network access: Capabilities can be obtained via the network and accessed through standard mechanisms that facilitate the use of heterogeneous thin or thick client platforms, such as mobile phones, laptops, and PDAs.
[0047] Resource pooling: A provider's computing resources are pooled to serve multiple consumers using a multi-tenant model, where different physical and virtual resources are dynamically allocated and reallocated based on demand. There is a sense of location agnosticity because consumers typically do not control or know the exact location of the resources provided, but can specify the location at a higher level of abstraction (e.g., country, state, or data center).
[0048] Rapid and flexible: Capabilities can be provided quickly and flexibly (in some cases automatically) to scale outwards rapidly and released quickly to scale inwards rapidly. For consumers, the capacity available for provision often appears unlimited and can be purchased at any time and in any quantity.
[0049] Measurement services: Cloud systems automatically control and optimize resource usage by leveraging metering capabilities at some level of abstraction appropriate to service types (such as storage, processing, bandwidth, and active user accounts). Resource usage can be detected, controlled, and reported, providing transparency for both service providers and consumers.
[0050] The service model is as follows:
[0051] Software as a Service (SaaS): This provides consumers with the ability to use a provider's applications running on cloud infrastructure. These applications can be accessed from various client devices through a thin client interface such as a web browser (e.g., web-based email). Consumers do not manage or control the underlying cloud infrastructure, including the network, servers, operating system, storage devices, or even individual application capabilities, with possible exceptions such as limited user-specific application configuration settings.
[0052] Platform as a Service (PaaS): This provides consumers with the ability to deploy consumer-created or acquired applications, built using programming languages and tools supported by the provider, onto cloud infrastructure. Consumers do not manage or control the underlying cloud infrastructure, including networks, servers, operating systems, or storage devices, but they have control over the deployed applications and the configuration of the hosting environment.
[0053] Infrastructure as a Service (1aaS): The capabilities provided to consumers are processing, storage, networking, and other basic computing resources that enable consumers to deploy and run arbitrary software, which may include operating systems and applications. Consumers do not manage or control the underlying cloud infrastructure, but have control over the operating system, storage, deployed applications, and possibly limited control over selected networking components (e.g., the main firewall).
[0054] The deployment model is as follows:
[0055] Private cloud: Cloud infrastructure for organization operations only. The cloud infrastructure can be managed by the organization or a third party, and can exist on-premises or off-premises.
[0056] Community cloud: Cloud infrastructure shared by several organizations and supporting a specific community with common concerns (e.g., missions, security requirements, policies, and compliance considerations). The cloud infrastructure can be managed by the organization or a third party and can reside on-premises or externally.
[0057] Public cloud: Cloud infrastructure that is available to the general public or large industry groups and is owned by organizations that sell cloud services.
[0058] Hybrid cloud: A cloud infrastructure is a combination of two or more clouds (private, community, or public) that remain a single entity but are bound together by standardized or proprietary technologies that enable data and application portability (e.g., cloud bursts for load balancing between clouds).
[0059] Cloud computing environments are service-oriented, focusing on statelessness, loose coupling, modularity, and semantic interoperability. At the heart of cloud computing is the infrastructure that includes a network of interconnected nodes.
[0060] Reference Figure 5The illustration depicts a cloud computing environment 500. As shown, the cloud computing environment 500 includes one or more cloud computing nodes 10, and local computing devices used by cloud consumers, such as personal digital assistants (PDAs) or cellular phones 54A, desktop computers 54B, laptop computers 54C, and / or automotive computer systems 54N, can communicate with one or more cloud computing nodes 10. The cloud computing nodes 10 can communicate with each other. The cloud computing nodes 10 can be physically or virtually grouped (not shown) in one or more networks, such as private clouds, community clouds, public clouds, or hybrid clouds or combinations thereof as described above. This allows the cloud computing environment 500 to provide infrastructure, platform, and / or software as a service, without requiring cloud consumers to maintain resources on their local computing devices for this service. It should be understood that... Figure 5 The types of computing devices 54A to 54N shown are intended to be illustrative only, and the cloud computing node 10 and cloud computing environment 500 can communicate with any type of computerized device via any type of network and / or network-addressable connection (e.g., using a web browser).
[0061] Reference Figure 6 This demonstrates the 500-fold cloud computing environment ( Figure 5 This provides a set of functional abstraction layers, 600. It should be understood beforehand that... Figure 6 The components, layers, and functions shown are intended to be illustrative only, and the implementation is not limited thereto. As depicted, the following layers and corresponding functions are provided:
[0062] The hardware and software layer 60 includes hardware components and software components. Examples of hardware components include: a mainframe 61; a server 62 based on a RISC (Reduced Instruction Set Computer) architecture; a server 63; a blade server 64; a storage device 65; and networking and interconnection components 66. In some implementations, software components include network application server software 67 and database software 68.
[0063] The virtual layer 70 provides an abstraction layer from which the following examples of virtual entities can be provided: virtual server 71; virtual storage device 72; virtual network including virtual private network 73; virtual application and operating system 74; and virtual client 75.
[0064] In one example, management layer 80 can provide the following functionalities: Resource Provisioning 81 provides dynamic acquisition of computing resources and other resources used to perform tasks within the cloud computing environment. Metering and Pricing 82 provides cost tracking for utilizing resources within the cloud computing environment, as well as billing or invoicing for the consumption of these resources. In one example, these resources may include application software licenses. Security provides authentication for cloud consumers and tasks, and protection for data and other resources. User Portal 83 provides access to the cloud computing environment for consumers and system administrators. Service Level Management 84 provides allocation and management of cloud computing resources to meet the required service level. Service Level Agreement (SLA) Planning and Fulfillment 85 provides pre-scheduling and acquisition of cloud computing resources, anticipating future demand for those resources according to the SLA.
[0065] Workload layer 90 provides examples of functionalities that can be leveraged in a cloud computing environment. Examples of workloads and functionalities that can be provided from this layer include: drawing and navigation 91; software development and lifecycle management 92; virtual classroom delivery 93; data analysis and processing 94; transaction processing 95; and graph-to-text generation 96. Graph-to-text generation 96 can be used to train a graph-to-text generation network.
[0066] Some implementations may involve systems, methods, and / or computer-readable media at any possible level of integration technical detail. A computer-readable medium may include one or more computer-readable non-transitory storage media having computer-readable program instructions on it for causing a processor to perform operations.
[0067] A computer-readable storage medium can be a tangible device capable of retaining and storing instructions for use by an instruction execution device. For example, a computer-readable storage medium can be, but is not limited to, electronic storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination of the foregoing. A non-exhaustive list of more specific examples of computer-readable storage media includes the following: portable computer floppy disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices such as punched cards or raised structures in recesses on which instructions are recorded, and any suitable combination of the foregoing. As used herein, computer-readable storage media should not be construed as transient signals themselves, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., optical pulses transmitted through fiber optic cables), or electrical signals transmitted through wires.
[0068] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to a suitable computing / processing device, or downloaded via a network such as the Internet, local area network, wide area network, and / or wireless network to an external computer or external storage device. The network may include copper cables, optical fibers, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to a computer-readable storage medium within the suitable computing / processing device.
[0069] Computer-readable program code / instructions used to perform operations can be assembly instructions, instruction-set-architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, integrated circuit configuration data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages (e.g., Smalltalk, C++, etc.) and procedural programming languages (e.g., the "C" programming language or similar programming languages). The computer-readable program instructions can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer can be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the use of the Internet provided by an Internet service provider). In some implementations, electronic circuits, including, for example, programmable logic circuits, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), can be specialized by executing computer-readable program instructions using state information of computer-readable program instructions in order to perform aspects or operations.
[0070] These computer-readable program instructions may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions / actions specified in one or more blocks of a flowchart and / or block diagram. These computer-readable program instructions may also be stored in a computer-readable storage medium that can direct a computer, programmable data processing apparatus, and / or other device to operate in a particular manner, such that the computer-readable storage medium in which the instructions are stored includes an article of writing comprising instructions for implementing aspects of the functions / actions specified in one or more blocks of a flowchart and / or block diagram.
[0071] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus or other device to cause a series of operational steps to be performed on the computer, other programmable apparatus or other device to produce a computer-implemented process, and to cause the instructions to be performed on the computer, other programmable apparatus or other device to perform the functions / actions specified in one or more blocks of a flowchart and / or block diagram.
[0072] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer-readable media according to various embodiments. In this regard, each block in a flowchart or block diagram may represent a portion of a module, segment, or instruction, comprising one or more executable instructions for implementing a specified logical function. The method, computer system, and computer-readable medium may include additional blocks, fewer blocks, different blocks, or blocks arranged differently compared to those depicted in the drawings. In some alternative implementations, the functions indicated in a block may occur in a different order than indicated in the drawings. For example, two blocks shown consecutively may actually be executed simultaneously or substantially simultaneously, or the blocks may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified function or action or executes a combination of dedicated hardware and computer instructions.
[0073] It will be apparent that the systems and / or methods described herein can be implemented in various forms, including hardware, firmware, or a combination of hardware and software. The actual dedicated control hardware or software code used to implement these systems and / or methods is not limited in its implementation. Therefore, the operation and behavior of the systems and / or methods are described herein without reference to any specific software code—it should be understood that software and hardware can be designed to implement the systems and / or methods based on the descriptions herein.
[0074] Unless explicitly stated otherwise, no element, action, or instruction used herein should be construed as critical or necessary. Furthermore, as used herein, the article “a (a or an)” is intended to include one or more items and may be used interchangeably with “one or more.” Additionally, as used herein, the term “group” is intended to include one or more items (e.g., related items, unrelated items, combinations of related and unrelated items, etc.) and may be used interchangeably with “one or more.” The term “one” or similar language is used when referring to only one item. Furthermore, as used herein, the terms “has,” “have,” “having,” etc., are intended to be open-ended terms. Additionally, unless explicitly stated otherwise, the phrase “based on” is intended to mean “at least partially based on.”
[0075] The description of various aspects and implementations has been presented for illustrative purposes, but is not intended to be exhaustive or limited to the disclosed implementations. Even though combinations of features are recited in the claims and / or disclosed in the specification, these combinations are not intended to limit the disclosure of possible implementations. In fact, many of these features can be combined in ways not specifically recited in the claims and / or not disclosed in the specification. Although each listed dependent claim may directly refer to only one claim, the disclosure of possible implementations includes combinations of each dependent claim with each other claim in the claim set. Many modifications and variations will be apparent to those skilled in the art without departing from the scope of the described implementations. The terminology used herein has been chosen to best illustrate the principles of the implementations, their practical application, or technical improvements to techniques found in the market, or to enable others skilled in the art to understand the implementations disclosed herein.
Claims
1. A method for training a graph-to-text generation network, characterized in that, The method includes: Receive the encoded graph information corresponding to the target sentence; Decoding the encoded graph information based on dual affine attention scores; and One or more loss values are determined based on the decoded information, wherein a second loss value predicts the graph as a linearized sequence, and depth-first graph traversal is used to preserve the range associated with the graph, wherein the loss of structural information associated with the graph caused by linearization is minimized, and the graph-to-text generation network is trained by minimizing the one or more loss values.
2. The method according to claim 1, characterized in that, The first loss value is generated by reconstructing one or more ternary relations based on the dual affine attention score.
3. The method according to claim 2, characterized in that, Each of the one or more ternary relations comprises a pair of nodes and a tag relation associated with the pair of nodes.
4. The method according to claim 3, characterized in that, Map one or more ternary relations to the target sentence based on one or more pre-generated alignments between graph nodes and target words.
5. The method according to claim 1, characterized in that, A linearized graph consists of a sequence of one or more tokens, wherein each token includes one or more of the following: graph nodes, edge markers, and inserted brackets.
6. A computer system for training a graph-to-text generation network, characterized in that, The computer system includes: One or more computer-readable non-transitory storage media configured to store computer program code; and One or more computer processors configured to access the computer program code and perform the method as indicated by the computer program code as described in any one of claims 1-5.
7. A non-transitory computer-readable medium having stored thereon a computer program for training a graph-to-text generation network, said computer program being configured to cause one or more computer processors to perform the method as described in any one of claims 1-5.