Label induction
Systems and methods for document classification are described. Embodiments of the present disclosure generate classification data for a plurality of samples using a neural network trained to identify a plurality of known classes; select a set of samples for annotation from the plurality of samples using an open-set metric based on the classification data, wherein the annotation includes an unknown class; and train the neural network to identify the unknown class based on the annotation of the set of samples.
1 . A method comprising:
receiving an electronic document;
classifying the electronic document using a neural network to obtain classification data, wherein the neural network is trained by:
creating, in a first training cycle, a first training set based on a plurality of known classes;
training, in the first training cycle, the neural network to classify data according to the plurality of known classes based on the first training set;
creating, in a second training cycle, a second training set by generating classification data including activation values for a plurality of samples across the plurality of known classes using the neural network, clustering the plurality of samples to obtain a plurality of clusters, selecting a cluster of samples from the plurality of clusters using an open-set metric that identifies the cluster of samples with lowest activation values across the plurality of known classes, annotating the selected cluster of samples with a new label corresponding to an unknown class, and including the selected cluster of samples with the new label corresponding to the unknown class in the second training set; and
training, in the second training cycle, the neural network to classify data according to the unknown class based on the second training set; and
displaying the electronic document via a customized user interface based on the classification data.
2 . The method of claim 1 , further comprising:
identifying a document type based on the classification data; and
selecting an interface element associated with the document type, wherein the customized user interface includes the interface element.
3 . A method comprising:
creating, in a first training cycle, a first training set based on a plurality of known classes;
training, in the first training cycle, a neural network to classify data according to the plurality of known classes based on the first training set;
creating, in a second training cycle, a second training set by generating classification data including activation values for a plurality of samples across the plurality of known classes using the neural network, clustering the plurality of samples to obtain a plurality of clusters, selecting a cluster of samples from the plurality of clusters using an open-set metric that identifies the cluster of samples with lowest activation values across the plurality of known classes, annotating the selected cluster of samples with a new label corresponding to an unknown class, and including the selected cluster of samples with the new label corresponding to the unknown class in the second training set; and
training, in the second training cycle, the neural network to classify data according to the unknown class based on the second training set.
4 . The method of claim 3 , further comprising:
computing a multi-label loss based on the classification data and ground truth labels, wherein each of the ground truth labels describes a known class of the plurality of known classes; and
updating parameters of the neural network based on the multi-label loss.
5 . The method of claim 3 , further comprising:
generating a feature embedding corresponding to each of the plurality of samples using the neural network, wherein the classification data is generated based on the feature embedding.
6 . The method of claim 3 , wherein:
the classification data includes prediction logits, uncertainty measures, or both.
7 . The method of claim 3 , wherein:
the open-set metric indicates that the plurality of known classes do not characterize the cluster of samples to a threshold level.
8 . The method of claim 3 , further comprising:
computing an activation logit value for each sample in the selected cluster; and
identifying a maximum activation logit value based on the activation logit value for each sample in the selected cluster, wherein the open-set metric is based on the maximum activation logit value.
9 . The method of claim 8 , wherein:
the selected cluster minimizes the maximum activation logit value.
10 . The method of claim 3 , further comprising:
identifying a class of the plurality of known classes;
excluding the class from the plurality of known classes to obtain a reduced set of known classes; and
computing the open-set metric based on the reduced set of known classes.
11 . The method of claim 3 , further comprising:
displaying the cluster of samples in an annotation interface; and
receiving annotation input via the annotation interface, wherein the training is based on the annotation input.
12 . The method of claim 11 , further comprising:
identifying a shared label of the cluster of samples based on the annotation input, wherein the annotation is based on the shared label.
13 . The method of claim 11 , further comprising:
identifying a distinguishing label of the cluster of samples based on the annotation input, wherein the annotation is based on the distinguishing label.
14 . An apparatus comprising:
a processor;
a memory including instructions executable by the processor to perform operations comprising:
receiving an electronic document;
classifying the electronic document using a neural network to obtain classification data, wherein the neural network is trained by:
creating, in a first training cycle, a first training set based on a plurality of known classes;
training, in the first training cycle, the neural network to classify data according to the plurality of known classes based on the first training set;
creating, in a second training cycle, a second training set by generating classification data including activation values for a plurality of samples across the plurality of known classes using the neural network, clustering the plurality of samples to obtain a plurality of clusters, selecting a cluster of samples from the plurality of clusters using an open-set metric that identifies the cluster of samples with lowest activation values across the plurality of known classes, annotating the selected cluster of samples with a new label corresponding to an unknown class, and including the selected cluster of samples with the new label corresponding to the unknown class in the second training set; and
training, in the second training cycle, the neural network to classify data according to the unknown class based on the second training set; and
displaying the electronic document via a customized user interface based on the classification data.
15 . The apparatus of claim 14 , further comprising:
a training component configured to train the neural network based on the annotation.
16 . The apparatus of claim 14 , further comprising:
an annotation component configured to display the selected cluster of samples in an annotation interface.
17 . The apparatus of claim 14 , further comprising:
a user interface component configured to display the customized user interface based on the classification data generated by the neural network.
18 . The apparatus of claim 14 , wherein:
the neural network includes a transformer network that includes a classification head.