Giter VIP home page Giter VIP logo

gretel-path-extrapolation's Introduction

Gretel

DOI

Implementation of the paper Extrapolating paths with graph neural networks,

by Jean-Baptiste Cordonnier and Andreas Loukas.

Hansel und Gretel

Illustration by Arthur Rackham, 1909

Introduction

We consider the problem of path inference: given a path prefix, i.e., a partially observed sequence of nodes in a graph, we want to predict which nodes are in the missing suffix. In particular, we focus on natural paths occurring as a by-product of the interaction of an agent with a network -- a driver on the transportation network, an information seeker in Wikipedia, or a client in an online shop. Our interest in path inference is due to the realization that, in contrast to shortest-path problems, natural paths are usually not optimal in any graph-theoretic sense, but might still follow predictable patterns.

Our main contribution is a graph neural network called Gretel. Conditioned on a path prefix, this network can efficiently extrapolate path suffixes, evaluate path likelihood, and sample from the future path distribution. Our experiments with GPS traces on a road network and user-navigation paths in Wikipedia confirm that Gretel is able to adapt to graphs with very different properties, while also comparing favorably to previous solutions.

example on 2D graph

Reproductibility

Install a conda environment and the dependencies with ./create_env.sh env_name.

Data can be downloaded from zenodo and is contained in workspace.zip.

You can format your own data following the format defined in main.py:load_data() documentation.

Directory structure

.
├── gretel
|   ├── config
|        ├── wiki_nll
|        └── ...
└── workspace
|   ├── chkpt
|        ├── trained_model1
|        └── ...
|   ├── mesh
|   ├── planar
|   ├── gps
|   ├── gps-rnn
|   └── wikispeedia

Run

python main.py config/wiki...

Reference

If you find this useful, please consider citing the following:

@article{DBLP:journals/corr/abs-1903-07518,
  author    = {Jean-Baptiste Cordonnier and Andreas Loukas},
  title     = {Extrapolating paths with graph neural networks},
  journal   = {CoRR},
  volume    = {abs/1903.07518},
  year      = {2019},
  url       = {https://arxiv.org/abs/1903.07518},
  archivePrefix = {arXiv},
  eprint    = {1903.07518},
  timestamp = {Mon, 18 Mar 2019 15:47:28 UTC},
}

gretel-path-extrapolation's People

Contributors

loukasa avatar jbcdnr avatar

Watchers

James Cloos 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.