This application is the national phase entry of International Application No. PCT/TR2017/050037, filed on Jan. 23, 2017 the entire contents of which are incorporated herein by reference.
This invention is related to a method of privacy preserving document similarity detection.
This invention is particularly related to a document similarity detection method in which non-prefix-free (NPF) coding of the input documents as a transform is used to provide the privacy.
Similarity computation between documents has many applications such as plagiarism detection, copyright management, duplicate report detection, document classification/clustering, and search engines, just to list a few. Many solutions have appeared assuming that the contents of the documents are public, where the general tendency here is to first compute a feature vector that is mainly based on the number of occurrences of words in the document, or n-gram frequencies. Those features, or the fingerprint values extracted from them, are then compared to compute the similarity score. Despite natural language processing based approaches, the information distance based similarity metric has also been applied for some practical cases such as software plagiarism detection.
The necessity for the privacy preserving similarity detection appears when the owners of the documents want to keep their contents secret, while at the same time they need to measure the similarity in between. Some example scenarios include, but not limited to, duplicate submission control between the related conferences and journals in academia, and information sharing between the insurance companies or intelligence agencies.
In simultaneous submission detection problem, since the content of each individual submission is private, the submitted venues cannot share the submissions publicly to check whether there exist multiple very similar copies of the same paper under review at other venues at the same time. However, in case a practical privacy preserving document similarity tool is available, then the related venues such as the conferences or journals accepting papers at the same time on similar topics, may use of this procedure to control the duplicate submissions.
Another example is on the document comparison between the insurance companies to detect fraud applications. When a damage or a loss is claimed from one company, it might be required to check similar claims filed from others. However, since those claims are confidential, public comparison is not possible, where the companies need a privacy preserving similarity method to compare the files without breaking their privacy. Similar scenarios can be imagined for the information sharing during a collaboration between the governmental intelligence agencies.
The known methods proposed to solve the privacy preserving document similarity detection problem generally begin with encrypting the extracted features from the documents mostly with a homomorphic scheme, which makes some limited operations possible to be computed on the encrypted data, while keeping the information provably secure. Based on those operations doable via homomorphic encryption, the comparison of the encrypted feature vectors are achieved via some multi-party secure computation protocols. However, the inherent practical difficulties of the homomorphic schemes inhibit the usage of the previous solutions for the privacy preserving document similarity detection.
The Chinese patent document numbered CN1447603 of the known state of the art relates to the technique of data lossless compression and decompression in information technique area the loss less compression and decompression using information source entropy coding are all based on the entropy coding method of non-prefix code, which builds a binary tree based on frequency of occurrence of the message source as well as builds the codes of message source through the search from root to leafs. This method does not aim to provide a method for privacy preserving document similarity detection and the non-prefix coding is totally different.
In the paper titled “Non prefix-free codes for constrained sequences” (Dalai, Marco & Leonardi, Ricardo, Department of Electronics for Automation University of Brescia, Italy), using of variable length non prefix-free codes for coding constrained sequences of symbols is mentioned. This method does not aim to provide a method for privacy preserving document similarity detection and the non-prefix coding is totally different.
The aim of this invention is to provide a method in which non-prefix-free (NPF) coding of the input documents as a transform is used to provide the privacy.
Another aim of this invention is to provide a method in which variable-length codes in the non-prefix-free codes are used for security purposes.
In this method, a novel privacy preserving document similarity detection is presented. The privacy in the method is based on the lack of unique decodability in non-prefix-free codes, which is different from the solutions offered to date that rely on mostly the homomorphic schemes and multi-party secure computation methods. While preserving the privacy, the NPF coding does not alter the patterns in the source files since it simply replaces symbols of the files with variable bit-length codewords. Thus, the regularities in between the documents are kept in their transformed versions also. Thanks to this property, the normalized compression distance (NCD) as a very suitable tool is used for the similarity detection. The NCD similarity of two sequences is a value between 0 and 1. The experiments conducted on 100-files corpus revealed that the deviation between the NPF transformed and normal plain comparisons is around 0.02 points, which is quite acceptable in practical usage. Despite the NCD similarity metric, it might be possible to integrate the same idea of NPF coding transform to the other proposed similarity evaluations such as the ones based on n-gram symbol counts.
Let A=a1a2 . . . ap and B=b1b2 . . . bq represent two documents of respectively p and q symbols long, where each character ai and bj is drawn from the alphabet Σ={ε1, ε2 . . . ε6} for valid 1≤i≤p and 1≤j≤q. The similarity score computed with the method S( ) is denoted by S(A,B).
The normalized compression distance similarity metric used in this method is based on the fact that if two documents are similar then each of them should be able to be compressed well with the model extracted from the other. In other words, when one of them is concatenated to the end of the other document, and send to a compressor, the compression ratio obtained should be reflecting their similarity since combined similar documents would result better compression then
the unrelated pairs. Normalizing the compression ratio by respecting possible different lengths of the documents, the NCD similarity score is represented by the formula
Here, C( ) is an arbitrary compressor, and AB is the concatenation of the documents A and B. The score is between 0 and 1. The similarity increases towards 0 and decreases towards 1.
In this method the documents are encoded with a non-prex-free coding scheme. Assume W={w1, w2 . . . w6} is a codeword set generated for the alphabet Σ={ε1, ε2 . . . ε6}. Each wi is a bit sequence of arbitrary length, which may be a prefix of another codeword wj from W. Given a sequence T=t1t2 . . . tn for tiϵΣ, the NPF: Σ→W coding replaces all occurrences of εi with its corresponding wi on T.
Example 1 demonstrates a sample NPF coding on a given T=NONPREFIXFREE.
The codewords in W are not prefix free. For example, the codeword 1 assigned to symbol X is a prefix of the codewords 111, 1111 assigned to F and O respectively. Other instances of that non-prefix-free property appear on W. The encoded bit stream for the sample T is shown. Notice that the codeword boundaries cannot be determined on the encoded stream due to the non-prefix-free property. The same stream can have many other parses according to the codeword set W, e.g., the initial bits 0011111 can also represent the sequence PFXX, and so on. Due to the lack of unique decodability, the non-prefix-free codes are not much interesting in terms of data compression.
Variable-length codes can also be used for security purposes. It had been previously shown that the prefix-free codes such as the Huffman codes are difficult to cryptanalyze, and it is hard to extract the original sequence from the prefix-free encoded version. The situation worsens in case of non-prefix-free codes since there are a lot less restrictions to be used in a ciphertext-only attack.
Despite the difficulty for extracting the original sequence, the NPF coding scheme actually preserves the syntactic structures of the documents. The portions that are equal to each other in distinct documents are mapped to the same bit stream. Thus, the shared information content is preserved after the NPF transform. For that reason the NCD distance between the documents are preserved in their NPF transformed versions. More formally, |S(A,B)−S(NPF(A),NPF(B))| is expected to be small.
The Method
Assume Alice and Bob own the document A and the document B respectively. We assume both documents have the same alphabet Σ. They would like to know how similar the documents are without revealing the contents to each other. To achieve this goal, they encode their documents with the same NPF codeword set W, that they had previously agreed on.
The codeword set W for the NPF coding can be chosen arbitrarily since the aim
here is not efficiency in data representation, but private data comparison. The important thing is to let codewords to be prefixes of others. With this in mind, the codeword set W for a given alphabet Σ can be prepared as follows.
The sequence X=<1, 2 . . . σ> is shuffled by the help of a pseudo-random number generator PRNG to get a random permutation of numbers from 1 to σ. The PRNG is first initialized with an arbitrarily chosen seed. For each i=1 to σ in order, the values at xi and xr are exchanged, where r is the random number generated by the PRNG in between 1 and σ. The procedure is repeated K times for a large K, e.g., 1000 times in the experiments conducted. At the end a random permutation X′=<x1, x2, . . . , xσ>, for xiϵ{1, 2, 3 . . . σ} and xi≠xj unless i=j, is prepared.
The codewords in W are generated by setting each wi to the minimal binary representation of (xi+1). The minimal binary representation bit sequence for an integer i is the binary string of length └log2i┘ without the leftmost bit set to 1, e.g., the minimal binary representation of 5=(101)2 is 01 that is of length 2=└log25┘ For example, assuming an alphabet size σ=8, and the random permutation vector as X=<2, 5, 3, 6, 7, 1, 4, 8>, the codewords set W is generated as W={1, 10, 00, 11, 000, 0, 01, 001} by the described procedure.
Notice that by using the same seed for the PRNG initialization and repeating the shuffling operation for the same K times, both parties will have the same permutation, and thus, the same W.
Once Alice and Bob encoded their documents with the same non-prefix-free codeword set W, they are ready to compute the similarity score of the transformed
documents. Since extracting the original documents from their NPF encoded transforms is hard due to the lack of codeword boundaries on the transformed bit sequences, they can exchange the documents and compute the similarity with the NCD metric described above. If the similarity score is below a certain threshold, then this implies the original documents are related since the similarity between the transformed documents reflect the similarity of the originals.
However, in this scenario, Alice and Bob may not want to exchange their documents even they are NPF encoded. That is because, although practically the privacy of the documents can be assumed to be established, the parties may be skeptical about the provable security of the system. Such a case may be expected when Alice and Bob are agents of intelligence services, who would like to check whether both sides have similar knowledge on an issue. On the other hand, it is not very likely if Alice and Bob are the program committee chairs of related conferences, who would like to examine whether there exist simultaneous submissions.
Anyway, if there exist a concern of that type, both parties grant a third trusted party to access the NPF encoded documents, and that third party performs the NCD computation. Notice that since that trusted third party has zero knowledge about the NPF codeword set, and the documents, it is much harder for him or her to try a ciphertext only attack.
We have collected a corpus of 100 documents that are the daily columns of 5 distinct Turkish journalists. Each author is represented by 20 files, which makes a total of 100 documents. Each document is around 5 KB long in size.
Our main curiosity in the experiments is to observe how much does the similarity in the private domain shown by
α′←NCD(NPF(A),NPF(B)) will be close to similarity in the public domain as shown by
α←NCD(A,B).
With that purpose we have computed the similarity scores between each possible pair of documents. Afterwards, we have encoded each document with the proposed NPF coding scheme by selecting a random seed, and using the PRNG of the C programming language (rand( ) command) to produce the random numbers required. We assumed the 256-symbol ASCII codes as the source alphabet of the documents. The NPF encoded document corpus was created in this way.
There is a small nuance here in terms of practical usage. While saving the encoded documents we have represented each bit with a byte. The reason for that depends on the working mechanisms of the daily compressors, which are byte oriented. The compressors that are also used in the NCD software, assumes an input sequence as a byte stream instead of a bit stream. Thus, we preferred to spend one byte per bit in the NPF encoded sequences not to loose any precision in the compression phase of the similarity calculation with the NCD.
The
We have presented a novel privacy preserving document similarity detection method. The privacy in the proposed method is based on the lack of unique decodability in non-prefix-free codes, which is different from the solutions offered to date that rely on mostly the homomorphic schemes and multi-party secure computation methods. While preserving the privacy, the NPF coding does not alter the patterns in the source files since it simply replaces symbols of the files with variable bit-length codewords. Thus, the regularities in between the documents are kept in their transformed versions also. This property led us to use the normalized compression distance (NCD) as a very suitable tool to be used for the similarity detection. The NCD similarity of two sequences is a value between 0 and 1. The experiments conducted on 100-files corpus revealed that the deviation between the NPF transformed and normal plain comparisons is around 0.02 points, which is quite acceptable in practical usage. Despite the NCD similarity metric, it might be possible to integrate the same idea of NPF coding transform to the other proposed similarity evaluations such as the ones based on n-gram symbol counts.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/TR2017/050037 | 1/23/2017 | WO | 00 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2018/136020 | 7/26/2018 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
8209339 | Tong | Jun 2012 | B1 |
9143393 | Bird | Sep 2015 | B1 |
9760548 | Cooke | Sep 2017 | B2 |
20120254333 | Chandramouli | Oct 2012 | A1 |
20120296637 | Smiley | Nov 2012 | A1 |
20140281856 | Byrne | Sep 2014 | A1 |
20150033120 | Cooke | Jan 2015 | A1 |
20150302886 | Brock | Oct 2015 | A1 |
20160055196 | Collins | Feb 2016 | A1 |
Number | Date | Country |
---|---|---|
1447603 | Oct 2003 | CN |
Entry |
---|
Urvashi Garg and Vishal Goyal, Maulik: A Plagiarism Detection Tool for Hindi Documents, Indian Journal of Science and Technology, vol. 9, Mar. 2016, pp. 1-11. (Year: 2016). |
John S. Whissell and Charles L.A. Clarke, Effective MEasures for Inter-Document Similarity, CIKM'13, Oct. 27, 2013, pp. 1-10 (Year: 2013). |
J. Whissell and C. Clarke, “Effective Measures for Inter-Document Similarity”, CIKM' 13, Oct. 27-Nov. 1, 2013, 1361-1370. (Year: 2013). |
Marco Dalai et al., Non prefix-free codes for constrained sequences, Department of Electronics for Automation University of Brescia, Italy, Jun. 10, 2015. |
Kulekci M Oguzhan,Uniquely Decodable and Directly Accessible Non-Prefix-Free Codes via Wavelet Trees, 2013 IEEE international symposium on information theory, IEEE, Jul. 7, 2013, pp. 1969-1973. |
Number | Date | Country | |
---|---|---|---|
20190087390 A1 | Mar 2019 | US |