Giter VIP home page Giter VIP logo

sii's Introduction

Randomly Weighted Feature Network for Neuro-Symbolic Relational Learning

This repository is the official implementation of Random Weighted Feature Netowrks (RWFNs). All source codes were implemented in Python 2.7.

Abstract

Knowledge Representation and Reasoning (KRR) is one of the well-known fields in computer science that try to understand, reason, and interpret knowledge as human beings efficiently do. Since many logical formalism and reasoning methods in the area have shown the capability of higher-order learning, such as abstract concept learning, integrating artificial neural networks with KRR methods to handle complex and practical tasks has received much attention. For example, Neural Tensor Networks (NTNs) are neural network models capable of transforming symbolic representations into vector spaces where reasoning can be performed through matrix computation and are used in Logic Tensor Networks (LTNs) that enable to embed first-order logic symbols such as constants, facts, and rules into real-valued tensors. However, such capability in higher-order learning is not exclusive to humans. Insects, such as fruit flies and honey bees, can solve simple associative learning tasks and learn abstract concepts such as 'sameness' and 'difference,' which is viewed as a higher-order cognitive function and typically thought to depend on top-down neocortical processing. With the inspiration from insect nervous systems, we propose a Randomly Weighted Feature Network (RWFN), which incorporates randomly drawn, untrained weights in an encoder with an adapted linear model as a decoder. Specifically, RWFN is a single-hidden-layer neural network with unique latent representations in the hidden layer, derived by integrating the input transformation between input neurons and Kenyon cells in the insect brain and random Fourier features used for better representing complex relationships between input using kernel approximation. Based on this unique representation, by training only a linear model, RWFNs can effectively learn the degree of relationship among inputs. We test RWFNs over LTNs for Semantic Image Interpretation (SII) tasks that have been used as a representative example of how LTNs utilize reasoning over first-order logic to surpass the performance of solely data-driven methods. We demonstrate that compared to LTNs, RWFNs can achieve better or similar performance for the object classification and the detection of the relevant part-of relations between objects in the SII tasks while using much fewer learnable parameters (1:151 ratio) and a faster learning process (1:2 ratio of running speed). Furthermore, we show that because the randomized weights do not depend on the data, several decoders can share a single encoder, giving RWFNs a unique economy of spatial scale for simultaneous classification tasks.

Requirements

To install requirements:

pip install -r requirements.txt

Execution

We directly compare the performances between our method and LTNs for Semantic Image Interpretation (SII).

Original source code of LTNs for SII and dataset are available here.

All the details of best hyperparameters for RWFNs are described in the paper.

  1. Select the dataset that you want to train in pascalpart.py

  2. To train, run the following command:

python train.py
  1. To evaluate, run the following command:
python evaluate.py

Results

All trained models, predefined weights, and figures are available.

  • AUC of RWFNs and LTNs for object type classification using indoor object data AUC of RWFNs and LTNs for object type classification

  • AUC of RWFNs and LTNs for detecting part-of relation using indoor object data AUC of RWFNs and LTNs for detecting part-of relation

  • The comparison of running time, including data configuration and training time, for RWTNs and LTNs The comparison of running time, including data configuration and training time, for RWTNs and LTNs

Contributing

All content in this repository is licensed under the MIT license.

Reference

You can cite our work

@inproceedings{hong2021insect,
  title={An insect-inspired randomly, weighted neural network with random Fourier features for neuro-symbolic relational learning},
  booktitle={Proceedings of the 15th International Workshop on Neuro-Symbolic Learning and Reasoning~(NeSy 20/21)},
  author={Hong, Jinyung and Pavlic, Theodore P},
  month={October 25--27,},
  year={2021}
}

sii's People

Contributors

jyhong0304 avatar

Stargazers

 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.