Git Product home page Git Product logo

weboftruth's Introduction

weboftruth

weboftruth is a project to use deep representation learning to ascertain the credibility of a statement given past context. It is a proof-of-concept for one approach to algorithmic fake news detection.

This repo contains Python and bash scripts for training Knowledge Graph embeddings using Subject-Verb-Object triples.

Two embedding spaces are created (one for Entities (Subjects/Objects) and one for Relationships/Verbs). Extensive use is made of the package torchkge that implements KGE algorithms like TransE. It is built on PyTorch.

Results:

  • We trained Entity and Relationship embeddings for a cleaned dataset of SVO triples constructed from Wikipedia sentences.
  • We trained three configurations - embeddings of dimension 50, 100 and 200.
  • A binary classifier (logistic regression) on concatenated SVO embeddings recorded 79% accuracy at telling true triples apart from false (negatively sampled) ones

This was part of a coursework for CAPP 30255 at the University of Chicago by Aabir Abubaker Kar Adarsh Mathew

Filestructure:

  • data

    contains data sources used, specifically the SVO dataset of subject-verb-object triples from Wikipedia, and our constructed 'partially true' datasets

  • logs

    execution logs for RCC and AWS runs

  • notebooks

    Jupyter notebooks used for early prototyping

  • shscripts

    shell scripts used for RCC

  • weboftruth

    Python code organized into a package. Borrows heavily from torch and torchkge

    • utils.py: miscellaneous useful functions for loading models, data etc.
    • corrupt.py: code for generating the partially true datasets and writing to disk
    • svofunctions.py: tools to translate triples to indices and vice versa
    • wotmodels.py: tools to build and train models from torchkge
    • evaluator.py: functions to evaluate the performance of embeddings as features in truth prediction

weboftruth's People

Contributors

bakerwho 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.