XFake: Explainable Fake News Detector with Visualizations
Fan Yang, Shiva K. Pentyala, Sina Mohseni, Mengnan Du, Hao Yuan, Rhema Linder, Eric D. Ragan, Shuiwang Ji, Xia Hu
XXFake: Explainable Fake News Detector with Visualizations
Fan Yang ∗ , Shiva K. Pentyala ∗ , Sina Mohseni ∗ , Mengnan Du ∗ , Hao Yuan ∗ , Rhema Linder ,Eric D. Ragan , Shuiwang Ji , Xia (Ben) Hu Department of Computer Science and Engineering, Texas A&M University School of Electrical Engineering and Computer Science, Washington State University Department of Computer & Information Science & Engineering, University of Florida{nacoyang,pk123,sina.mohseni,dumengnan,rhema,sji,xiahu}@tamu.edu,[email protected],[email protected]
ABSTRACT
In this demo paper, we present the XFake system, an explainablefake news detector that assists end-users to identify news credibil-ity. To effectively detect and interpret the fakeness of news items,we jointly consider both attributes (e.g., speaker) and statements.Specifically,
MIMIC , ATTN and
PERT frameworks are designed,where MIMIC is built for attribute analysis, ATTN is for statementsemantic analysis and PERT is for statement linguistic analysis.Beyond the explanations extracted from the designed frameworks,relevant supporting examples as well as visualization are furtherprovided to facilitate the interpretation. Our implemented systemis demonstrated on a real-world dataset crawled from
PolitiFact ,where thousands of verified political news have been collected. CCS CONCEPTS • Human-centered computing → Natural language interfaces ; Graphical user interfaces ; Web-based interaction . KEYWORDS
Fake news detection, explainable models, system visualization.
ACM Reference Format:
Fan Yang ∗ , Shiva K. Pentyala ∗ , Sina Mohseni ∗ , Mengnan Du ∗ , HaoYuan ∗ , Rhema Linder , and Eric D. Ragan , Shuiwang Ji , Xia (Ben) Hu .2019. XFake: Explainable Fake News Detector with Visualizations. In Pro-ceedings of the 2019 World Wide Web Conference (WWW ’19), May 13–17,2019, San Francisco, CA, USA.
ACM, New York, NY, USA, 4 pages. https://doi.org/10.1145/3308558.3314119
With the prevalence of web applications, it has become much easierfor the public to get access to various news items through differentchannels, such as news websites and social media. However, thiskind of convenience also brings about the wide spread of fake newsat the same time [10]. Fake news is detrimental to both individualsand society, and it is usually generated as hoaxes to mislead publicthrough false or biased information. In 2016, the term "Fake News"was even shown as the word of the year by Macquarie Dictionary. ∗ Those authors contributed equally in developing the system.This paper is published under the Creative Commons Attribution 4.0 International(CC-BY 4.0) license. Authors reserve their rights to disseminate the work on theirpersonal and corporate Web sites with the appropriate attribution.
WWW ’19, May 13–17, 2019, San Francisco, CA, USA © 2019 IW3C2 (International World Wide Web Conference Committee), publishedunder Creative Commons CC-BY 4.0 License.ACM ISBN 978-1-4503-6674-8/19/05.https://doi.org/10.1145/3308558.3314119
MIMIC
ATTNPERT
Predictions
XFakeSystem
Verified News Set
Explanations
Supporting
Examples V i s u a li z a t i o n Figure 1: The architecture of XFake system.
Though increasingly relevant, effective fake news detection isstill considered to be challenging due to the following two aspects.First, fakeness of news could come from diversified perspectives [7],which is beyond the boundaries of traditional textual analysis. Forexample, a fake news item may result from its contexts or speaker,and it may not directly relate to its contents. The source of fakenessis highly dependent on each specific instance. Second, fakenessdetection results need further explanation, which is important andnecessary for users’ final decisions [2]. The explanation could pro-vide evidences on model predictions and further help users betterunderstand why certain news items are classified as fake.Considering these two challenges, we design and implement anexplainable system, named
XFake , on fake news detection task. Par-ticularly, three different frameworks (i.e.,
MIMIC , ATTN and
PERT )are designed to analyze news items from different perspectives.With MIMIC, we aim to judge each news item from its attributeinformation, which may include news context, speaker and etc. ForATTN, our goal is to investigate each news statement through itssemantic meaning. By employing PERT, we aim to study the lin-guistic features of news statements for detection. All three designedframeworks are self-explainable, where relevant explanations couldbe extracted for interpreting detection results. Besides, we also pro-vide supporting examples for each news instance by correspondingmatching algorithm, and visualize detection results for user-friendlyinteraction. Both supporting examples and visualizations furtherassist users to understand why the system make a certain predictionon a given news. Overall, XFake system is capable of not only giv-ing prediction scores on news fakeness, but also providing relevantexplanations as prediction evidences. With the aid of XFake, userswould be convenient to identify the news credibility.To best of our knowledge, XFake is the first explainable fakenews detector over multiple perspectives. Corresponding system ar-chitecture and demonstration details will be respectively introducedin the following section 2 and section 3. a r X i v : . [ c s . C Y ] J u l tatement Speaker Targeting Subject ContextEmbedding Convolution
Max-Pooling Bi-LSTM Bi-LSTMFully ConnectedSoftMaxXGBoost
Final Prediction
Soft Labels
Student Model (Shallow)
Teacher Model (Deep)
Embedding
InstanceModel
Figure 2: The structure of MIMIC framework.
The architecture of XFake is illustrated in Figure 1. The system inputis the targeting news with attributes, and the output contains bothprediction and explanation results. The whole system is trained ona verified news set. All components will be introduced as below.
MIMIC Framework.
MIMIC is designed to analyze the news at-tributes. Enlightened by [9], we employ a deep neural network asthe teacher, and use a shallow model as the student to emulatethe teacher’s performance for better explainability. Basically, theoverall idea is to mimic the performance of neural networks withtree ensemble models, so that we can keep the good performancefrom neural networks and good explainability from tree ensemblemodels simultaneously. The structure of MIMIC is illustrated inFigure 2. Specifically, we use GloVe [6] as our word embeddingscheme in MIMIC. After obtaining the soft labels from the teachermodel, we further use them to train a student model consisting of 80decision trees. By calculating the node importance of each attributein the ensemble trees, we could get the significance of each attributein the input news instance. Further, through the constructed treesand importance scores, users could know what happened inside,which provides an overall transparency towards the model itself.
ATTN Framework.
ATTN is designed to analyze news statementsimply from semantic perspective. To build an explainable modelfor semantic analysis with good performance, we employ severaltechniques, including pre-trained word embedding, convolutionalneural network [4], and self-attention mechanism [8]. Self-attentionis used because it can capture global relationships between dif-ferent words efficiently. In addition, the weight matrix generatedin attention mechanism is input dependent, which helps provideinstance-level explanation. By applying different kernel sizes forthe convolutional network, we can get explanations based on one-gram, two-gram or three-gram analysis. The overall illustrationof ATTN is given by Figure 3. In ATTN, we employ word2vec [5]as the pre-trained embeddings and each vector representation hasa dimension of 300 (i.e. E = D = PERT Framework.
PERT is designed for news statement anal-ysis as well, but it is uniquely from a linguistic perspective. Foreffective analysis, we employ eight linguistic features, including a b c d e
M M TrueFake
Representation Dimension: E AttentionDimension: D Embedding and
1D ConvSelf-Attention Max-Pooling
News Statement
Figure 3: The illustration of ATTN framework.
NewsStatement
Feature Feature Feature Feature Feature Feature … … XGBoost
Prediction
Associated Probability
Training Data … … Perturbative Probability
Explanation
Data Sampling
Linguistic Feature
Engineering
Perturbation byreplacementSampleInstance
Figure 4: The mechanism of PERT framework.
Adjective ratio , Noun ratio , Verb ratio , Propn (such as Google, etc.) ratio , Sentiment score , Normalized text length , Whether contains themark "?" , Whether contains the mark "!" [3]. For each news itemin the training set, we extract its linguistic features and train anXGBoost [1] classifier using these features. The trained XGBoostis then used to make predictions for new items. Further, we useperturbation-based method to provide explanations. The idea isthat feature importance can be measured by observing how muchthe score (e.g., accuracy) decreases when the feature is not avail-able. To this end, we can remove a feature from the dataset, andthen re-train the classifier for score checking. Since re-training maybe computationally expensive, we replace the feature value withrandom noise, drawn from the same distribution as the originalone, instead of removing. The computed prediction difference isutilized as the significance score for the corresponding feature.
Prediction & Explanation.
XFake outputs the prediction of newsas a unified score, indicating its probability to be fake. The predic-tion result is the ensemble output from MIMIC, ATTN and PERT,where different results are combined together in a weighted summanner. The weights for combination are tuned on a validation set,according to the performance of different frameworks. The higherthe prediction score, the higher the probability for fake news. Asfor the explanation from XFake, it is mainly extracted from threedifferent perspectives enabled by MIMIC, ATTN and PERT. MIMICcould provide explanation by key components of news, ATTN isable to explain predictions by word/phrase attribution, and PERTgenerates explanation by linguistic features. Beyond this, XFakealso explains predictions from data perspective with supportingexamples. These examples are generated from both MIMIC andATTN by retrieving training samples given corresponding expla-nations (i.e. key attributes or important words/phrases). Showinghese training samples which are highly similar to the input newswould be helpful for users to understand the working patterns ofXFake. Besides, we also assign different similarity scores for differ-ent supporting examples based on the matching extent between theinput and support. Supporting examples with higher scores wouldbe considered more informative in delivering explanation.
Visualization.
To further facilitate the explanability of XFake, wevisualize the outputs of both prediction and explanation by
D3JavaScript . Visualization mainly lies in three aspects. First, for nu-merical values, such as prediction score and attribute significance,we visualize them by histograms, which straightforwardly indicatethe results and influences. Second, to enhance the explanability forword/phrase attribution, we visualize the outputs by highlightingimportant words/phrases with heatmaps, where the darkness posi-tively relates to the importance of word/phrase. Third, for bettermodel explanability, the ensemble trees are visualized with interac-tive diagrams which are capable of showing both overall structureand specific activated paths (depending on the input). Throughthose visualization schemes, users could have a better sense to-wards XFake about why certain news are classified as fake or true.
XFake is implemented by
Python and deployed in
FLASK with an
HTML front end. To demonstrate the system, we will first introducethe data source and then go through a specific use case of XFake.
The news data, which is used to train, tune and evaluate XFake,comes from a political fact-checking website, named PolitiFact. It isa Pulitzer prize-winning website containing tons of political newswith diversified categories. The reasons why we employ this datasource are in three folds. First, PolitiFact provides professional jus-tification and fine-grained labels for all news items, where the coreprinciples in independence, transparency and fairness guaranteeits high credibility among the public. Second, the news collected byPolitiFact have various attribute information, which directly meetsour data requirement for analysis. Third, raw data in PolitiFact canbe effectively crawled through an available API , and it is conve-nient to obtain the customized dataset for system implementation.When processing the data, we only keep the attributes whichare highly related to news fakeness. Specifically, the maintainedattributes for XFake include Subject , Context , Speaker , Targeting and
Statement , although some news may not have all five attributes. Be-sides, to effectively measure the news fakeness and train the system,we transform the original multi-class data to binary data whereeach news item is labelled as either
True or False . Particularly,labels with Mostly True , Half True , No Flip , Half Flip are switchedto label
True , and labels with
Mostly False , Pants On Fire , Full Flop are switched to label
False . Furthermore, as for data statistics, thereare news crawled in total, which are evenly distributed. Thetraining, validation, test set of XFake respectively contain , , items. The validation set is used to test the performance ofdifferent frameworks and further tune the hyper-parameters, whilethe test set is employed to conduct the overall evaluation. http://static.politifact.com.s3.amazonaws.com/api/v2apidoc.html A news item labelled as False is regarded as the fake news.
With the testing on validation set, we obtain , , accuracy respectively for MIMIC, ATTN and PERT framework.By normalizing weights according to the performance, we fix thecoefficients , , in weighted sum correspondingly for alluse cases. Considering the fake news identification scenario, weshow a specific case demonstration of XFake as follows.Illustrated by Figure 5, users start by inputting news into the textboxes. In XFake, we provide a button "Random News" to help usersexplore the system, which is used to retrieve random items from ourtest set. Similarly, buttons "Fake Examples" and "True Examples"are also provided to help quickly access some representative fakeand true news. After clicking "Submit", users would obtain all theoutputs including both prediction and explanation in a few seconds.As for the prediction of the example in Figure 5, we get the score0.76, which means that the given news has the probability 76%to be fake. Regarding to the explanation, we can obtain it fromboth attribute and statement analysis. Aided by MIMIC, for thisexample, we know that "Statement" plays the most important rolecompared with others. Through ATTN, we can easily check thosehighlighted words, such as "invited" and "Russia", with differentdarkness, which would also show the contribution scores whenmouse is hovering around. PERT gives users a clear view aboutwhich linguistic features contribute to fake and which to true. Inthe example, we observe that features "Propn Ratio", "AdjectiveRatio" and "Noun Ratio" mainly contribute this news to be fake.XFake further provides supporting examples and visualized treesfor users to better understand the system. As shown in Figure 6, wegive two supporting news for instance, where one is retrieved basedon the important attributes (Context & Statement) from MIMICand the other is obtained by matching significant word ("Obama")from ATTN. For the support extraction with MIMIC, we also attacha similarity score, indicating how much attribute information itoverlaps with the input one. Besides, 80 decision trees are visualizedwith interactive diagrams and highlight the activated path of eachtree regarding to the input. In Figure 6, we only show one decisiontree for example. We can see that each decision tree can be expandedor compressed flexibly, which allows users to track the decisionprocess closely. Given a certain news, each decision tree has onlyone activated path, corresponding to one specific decision attachedat the end of the path with relevant contribution score. Thosevisualized trees largely enhance the model explainability of XFake.To demonstrate the effectiveness of XFake in real cases, weconduct relevant human evaluations by Amazon Mechanical Turk(AMT), with valid testing users in total covering diversifiedgender, age and education level. The involved user tasks include Fact Check and
Prediction Guess , where the first one is to test theusefulness of the generated explanation and the second one is toindicate the users’ understanding towards the system. The evalua-tion metrics are accuracy and time for user prediction. The humanstudy shows a clear trade-off between the speed and accuracy re-garding to generated explanations. On one hand, explanation doeshelp users better understand and predict system behavior. On theother hand, explanation would take users more time to review andinterpret detection results for benefits. Due to space constraints,we limit the details of the human evaluation study in this paper. igure 5: Prediction and explanation from XFake.
MIMIC ATTNMIMIC ATTN
Figure 6: Supporting examples and ensemble trees from XFake.
We design and implement an explainable fake news detector, namedXFake, to help end-users identify the news credibility. XFake is capa-ble of jointly analyzing news items from multiple perspectives, andcan effectively provide explanation through attribute importance,word/phrase significance, linguistic features as well as relevant sup-porting examples. Corresponding visualizations further enhancethe explanability of XFake and facilitate the decision making forusers. In future, applying XFake to multi-source (i.e., not limited tothe PolitiFact website) or multi-modal (i.e., not limited to textualform) news data could be a promising extension for the system.
ACKNOWLEDGMENTS
The authors thank the anonymous reviewers for their helpful com-ments and the funding agencies for their generous supports. Thework is in part supported by DARPA grant N66001-17-2-4031. Theviews and conclusions in this paper are those of the authors andshould not be interpreted as representing any funding agencies.
REFERENCES [1] Tianqi Chen and Carlos Guestrin. 2016. Xgboost: A scalable tree boosting system.In
Proceedings of the 22nd ACM SIGKDD . ACM, 785–794.[2] David Gunning. 2017. Explainable artificial intelligence (xai).
Defense AdvancedResearch Projects Agency (DARPA), nd Web (2017).[3] Wafa Herzallah, Hossam Faris, and Omar Adwan. 2018. Feature engineering fordetecting spammers on Twitter: Modelling and analysis.
Journal of InformationScience
44, 2 (2018), 230–247.[4] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. 2012. Imagenet classifica-tion with deep convolutional neural networks. In
Advances in neural informationprocessing systems . 1097–1105.[5] Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg S Corrado, and Jeff Dean. 2013.Distributed representations of words and phrases and their compositionality. In
Advances in neural information processing systems . 3111–3119.[6] Jeffrey Pennington and etc. 2014. Glove: Global vectors for word representation.In
Proceedings of the 2014 conference on EMNLP . 1532–1543.[7] Victoria L Rubin, Yimin Chen, and Niall J Conroy. 2015. Deception detection fornews: three types of fakes. In
Proceedings of the 78th ASIS&T Annual Meeting . 83.[8] Ashish Vaswani, Noam Shazeer, and etc. 2017. Attention is all you need. In
Advances in Neural Information Processing Systems . 5998–6008.[9] William Yang Wang. 2017. " liar, liar pants on fire": A new benchmark datasetfor fake news detection. arXiv preprint arXiv:1705.00648 (2017).[10] Xinyi Zhou and Reza Zafarani. 2018. Fake News: A Survey of Research, DetectionMethods, and Opportunities. arXiv preprint arXiv:1812.00315arXiv preprint arXiv:1812.00315