Multi-modal electronic document classification
A method comprising operating at least one hardware processor for: receiving, as input, a plurality of electronic documents, training a machine learning classifier based, at least on part, on a training set comprising: (i) labels associated with the electronic documents, (ii) raw text from each of said plurality of electronic documents, and (iii) a rasterized version of each of said plurality of electronic documents, and applying said machine learning classifier to classify one or more new electronic documents.
1. A method comprising:
operating at least one hardware processor for:
receiving, as input, a plurality of electronic documents;
applying, with respect to each of said plurality of electronic documents, one or more neural networks:
(i) to raw text extracted from the respective electronic document, to generate a data representation of said raw text as a fixed length vector, and
(ii) to a rasterized version of the respective electronic document, to generate a data representation of said rasterized version which corresponds to a visual layout of the respective electronic document;
calculating, with respect to each of said plurality of electronic documents, a correlation between said data representation of said raw text and said data representation of said rasterized version;
generating, with respect to each of said plurality of electronic documents, a combined data representation based, at least in part, on: said data representation of said raw text, said data representation of said rasterized version, and said correlation,
wherein said generating is based, at least in part, on a cost function which:
(i) minimizes an error of reconstructing said raw text from said data representation of said raw text, and said rasterized version from said data representation of said rasterized version,
(ii) minimizes an error of cross-reconstructing said raw text from said data representation of said rasterized version, and said rasterized version from said data representation of said raw text, and
(iii) maximizes said correlation between said data representation of said raw text and said data representation of said rasterized version;
training a machine learning classifier based, at least in part, on a training set comprising:
(i) labels associated with said plurality of electronic documents,
(ii) said combined data representations; and
applying said machine learning classifier to classify one or more new electronic documents.
2. The method of claim 1 , wherein the labels denote document categories.
3. The method of claim 1 , wherein said one or more neural networks are selected from the group consisting of: Neural Bag-of-Words (NBOW), recurrent neural network (RNN), Recursive Neural Tensor Network (RNTN), Convolutional neural network (CNN), Dynamic Convolutional Neural Network (DCNN), Long short-term memory network (LSTM), and recursive neural network (RecNN).
4. The method of claim 1 , wherein said one or more neural networks comprise one or more hidden layers.
5. A system comprising:
at least one hardware processor; and
a non-transitory computer-readable storage medium having stored thereon program instructions, the program instructions executable by the at least one hardware processor to:
receive, as input, a plurality of electronic documents,
apply, with respect to each of said plurality of electronic documents, one or more neural networks:
(i) to raw text extracted from the respective electronic document, to generate a data representation of said raw text as a fixed length vector, and
(ii) to a rasterized version of the respective electronic document, to generate a data representation of said rasterized version which corresponds to a visual layout of the respective electronic document,
calculate, with respect to each of said plurality of electronic documents, a correlation between said data representation of said raw text and said data representation of said rasterized version,
generate, with respect to each of said plurality of electronic documents, a combined data representation based, at least in part, on: said data representation of said raw text, said data representation of said rasterized version, and said correlation,
wherein the generating is based, at least in part, on a cost function which:
(i) minimizes an error of reconstructing said raw text from said data representation of said raw text, and said rasterized version from said data representation of said rasterized version,
(ii) minimizes an error of cross-reconstructing said raw text from said data representation of said rasterized version, and said rasterized version from said data representation of said raw text, and
(iii) maximizes said correlation between said data representation of said raw text and said data representation of said rasterized version,
train a machine learning classifier based, at least in part, on a training set comprising:
(i) labels associated with said plurality of electronic documents,
(ii) said combined data representations; and
apply said machine learning classifier to classify one or more new electronic documents.
6. The system of claim 5 , wherein the labels denote document categories.
7. The system of claim 5 , wherein said one or more neural networks are selected from the group consisting of: Neural Bag-of-Words (NBOW), recurrent neural network (RNN), Recursive Neural Tensor Network (RNTN), Convolutional neural network (CNN), Dynamic Convolutional Neural Network (DCNN), Long short-term memory network (LSTM), and recursive neural network (RecNN).
8. The system of claim 5 , wherein said one or more neural networks comprise one or more hidden layers.
9. A computer program product comprising a non-transitory computer-readable storage medium having program instructions embodied therewith, the program instructions executable by at least one hardware processor to:
receive, as input, a plurality of electronic documents,
apply, with respect to each of said plurality of electronic documents, one or more neural networks:
(i) to raw text extracted from the respective electronic document, to generate a data representation of said raw text as a fixed length vector, and
(ii) to a rasterized version of the respective electronic document, to generate a data representation of said rasterized version which corresponds to a visual layout of the respective electronic document,
calculate, with respect to each of said plurality of electronic documents, a correlation between said data representation of said raw text and said data representation of said rasterized version,
generate, with respect to each of said plurality of electronic documents, a combined data representation based, at least in part, on: said data representation of said raw text, said data representation of said rasterized version, and said correlation,
wherein the generating is based, at least in part, on a cost function which:
(i) minimizes an error of reconstructing said raw text from said data representation of said raw text, and said rasterized version from said data representation of said rasterized version,
(ii) minimizes an error of cross-reconstructing said raw text from said data representation of said rasterized version, and said rasterized version from said data representation of said raw text, and
(iii) maximizes said correlation between said data representation of said raw text and said data representation of said rasterized version,
train a machine learning classifier based, at least in part, on a training set comprising:
(i) labels associated with said plurality of electronic documents,
(ii) said combined data representations; and
apply said machine learning classifier to classify one or more new electronic documents.
10. The computer program product of claim 9 , wherein the labels denote document categories.
11. The computer program product of claim 10 , wherein said one or more neural networks are selected from the group consisting of: Neural Bag-of-Words (NBOW), recurrent neural network (RNN), Recursive Neural Tensor Network (RNTN), Convolutional neural network (CNN), Dynamic Convolutional Neural Network (DCNN), Long short-term memory network (LSTM), and recursive neural network (RecNN).
12. The computer program product of claim 10 , wherein said one or more neural networks comprise one or more hidden layers.