Giter VIP home page Giter VIP logo

fakebananas's Introduction

Fake Bananas

Fake news detection made simple and scalable for real people.

Fake Bananas finished top 10 at HackMIT 2017 and won awards for 'best use of data' and 'best use of machine learning for the common good.'

alt alt alt

Getting Started

I would strongly recommend a conda environment in order to easily install our older version of TensorFlow. We used TensorFlow 0.12.1 for backwards compatibility with previous work in the field. Newer versions of TensorFlow may work, but certainly not 'out of the box'.

# download and install anaconda
# python 3.5 is required for this version of TensorFlow
conda create --name FakeBananas python=3.5
NumPy==1.11.3
scikit-learn==0.18.1
TensorFlow==0.12.1
# note: older versions of TF (like 0.10) require less modification to use than newer ones
Pandas
eventregistry
watson_developer_cloud # IBM api signup required
py-ms-cognitive # microsoft 

How this works

Our fake news detection is based on the concept of stance detection. Fake news is tough to identify. Many 'facts' are highly complex and difficult to check, or exist on a 'continuum of truth' or are compound sentences with fact and fiction overlapping. The best way to attack this problem is not through fact checking, but by comparing how reputable sources feel about a claim.

  1. Users input a claim like "The Afghanistan war was bad for the world"
  2. Our program will search the thousands of global and local news sources for their 'stance' on that topic.
  3. We run sources through our Reputability Algorithm. If lots of reputable sources all agree with your claim, then it's probably true!
  4. Then we cite our sources so our users can click through and read more about that topic!

News Sources

After combing through numerous newspaper and natural language processing APIs, I discovered that the best way to find related articles is by searching for keywords. The challenge was implementing a natural language processing algorithm that extracted the most relevant keywords that were searchable, and to extract just the right number of keywords. Many algorithms were simply summarizers, and would return well over 50 keywords, which would be too many to search with. On top of that, many algorithms were resource exhaustive and would sometimes take up to a minute to parse a given text.

In the end, I implemented both Microsoft’s Azure and IBM’s Watson to process, parse, and extract keywords given the URL to a news article or a claim. I passed the extracted keywords to Event Registry’s incredible database of almost 200 million articles to find as many related articles as possible.

With more time, I would love to implement Event Registry’s data visualization capabilities which include generating tag clouds and graphs showing top news publishers given a topic. -@Henry

Determining Reputation

Using a large set of default sources with hard coded reputability, our database of sources continues to become more accurate with each web scraping by adding new sources and articles. To ensure this makes our algorithm better, the weights of each source are adjusted according to how much each new article agrees or disagrees with sources determined to be reputable. In the future, we would love to implement deep learning to further advance this ‘learning’ aspect of our reputability, but the current system more than supplies a proof of concept. -@Josh

Stance Detection

To determine if a claim is true or false, we go out and see where sources which are known to be reputable stand on that issue. We do this by leaning on established machine learning principles used for 'stance detection.' So we:

  1. Ask the user to input a claim (which holds a 'stance') on a topic. A claim might be "ISIS has developed the technology to fire missiles at the International Space Station."
  2. We search databases, and scrape web pages, to find other articles on that issue.
  3. Then run our 'stance detection' machine learning algorithm to determine if reputable sources generally agree or generally disagree with that claim. If many reputable sources all agree with a claim, then it's probably true!

Our stance detection is run by Google's Tensorflow and our model is built off of the work of the fantastic people at University College London's (UCL) Machine Reading group. -@Kastan

Frontend/backend info

Our backend is written on a Flask python server which connects to our front-end written in JavaScript.

Other (worse) methods

1. 'Fake News Style' Detection

Some teams try to train machine learning models on sets of 'fake' articles and sets of 'real' articles. This method is terrible because fake news can appear in well written articles and vice versa! Style is not equal to content and we care about finding true content.

2. Fact checking

Some teams try to granularly check the truth of each fact in an article. This is interesting, and may ultimately be a part of some future fake news detection system, but today this method is not feasible. The truth of facts exists on a continuum and relies heavily on the nuance of individual words and their connotations. The nuances of human language are difficult to parse into true/false dichotomies.

  1. Human language is nuanced. Determining a single statement as true or false
  2. No databases of what's true or false
  3. Many facts in a single article existing on all sides of the truth spectrum -- is that article true or false?

Team Members

Acknowledgements

The Fake News Challenge provided great inspiration for our project and guiding principles for tackling the task.

EventRegistry:

We want to thank EventRegistry for their awesome work and generous support in providing us a trial account to their service. We couldn't have done this without their amazing database of articles.

The University of College London's short paper on the topic:

@article{riedel2017fnc,
    author = {Benjamin Riedel and Isabelle Augenstein and George Spithourakis and Sebastian Riedel},
    title = {A simple but tough-to-beat baseline for the {F}ake {N}ews {C}hallenge stance detection task},
    journal = {CoRR},
    volume = {abs/1707.03264},
    year = {2017},
    url = {http://arxiv.org/abs/1707.03264}
}

fakebananas's People

Contributors

hanksterhan avatar jfreier1 avatar kastanday avatar likeaj6 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.