Classification of Long Sequential Data using Circular Dilated Convolutional Neural Networks

Overview

Classification of Long Sequential Data using Circular Dilated Convolutional Neural Networks

arXiv preprint: https://arxiv.org/abs/2201.02143.

Architecture

CDIL-CNN is a novel convolutional model for sequence classification. We use symmetric dilated convolutions, a circular mixing protocol, and an average ensemble learning.

Symmetric Dilated Convolutions

Circular Mixing

CDIL-CNN

Experiments

Synthetic Task

To reproduce the synthetic data experiment results, you should:

  1. Run syn_data_generation.py;
  2. Run syn_main.py for one experiment or run syn_all.sh for all experiments.

The generator will create 6 files for each sequence length and store them in the syn_datasets folder in the following format: adding2000_{length}_train.pt adding2000_{length}_train_target.pt adding2000_{length}_test.pt adding2000_{length}_test_target.pt adding2000_{length}_val.pt adding2000_{length}_val_target.pt

By default, it iterates over 8 sequence lengths: [2**7, 2**8, 2**9, 2**10, 2**11, 2**12, 2**13, 2**14].

You can run different models for different lengths. The syn_log folder will save all results.

We provide our used configurations in syn_config.py.

Long Range Arena

Long Range Arena (LRA) is a public benchmark suite. The datasets and the download link can be found in the official GitHub repository.

To reproduce the LRA experiment results, you should:

  1. Download lra_release.gz (~7.7 GB), extract it, move the folder ./lra_release/lra_release into our create_datasets folder, and run all_create_datasets.sh.
  2. Run lra_main.py for one experiment or run lra_all.sh for all experiments.

The dataset creators will create 3 files for each task and store them in the lra_datasets folder in the following format: {task}.train.pickle {task}.test.pickle {task}.dev.pickle

You can run different models on different tasks. The lra_log folder will save all results.

We provide our used configurations in lra_config.py.

Time Series

The UEA & UCR Repository consists of various time series classification datasets. We use three audio datasets: FruitFlies, RightWhaleCalls, and MosquitoSound.

To reproduce the time series results, you should:

  1. Download the datasets, extract them, move the extracted folders into our time_datasets folder, and run time_arff_generation.py.
  2. Run time_main.py for one experiment or run time_all.sh for all experiments.

The generator will create 2 files for each dataset and store them in the time_datasets folder in the following format: {dataset}_train.csv {dataset}_test.csv

You can run different models on different datasets. The time_log folder will save all results.

We provide our used configurations in time_main.py.

You might also like...
Code for the AAAI-2022 paper: Imagine by Reasoning: A Reasoning-Based Implicit Semantic Data Augmentation for Long-Tailed Classification

Imagine by Reasoning: A Reasoning-Based Implicit Semantic Data Augmentation for Long-Tailed Classification (AAAI 2022) Prerequisite PyTorch = 1.2.0 P

Spontaneous Facial Micro Expression Recognition using 3D Spatio-Temporal Convolutional Neural Networks

Spontaneous Facial Micro Expression Recognition using 3D Spatio-Temporal Convolutional Neural Networks Abstract Facial expression recognition in video

Learning and Building Convolutional Neural Networks using PyTorch
Learning and Building Convolutional Neural Networks using PyTorch

Image Classification Using Deep Learning Learning and Building Convolutional Neural Networks using PyTorch. Models, selected are based on number of ci

A PyTorch implementation of Multi-digit Number Recognition from Street View Imagery using Deep Convolutional Neural Networks
A PyTorch implementation of Multi-digit Number Recognition from Street View Imagery using Deep Convolutional Neural Networks

SVHNClassifier-PyTorch A PyTorch implementation of Multi-digit Number Recognition from Street View Imagery using Deep Convolutional Neural Networks If

Search and filter videos based on objects that appear in them using convolutional neural networks
Search and filter videos based on objects that appear in them using convolutional neural networks

Thingscoop: Utility for searching and filtering videos based on their content Description Thingscoop is a command-line utility for analyzing videos se

Shallow Convolutional Neural Networks for Human Activity Recognition using Wearable Sensors
Shallow Convolutional Neural Networks for Human Activity Recognition using Wearable Sensors

-IEEE-TIM-2021-1-Shallow-CNN-for-HAR [IEEE TIM 2021-1] Shallow Convolutional Neural Networks for Human Activity Recognition using Wearable Sensors All

Hl classification bc - A Network-Based High-Level Data Classification Algorithm Using Betweenness Centrality
Hl classification bc - A Network-Based High-Level Data Classification Algorithm Using Betweenness Centrality

