Coder Social home page Coder Social logo

vreason's Introduction

Building Blocks for Neural-Symbolic Reasoning

This repo provides implementations of Slot Attention, Vector Quantization, Visual GPT, and Image PCFG.

Image PCFG

This is a straightforward extension of PCFGs of languages to 2-dimensional images. Here are algorithms and implementations. Motivations and technical details are summarized in my thesis (p18-21). The key idea here is to use a pre-trained vector quantization model to tokenize images into $n\times n$ tokens and treat them as 2-dimensional languages.

VisualGPT: Abstract Reasoning.

Check out run_ipcfg.sh and run_ipcfg_eval.sh for training and evaluation.

Visual GPT

Inspired by Image GPT and DALL·E, I combined Vector Quantization and GPT to solve the abstract visual reasoning task. Below is an example of the task: what is the most likely image that follows the given sequence of images (have a guess :))? What I did include (1) using a pre-trained vector quantization model to tokenize the prefix images, (2) formulating the task as causal language modeling, and (3) generating the most likely image using GPT.

VisualGPT: Abstract Reasoning.

Check out run_raven_solver.sh and run_raven_eval.sh for training and evaluation.

Slot Attention

See this paper for technical details. I trained and evaluated models on AbstractScences and CLEVR. Below are some illustrations:

AbstractScenes: Groundtruth.

AbstractScenes: Prediction.

CLEVR: Groundtruth.

CLEVR: Prediction.

Check out run_slot_abscene.sh and run_slot_clevr.sh for training and evaluation.

License

MIT

vreason's People

Contributors

zhaoyanpeng avatar

Watchers

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