<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Hierarchical Metadata-Aware Document Categorization under Weak Supervision</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>03/08/2021</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10279804</idno>
					<idno type="doi">10.1145/3437963.3441730</idno>
					<title level='j'>WSDM'21, The Fourteenth ACM International Conference on Web Search and Data Mining, March 2021</title>
<idno></idno>
<biblScope unit="volume">2021</biblScope>
<biblScope unit="issue">1</biblScope>					

					<author>Yu Zhang</author><author>Xiusi Chen</author><author>Yu Meng</author><author>Jiawei Han</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Categorizing documents into a given label hierarchy is intuitively appealing due to the ubiquity of hierarchical topic structures in massive text corpora. Although related studies have achieved satisfying performance in fully supervised hierarchical document classification, they usually require massive human-annotated training data and only utilize text information. However, in many domains, (1) annotations are quite expensive where very few training samples can be acquired; (2) documents are accompanied by metadata information. Hence, this paper studies how to integrate the label hierarchy, metadata, and text signals for document categorization under weak supervision. We develop HiMeCat, an embedding-based generative framework for our task. Specifically, we propose a novel joint representation learning module that allows simultaneous modeling of category dependencies, metadata information and textual semantics, and we introduce a data augmentation module that hierarchically synthesizes training documents to complementthe original, small-scale training set. Our experiments demonstrate a consistent improvement of HiMeCat over competitive baselines and validate the contribution of our representation learning and data augmentation modules.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><p>necessary due to their pervasiveness in web directories <ref type="foot">1</ref> , business category lists<ref type="foot">foot_1</ref> and many other domains (Figure <ref type="figure">1</ref>).</p><p>Although recent studies on hierarchy-aware neural models <ref type="bibr">[24,</ref><ref type="bibr">44,</ref><ref type="bibr">55]</ref> and pre-trained language models <ref type="bibr">[5,</ref><ref type="bibr">38]</ref> greatly improve the performance of (hierarchical) text categorization, they are less concerned with two challenges in real applications:</p><p>Limited Training Data. Neural classifiers are data hungry and require a significant amount of manually labeled training documents to achieve good performance. In some scientific domains (e.g., arXiv papers and GitHub repositories), to obtain a large training set is expensive because annotations have to be acquired from domain experts. In these scenarios, it would be favorable to perform classification without much annotation effort. To be specific, one may only expect very few (e.g., <ref type="bibr">5</ref>) training examples for each category.</p><p>Heterogeneous Signals. Documents on the Web are often accompanied by metadata information. We raise three examples in Figure <ref type="figure">1</ref>: each GitHub repository has its creator and several topic tags; each arXiv paper has its author(s); each Amazon review is associated with a user and a product. These signals, as potential category indicators, should be considered together with the plain text sequence. Moreover, the label hierarchy, which reflects category dependencies and correlation, should also be viewed as one type of signal. In recognition of these heterogeneous signals, how can we jointly leverage them during category inference?</p><p>In this paper, to tackle the two challenges, we develop HiMe-Cat, an embedding-based generative framework for Hierarchical Metadata-aware document Categorization under weak supervision. HiMeCat features a hierarchical generative process in the embedding space to simultaneously model (1) category dependencies via a top-down generative assumption along the label hierarchy, (2) metadata information via a joint generative assumption that documents are dependent on both their categories and metadata, and (3) textual semantics via a document-word generative assumption. This hierarchical generative process guides the two important steps of our method: (1) representation learning: Maximizing the likelihood of the hierarchical generative process yields an embedding learning objective which jointly optimizes the representations of the label hierarchy, metadata and texts to effectively exploit the heterogeneous signals;</p><p>(2) data augmentation: Following the hierarchical generative process allows us to synthesize training documents that augment the original, small-scale training set, which overcomes the limited training data challenge. Combining real and synthesized training data, we train a neural classifier for hierarchical text categorization by taking word representations learned from the previous step as embedding initialization.</p><p>Inspired by related studies on spherical hierarchical clustering <ref type="bibr">[13]</ref> and spherical text embedding <ref type="bibr">[29]</ref> which better capture directional similarities and outperform Euclidean space models, we propose to define our hierarchical generative process in the spherical space, where conditional probabilities are described by the von Mises-Fisher (vMF) distribution <ref type="bibr">[8]</ref> and Riemannian optimization <ref type="bibr">[2]</ref> is adopted for embedding learning.</p><p>To summarize, our contributions are as follows:</p><p>&#8226; We explore the task of jointly leveraging limited supervision and metadata information for hierarchical text classification. &#8226; We develop HiMeCat with a representation learning module and a data augmentation module guided by a novel hierarchical generative process in the spherical space. Our representation learning module jointly learns embeddings from heterogeneous signals, and our data augmentation module synthesizes training documents to address the supervision scarcity bottleneck. &#8226; We conduct comprehensive experiments on three datasets from different domains and observe a consistent improvement of HiMe-Cat over competitive baselines. We also show that leveraging the hierarchy, leveraging metadata, and generating training samples are all beneficial to the categorization performance.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">PRELIMINARIES 2.1 Problem Definition</head><p>The inputs of our hierarchical metadata-aware text categorization task are a collection of documents D = {&#119889; 1 , ..., &#119889; | D | } and a label hierarchy T . Each document &#119889; &#119894; &#8712; D has both text and metadata information. We explain these concepts one by one.</p><p>Text. In this paper, text refers to all free-text fields of a document. For example, in Figure <ref type="figure">1</ref>, a GitHub repository has its description and README file as text information; an arXiv paper has its title and abstract. To simplify our discussion, we concatenate all these fields into one word sequence, denoted as &#119908; 1 &#119908; 2 ...&#119908; &#119899; .</p><p>Metadata. Each document can have multiple types of metadata (e.g., an Amazon review has both user and product information). Given a specific metadata type, there may be an arbitrary number (could be zero) of metadata instances associated with a document (e.g., a repository may have no tags, and a paper can have more than one author). For a document &#119889;, we represent its metadata as a set of metadata instances</p><p>Label Hierarchy. We assume the label hierarchy T has a tree structure. Each node &#119897; &#8712; T represents a category. If, in some cases, T is a directed acyclic graph (DAG), we follow <ref type="bibr">[55]</ref> and convert T to a tree by distinguishing each label node as a single-path node. Formally, we define our task as follows:</p><p>Problem Definition. Given a collection of documents D and a label hierarchy T , where each leaf category &#119897; &#8712; T is characterized by a small set of training documents D &#119897; &#8834; D, the task is to assign appropriate category labels to the remaining documents D\(&#8746; &#119897; D &#119897; ).</p><p>The labels of each document should form a path in T .</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.2">The Von Mises-Fisher Distribution</head><p>The von Mises-Fisher (vMF) distribution <ref type="bibr">[8,</ref><ref type="bibr">26]</ref> will be extensively used in our proposed framework. It defines a probability density over a unit sphere and is parameterized by a mean direction vector &#120641; and a concentration parameter &#120581;. Formally, let S &#119901;-1 = {&#119961; &#8712; R &#119901; : ||&#119961; || 2 = 1} denote the &#119901;-dimensional unit sphere. The probability density function for &#119961; &#8712; S &#119901;-1 , ||&#120641; || 2 = 1, &#120581; &gt; 0 is given by</p><p>Here, the normalization constant &#119888; &#119901; (&#120581;) is</p><p>where &#119868; &#119903; (&#8226;) represents the modified Bessel function of the first kind at order &#119903; <ref type="bibr">[8,</ref><ref type="bibr">26]</ref>. Intuitively, the vMF distribution is an analogue of the Gaussian distribution on a sphere. The distribution concentrates around the mean direction &#120641;, and is more concentrated if &#120581; is large.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">MODEL 3.1 A Hierarchical Generative Process</head><p>Motivation. In recognition of various types of information (i.e., the label hierarchy, weak supervision, metadata, and text), we propose a probabilistic generative process to characterize these heterogeneous signals. By adopting the vMF distribution, our generative process is defined in a spherical space (i.e., S &#119901;-1 ) instead of a Euclidean one (i.e., R &#119901; ). The motivation of doing so is inspired by two lines of related studies. First, the vMF distribution has demonstrated its  effectiveness in several tasks including hierarchical clustering <ref type="bibr">[13]</ref> and text sequence generation <ref type="bibr">[19]</ref>, which bears some similarities with our hierarchical representation learning and data augmentation modules, respectively. Second, normalizing word embedding vectors onto a sphere <ref type="bibr">[20,</ref><ref type="bibr">49]</ref> or directly training embeddings in a spherical space <ref type="bibr">[29]</ref> can better capture directional similarities, which is proved to be beneficial to tasks like semantic similarity search and document classification <ref type="bibr">[29]</ref>. As shown in Figure <ref type="figure">2</ref>(a), the process can be divided into the following steps.</p><p>Parent Label &#8594; Child Label. Given the label hierarchy T , the semantics of each child category &#119897; &#119888; should largely depend on the semantics of its parent category &#119897; &#119901; . In other words, if we use an embedding vector to represent each category, the child embedding &#119949; &#119888; should be close to its parent embedding &#119949; &#119901; . Inspired by the softmax function used in word embedding <ref type="bibr">[32]</ref> and network embedding <ref type="bibr">[40]</ref>, we define the generation probability as</p><p>Here, one needs to notice that &#119901; (&#8226;|&#119897; &#119901; ) describes a probability distribution of an embedding vector &#119949; &#119888; . Since &#119949; &#119888; can be any point in a continuous embedding space, &#119901; (&#8226;|&#119897; &#119901; ) should also be a continuous distribution. Therefore, we cannot fully borrow the softmax function which defines a discrete choice from finite candidates. Instead, the vMF distribution introduced in Section 2.2 is a proper tool here. Assume all category embedding vectors reside on a sphere S &#119901;-1 . Recall Eq. ( <ref type="formula">1</ref>). If we set &#120581; = 1, then &#119891; vMF (&#119961; |&#120641;, 1) = &#119888; &#119901; (1) exp(cos(&#119961;, &#120641;)) = &#119888; &#119901; (1) exp(&#119961; &#119879; &#120641;). (4) By comparing Eq. ( <ref type="formula">4</ref>) with Eq. (3), we know that the vMF distribution meets our requirement of the generation probability (because &#119888; &#119901; (1) is a constant given the dimension &#119901;). Thus, we rewrite Eq. (3) as</p><p>(5) Given the conditional probability, the category embedding can be generated in a top-down manner: we first determine the embedding of T 's root, and then proceed to the next level to generate embeddings of categories at that level. The embeddings of child labels are supposed to be surrounding the embedding of their parent label, and, according to the property of the vMF distribution, we have E[&#119949; &#119888; |&#119949; &#119901; ] = &#119949; &#119901; . This process can be repeated until we reach the leaf categories.</p><p>Label &amp; Metadata &#8594; Document. Our second step generates document embeddings according to their metadata and label information (if applicable). Consider how we humans write a document given a topic category (or a tag/product). We need to first have a general idea of the article, which can be represented as the document embedding &#119941;. To impose the coherence between &#119941; and its category/metadata information, we assume</p><p>where &#119897; &#119889; is the category label of &#119889; (here, we are referring to the leaf label of &#119889;); &#119898; &#119889; is a metadata instance of &#119889;; the corresponding embedding variables are in bold. Following the derivation above, by assuming all embedding vectors reside on a sphere, we can rewrite Eq. ( <ref type="formula">6</ref>) as</p><p>One unique problem we need to address here is that label and metadata information can be missing. For example, due to supervision scarcity, only a small proportion of documents in D have label information. Besides, a GitHub repository may have no tags. In general, suppose &#119881; instances &#119911; 1 , ..., &#119911; &#119881; are missing in {&#119897; &#119889; } &#8746; M &#119889; .</p><p>In this case, we assume their embeddings &#119963; 1 , ..., &#119963; &#119881; can be any vector on the sphere with equal probability (i.e., &#119963; 1 , ...,</p><p>.., &#119911; &#119881; } be the remaining observable instances. Therefore, Eq. ( <ref type="formula">7</ref>) becomes</p><p>The second-to-last step holds because &#8747; S &#119901;-1 &#119888; &#119901; (1) exp(&#119941; &#119879; &#119963; &#119894; ) d&#119963; &#119894; &#8801; 1 (i.e., the probability density function of a vMF distribution integrates to 1 over the whole sphere). Eq. ( <ref type="formula">8</ref>) tells us that, when some label/metadata information is missing, we only need to consider the remaining observable part (i.e., O &#119889; ) in the conditional probability. Document &#8594; Word. Based on the document embedding &#119941;, a sequence of words &#119908; 1 , ..., &#119908; &#119899; is then generated to describe the overall semantics of &#119889;. Similar to Eqs. ( <ref type="formula">3</ref>) and ( <ref type="formula">6</ref>), we assume the probability of word &#119908; &#119894; appearing in document &#119889; to be</p><p>Again, we rewrite the probability using a vMF distribution: <ref type="formula">5</ref>), ( <ref type="formula">8</ref>) and ( <ref type="formula">10</ref>) together fully specify our proposed hierarchical generative process.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.2">Joint Representation Learning</head><p>Guided by the hierarchical generative process, we aim to jointly learn the embeddings of all labels, metadata instances, documents and words. Our learning objective can be divided into two parts: one for modeling the label hierarchy information (corresponding to the first step in our generative process), and the other for modeling corpus statistics and metadata information (corresponding to the second and third steps).</p><p>Objective for Label Hierarchy. Given a parent-child label pair (&#119897; &#119901; , &#119897; &#119888; ), our goal is to maximize the log-likelihood log &#119901; (&#119897; &#119888; |&#119897; &#119901; ) during embedding learning. Inspired by studies on knowledge graph embedding <ref type="bibr">[3,</ref><ref type="bibr">42]</ref>, we adopt the following margin-based ranking objective:</p><p>where &#120574; &gt; 0 is a margin hyperparameter and (&#119897; &#8242; &#119901; , &#119897; &#8242; &#119888; ) is a negative training sample. Given the positive pair (&#119897; &#119901; , &#119897; &#119888; ), we generate the negative pair by replacing the parent label with any other label in T while keeping the child label. According to this corruption strategy, our objective can be defined as</p><p>Based on the definition of &#119901; (&#119897; &#119888; |&#119897; &#119901; ) in Eq. ( <ref type="formula">5</ref>), we have</p><p>Therefore,</p><p>Objective for Metadata and Corpus. Given the label and metadata information of a document &#119889;, the log-likelihood of observing the document and its word sequence is</p><p>According to Eqs. ( <ref type="formula">8</ref>) and <ref type="bibr">(10)</ref>, it can be written as</p><p>Again, we adopt the margin-based ranking objective to push the negative pairs distant enough from the positive pairs (&#119911;, &#119889;) and (&#119889;, &#119908; &#119894; ). Formally,</p><p>Following the derivation in Eq. ( <ref type="formula">13</ref>), we have</p><p>To summarize, our joint representation learning step can be formulated as the following optimization problem:</p><p>Here, M is the set of metadata instances appearing in the dataset, and V is the vocabulary (i.e., the set of words).</p><p>Optimization. Given the constraint that all embedding vectors live on a sphere, directly performing stochastic gradient descent in the Euclidean space is not an effective way to optimize the objective. Instead, following recent studies on hyperbolic embedding <ref type="bibr">[33,</ref><ref type="bibr">34]</ref> and spherical embedding <ref type="bibr">[29,</ref><ref type="bibr">45]</ref>, we apply the Riemannian gradient method <ref type="bibr">[2]</ref> to learn the embeddings.</p><p>According to <ref type="bibr">[29]</ref>, on a unit sphere, the relationship between the Riemannian gradient &#8711; &#119877; and the Euclidean gradient &#8711; &#119864; is</p><p>Based on Eqs. ( <ref type="formula">14</ref>) and ( <ref type="formula">18</ref>), the Euclidean gradient of each embedding vector is easy to compute. For example, given a parent-child label pair (&#119897; &#119901; , &#119897; &#119888; ), we have</p><p>where 1(&#8226;) is the indicator function. Then, following Eq. ( <ref type="formula">20</ref>), we can obtain the Riemannian gradient &#8711; &#119877; J (&#119949; &#119888; ), &#8711; &#119877; J (&#119949; &#119901; ) and &#8711; &#119877; J (&#119949; &#8242; &#119901; ). The gradient of other embedding vectors can be calculated in a similar way. After knowing the Riemannian gradient, we update the parameters in the following form <ref type="bibr">[2,</ref><ref type="bibr">29]</ref>:</p><p>where &#120572; &#119905; is the learning rate at step &#119905;. Intuitively, this update can be viewed as an addition along the Riemannian gradient direction followed by a projection onto the unit sphere. Since computing the gradient requires enumerating all labels or documents, in our actual computation, we adopt the negative sampling strategy <ref type="bibr">[3,</ref><ref type="bibr">32]</ref> to accelerate this process. To be specific, for each positive pair (&#119897; &#119901; , &#119897; &#119888; ), (&#119911;, &#119889;) or (&#119889;, &#119908; &#119894; ), we sample 5 negative pairs to estimate the gradient.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.3">Hierarchical Data Augmentation</head><p>Now we proceed to tackle the limited training data challenge. After representation learning, we have obtained the embedding vectors of all observed labels, metadata instances, documents and words. Using these embeddings, we can generate synthesized training documents for each category. Formally, given a category &#119897;, we aim to create a document set D * &#119897; to augment its original training set Algorithm 1 Hierarchical Data Augmentation if &#119897; is a leaf category then 5:</p><p>for &#119894; = 1 to &#120573; do 7:</p><p>Generate &#119941; * according to Eq. ( <ref type="formula">24</ref>)</p><p>8:</p><p>Generate &#119960; * 1 &#119960; * 2 ...&#119960; * &#119899; according to Eq. ( <ref type="formula">25</ref>) for &#119909; &#8712; Child(&#119897;) do Data Augmentation for a Leaf Category. Recall Figure <ref type="figure">2</ref>(a). If &#119897; is a leaf category, it will directly participate in the generation of document embeddings according to Eq. ( <ref type="formula">8</ref>). If we denote a synthesized document as &#119889; * (to distinguish it from a "real" document &#119889;), the generation probability will become</p><p>Note that we do not have any metadata information of the synthesized document. Therefore, the only observable variable here in {&#119897; } &#8746; M &#119889; * is the label &#119897;. Also, it is not necessary to generate documents associated with a certain metadata instance because our goal is to predict the label, instead of the metadata information, of a document. Substituting O &#119889; * = {&#119897; } into Eq. ( <ref type="formula">23</ref>), we have</p><p>After getting the document embedding &#119941; * , we continue our generative process to create a sequence of words describing &#119889; * . In principle, we should follow Eq. ( <ref type="formula">10</ref>) and sample words from &#119891; vMF (&#8226;|&#119941; * , 1). However, in practice, we expect that the generated word embedding &#119960; * can be mapped back to a concrete word that has occurred in our vocabulary V. In <ref type="bibr">[19]</ref>, Kumar and Tsvetkov propose a way that first samples an vector &#119942; from a continuous distribution, and then find the nearest neighbor of &#119942; in the embedding space among all &#119908; &#8712; V. In contrast, we directly require the generated word to reside in the neighborhood of &#119941; * in our joint embedding space. In this way, Eq. ( <ref type="formula">10</ref>) degenerates to a discrete softmax function:</p><p>where V &#119873; (&#119889;) is the set of top-&#119873; nearest neighbors of &#119941; * in the embedding space among all &#119908; &#8712; V. Using Eq. ( <ref type="formula">25</ref>) repeatedly, we can obtain a sequence of words &#119908; * 1 &#119908; * 2 ...&#119908; * &#119899; as the content of &#119889; * . Data Augmentation for a Non-Leaf Category. In our hierarchical generative process, a non-leaf label does not directly generate documents. Instead, it determines the embeddings of its children, and the child categories further determine its lower-level descendants. Formally, given a non-leaf label &#119897;, let T &#119897; &#8838; T be the subtree with root &#119897; and Leaf(T &#119897; ) be the leaf descendants of &#119897;. Then,</p><p>After the joint representation learning step, all label embeddings have been fixed. </p><p>If we adopt a bottom-up order to generate D * &#119897; , this can also be written in a recursive way:</p><p>In practice, some non-leaf categories have more children than their siblings have. Thus, if we directly apply Eq. ( <ref type="formula">29</ref>  &#119897; has a sequence of words, whose embedding vectors are already learned in joint representation learning. Now, based on the augmented training data, we need to train a hierarchical text classifier. Hierarchical text classification has been extensively studied for decades with many effective models proposed (see Section 5 for a detailed discussion). The main goal of this paper is to tackle signal heterogeneity and supervision scarcity instead of proposing a novel neural architecture for hierarchical classification. Therefore, we simply adopt the top-down training strategy <ref type="bibr">[7,</ref><ref type="bibr">18,</ref><ref type="bibr">22]</ref> that classifies documents at the top layer and then propagates the results to the next layer until the leaves. For each non-leaf category &#119897; &#8712; T , we need to train a flat classifier that assigns documents to its child classes Child(&#119897;) for more fine-grained predictions. We adopt Kim-CNN <ref type="bibr">[17]</ref>, a popular convolutional architecture, as our flat text classifier. The embeddings {&#119960; : &#119908; &#8712; V} trained in the joint representation learning step are used as initialization embeddings of the input layer. The model adopted here can be easily improved by replacing Kim-CNN with a more advanced flat classifier (e.g., <ref type="bibr">[41,</ref><ref type="bibr">51]</ref>) or by adding a hierarchical regularization (e.g., <ref type="bibr">[12,</ref><ref type="bibr">14,</ref><ref type="bibr">35]</ref>). However, since we would like to demonstrate the contribution of our embedding and augmentation modules when comparing with baselines, we keep the classifier as simple as possible.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3.4">Hierarchical Classifier Training</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">EXPERIMENTS 4.1 Experimental Setup</head><p>Datasets. We use three datasets from different domains. <ref type="foot">3</ref> The statistics of the datasets can be found in Table <ref type="table">1</ref>.</p><p>&#8226; GitHub <ref type="bibr">[54]</ref>. This dataset is collected by paperswithcode.com.</p><p>It contains 1,596 GitHub repositories implementing state-of-theart machine learning algorithms for different tasks (e.g., object detection, question answering, speech synthesis, etc.). The tasks form a taxonomy which is viewed as the label hierarchy. &#8226; ArXiv. This dataset is crawled from arXiv.org. There are 5 level-1 categories (i.e., cs, math, physics, q-bio, and q-fin) and 88 level-2 categories. For each category, we randomly sample 300 papers to constitute the dataset. &#8226; Amazon <ref type="bibr">[27]</ref>. This dataset is a large collection of Amazon product reviews. The label of each review is its product category (e.g., automotive, car care, beauty, skin care, etc.). These categories are organized into a catalog taxonomy <ref type="bibr">[25]</ref>. We select 147 large leaf categories and sample 1,000 reviews for each of them. According to our weakly supervised setting, we use 5 documents per leaf category for training and all the other documents for testing.</p><p>Baseline Methods. We evaluate the performance of HiMeCat against the following classification/embedding algorithms:</p><p>&#8226; HierSVM <ref type="bibr">[7]</ref> is a supervised hierarchical classification method.</p><p>It adopts a top-down classification strategy and trains an SVM for each non-leaf node to distinguish its categories. &#8226; WeSHClass <ref type="bibr">[30]</ref> is a weakly supervised hierarchical classification method. It adopts LSTM to generate data for pre-training and iteratively refines results based on the hierarchy. &#8226; PCEM <ref type="bibr">[48]</ref> is a weakly supervised hierarchical classification method. It proposes a path-cost sensitive hierarchical classifier and applies an EM technique to utilize the unlabeled data. &#8226; HiGitClass <ref type="bibr">[54]</ref> is a weakly supervised hierarchical classification method. It uses heterogeneous network embedding to encode relationships between labels, text and metadata and then leverages WeSHClass to train a hierarchical classifier. &#8226; MetaCat <ref type="bibr">[52]</ref> is a weakly supervised flat classification method.</p><p>It leverages metadata information but cannot utilize the label hierarchy. We use it to directly classify documents to the leaf layer and then infer higher-level labels using the hierarchy. &#8226; Metapath2vec <ref type="bibr">[6]</ref> is a metadata-aware embedding method. It models the proximity between heterogeneous elements through meta-path guided random walks.</p><p>&#8226; Poincar&#233; <ref type="bibr">[33]</ref> is a hierarchy-aware embedding method. It preserves the tree structure of embedded elements by putting them into a hyperbolic space. &#8226; Pretrained BERT <ref type="bibr">[5]</ref> is a benchmark language model that provides contextualized word representations. For text classification, following <ref type="bibr">[5]</ref>, we add a classification layer upon the [CLS] token of the last transformer layer and fine-tune the model using labeled documents. After predicting the leaf category of a document, we infer its higher-level labels using the hierarchy.</p><p>For Metapath2vec and Poincar&#233;, inspired by our hierarchical generative process, we construct a graph with edges (&#119897; &#119901; , &#119897; &#119888; ), (&#119897;, &#119889;), (&#119898;, &#119889;) and (&#119889;, &#119908;) and perform node embedding on the graph. (We use four meta-paths &#119897;-&#119897;, &#119889;-&#119897;-&#119889;, &#119889;-&#119898;-&#119889; and &#119889;-&#119908;-&#119889; for Metapath2vec.) Then, to apply these two baselines in weakly supervised hierarchical classification, we use the learned embeddings to train a WeSHClass classifier (by replacing its word2vec embedding module). Since some baselines only utilize text information, for each document, we append its metadata instances to the end of its text sequence so that they can exploit these signals. &#119879; &#119875; &#119897; +&#119865; &#119873; &#119897; . Following previous works <ref type="bibr">[30,</ref><ref type="bibr">48]</ref>, we also calculate the Overall Micro/Macro F1, which is defined accordingly on T \{ROOT} instead of Leaf(T ).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Parameters. Embedding dimension</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.2">Performance Comparison</head><p>Table <ref type="table">2</ref> shows the categorization performance of compared algorithms on the three datasets. We repeat each experiment five times and report the average F1 scores. To measure statistical significance, we conduct a two-tailed paired t-test to compare HiMeCat and each baseline approach. The significance level ("p-value &lt; 0.01" or "p-value &lt; 0.05") of each result is also marked in Table <ref type="table">2</ref>.</p><p>We observe that: (1) HiMeCat consistently outperforms the compared baseline methods on all three datasets. In most cases, the performance gap is statistically significant. The improvement of HiMeCat over the best baseline is 8.3%, 13.0% and 47.5% on GitHub, ArXiv and Amazon, respectively. (2) For the three metadata-aware text categorization methods, HiMeCat performs better than HiGit-Class and MetaCat, indicating the importance of considering label hierarchy and incorporating it into representation learning. (3) Although Metapath2vec and Poincar&#233; are assumed to be strong tools for metadata and hierarchy embedding respectively, they do not achieve competitive performance when we need to jointly embed these signals. This observation also emphasizes the contribution of our joint representation learning module. (4) Despite the great success of BERT in many supervised NLP tasks, it does not perform   well in our problem settings. There may be two possible reasons. First, directly using BERT for text classification does not consider metadata and hierarchy information. Second, the small set of training data may not be enough to fine-tune BERT.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.3">Ablation Study of Representation Learning</head><p>Two key steps, representation learning and data augmentation, are proposed in our HiMeCat framework. Now we validate their contribution to the categorization performance through ablation analysis. We start from the representation learning module.</p><p>Hierarchy and Metadata. In our joint hierarchy-metadata-text representation learning module, to check whether the label hierarchy and various types of metadata are useful, we create the following ablation versions of HiMeCat.</p><p>&#8226; No-Hierarchy does not consider parent-child relationships in representation learning. Formally, it ignores J &#119871; in Eq. ( <ref type="formula">19</ref>) and only maximizes J &#119872;&#119862; . &#8226; No-Metadata does not consider metadata-document relationships in representation learning. Formally, in Eq. ( <ref type="formula">18</ref>), we will have</p><p>Moreover, instead of ignoring all metadata instances, we can overlook one specific type of metadata. This will yield ablations including No-User/Author, No-Tag and No-Product. Table <ref type="table">3</ref> depicts the comparison between the full HiMeCat model and its ablations on the three datasets. (Due to space limitations, we only show Overall F1 scores. Similar observations can be drawn from Leaf F1 scores.) We find that: <ref type="bibr">(1)</ref> The full model outperforms No-Hierarchy, which validates our claim that modeling label dependencies and correlation is beneficial to hierarchical categorization. Moreover, when the dataset has a larger label hierarchy, the gap between HiMeCat and No-Hierarchy is more statistically significant. The average improvement of HiMeCat over No-Hierarchy on the  six metrics is 5.0%. <ref type="bibr">(2)</ref> The full model outperforms No-Metadata, which validates our claim that incorporating metadata signals is</p><p>When studying different types of metadata separately, we find all of them play a positive role on our datasets. The contribution of metadata is larger than that of label hierarchy, possibly because metadata information is denser than hierarchy information. That being said, each document has its own metadata, while the whole corpus only has one label hierarchy.</p><p>Dimension. The embedding dimension &#119901; is an important parameter of the representation learning module. To check the sensitivity of &#119901;, we plot Overall F1 scores of HiMeCat with &#119901; = 10, 50, 100, 200 and 300 in Figure <ref type="figure">3</ref>. We can observe that: if &#119901; is too small, the embedding vectors cannot sufficiently capture heterogeneous signals in the dataset; if &#119901; is too large, we may face overfitting problems, especially under weak supervision. According to the results, setting &#119901; between 100 and 200 is reasonable on our datasets.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.4">Ablation Study of Data Augmentation</head><p>Now we proceed to the hierarchical data augmentation module.</p><p>We need to answer two questions here: (1) Can data augmentation mitigate the label scarcity problem? (2) How many synthesized  training samples should we create for each category? To investigate these two questions, we show the performance of HiMeCat with &#120573; = 0, 50, 100, 500, 1000 and 2000 in Figure <ref type="figure">4</ref>. We observe that, when comparing &#120573; = 500 with &#120573; = 0 (i.e., we do not generate any synthesized training data and use real training data only), the performance boost is quite evident. For example, the average absolute improvement of Overall F1 scores on the three datasets is 21.4%. Thus, we validate our claim that the hierarchical data augmentation module can help improve the classification accuracy under weak supervision. Meanwhile, the performance gap between &#120573; = 2000 with &#120573; = 500 is quite subtle. In fact, the average absolute gap of Overall F1 scores on the three datasets becomes 0.1%. Also, too many synthesized training samples will make the training process inefficient. Seeking a balance, we believe setting &#120573; = 500 is an appropriate choice (and we do set &#120573; = 500 in previous experiments).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4.5">Visualization of Tree Embedding</head><p>In order to show how the label hierarchy is modeled and how the labels are distributed in our joint embedding space, we plot label embeddings in Figure <ref type="figure">5</ref> after reducing their dimensions using t-SNE <ref type="bibr">[23]</ref>. Labels are denoted as stars, and names of all level-1 categories and the root are shown. We have two observations: (1) The tree structure of the label hierarchy is well preserved in our embedding space. Child categories center around their parent categories. <ref type="bibr">(2)</ref> In the ArXiv embedding space, "q-fin" (Quantitative Finance) is embedded near the root, and its children are embedded closer to "math" and "physics" than they are to "cs" and "q-bio" (Quantitative Biology). This is reasonable because quantitative finance is a quite interdisciplinary area and has many overlap with mathematics and physics. This observation shows that our joint representation learning module not only considers the label hierarchy but also captures semantics from text and/or metadata information.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">RELATED WORK</head><p>Hierarchical Text Classification. Many efforts have been put on how to utilizing the label hierarchy to improve text classification. For example, Dumais and Chen <ref type="bibr">[7]</ref> and Liu et al. <ref type="bibr">[22]</ref> adopt a top-down training strategy and use SVMs to distinguish child categories of the same parent. In contrast, bottom-up classification <ref type="bibr">[1]</ref> backpropagates the labels from the leaves to the top layer. Gopal and Yang <ref type="bibr">[12,</ref><ref type="bibr">14]</ref> propose a recursive regularization framework encouraging the similarity between the child classifiers and the parent classifier. Peng et al. <ref type="bibr">[35]</ref> extend this regularization to deep graph-CNN models. Wehrmann et al. <ref type="bibr">[44]</ref> and Huang et al. <ref type="bibr">[15]</ref> combine the ideas of training a local classifier per level and optimizing the global classification results to mitigate exposure bias. The global structure of hierarchies is also used in many other models, such as meta-learning <ref type="bibr">[46]</ref>, reinforcement learning <ref type="bibr">[24]</ref> and tree/graph based neural networks <ref type="bibr">[55]</ref>. However, these fully supervised methods rely heavily on the amount of human-labeled training data. Under weakly supervised settings, hierarchical dataless classification <ref type="bibr">[36]</ref> jointly embeds class labels and documents using Explicit Semantic Analysis; WeSHClass <ref type="bibr">[30]</ref> models topic semantics in the word2vec embedding space and applies a self-training scheme; PCEM <ref type="bibr">[48]</ref> introduces a path-cost sensitive classifier for semi-supervised hierarchical classification; HierCon <ref type="bibr">[21]</ref> projects documents and taxonomy categories into a common concept space and calculates their fine-grained similarity. However, these studies are not concerned with metadata information.</p><p>Metadata-Aware Text Classification. Several previous studies try to incorporate metadata information into a text classifier. For example, Ghani et al. <ref type="bibr">[11]</ref> use HTML meta tags to help hypertext classification; Steyvers et al. <ref type="bibr">[37]</ref> leverage author information in topic classification; Tang et al. <ref type="bibr">[39]</ref> learn user and product representations for sentiment analysis; Zhang et al. <ref type="bibr">[53]</ref> employ user biography data for tweet localization. Chen et al. <ref type="bibr">[4]</ref> encode user mobility data and social network information for joint time and location prediction; Kim et al. <ref type="bibr">[16]</ref> propose a general framework to inject categorical metadata signal into a deep text classifier. However, these models assume a fully supervised setting. Zhang et al. <ref type="bibr">[54]</ref> present a weakly supervised hierarchical classification approach to classify GitHub repositories. Later, they also propose a flat metadata-aware text categorization framework <ref type="bibr">[52]</ref>. Mekala et al. <ref type="bibr">[28]</ref> explore to incorporate metadata as additional supervision for text classification with seed words only. However, in these studies, the label hierarchy is not leveraged in the embedding space.</p><p>Tree and Metadata Embedding. Recent studies on non-Euclidean embedding models, such as Poincar&#233; <ref type="bibr">[33]</ref>, Lorentz <ref type="bibr">[34]</ref>, hyperbolic cones <ref type="bibr">[10]</ref> and spherical tree embedding <ref type="bibr">[31]</ref>, consider to preserve a tree structure in the embedding space. Along another line of work, heterogeneous network embedding algorithms <ref type="bibr">[6,</ref><ref type="bibr">9,</ref><ref type="bibr">50]</ref> are widely used to learn representations of metadata. HHNE <ref type="bibr">[43]</ref> further considers to perform heterogeneous network embedding in a hyperbolic space. Despite their respective success in capturing hierarchy and metadata information, to the best of our knowledge, there lacks a framework which allows simultaneous modeling of tree-structure dependencies, text semantics and metadata signals.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="6">CONCLUSIONS</head><p>We present HiMeCat, an embedding-based generative framework for hierarchical metadata-aware document categorization under weak supervision. The framework is featured by a joint hierarchymetadata-text representation learning module and a hierarchical data augmentation module. We propose a generative process in the spherical space to guide the design of both modules. Through experiments on three datasets from different domains, we show the superiority of HiMeCat towards competitive baselines in our task. We also conduct ablation studies to validate the contribution of our proposed embedding and augmentation modules. Interesting future work include: (1) discovering new categories from the unlabeled dataset and put them into the existing hierarchy and (2) integrating different forms of weak supervision (e.g., annotated documents and class-related keywords) in hierarchical text classification.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="1" xml:id="foot_0"><p>https://en.wikipedia.org/wiki/Yahoo!_Directory</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_1"><p>https://www.yelp.com/developers/documentation/v3/all_category_list</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_2"><p>Our code and datasets are available at https://github.com/yuzhimanhua/HIMECat.</p></note>
		</body>
		</text>
</TEI>
