{'fraction_non_alphanumeric': 0.036063276669493716, 'fraction_numerical': 0.011910468675098639, 'mean_word_length': 4.873944119558154, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 3, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Information filtering based on corrected redundancy-eliminating mass diffusion

Methods used in information filtering and recommendation often rely on quantifying the similarity between objects or users. The used similarity metrics often suffer from similarity redundancies arising from correlations between objects’ attributes. Based on an unweighted undirected object-user bipartite network, we propose a Corrected Redundancy-Eliminating similarity index (CRE) which is based on a spreading process on the network. Extensive experiments on three benchmark data sets—Movilens, Netflix and Amazon—show that when used in recommendation, the CRE yields significant improvements in terms of recommendation accuracy and diversity. A detailed analysis is presented to unveil the origins of the observed differences between the CRE and mainstream similarity indices.


Introduction
Not so long time ago, people had to arduously travel around many stores to search for what they needed. Limited by the travel distance, number of available stores, and search costs in general, one often had to accept choices that did not meet the expectations satisfactorily. Information technologies such as the Internet [1,2], World Wide Web [3,4] and smart mobile devices [5,6] have revolutionized the shopping behavior with most of the conceivable goods just a few clicks away. However, these unlimited possibilities have exposed the customers to yet another problem: that of information overload. The limited information processing capability of individuals made an additional layer of online shopping experience necessary where every customer is provided with personalized recommendation [7]. The task of personalized recommendation is to find potentially suitable items for individual customers. The recommendations are typically computed based on past purchases of all customers, features of the available items, customer personal information, or often a combination of these various approaches. Nowadays, a recommendation engine is present in most successful e-commerce web sites. For example, Amazon uses customers' purchase records to recommend books [8], Twitter uses users' past actions to recommend who to follow [9], AdaptiveInfo uses users' reading histories to recommend news [10], and TiVo uses users' viewing patterns and provided ratings to recommend TV shows and movies [11]. Due to the outstanding significance of recommendation to the economy and society, significant attention has been devoted to studying its scientific basis and engineering applications (see the review articles [12][13][14] and the references therein). The various approaches to recommendation have been suggested, such as content-based analysis [15,16], context-aware analysis [17], time-aware analysis [18], tag-aware analysis [19], social recommendation analysis [20], constraint-based analysis [21], spectral analysis [22], iterative refinement [23], principle component analysis [24], information core analysis [25], and hybrid methods [26]. Furthermore, collaborative filtering (CF) recommendation algorithms become highly popular due to their simplicity and effectiveness [27]. The class of algorithms based on network-based inference (NBI) [28][29][30][31][32][33][34] and heat conduction [35][36][37] becomes popular due to their flexibility and extendability.
In an unweighted undirected object-user bipartite network, two objects are thought to be similar if they are simultaneously selected by a user. The more users co-select the two objects, the more similar the objects are believed to be. The same is true for objects who are thought to be similar if they co-selected by one or more users. However, owing to the sparsity and heterogeneity of many real-world bipartite networks, similarities among pairs of objects or users are overestimated or underestimated outstandingly, which in turn impairs accuracy of the produced recommendations. In addition, overestimating object similarity arising from object attributes leads to substantial redundancy which then directly weakens the diversity and personality of the produced recommendations. To further improve the performance of recommendation methods, these problems must be comprehensively addressed. We propose a novel similarity index, which we refer to as Corrected Redundancy-Eliminating similarity index (shortly CRE), in order to improve the accuracy and diversity of recommendations. Similarly to the corrected similarity index (shortly CSI), the CRE takes into account the symmetrical nature of the underlying mass diffusion process on the bipartite network. Most importantly, CRE eliminates unexpected original and secondary similarity redundancy-a problem which is ignored by the CSI. We show that the CRE indeed improves the recommendation performance as measured by a number of standard information filtering evaluation metrics.

Apparent similarity problem
In traditional works based on bipartite networks (e.g. NBI), researchers naturally suppose two objects are more similar if they are commonly selected by more users. However, owing to structural sparsity and heterogeneity in bipartite networks, the apparent similarity estimations including overestimation and underestimation can happen unexpectedly. For concretely explaining the origin of such problem, we simply exemplify it in Fig 1, which has been mentioned in [33].
Concretely, in the example bipartite network shown in Fig 1(a), objects {o 1 , o 2 } and {o 1 , o 3 } are only selected by user u 2 at the same time. So, the similarity from o 1 to o 2 is expected to the same as the one from o 1 to o 3 , such like w 21 = w 31 for NBI (see R F of Fig 1(b)). Nevertheless, it deviates from this expectation: the statistical sums of (mass) similarities between each object and others are assumed to be set as 1. In total three users selecting o 2 , only one also selects o 1 and for o 3 it is one in two. Accordingly, for o 2 , the most likely similarity only accounts for 1 3 of the original, and for o 3 it accounts for 1 2 . We inverse the similarity matrix W obtained from NBI, and scale it in each column (see R B of Fig 1(b)). It can be found that the original (mass) similarity is overestimated between o 1 and o 2 (w 21 > r 12 ) or underestimated between o 1 and o 3 (w 31 < r 13 ). It suggests the heterogenous objects' degrees affect the similarity estimation based asymmetrical mass diffusion of NBI. Obviously, we can solve this apparent similarity problem to introduce the symmetrical mass diffusion like CSI (more details of CSI in Sec. 2.3).

Similarity redundancy problem
Since CSI takes NBI as foundation, there still exists another similarity redundancy problem [31]. Basically speaking, similarity between two objects is originated from correlation between objects' attributes. In other words, some similarities may be derived from objects' diverse attributes and others may be deduced from objects' same attribute, which brings in similarity redundancy and eventually harms recommendation performance, especially for diversity and personalization. Let us take Fig 2 for an example to clarify the idea.
In Fig 2, A, B, D, E represent the collected objects and C, F represent the uncollected objects, respectively. All five links, representing correlations between two objects in the object -object network, should have more or less the same weight because each of them is derived from one common attribute as labeled. Here, we may as well set the weight of each link as one unit.
Since C and F respectively has two similar collected objects, both of them are ranked with two scores based on similarity measure. However, the collected objects for C has two absolutely distinct attributes 'color = green' and 'geometry = diamond', while for F the collected objects oppose a common attribute 'color = green'. Obviously, the two scores for C and F implies different extent of similarity. Such phenomenon is called the similarity redundancy existing ubiquitously in real recommendation systems, which recommends users many repetitions and definitely depresses diversity, personality and accuracy.

Corrected redundancy-eliminating similarity index
The reason resulting in the apparent similarity problem is asymmetrical mass diffusion on the spares and heterogeneous BN. Much more practically, two objects are believed to be similar only if the forward similarity proportion is coherent with the backward similarity proportion. The more coherent and symmetrical, the more similar they are. Like CSI, the element m ij of corrected similarity matrix M C can be defined as, where r F ij and r B ji are the elements of R F and R B . The computation of r F ij and r B ji is according to CSI. As shown in Fig 1(b), the original apparent similarity estimations of w 21 and w 31 in blue solid circle. Through the corrections via r 12 , r 13 and definition of r B ji , they are corrected as m 21 and m 31 , respectively. Between them, the clear difference is embodied and confirms our formally expectation. Meanwhile, other similarity weight w ij are transformed into m ij with the same circle marker to keep the existing distinguishability, such as w 13 and w 23 into m 13 and m 23 surrounded by green dash circles.
Apart from the above apparent similarity, the redundancy similarity intrinsically originates from the common attributes among collected objects, which tightly connects them just like the D-E correlation ('color = green') in Fig 2(b). With the close correlation like D-E, the collected object must have strong second order correlations with the uncollected one, such as the second order correlation D-E-F. It causes the redundancy similarity for uncollected objects. On the contrary, if the two collected objects have weak relation, the second order correlation can be neglected, just like the A-B-C in Fig 2(a). Beside of the above mentioned similarity redundancy, the superposed bidirectional similarities arising from the symmetrical mass diffusion bring in secondary similarity redundancy.
Thus, after correcting apparent similarity, we should eliminate these similarity redundancies with the following definition, Definition 1 With corrected similarity matrix M C and tunable parameter α, the corrected redundancy-eliminating similarity matrix S CRE is defined as follows: where the tunable parameter α is always negative and adjusts for different redundancy situations in diverse biparite networks, and [M C ] 2 represents the secondary moment of M C . If a user has selections denoted by vector f, the recommendations f 0 according to corrected similarity matrix S CRE can be obtained from the equation f 0 = S CRE f.

Experimental results
The experimental results on three benchmark datasets are averaged over ten independent random divisions. The goal of our experiment is to investigate diversity and personality under the condition of the optimal accuracy. Thus, we choose the optimal parameter when the ranking score is the lowest in each dataset, and compute six metrics (ranking score, AUC, precision, intra-similarity, hamming distance and average degree) under such parameter. In Fig 3, we plot the curves of six metrics, from the top to the bottom, with α in [-1.2, 0] and recommendation list's length L = 10, 50, 100. In the same pattern, metrics curves of three datasets (Movielens, Netflix and Amazon) from the left to the right are provided. Accordingly, we first show the all evaluation metrics of six performance indices in restriction to the optimal α = -0.93, -0.88 and 0. These results clearly suggest that the optimal α definitely exists in [-1, 0], and with this restriction the other evaluation metrics (especially precision and AUC) also behave better.
Although we cannot leverage the best values of evaluation metrics with an identical parameter, the comparatively better values in restriction to higher accuracy outperform those of benchmark methods. As shown in Tables 1 and 2, the optimal parameters are subject to the lowest ranking score(hri) for all methods (mainly HNBI, REBNI, CRE). The other evaluation metrics of precision(P), AUC, intrasimilarity(I), hamming distance(H), and popularity(hki), are obtained at their optimal parameters, respectively. According to the optimal evaluation metrics, we can clearly find that the best ones emphasized in boldface are almost obtained through CRE. Distinctively, CRE perfectly acquires the most outstanding diversity and personality (see values in I, H, hki) with L = 50, 100 and also achieves much more remarkable accuracy (see values in hri, P, AUC) in the most cases.
More concretely, let's analyze Table 1 at first. Evidently, CRE surpasses CF the most in all aspects, especially even with hri reduced by more than 32%, H increased by more than 44% in Movielens, P increased by more than 51%, I increased by more than 47% and hki reduced by more than 53% in Netflix, and in Amazon, besides, P increased by more than 23% and hki reduced by more than 51%. CRE transcends NBI on six metrics, distinctively, with hri reduced by more than 28%, P increased by more than 41% and I reduced by 42% in Netflix, H increased by more than 34% in Movielens and hki reduced by more than 52% in Amazon. CRE is superior to HNBI on all six metrics, with hri reduced by more than 23%, P increased by more than 31%, I reduced by 41% in Netflix, H increased by more than 21% in Movielens, and hki reduced by more than 51% in Amazon. CRE is more excellent than RENBI in most cases. Prominently, herein, CRE overcomes RENBI with I reduced by more than 31% in Netflix, and hki reduced by more than 42% in Amazon. At last, CRE stands on top of CSI, remarkably with hri reduced by more than 17%, P increased by more than 15%, I reduced by more than 23% and hki reduced by more than 23% in Netflix, H increased by more than 11% in Movielens.
In addition, from further examination in Table 2 with L = 100, CRE also has approximately similar performances corresponding to Table 1. Even though there exists differences in three benchmark data sets, we argue that CRE obviously outperforms the five mainstream baselines in diversity and personality, and meanwhile has excellent accuracy in most cases as well. Especially, in data set Amazon containing little redundancy because of diversity of goods for sale, CRE shows the optimal values as the same as CSI at α = 0, meaning that it degrades to CSI. In others words, from the definition of CRE, it is obvious that CSI is a special case of CRE, suggesting CRE a more capable and adaptive algorithm in various conditions of different datasets to approach the satisfied performances.

Analysis
To better reveal the intrinsic nature that CRE outperforms benchmark methods, we compare the recommendation processes of all methods. Generally, CF makes recommendation reasonably based on similarity between users, but still ranks with the worst compared with CRE because it neglects the similarity between objects and users' similarity redundancy. NBI distinctively performs better than CF but also shows severe shortage in contrast to CRE. It is Table 1. Performance comparison table. The optimal α's of ranking score hri for HNBI, RENBI, CRE are (-0.86, -0.76, -0.93) in Movielens, (-1, -0.81, -0.88) in Netflix and (-0.08, -0.53, 0) in Amazon, respectively. And the other evaluation metrics-P for precision, AUC, I for intra-similarity, H for hamming distance, hki for popularity-take the values corresponding to the optimal α of hri. The recommendation list L = 50, and the sampling number n in AUC is one million. All the values are obtained by averaging over ten independent runs with different data set divisions and numbers in brackets stand for the standard deviations. due to the unidirectional defective (or apparent) similarity between objects and neglects similarity redundancy. HNBI and RENBI are the derivations of NBI. HNBI only penalizes the high degree of popular objects and RENBI only eliminates the similarity redundant. However, both of them are based on the unidirectional defective similarity between objects like NBI. To the opposite, CSI explicitly corrects the biased unidirectional similarity, but preserves the original adverse similarity redundancy. Meanwhile, it brings in secondary redundancy because of the accumulation of bidirectional similarities, which may lead to much worse redundancy. These traditional similarity based algorithms indeed either contains the analogous drawback of similarity estimation, or hides with annoying similarity redundancy, which cause unsatisfied recommendation performance. Nevertheless, CRE simultaneously combines apparent similarity correction with redundant similarity elimination, even removes secondary redundant similarity brought by similarity correction procedure. It surely achieves the admirable improvements in accuracy, diversity and personality. More importantly, CRE intrinsically holds the merits of our proposed CSI, but modifies its defects. Moreover, CRE with tunable parameter can adjust to diverse similarity redundancies for the most suitable recommendations.
Besides, the lower computation complexity is another important factor when we design the recommendation algorithm. As we known, the time complexity of product of two N × N matrices is O(N 3 ). To NBI and CSI without searching precess, they have the complexity of O (N 3 ). However, even though necessary for searching for optimal value, compared with N, the searching cost is negligible. Accordingly, CRE, HNBI and RENBI still retain the complexity as O(N 3 ), implying great improvement of performance but without increasing complexity. Table 2. Performance comparison table. The optimal α's of ranking score hri for HNBI, RENBI, CRE are (-0.86, -0.76, -0.93) in Movielens, (-1, -0.81, -0.88) in Netflix and (-0.08, -0.53, 0) in Amazon, respectively. And other evaluation metrics-P for precision, AUC, I for intra-similarity, H for hamming distance, hki for popularity-take the values corresponding to the optimal α of hri. The recommendation list L = 100, and the sampling number n in AUC is one million. All the values are obtained by averaging over ten independent runs with different data set divisions and numbers in brackets stand for the standard deviations.

Discussions
We have investigated the similarity based recommendation algorithms (mainly involving with benchmark methods) and find the existence of two problem, that is, apparent similarity estimations due to only considering unidirectional mass diffusion and similarity redundancy caused by the correlations between objects' attributes. Even the worse, in some benchmark methods, such as CF, NBI, HNBI, they both originally exist. Significantly, CSI bring in secondary similarity redundancy to make recommendation worse in some evaluation metrics, such as I, H, hki in Movielens, although it correct the apparent similarity. After exploring biased unidirectional similarities from the collected objects to the uncollected ones and similarity redundancies derived from correlations between objects' attributes, a corrected redundancyeliminating model (i.e., CRE) is proposed. Herein, modeled with symmetrical mass diffusion, CRE believes stronger symmetric mass diffusion makes more precise similarity estimation. Additionally, CRE advisably eliminates unexpected original and secondary similarity redundancy caused by mass diffusion. Through experimental verifications on three benchmark datasets, CRE indeed achieves great and impressive improvement in accuracy, diversity and personality in comparison with other methods. Because of high effectiveness and low complexity, CRE can be applied in various kinds of recommendation systems, such as online news recommendation, online books recommendation, online movies recommendation, online music recommendation, and so on. Although obtaining great improvement, CRE still has weaknesses. For example, the lack of consideration on node degrees may to some extent impacts the recommendation performance. This will be further investigated in our future work.

Data & metrics Data
Three real benchmark datasets, Movielens from http://www.grouplens.org/, Netflix from http://www.netflix.com/, and Amazon from http://www.amazon.com/ are introduced to demonstrate the effectiveness of our CRE index and freely downloaded from KONECT database. Three benchmark datasets are firstly realeased by GroupLens, Netflix and Amazon, which mainly used to testing recommendation alogorithms. They are gathered into the KONECT database built by Institute of Web Science and Technologies at the University of Koblenz-Landau (http://konect.uni-koblenz.de/networks/). The aim of the KONECT database is for public academic research. We guarantee that there is no conflict of interest. And, all people can freely download these datasets. Movielens and Netflix are well-known movie recommendation websites, and Amazon is a famous online shopping store. Ratings in such web sites are extracted to rank users' preference to the objects with extent from 1 to 5 stars. We believe user likes the object if he/she rank the ratings ! 3, and then the rest dislike links will be abandoned. Consequently, we can gain the ultimate processed experimental datasets, detailed in the following Table 3.
For the sake of clear description of experiment, we denote all the possible user-object links as a whole link-set E A . Further, we divide the existed link-set E into training set E T with 90% links of the total and probe set E P with the remaining 10% links (E P \ E T = ;). It is noticed that links in the probe set are considered as unknown information which is prohibited from taking in training phase. The links in the set E A \ E represent all the unrealized user-object selections.

Evaluation
For evaluating the recommendation performance, we focus on three categories of metrics: accuracy, diversity and personality (contrary to popularity) [14]. The accuracy is usually assessed by three metrics, including averaged ranking score, precision and AUC, which are described as follows: 1. Averaged ranking score (hri): Better ranking score is smaller, meaning all the links in the probe set E P are ranked ahead contrast to the links in the set E A \ E T . If u j purchases o i in the E P and the link gets the ranking position p ij in his/her uncollected objects set O j based on the recommendation score, we obtain the rank ij ¼ p ij jO j j as the ranking score of o i -u j link l ij . Consequently, we compute the averaged ranking score hri via all the links in E P as follows: Where |O j | and |E P | suggest the cardinality of sets.
2. Precision (P): If a user u j has N j recommended testing links, the precision P j (L) of him/her equals to N j L with recommendation list length = L. Furthermore, the precision P of the whole system can be calculated through all users' individual precisions as 3. Area Under ROC Curve (AUC): AUC is designed for the measurement that a recommender system can effectively discriminate the users' appreciated objects from all other objects. There exists a convenient way to compute AUC, we can compare the probability that the users' appreciated objects will be recommended with that of the uninterested objects. In n independent comparisons (each comparison means choosing an appreciated and a disliked object), if the appreciated object has n 0 times higher score than the disliked and n 00 times equal, then Evidently, if all appreciated objects are ranked higher score than the opposite objects, AUC = 1 which implies a perfect recommendation list. For a completely random recommendation list, AUC = 0.5. Therefore, the more AUC exceeds 0.5, the more excellent the ability of a recommendation algorithm to distinguish niche objects.
Referred to diversity, we usually consider intra-similarity and hamming distance, which are introduced as below: In addition, we can define the intra-similarity of u l 's recommendation list as, The whole system's intra-similarity is thus calculated as, 2. Hamming distance (H): Another perspective to see the diversity of recommendations is the intra-diversity, which is quantified via the Hamming distance and the essence of personalized recommendations. Assumed the recommendation list length = L (i.e., the number of objects recommended to each user), if the overlapped number of objects in u i and u j 's recommendation lists is Q, their recommendation lists' Hamming distance is described as, In a word, a more personalized recommendation list should be qualified with larger Hamming distances contrast to other lists. Accordingly, we can further measure the diversity of recommendations through Hamming distance as averaged over all the user-user pairs. Note that, H only takes into account the diversity among users.
The popularity is estimated by average degree over recommended objects to represent personality: 1. Average degree (hki): o ij is the jth recommended item as to user i. k(o ij ) denotes item o ij 's degree. We can leverage the average degree of all recommended items for all users to compute the popularity as below,

Benchmark methods
Five mainstream indices, cooperative filtering (CF), network based inference (NBI), heterogenous initial resource distribution NBI (HNBI), redundancy elimination NBI (RENBI), corrected similarity index (CSI) are introduced for comparison with our CRE, listed as below: 1. Collaborative filtering (CF) [27]: Collaborative filtering is designed to compute similarity between users or objects. We define the cosine similarity between two users u i and u j as: To any user u i , we sort all the nonzero v ij with a ji = 0 in a descending order, and recommend those objects in the top-L.
2. Network Based Inference (NBI) [29]: NBI based on network structure computes the Sϕensen index. For a general user-object network, we can give the similarity weight between o i and o j as: where w NBI ij comes from similarity weight matrix W NBI , and kðo j Þ ¼ P m i¼1 a ji and kðu l Þ ¼ P n i¼1 a il respectively denote the degrees of object o j and user u l . Accordingly, we can obtain the recommendation list of user u l as f 0 l ¼ W NBI f l , with f l = a li representing the historical record of u l .
3. Heterogeneous NBI (HNBI) [30]: HNBI based on NBI takes heterogenous initial resource configuration into account with weight w HNBI ij ¼ kðo j Þw a ij . w ij is from Eq (14) and W HNBI ¼ fw HNBI ij g. With purchase history f j of u j , the probable recommendation list of u j is 4. Redundancy-Eliminating NBI (RENBI) [31]: RENBI based on NBI further consider to eliminate the similarity redundancy. Say the similarity matrix of NBI as W, the similarity matrix of RENBI is modeled as W RENBI = W + αW 2 and the future recommendation list of u j is acquired as f 0 j ¼ W RENBI f j .

Corrected
Similarity Index (CSI) [33]: CSI based on NBI further corrects unidirectional similarity. Given similarity matrix W = {w ij } of NBI, the forward similarity proportion is: and the back similarity proportion is: eventually getting the CSI similarity S CSI = {s ij } as: Therefore, the recommendation list of u j is f 0 j ¼ S CSI f j .