With the need of fast retrieval speed and small memory footprint, document hashing has been playing a crucial role in large-scale information retrieval. To generate high-quality hashing code, both semantics and neighborhood information are crucial. However, most existing methods leverage only one of them or simply combine them via some intuitive criteria, lacking a theoretical principle to guide the integration process. In this paper, we encode the neighborhood information with a graph-induced Gaussian distribution, and propose to integrate the two types of information with a graph-driven generative model. To deal with the complicated correlations among documents, we further propose a tree-structured approximation method for learning. Under the approximation, we prove that the training objective can be decomposed into terms involving only singleton or pairwise documents, enabling the model to be trained as efficiently as uncorrelated ones. Extensive experimental results on three benchmark datasets show that our method achieves superior performance over state-of-the-art methods, demonstrating the effectiveness of the proposed model for simultaneously preserving semantic and neighborhood information. 1 1 Introduction Similarity search plays a pivotal role in a variety of tasks, such as image retrieval (Jing and Baluja, 2008; Zhang et al., 2018), plagiarism detection (Stein et al., 2007) and recommendation systems (Koren, 2008). If the search is carried out in the original continuous feature space directly, the requirements of computation and storage would be  Corresponding author. Qinliang Su is also affiliated with (i) Guangdong Key Lab. of Big Data Analysis and Processing, Guangzhou, China, and (ii) Key Lab. of Machine Intelligence and Advanced Computing, Ministry of Education, China. 1 Our code is available at https://github.com/J-zin/SNUH. extremely high, especially for large-scale applications. Semantic hashing (Salakhutdinov and Hinton, 2009b) sidesteps this problem by learning a compact binary code for every item such that similar items can be efficiently found according to the Hamming distance of binary codes. Unsupervised semantic hashing aims to learn for each item a binary code that can preserve the semantic similarity information of original items, without the supervision of any labels. Motivated by the success of deep generative models (Salakhutdi-nov and Hinton, 2009a; Kingma and Welling, 2013; Rezende et al., 2014) in unsupervised representation learning, many recent methods approach this problem from the perspective of deep generative models, leading to state-of-the-art performance on benchmark datasets. Specifically, these methods train a deep generative model to model the underlying documents and then use the trained generative model to extract continuous or binary representations from the original documents (Chaidaroon and Fang, 2017; Shen et al., 2018; Dong et al., 2019; Zheng et al., 2020). The basic principle behind these generative hashing methods is to have the hash codes retaining as much semantics information of original documents as possible so that semantically similar documents are more likely to yield similar codes. In addition to semantics information, it is widely observed that neighborhood information among the documents is also useful to generate high-quality hash codes. By constructing an adjacency matrix from the raw features of documents, neighbor-based methods seek to preserve the information in the constructed adjacency matrix, such as the locality-preserving hashing (He et al., 2004; Zhao et al., 2014), spectral hashing (Weiss et al., 2009; Li et al., 2012), and etc. However, since the ground-truth neighborhood information is not available and the constructed one is neither accurate nor complete, neighbor-based methods alone do not perform as well as the semantics-based ones. Despite both semantics and neighborhood information are derived from the original documents, different aspects are emphasized in them. Thus, to obtain higher-quality hash codes, it has been proposed to incorporate the constructed neighborhood information into semantics-based methods. For examples, Chaidaroon et al. (2018) and Hansen et al. (2020) require the hash codes can reconstruct neighboring documents, in addition to the original input. Other works (Shen et al., 2019; Hansen et al., 2019) use an extra loss term, derived from the approximate neighborhood information, to encourage similar documents to produce similar codes. However, all of the aforementioned methods exploit the neighborhood information by using it to design different kinds of regularizers to the original semantics-based models, lacking a basic principle to unify and leverage them under one framework. To fully exploit the two types of information, in this paper, we propose a hashing method that uni-fies the semantics and neighborhood information with the graph-driven generative models . Specifically, we first encode the neighborhood information with a multivariate Gaussian distribution. With this Gaussian distribution as a prior in a generative model, the neighborhood information can be naturally incorporated into the semantics-based hashing model. Despite the simplicity of the modeling, the correlation introduced by the neighbor-encoded prior poses a significant challenge to the training since it invalidates the widely used identical-and-independent-distributed ( i.i.d. ) assumption, making all documents correlated. To address this issue, we propose to use a tree-structured distribution to capture as much as possible the neighborhood information. We prove that under the tree approximation, the evidence lower bound (ELBO) can be decomposed into terms involving only singleton and pairwise documents, enabling the model to be trained as efficiently as the models without considering the document correlations. To capture more neighborhood information, a more accurate approximation by using multiple trees is also developed. Extensive experimental results on three public datasets demonstrate that the proposed method can outperform state-of-the-art methods, indicating the effectiveness of the proposed framework in unifying the semantic and neighborhood information for document hashing. Semantics-Based Hashing Due to the similarities among the underlying ideas of these methods, we take the variational deep semantic hashing (VDSH) (Chaidaroon and Fang, 2017) as an example to illustrate their working flow. Given a document x (cid:44) { w j } | x | j =1 , VDSH proposes to model a document by a generative model as p ( x , z ) = p  ( x | z ) p ( z ) , (1) where p ( z ) is the prior distribution and is chosen to be the standard Gaussian distribution N ( z ; 0 , I d ) , with I d denoting the d -dimensional identity matrix; and p  ( x | z ) is defined to be p  ( x | z ) = (cid:89) w i  x p  ( w i | z ) (2) with p  ( w i | z ) (cid:44) exp ( z T Ew i + b i ) (cid:80) | V | j =1 exp ( z T Ew j + b j ) , (3) in which w j denotes the | V | -dimensional one-hot representation of the j -th word, with | x | and | V | denoting the document and vocabulary size, respectively; and E  R d | V | represents the learnable embedding matrix. For a corpus containing N documents X = { x 1 , x 2 ,    , x N } , due to the i.i.d. assumption for documents, it is modelled by simply multiplying individual document models as p ( X , Z ) = N (cid:89) k =1 p  ( x k | z k ) p ( z k ) , (4) where Z (cid:44) [ z 1 ; z 2 ;    ; z N ] denotes a long vector obtained by concatenating the individual vectors z i . The model is trained by optimizing the evidence lower bound (ELBO) of the log-likelihood function log p ( X ) . After training, outputs from the trained encoder are used as documents' representations, from which binary hash codes can be obtained by thresholding the real-valued representations. Neighborhood Information The ground-truth semantic similarity information is not available for the unsupervised hashing task in practice. To leverage this information, an affinity N  N matrix A is generally constructed from the raw features ( e.g. , the TFIDF) of original documents. For instances, we can construct the matrix as a ij =   e  || x i  x j || 2  , x i N k ( x j ) 0 , otherwise (5) where a ij denotes the ( i, j ) -th element of A ; and N k ( x ) denotes the k -nearest neighbors of document x . Given the affinity matrix A , some methods have been proposed to incorporate the neighborhood information into the semantics-based hashing models. However, as discussed above, these methods generally leverage the information based on some intuitive criteria, lacking theoretical supports behind them. In this section, we present a more effective framework to unify the semantic and neighborhood information for the task of document hashing. To introduce the neighborhood information into the semantics-based hashing models, we first rewrite the VDSH model into a compact form as p ( X , Z ) = p  ( X | Z ) p I ( Z ) , (6) where p  ( X | Z ) = (cid:81) Nk =1 p  ( x k | z k ) ; and the prior p I ( Z ) = (cid:81) Nk =1 p ( z k ) , which can be shown to be p I ( Z ) = N ( Z ; 0 , IN  I d ) . (7) Here,  denotes the Kronecker product and the subscript I indicates independence among z k . The ELBO of this model can be expressed as L = E q  ( Z | X ) [log p  ( X | Z )] (cid:124) (cid:123)(cid:122) (cid:125) L 1  KL ( q  ( Z | X ) || p I ( Z )) (cid:124) (cid:123)(cid:122) (cid:125) L 2 where KL (  ) denotes the Kullback-Leibler (KL) divergence. By restricting the posterior to independent Gaussian form q  ( Z | X ) = N (cid:89) k =1 N (cid:0) z k ;  k , diag (  2 k ) (cid:1) (cid:124) (cid:123)(cid:122) (cid:125) q  ( z k | x k ) , (8) the L 1 can be handled using the reparameteriza-tion trick. Thanks to the factorized forms assumed in q  ( Z | X ) and p I ( Z ) , the L 2 term can also be expressed analytically and evaluated efficiently. Given an affinity matrix A , the covariance matrix IN +  A can be used to reveal the neighborhood information of documents, where the hyperparameter   [0 , 1) is used to control the overall correlation strength. If two documents are neighboring, then the corresponding correlation value in IN +  A will be large; otherwise, the value will be zero. To have the neighborhood information reflected in document representations, we can require that the representations z i are drawn from a Gaussian distribution of the form where the subscript G denotes that the distribution is constructed from a neighborhood graph. To see why the representations Z  p G ( Z ) have already reflected the neighborhood information, let us consider an example with three documents { x 1 , x 2 , x 3 } , in which x 1 is connected to x 2 , x 2 is connected to x 3 , and no connection exists between x 1 and x 3 . Under the case that z i is a two-dimensional vector z i  R 2 , we have the concatenated representations [ z 1 ; z 2 ; z 3 ] follow a Gaussian distribution with covariance matrix of z 1 z 2 z 3 From the property of Gaussian distribution, it can be known that z 1 is strongly correlated with z 2 on the corresponding elements, but not with z 3 . This suggests that z 1 should be similar to z 2 , but different from z 3 , which is consistent with the neighborhood relation that x 1 is a neighbor of x 2 , but not of x 3 . Now that the neighborhood information can be modeled by requiring Z being drawn from p G ( Z ) , and the semantic information can be reflected in the likelihood function p  ( X | Z ) . The two types of information can be taken into account simultaneously by modeling the corpus as p ( X , Z ) = p  ( X | Z ) p G ( Z ) . Comparing to the VDSH model in (6), it can be seen that the only difference lies in the employed priors. Here, a neighborhood-preserving prior p G ( Z ) is employed, while in VDSH, an independent prior p I ( Z ) is used. Although only a modification to the prior is made from the perspective of modeling, significant challenges are posed for the training. Specifically, by replacing p I ( Z ) with p G ( Z ) in the L 2 of L , it can be shown that the expression of L 2 involves the matrix (cid:0) ( IN +  A )  I d (cid:1)  1 . Due to the introduced dependence among documents, for example, if the corpus contains over 100,000 documents and the representation dimension is set to 100, the L 2 involves the inverse of matrices with dimension as high as 10 7 , which is computationally prohibitive in practice. Although the prior p G ( Z ) captures the full neighborhood information, its induced model is not practically trainable. In this section, to facilitate the training, we first propose to use a tree-structured prior to partially capture the neighborhood information, and then extend it to multiple-tree case for more accurate modeling. The matrix A represents a graph G (cid:44) ( V , E ) , where V = { 1 , 2 ,    , N } is the set of document indices; and E = { ( i, j ) | a ij (cid:54) = 0 } is the set of connections between documents. From the graph G , a spanning tree T = ( V , ET ) can be obtained easily, where ET denotes the set of connections on the tree. 2 Based on the spanning tree, we construct a new distribution as p T ( Z ) = (cid:89) i V p G ( z i ) (cid:89) ( i,j ) E T p G ( z i , z j ) p G ( z i ) p G ( z j ) , (11) where p G ( z i ) and p G ( z i , z j ) represent oneand two-variable marginal distributions of p G ( Z ) , respectively. From the properties of Gaussian distribution, it is known that p G ( z i )= N ( z i ; 0 , I d ) , p G ( z i , z j )= N ([ z i ; z j ]; 0 , ( I 2 +  A ij )  I d ) , (12) where A ij (cid:44) (cid:20) 0 a ij a ji 0 (cid:21) . Because p T ( Z ) is defined on a tree, as proved in (Wainwright and Jordan, 2008), it is guaranteed to be a valid probability distribution, and more importantly, it satisfies the following two relations: i) p T ( z i ) = p G ( z i ) ; ii) p T ( z i , z j ) = p G ( z i , z j ) for any ( i, j )  ET , where p T ( z i ) and p T ( z i , z j ) denote the marginal distributions of p T ( Z ) . That is, the tree-structured 2 We assume the graph is connected. distribution p T ( Z ) captures the neighborhood information reflected on the spanning tree T . By using p T ( Z ) to replace p I ( Z ) of L 2 , it can be shown that L 2 can be expressed as the summation of terms involving only one or two variables, which can be handled easily. Due to the limitation of space, the concrete expression for the lower bound is given in the Supplementary Material. The posterior distribution q  ( Z | X ) in the previous section is assumed to be in independent form, as the form shown in (8). But since a prior p T ( Z ) considering the correlations among documents is used, assuming an independent posterior is not appropriate. Hence, we follow the tree-structured prior and also construct a tree-structured posterior q T ( Z | X )= (cid:89) i V q  ( z i | x i ) (cid:89) ( i,j ) E T q  ( z i , z j | x i , x j ) q  ( z i | x i ) q  ( z j | x j ) , where q  ( z i | x i ) is the same as that in (8); and q  ( z i , z j | x i , x j ) is also defined to be Gaussian, with its mean defined as [  i ;  j ] and covariance matrix defined as (cid:20) diag (  2 i ) diag (  ij (cid:12)  i (cid:12)  j ) diag (  ij (cid:12)  i (cid:12)  j ) diag (  2 j ) (cid:21) , (13) in which  ij  R d controls the correlation strength between z i and z j , whose elements are restricted in (  1 , 1) and (cid:12) denotes the Hadamard product. By taking the correlated posterior q T ( Z | X ) into the ELBO, we obtain LT = (cid:88) i V E q  [log p  ( x i | z i )]  KL ( q  ( z i ) || p G ( z i ))  (cid:88) ( i,j ) E T (cid:16) KL ( q  ( z i , z j | x i , x j ) || p G ( z i , z j ))  KL ( q  ( z i ) || p G ( z i ))  KL ( q  ( z j ) || p G ( z j )) (cid:17) , where we briefly denote the variational distribution q  ( z i | x i ) as q  ( z i ) . Since p G ( z i ) , p G ( z i , z j ) , q  ( z i | x i ) and q  ( z i , z j | x i , x j ) are all Gaussian distributions, the KL-divergence terms above can be derived in closed-form. Moreover, it can be seen that LT involves only single or pairwise variables, thus optimizing it is as efficient as the models without considering document correlation. With the trained model, hash codes can be obtained by binarizing the posterior mean  i with a threshold, as done in (Chaidaroon and Fang, 2017). However, if without any constraint, the range of mean lies in (  , +  ) . Thus, if we binarize it directly, lots of information in the original representations will be lost. To alleviate this problem, in our implementation, we parameterize the posterior mean  i by a function of the form  i = sigmoid ( nn ( x i ) / ) , where the outermost sigmoid function forces the mean to look like binary value and thus can effectively reduce the quantization loss, with nn (  ) denoting a neural network function and  controlling the slope of the sigmoid function. Obviously, approximating the graph with a spanning tree may lose too much information. To alleviate this issue, we propose to capture the similarity information by a mixture of multiple distributions, with each built on a spanning tree. Specifi-cally, we first construct a set of M spanning trees TG = { T 1 , T 2 ,    , TM } from the original graph G . Based on the set of spanning trees, a mixture-distribution prior and posterior can be constructed as p MT ( Z ) = 1 M (cid:88) T T G p T ( Z ) , (14) q MT ( Z | X ) = 1 M (cid:88) T T G q T ( Z | X ) , (15) where p T ( Z ) and q T ( Z | X ) are the prior and posterior defined on the tree T , as done in (11) and (13). By taking the mixture distributions above into the ELBO of L to replace the prior and posterior, we can obtain a new ELBO, denoted as LMT . Obviously, it is impossible to obtain a closed-form expression for the bound LMT . But as proved in (Tang et al., 2019), by using the log-sum inequality, LMT can be further lower bounded by (cid:101) LMT = 1 M (cid:88) T T GLT . Given the expression of LT , the lower bound of (cid:101) LMT can also be expressed in closed-form and optimized efficiently. For detailed derivations and concrete expressions, please refer to the Supplementary. The parameters  i ,  j ,  i ,  j and  ij in the approximate posterior distribution q  ( z i | x i ) of (8) and q  ( z i , z j | x i , x j ) of (13) are all defined as the outputs of neural networks, with the parameters denoted as  . Specifically, the entire model is mainly composed of three components: i) The variational encoder q  ( z i | x i ) , which takes single document as input, and outputs the mean and variance of Gaussian distribution, i.e., [  i ;  2 i ] = f  ( x i ) ; ii) The correlated encoder, which takes pairwise documents as input, and outputs the correlation coefficient, i.e. ,  ij = f  ( x i , x j ) . Note that the correlation encoder is required to be order-irrelevant, that is, f  ( x i , x j ) = f  ( x j , x i ) , which is achieved in this paper as f  = 12 (cid:0) f  ( x i , x j ) + f  ( x j , x i ) (cid:1) ; iii) The generative decoder p  ( x i | z i ) , which takes the latent variable z i as input and output the document x i . The decoder is modeled by a neural network parameterized by  . The model is trained by optimizing the lower bound (cid:101) LMT w.r.t.  and  . After training, hash codes are obtained by passing the documents through the variational encoder and binarizing the outputs on every dimension by a the threshold value, which is simply set as 0.5 in our experiments. To intuitively understand the insight behind our model, an illustration is shown in Figure 1. We see that if the two documents are neighbors and semantically similar, the representations will be strongly correlated to each other. But if they are not semantically similar neighbors, the representations become less correlated. If they are neither neighbors nor semantically similar, the representations become not correlated at all. Since our model can simultaneously preserve semantics and neighborhood information, we name it as S emanticsN eighborhood U nified H ahing (SNUH). Deep generative models (Rezende et al., 2014) have attracted a lot of attention in semantics-based hashing, due to their successes in unsupervised representation learning. VDSH (Chaidaroon and Fang, 2017) first employed variational auto-encoder (VAE) (Kingma and Welling, 2013) to learn continuous representations of documents and then casts them into binary codes. However, for the sake of information leaky problem during bi-narization step, such a two-stage strategy is prone to result in local optima and undermine the performance. NASH (Shen et al., 2018) tackled this issue by replacing the Gaussian prior with Bernoulli and adopted the straight-through technique (Ben-gio et al., 2013) to achieve end-to-end training. To further improve the model's capability, Dong et al. (2019) proposed to employ mixture distribution as a priori knowledge and Zheng et al. (2020) exploited Boltzmann posterior to introduce correlation among bits. Beyond generative frameworks, AMMI (Stratos and Wiseman, 2020) achieved superior performance by maximizing the mutual information between codes and documents. Nevertheless, the aforementioned semantic hashing methods are consistently under the i.i.d. assumption, which means they ignore the neighborhood information. Spectral hashing (Weiss et al., 2009) and self-taught hashing (Zhang et al., 2010) are two typical methods of neighbor-based hashing models. But these algorithms generally ignore the rich semantic information associated with documents. Recently, some VAE-based models tried to concurrently take account of semantic and neighborhood information, such as NbrReg (Chaidaroon et al., 2018), RBSH (Hansen et al., 2019) and PairRec(Hansen et al., 2020). However, as mentioned before, all of them simply regarded the proximity as regularization, lacking theoretical principles to guide the incorporation process. Thanks to the virtue of graph-induced distribution, we effectively preserve the two types of information in a theoretical framework. Datasets We verify the proposed methods on three public datasets which published by VDSH 3 : i) Reuters25178, which contains 10,788 news documents with 90 different categories; ii) TMC, which is a collection of 21,519 air traffic reports with 22 different categories; iii) 20Newsgroups (NG20), which consists of 18,828 news posts from 20 different topics. Note that the category labels of each dataset are only used to compute the evaluation metrics, as we focus on unsupervised scenarios. Baselines We compare our method with the following models: SpH (Weiss et al., 2009), STH (Zhang et al., 2010), VDSH (Chaidaroon and Fang, 2017), NASH (Shen et al., 2018), GMSH(Dong et al., 2019), NbrReg (Chaidaroon et al., 2018), CorrSH (Zheng et al., 2020) and AMMI (Stratos and Wiseman, 2020). For all baselines, we take the reported performance from their original papers. Training Details For fair comparisons, we follow the same network architecture used in VDSH, GMSH and CorrSH, using a one-layer feed-forward neural network as the variational and the correlated encoder. The graph G is constructed with the K -nearest neighbors (KNN) algorithm based on cosine similarity on the TFIDF features of documents. In our experiments, the correlation strength coefficient  in (12) is fixed to 0.99. According to the performance observed on the validation set, we choose the learning rate from { 0 . 0005 , 0 . 001 , 0 . 003 } , batch size from { 32 , 64 , 128 } , the temperature  in sigmoid function from { 0 . 1 , 0 . 2 ,    , 1 } , the number of trees M and neighbors K both form { 1,2,. . . ,20 } , with the best used for evaluation on the test set. The model is trained using the Adam optimizer (Kingma and Ba, 2014). More detailed experimental settings, along with the generating method of spanning trees, are given in the supplementary materials. Evaluation Metrics The retrieval precision is used as our evaluation metric. For each query document, we retrieve 100 documents most similar to it based on the Hamming distance of hash codes. Then, the retrieval precision for a single sample is measured as the percentage of the retrieved documents with the same label as the query. Finally, the average precision over the whole test set is calculated as the performance of the evaluated method. Overall Performance The performances of all the models on the three public datasets are shown in Table 1. We see that our model performs favorably Method Reuters TMC 20Newsgroups Avg 16bits 32bits 64bits 128bits 16bits 32bits 64bits 128bits 16bits 32bits 64bits 128bits SpH 0.6340 0.6513 0.6290 0.6045 0.6055 0.6281 0.6143 0.5891 0.3200 0.3709 0.3196 0.2716 0.5198 STH 0.7351 0.7554 0.7350 0.6986 0.3947 0.4105 0.4181 0.4123 0.5237 0.5860 0.5806 0.5443 0.5662 VDSH 0.7165 0.7753 0.7456 0.7318 0.6853 0.7108 0.4410 0.5847 0.3904 0.4327 0.1731 0.0522 0.5366 NbrReg n.a. n.a. n.a. n.a. n.a. n.a. n.a. n.a. 0.4120 0.4644 0.4768 0.4893 0.4249 NASH 0.7624 0.7993 0.7812 0.7559 0.6573 0.6921 0.6548 0.5998 0.5108 0.5671 0.5071 0.4664 0.6462 GMSH 0.7672 0.8183 0.8212 0.7846 0.6736 0.7024 0.7086 0.7237 0.4855 0.5381 0.5869 0.5583 0.6807 AMMI 0.8173 0.8446 0.8506 0.8602 0.7096 0.7416 0.7522 0.7627 0.5518 0.5956 0.6398 0.6618 0.7323 CorrSH 0.8212 0.8420 0.8465 0.8482 0.7243 0.7534 0.7606 0.7632 0.5839 0.6183 0.6279 0.6359 0.7355 SNUH 0.8320 0.8466 0.8560 0.8624 0.7251 0.7543 0.7658 0.7726 0.5775 0.6387 0.6646 0.6731 0.7474 to the current state-of-the-art method, yielding best average performance across different datasets and settings. Compared with VDSH and NASH, which simply employ isotropic Gaussian and Bernoulli prior, respectively, we can observe that our model, which leverages correlated prior and posterior distributions, achieves better results on all the three datasets. Although GMSH improves performance by exploiting a more expressive Gaussian mixture prior, our model still outperforms it by a substantial margin, indicating the superiority of incorporating document correlations. It is worth noting that, by unifying semantics and neighborhood information under the generative models, the two types of information can be preserved more effectively. This can be validated by that our model performs significantly better than NbrReg, which naively incorporates the neighborhood information by using a neighbor-reconstruction regularizer. The superiority of our unified method can be further corroborated in the comparisons with RBSH and PairRec, which are given in the Supplementary since they employed a different preprocessing method as the models reported here. Comparing to the current SOTA methods of AMMI and CorrSh, our method 0 1 2 3 4 5 6 7 8 9 10 1XPEHURI7UHHV 0.73 0.74 0.75 0.76 0.77 0.78 3 UHF L V L R Q     TMC 0 1 2 3 4 5 6 7 8 9 10 1XPEHURI7UHHV 0.58 0.60 0.62 0.64 0.66 0.68 0.70 3 UHF L V L R Q     20Newsgroups 0 1 2 3 4 5 6 7 8 9 10 1XPEHURI1HLJKERUV 0.73 0.74 0.75 0.76 0.77 0.78 3 UHF L V L R Q     TMC 0 1 2 3 4 5 6 7 8 9 10 1XPEHURI1HLJKERUV 0.58 0.60 0.62 0.64 0.66 0.68 0.70 3 UHF L V L R Q     20Newsgroups Figure 2: The precision of 64-bit hash codes with varying number of trees M and neighbors K . is still able to achieve better results by exploiting the correlation among documents. Moreover, thanks to the benefit of correlation regularization, remarkable gratuity can be acquired profitably in 64 and 128 bits. Impact of Introducing Correlations in Prior and Posterior To understand the influences of the proposed document-correlated prior and posterior, we further experiment with two variants of our model: i) SNUH ind : which does not consider document correlations in neither the prior nor the posterior distribution; ii) SNUH prior : which only considers the correlations in the prior, but not in the posterior. Obviously, the proposed SNUH represents the method that leverage the correlations in both of the prior and posterior. As seen from Table 2, SNUH prior achieves better performance than SNUH ind , demonstrating the benefit of considering the correlation information of documents only in the prior. By further taking the correlations into account in the posterior, improvements of SNUH can be further observed, which fully corroborates the superiority of considering document correlations in the prior and posterior. Another interesting observation is that the performance gap be-Distance Category Title/Subject query hockey NHL PLAYOFF RESULTS FOR GAMES PLAYED 4-21-93 1 hockey NHL PLAYOFF RESULTS FOR GAMES PLAYED 4-19-93 10 hockey NHL Summary parse results for games played Thur, April 15, 1993 20 hockey AHL playoff results (4/15) 50 forsale RE: == MOVING SALE === 70 hardware Re: Quadra SCSI Problems? tween SNUH ind and SNUH prior becomes small as the length of bits increases. This may be attributed to the fact that the increased generalization ability of models brought by large bits is inclined to alleviate the impact of priori knowledge. However, by additionally incorporating correlation constraints on posterior, significant performance gains would be obtained, especially in large bits scenarios. Effect of Spanning Trees For more efficient training, spanning trees are utilized to approximate the whole graph by dropping out some edges. To understand its effects, we first investigate the impact of the number of trees . The first row of Figure 2 shows the performance of our method as a function of different numbers of spanning trees. We observe that, compared to not using any correlation, one tree alone can bring significant performance gains. As the tree number increases, the performance rises steadily at first and then converges into a certain level, demonstrating that the document correlations can be mostly captured by several spanning trees. Then, we further explore the impact of the neighbor number when constructing the graphs using the KNN method, as shown in the second row of Figure 2. It can be seen that more neighbors contributes to better performance. We hypothesize that this is partly due to the more diverse correlation information captured by the increasing number of neighbors. However, incorporating too many neighbors may lead to the problem of introducing noise and incorrect correlation information to the hash codes. That explains why no further improvement is observed after the number reaches a level. Empirical Study of Computational Efficiency We also investigate the training complexity by comparing the training duration of our method and VDSH, on Tesla V100-SXM2-32GB. On the Reuters, TMC, 20Newsgroups datasets with 64-bit hash codes, our method finishes one epoch of training respectively in 3.791s, 5.238s, 1.343s and VDSH in 2.038s, 4.364s, 1.051s. It can be seen that our model, though with much stronger performance, can be trained almost as efficiently as vanilla VDSH due to the tree approximations. Case Study In Table 3, we present a retrieval case of the given query document. It can be observed that as the Hamming distance increases, the semantic (topic) of the retrieved document gradually becomes more irrelevant, illustrating that the Hamming distance can effectively measure the document relevance. Visualization of Hash Codes To evaluate the quality of generated hash code more intuitively, we project the latent representations into a 2-dimensional plane with the t-SNE (van der Maaten and Hinton, 2008) technique. As shown in Figure 3, the representations generated by our method are more separable than those of AMMI, demonstrating the superiority of our method. We have proposed an effective and efficient semantic hashing method to preserve both the semantics and neighborhood information of documents. Specifically, we applied a graph-induced Gaussian prior to model the two types of information in a unified framework. To facilitate training, a tree-structure approximation was further developed to decompose the ELBO into terms involving only singleton or pairwise variables. Extensive evaluations demonstrated that our model significantly outperforms baseline methods by incorporating both the semantics and neighborhood information. This work is supported by the National Natural Science Foundation of China (No. 61806223, 61906217, U1811264), Key R&D Program of Guangdong Province (No. 2018B010107005), National Natural Science Foundation of Guangdong Province (No. 2021A1515012299). This work is also supported by MindSpore.
abstain abstain abstain objective objective objective objective abstain abstain abstain abstain abstain abstain abstain other abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain objective objective abstain abstain objective method abstain abstain method other other abstain abstain abstain abstain method abstain abstain method abstain other abstain other abstain abstain abstain abstain other abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain other other abstain abstain abstain method abstain abstain abstain abstain abstain method other abstain abstain abstain abstain abstain method abstain abstain abstain other abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain other other other other other other other other other other other abstain method abstain abstain abstain method method method method abstain method method abstain abstain abstain abstain abstain abstain abstain abstain abstain method method abstain abstain result other abstain result result abstain abstain abstain other abstain abstain abstain abstain abstain abstain abstain abstain other abstain abstain abstain abstain abstain abstain result abstain abstain abstain abstain abstain abstain abstain abstain result abstain abstain abstain abstain objective method abstain objective other other