A Network-Based High-Level Data Classification Algorithm Using Betweenness Centr

Recurrent Variational Autoencoder that generates sequential data implemented with pytorch

Pytorch Recurrent Variational Autoencoder Model: This is the implementation of Samuel Bowman's Generating Sentences from a Continuous Space with Kim's

sequitur is a library that lets you create and train an autoencoder for sequential data in just two lines of code
sequitur is a library that lets you create and train an autoencoder for sequential data in just two lines of code

sequitur sequitur is a library that lets you create and train an autoencoder for sequential data in just two lines of code. It implements three differ

Comments
  • Classifier part

    Classifier part

    https://github.com/LeiCheng-no/CDIL-CNN/blob/main/figures/cdil.png image Hello , as i see the picture and the code in the demo.py i think the classifier self.classifier(torch.mean(y_conv, dim=2)) is not true. Can you explain that for me? The picture is we first pass it through linear layers and aggregate the result. Thanks

    image

    opened by buiminhptit 1
  • Best way to test individual examples?

    Best way to test individual examples?

    Hi, been looking through your codebase for a method for inputting just 1 example from a time series dataset (eg. FruitFlies) and having the CDIL-CNN spit out a prediction (and ideally confidence level) for it using one of the saved .ph models.

    The only use of .load_state_dict to load a .ph file that I could find was in time_dynamic_main.py, I assume therefore that this functionality has not yet been added for non-dynamic nns?

    opened by BassOnToast 3
Owner
null
Classify bird species based on their songs using SIamese Networks and 1D dilated convolutions.

The goal is to classify different birds species based on their songs/calls. Spectrograms have been extracted from the audio samples and used as features for classification.

Aditya Dutt 9 Dec 27, 2022
This repository implements and evaluates convolutional networks on the Möbius strip as toy model instantiations of Coordinate Independent Convolutional Networks.

Orientation independent Möbius CNNs This repository implements and evaluates convolutional networks on the Möbius strip as toy model instantiations of

Maurice Weiler 59 Dec 9, 2022
On Size-Oriented Long-Tailed Graph Classification of Graph Neural Networks

On Size-Oriented Long-Tailed Graph Classification of Graph Neural Networks We provide the code (in PyTorch) and datasets for our paper "On Size-Orient

Zemin Liu 4 Jun 18, 2022
An implementation of paper `Real-time Convolutional Neural Networks for Emotion and Gender Classification` with PaddlePaddle.

简介 通过PaddlePaddle框架复现了论文 Real-time Convolutional Neural Networks for Emotion and Gender Classification 中提出的两个模型,分别是SimpleCNN和MiniXception。利用 imdb_crop

null 8 Mar 11, 2022
Dilated RNNs in pytorch

PyTorch Dilated Recurrent Neural Networks PyTorch implementation of Dilated Recurrent Neural Networks (DilatedRNN). Getting Started Installation: $ pi

Zalando Research 200 Nov 17, 2022
Official code for "Stereo Waterdrop Removal with Row-wise Dilated Attention (IROS2021)"

Stereo-Waterdrop-Removal-with-Row-wise-Dilated-Attention This repository includes official codes for "Stereo Waterdrop Removal with Row-wise Dilated A

null 29 Oct 1, 2022
Scripts for training an AI to play the endless runner Subway Surfers using a supervised machine learning approach by imitation and a convolutional neural network (CNN) for image classification

About subwAI subwAI - a project for training an AI to play the endless runner Subway Surfers using a supervised machine learning approach by imitation

null 82 Jan 1, 2023
Moving Object Segmentation in 3D LiDAR Data: A Learning-based Approach Exploiting Sequential Data

LiDAR-MOS: Moving Object Segmentation in 3D LiDAR Data This repo contains the code for our paper: Moving Object Segmentation in 3D LiDAR Data: A Learn

Photogrammetry & Robotics Bonn 394 Dec 29, 2022
Learning from History: Modeling Temporal Knowledge Graphs with Sequential Copy-Generation Networks

CyGNet This repository reproduces the AAAI'21 paper “Learning from History: Modeling Temporal Knowledge Graphs with Sequential Copy-Generation Network

CunchaoZ 89 Jan 3, 2023
Danfeng Hong, Lianru Gao, Jing Yao, Bing Zhang, Antonio Plaza, Jocelyn Chanussot. Graph Convolutional Networks for Hyperspectral Image Classification, IEEE TGRS, 2021.

Graph Convolutional Networks for Hyperspectral Image Classification Danfeng Hong, Lianru Gao, Jing Yao, Bing Zhang, Antonio Plaza, Jocelyn Chanussot T

Danfeng Hong 154 Dec 13, 2022