The present application relates generally to computers and computer applications, and more particularly to automated machine learning that can generate summary based on comparison objects.
Comparative analysis reports that cover objects such as products and/or services can be useful in product developments and marketing strategies. However, generating such kinds of reports may be rather time-consuming and may require repetitive and manual work. The reasons can be multi-faceted. For example, the raw data of those objects can be large and scattered across locations, where one would need to read them through to obtain what one is searching for; the source collected from different channels can be described differently in text. Sometimes one may need to convert the descriptions and manually summarize the main points.
The summary of the disclosure is given to aid understanding of a computer system and method of summary generation based on comparison objects, and not with an intent to limit the disclosure or the invention. It should be understood that various aspects and features of the disclosure may advantageously be used separately in some instances, or in combination with other aspects and features of the disclosure in other instances. Accordingly, variations and modifications may be made to the computer system and/or the method of operation to achieve different effects.
A method, in an aspect, can include receiving text descriptions of a target object and at least one comparison object. The method can also include obtaining semantic vectors from the text descriptions, using a deep learning based semantic extraction model. The method can further include inputting the semantic vectors to a generator model trained using an adversarial machine learning technique, where the generator model outputs a text summary of the target object describing only unique characteristics of the target object different from characteristics of the at least one comparison object and excluding the characteristics of the at least one comparison object.
A system, in an aspect, can include at least one processor. The system can also include a memory device coupled with at least one processor. At least one processor can be configured to receive text descriptions of a target object and at least one comparison object. At least one processor can also be configured to obtain semantic vectors from the text descriptions, using a deep learning based semantic extraction model. At least one processor can also be configured to input the semantic vectors to a generator model trained using an adversarial machine learning technique, where the generator model outputs a text summary of the target object describing only unique characteristics of the target object different from characteristics of the at least one comparison object and excluding the characteristics of the at least one comparison object.
A computer readable storage medium storing a program of instructions executable by a machine to perform one or more methods described herein also may be provided.
Further features as well as the structure and operation of various embodiments are described in detail below with reference to the accompanying drawings. In the drawings, like reference numbers indicate identical or functionally similar elements.
Various aspects of the present disclosure are described by narrative text, flowcharts, block diagrams of computer systems and/or block diagrams of the machine logic included in computer program product (CPP) embodiments. With respect to any flowcharts, depending upon the technology involved, the operations can be performed in a different order than what is shown in a given flowchart. For example, again depending upon the technology involved, two operations shown in successive flowchart blocks may be performed in reverse order, as a single integrated step, concurrently, or in a manner at least partially overlapping in time.
A computer program product embodiment (“CPP embodiment” or “CPP”) is a term used in the present disclosure to describe any set of one, or more, storage media (also called “mediums”) collectively included in a set of one, or more, storage devices that collectively include machine readable code corresponding to instructions and/or data for performing computer operations specified in a given CPP claim. A “storage device” is any tangible device that can retain and store instructions for use by a computer processor. Without limitation, the computer readable storage medium may be an electronic storage medium, a magnetic storage medium, an optical storage medium, an electromagnetic storage medium, a semiconductor storage medium, a mechanical storage medium, or any suitable combination of the foregoing. Some known types of storage devices that include these mediums include: diskette, hard disk, 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 versatile disk (DVD), memory stick, floppy disk, mechanically encoded device (such as punch cards or pits/lands formed in a major surface of a disc) or any suitable combination of the foregoing. A computer readable storage medium, as that term is used in the present disclosure, is not to be construed as storage in the form of transitory signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through a waveguide, light pulses passing through a fiber optic cable, electrical signals communicated through a wire, and/or other transmission media. As will be understood by those of skill in the art, data is typically moved at some occasional points in time during normal operations of a storage device, such as during access, de-fragmentation or garbage collection, but this does not render the storage device as transitory because the data is not transitory while it is stored.
Computing environment 100 contains an example of an environment for the execution of at least some of the computer code involved in performing the inventive methods, such as summary generation code 200. In addition to block 200, computing environment 100 includes, for example, computer 101, wide area network (WAN) 102, end user device (EUD) 103, remote server 104, public cloud 105, and private cloud 106. In this embodiment, computer 101 includes processor set 110 (including processing circuitry 120 and cache 121), communication fabric 111, volatile memory 112, persistent storage 113 (including operating system 122 and block 200, as identified above), peripheral device set 114 (including user interface (UI), device set 123, storage 124, and Internet of Things (IoT) sensor set 125), and network module 115. Remote server 104 includes remote database 130. Public cloud 105 includes gateway 140, cloud orchestration module 141, host physical machine set 142, virtual machine set 143, and container set 144.
COMPUTER 101 may take the form of a desktop computer, laptop computer, tablet computer, smart phone, smart watch or other wearable computer, mainframe computer, quantum computer or any other form of computer or mobile device now known or to be developed in the future that is capable of running a program, accessing a network or querying a database, such as remote database 130. As is well understood in the art of computer technology, and depending upon the technology, performance of a computer-implemented method may be distributed among multiple computers and/or between multiple locations. On the other hand, in this presentation of computing environment 100, detailed discussion is focused on a single computer, specifically computer 101, to keep the presentation as simple as possible. Computer 101 may be located in a cloud, even though it is not shown in a cloud in
PROCESSOR SET 110 includes one, or more, computer processors of any type now known or to be developed in the future. Processing circuitry 120 may be distributed over multiple packages, for example, multiple, coordinated integrated circuit chips. Processing circuitry 120 may implement multiple processor threads and/or multiple processor cores. Cache 121 is memory that is located in the processor chip package(s) and is typically used for data or code that should be available for rapid access by the threads or cores running on processor set 110. Cache memories are typically organized into multiple levels depending upon relative proximity to the processing circuitry. Alternatively, some, or all, of the cache for the processor set may be located “off chip.” In some computing environments, processor set 110 may be designed for working with qubits and performing quantum computing.
Computer readable program instructions are typically loaded onto computer 101 to cause a series of operational steps to be performed by processor set 110 of computer 101 and thereby effect a computer-implemented method, such that the instructions thus executed will instantiate the methods specified in flowcharts and/or narrative descriptions of computer-implemented methods included in this document (collectively referred to as “the inventive methods”). These computer readable program instructions are stored in various types of computer readable storage media, such as cache 121 and the other storage media discussed below. The program instructions, and associated data, are accessed by processor set 110 to control and direct performance of the inventive methods. In computing environment 100, at least some of the instructions for performing the inventive methods may be stored in block 200 in persistent storage 113.
COMMUNICATION FABRIC 111 is the signal conduction paths that allow the various components of computer 101 to communicate with each other. Typically, this fabric is made of switches and electrically conductive paths, such as the switches and electrically conductive paths that make up busses, bridges, physical input/output ports and the like. Other types of signal communication paths may be used, such as fiber optic communication paths and/or wireless communication paths.
VOLATILE MEMORY 112 is any type of volatile memory now known or to be developed in the future. Examples include dynamic type random access memory (RAM) or static type RAM. Typically, the volatile memory is characterized by random access, but this is not required unless affirmatively indicated. In computer 101, the volatile memory 112 is located in a single package and is internal to computer 101, but, alternatively or additionally, the volatile memory may be distributed over multiple packages and/or located externally with respect to computer 101.
PERSISTENT STORAGE 113 is any form of non-volatile storage for computers that is now known or to be developed in the future. The non-volatility of this storage means that the stored data is maintained regardless of whether power is being supplied to computer 101 and/or directly to persistent storage 113. Persistent storage 113 may be a read only memory (ROM), but typically at least a portion of the persistent storage allows writing of data, deletion of data and re-writing of data. Some familiar forms of persistent storage include magnetic disks and solid state storage devices. Operating system 122 may take several forms, such as various known proprietary operating systems or open source Portable Operating System Interface type operating systems that employ a kernel. The code included in block 200 typically includes at least some of the computer code involved in performing the inventive methods.
PERIPHERAL DEVICE SET 114 includes the set of peripheral devices of computer 101. Data communication connections between the peripheral devices and the other components of computer 101 may be implemented in various ways, such as Bluetooth connections, Near-Field Communication (NFC) connections, connections made by cables (such as universal serial bus (USB) type cables), insertion type connections (for example, secure digital (SD) card), connections made though local area communication networks and even connections made through wide area networks such as the internet. In various embodiments, UI device set 123 may include components such as a display screen, speaker, microphone, wearable devices (such as goggles and smart watches), keyboard, mouse, printer, touchpad, game controllers, and haptic devices. Storage 124 is external storage, such as an external hard drive, or insertable storage, such as an SD card. Storage 124 may be persistent and/or volatile. In some embodiments, storage 124 may take the form of a quantum computing storage device for storing data in the form of qubits. In embodiments where computer 101 is required to have a large amount of storage (for example, where computer 101 locally stores and manages a large database) then this storage may be provided by peripheral storage devices designed for storing very large amounts of data, such as a storage area network (SAN) that is shared by multiple, geographically distributed computers. IoT sensor set 125 is made up of sensors that can be used in Internet of Things applications. For example, one sensor may be a thermometer and another sensor may be a motion detector.
NETWORK MODULE 115 is the collection of computer software, hardware, and firmware that allows computer 101 to communicate with other computers through WAN 102. Network module 115 may include hardware, such as modems or Wi-Fi signal transceivers, software for packetizing and/or de-packetizing data for communication network transmission, and/or web browser software for communicating data over the internet. In some embodiments, network control functions and network forwarding functions of network module 115 are performed on the same physical hardware device. In other embodiments (for example, embodiments that utilize software-defined networking (SDN)), the control functions and the forwarding functions of network module 115 are performed on physically separate devices, such that the control functions manage several different network hardware devices. Computer readable program instructions for performing the inventive methods can typically be downloaded to computer 101 from an external computer or external storage device through a network adapter card or network interface included in network module 115.
WAN 102 is any wide area network (for example, the internet) capable of communicating computer data over non-local distances by any technology for communicating computer data, now known or to be developed in the future. In some embodiments, the WAN may be replaced and/or supplemented by local area networks (LANs) designed to communicate data between devices located in a local area, such as a Wi-Fi network. The WAN and/or LANs typically include computer hardware such as copper transmission cables, optical transmission fibers, wireless transmission, routers, firewalls, switches, gateway computers and edge servers.
END USER DEVICE (EUD) 103 is any computer system that is used and controlled by an end user (for example, a customer of an enterprise that operates computer 101), and may take any of the forms discussed above in connection with computer 101. EUD 103 typically receives helpful and useful data from the operations of computer 101. For example, in a hypothetical case where computer 101 is designed to provide a recommendation to an end user, this recommendation would typically be communicated from network module 115 of computer 101 through WAN 102 to EUD 103. In this way, EUD 103 can display, or otherwise present, the recommendation to an end user. In some embodiments, EUD 103 may be a client device, such as thin client, heavy client, mainframe computer, desktop computer and so on.
REMOTE SERVER 104 is any computer system that serves at least some data and/or functionality to computer 101. Remote server 104 may be controlled and used by the same entity that operates computer 101. Remote server 104 represents the machine(s) that collect and store helpful and useful data for use by other computers, such as computer 101. For example, in a hypothetical case where computer 101 is designed and programmed to provide a recommendation based on historical data, then this historical data may be provided to computer 101 from remote database 130 of remote server 104.
PUBLIC CLOUD 105 is any computer system available for use by multiple entities that provides on-demand availability of computer system resources and/or other computer capabilities, especially data storage (cloud storage) and computing power, without direct active management by the user. Cloud computing typically leverages sharing of resources to achieve coherence and economies of scale. The direct and active management of the computing resources of public cloud 105 is performed by the computer hardware and/or software of cloud orchestration module 141. The computing resources provided by public cloud 105 are typically implemented by virtual computing environments that run on various computers making up the computers of host physical machine set 142, which is the universe of physical computers in and/or available to public cloud 105. The virtual computing environments (VCEs) typically take the form of virtual machines from virtual machine set 143 and/or containers from container set 144. It is understood that these VCEs may be stored as images and may be transferred among and between the various physical machine hosts, either as images or after instantiation of the VCE. Cloud orchestration module 141 manages the transfer and storage of images, deploys new instantiations of VCEs and manages active instantiations of VCE deployments. Gateway 140 is the collection of computer software, hardware, and firmware that allows public cloud 105 to communicate through WAN 102.
Some further explanation of virtualized computing environments (VCEs) will now be provided. VCEs can be stored as “images.” A new active instance of the VCE can be instantiated from the image. Two familiar types of VCEs are virtual machines and containers. A container is a VCE that uses operating-system-level virtualization. This refers to an operating system feature in which the kernel allows the existence of multiple isolated user-space instances, called containers. These isolated user-space instances typically behave as real computers from the point of view of programs running in them. A computer program running on an ordinary operating system can utilize all resources of that computer, such as connected devices, files and folders, network shares, CPU power, and quantifiable hardware capabilities. However, programs running inside a container can only use the contents of the container and devices assigned to the container, a feature which is known as containerization.
PRIVATE CLOUD 106 is similar to public cloud 105, except that the computing resources are only available for use by a single enterprise. While private cloud 106 is depicted as being in communication with WAN 102, in other embodiments a private cloud may be disconnected from the internet entirely and only accessible through a local/private network. A hybrid cloud is a composition of multiple clouds of different types (for example, private, community or public cloud types), often respectively implemented by different vendors. Each of the multiple clouds remains a separate and discrete entity, but the larger hybrid cloud architecture is bound together by standardized or proprietary technology that enables orchestration, management, and/or data/application portability between the multiple constituent clouds. In this embodiment, public cloud 105 and private cloud 106 are both part of a larger hybrid cloud.
In one or more embodiments, automated generation of summary comparing a target object and one or more comparison objects is provided. In an aspect, the summary that is generated provides only the key differentiators from other comparison objects, and the comparative analysis report generation can be more efficient, save computer processing time, assure quality of the output.
A system, method, and/or technique can generate a summary of a target object, as compared to one or more comparison objects, that only describes the unique characteristics of the target object based on the text descriptions of the target object and one or more comparison objects. The methodology described herein can be useful in performing comparative researches on objects. The methodology can automatically generate a summary from multiple documents written about the same topic. The methodology can involve multi-objects and focus on the target object and its unique characteristics. The generated summary for the target object can avoid any unnecessary conflicts by only describing the unique characteristics of the target object and excluding the descriptions of the characteristics of any related comparison objects.
A method that generates a summary of a target object, in an embodiment, can include the following implementation features. The method may obtain semantic vectors from respective text descriptions of a target object and one or more comparison objects, using a semantic extraction model based on deep learning. A deep learning summary generator takes in as input the obtained semantic vectors of the target object and comparison objects. The summary generator outputs a text summary that only describes the characteristics of the target object which are different from those of comparison objects.
For example,
With the pretrained XLNet, the method may construct a Siamese Neural Network 416 to fine-tune the XLNet. The Siamese Neural Network takes in an article 410 and a summary 412, which can all be randomly selected from a pre-built corpus (e.g., coming from publicly available data). Those three separator tokens ([BOP], [EOP] and [EOS]) are also inserted into each input article or summary as the boundaries. The method may calculate the cosine similarity 418 by a cosine similarity calculation module 414 (e.g., cosine similarity value ranges from −1 to 1) between the two semantic vectors u 406 and v 408 (the outputs of the semantic extraction model). The cosine similarity calculation module 414 can be a computer function implemented on or by hardware or software. Then, the method may calculate the mean absolute error (MAE) loss of the cosine similarity and a corresponding training label. By way of example, the label can be set to 1 if input article and summary belong to the same document; otherwise, the label can be set to −1. The method may use backpropagation to update the parameters of the XLNet.
In an embodiment, an encoder 502 can use long short-term memory (LSTM) networks, or another machine learning model such as, but not limited to, a recurrent neural network (RNN). Firstly, it takes in a semantic vector u which is extracted from the input text description of a target object by using the semantic extraction model 508 (e.g., also shown at 402, 404 in
The generator 506 can use LSTM, or another machine learning model such as a recurrent neural network (RNN), and take in the concatenated result of 1st last hidden state and 2nd last hidden state from the encoder 502 as its initial hidden state. Then, the generator 506 samples existing text tokens (represented as one-hot encoding vectors) to generate a sequence of text tokens (including separator tokens [BOP], [EOP] and [EOS] as sentence/paragraph boundaries) as a new summary.
A discriminator 510 uses a convolutional neural network (CNN) with a highway structure and distinguishes between real summaries or text paragraphs (that is, sequences of one-hot encoded text tokens) from the pre-collected corpus and generated summaries from the generator 506.
A semantic-reward processing module 512 performs the following processing in an embodiment:
Extract the semantic vector s from the generated summary; Calculate the cosine similarity between each pair of semantic vectors, such as (u, s), (v1, s), (v2, s), . . . , (vn, s) (e.g., by cosine similarity calculation module 514 that performs cosine similarity calculation or operation); Calculate semantic reward signal, which is involved in the adversarial training of the generator, based on all cosine similarities. Action-value functions, which can provide rewards based on actions and states are further described below with reference to
Building a training dataset can include crawling massive available articles and paired summaries (e.g., if such summaries exist) from available sources such as (but not limited to) the Internet, together with documents describing multiple comparison objects (e.g., text descriptions of competing products from multiple companies' websites or other sources that are available) to collect data. Building the training dataset can also include preprocessing and tokenizing the collected data. In building the training dataset, for example, after preprocessing and tokenizing the collected data, separator tokens ([BOP], [EOP] and [EOS]) can be inserted into the text tokens of articles and summaries as boundaries. In an embodiment, tokens can be represented as one-hot encoding vectors later.
In an embodiment, before the adversarial training of the summary generator, the following can be performed: train the encoder 502; pretrain the generator 506; and pretrain the discriminator 510.
A processor may pretrain the generator (e.g., 506 in
A processor may pretrain the discriminator (e.g., 510 in
In an embodiment, adversarial training undergoes two different modes of training, e.g., referred to as modal 1 and modal 2.
In each g-step at 710, the training may use a policy gradient to update the generator's parameters. In each d-step at 702, the training may use the current generator to generate fake summaries and combine with real summaries or text paragraphs (from the training dataset) to minimize the cross entropy for the discriminator 704. In an embodiment, the encoder 714 is involved in both g-steps 710 and d-steps 702 to keep encoding input semantic vectors extracted from random articles and delivering its last hidden states. The adversarial training with modal 1 can be continued until the generator converges, e.g., a threshold minimum discrepancy error is reached. Then, the adversarial training with modal 2 can start.
In each g-step at 810, the training can use the policy gradient to update the generator's parameters. In each d-step at 802, the training can use the current generator to generate fake summaries and combine with real summaries or text paragraphs (from the training dataset) to minimize the cross entropy for the discriminator 804. The encoder 814 can be involved in both g-steps 810 and d-steps 802 to keep delivering 1st last hidden state and 2nd last hidden state every time. The adversarial training with modal 2 can be continued until the generator converges, for example, some minimum threshold error or discrepancy has been reached.
The following illustrates an action value function in an embodiment.
For modal 1:
For modal 2:
Where:
At 1004, the method can include obtaining semantic vectors from the text descriptions, using a deep learning based semantic extraction model.
At 1006, the method can include inputting the semantic vectors to a generator model trained using adversarial training technique. At 1008, the generator model outputs a text summary of the target object describing only unique characteristics of the target object different from the at least one comparison object and excluding characteristics of the at least one comparison object.
In an embodiment, the method can also include training the deep learning based semantic extraction model. For example, the semantic extraction model can be pretrained using training documents, by a generalized autoregressive pretraining technique, and refined by constructing a Siamese neural network that takes an article and summary, and computes or uses as a loss function, mean absolute error (MAE) loss of cosine similarity of vectors associated with the article and the summary, and a corresponding training label.
In an aspect, the generator model is trained based on generative adversarial networks. Training of the generator model can include training an encoder, using encoder-decoder architecture, to encode the semantic vectors into hidden states, the generator model using the hidden states output by the encoder, as its initial hidden states.
Training of the generator model can also include pretraining the generator model using Maximum Likelihood Estimation (MLE) based on text-token sequences of summaries and text paragraphs from a training dataset, and using cross entropy loss and backpropagation techniques to update the generator model's parameters, where during the pretraining of the generator model, the generator model's initial hidden state is set to zeros. Training of the generator model can further include pretraining a discriminator via minimizing cross entropy for real versus generated classification based on real text-token sequences of randomly selected text from a training dataset and generated sequences from the pretrained generator model.
Training of the generator model can further include training the generator model in at least two modes. During first mode of training, the generator model uses as initial hidden state, a hidden state generated by the encoder based on a semantic vector extracted from a random article in a training dataset, concatenated with a zero vector, the generator model learning to generate a summary for the random article, at least in part based on a semantic reward signal computed based on a semantic vector extracted from the generated summary and a semantic vector extracted from a real summary associated with the random article. During second mode of training, the generator model uses as initial hidden state, a hidden state generated by the encoder based on a semantic vector extracted from a random target object in the training dataset, concatenated with a hidden state generated by the encoder based on a sequence of semantic vectors extracted from a set of comparison objects in the training dataset, the generator model learning to generate a summary for the random target object, at least in part based on a semantic reward signal computed based on a semantic vector extracted from the generated summary for the random target object and the sequence of semantic vectors extracted from the random target object and the set of comparison objects taken by the encoder.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used herein, the singular forms “a”. “an” and “the” are intended to include the plural forms as well, unless the context clearly indicates otherwise. As used herein, the term “or” is an inclusive operator and can mean “and/or”, unless the context explicitly or clearly indicates otherwise. It will be further understood that the terms “comprise”, “comprises”, “comprising”, “include”, “includes”, “including”, and/or “having,” when used herein, can specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. As used herein, the phrase “in an embodiment” does not necessarily refer to the same embodiment, although it may. As used herein, the phrase “in one embodiment” does not necessarily refer to the same embodiment, although it may. As used herein, the phrase “in another embodiment” does not necessarily refer to a different embodiment, although it may. Further, embodiments and/or components of embodiments can be freely combined with each other unless they are mutually exclusive.
The corresponding structures, materials, acts, and equivalents of all means or step plus function elements, if any, in the claims below are intended to include any structure, material, or act for performing the function in combination with other claimed elements as specifically claimed. The description of the present invention has been presented for purposes of illustration and description, but is not intended to be exhaustive or limited to the invention in the form disclosed. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the invention. The embodiment was chosen and described in order to best explain the principles of the invention and the practical application, and to enable others of ordinary skill in the art to understand the invention for various embodiments with various modifications as are suited to the particular use contemplated.