Skip to main content

Path Signature-Weighted Kolmogorov-Arnold Networks for Time Series

Project description

SigKAN: Path Signature-Weighted Kolmogorov-Arnold Networks for Time Series

This folder includes the original code implemented for the paper of the same name.

The SigKAN is a novel layer that combines the power of path signature and Kolmogorov-Arnold Networks.

The idea behing is to use a learnable path signature that is transformed in weights to the KAN layer.

The Signature is passed through a GRKAN (Gated Residual KAN unit) that is a modified GRN where some Dense layers are replaced by KAN layers.

The signature are computed using iisignature_tensorflow_2 a lightweight wrapper over the iisignature library to create tensorflow 2.x compatible layers for signature function with backward propagation of the gradient.

The code is implemented in tensorflow 2.x and implemnts a custom layer for the SigKAN, that takes an input tensor of shape (baatch_size, time_steps, features) and returns a tensor of shape (batch_size, time_steps, units). The layers can thus be stacked if wanted, however this is not recommended for performances reasons as the iisignature_tensorflow_2 library do not implement GPU acceleration, making made model not XLA compatible.

It is thus important to specify that jit_compile is False in the model.compile() function.

The SigKAN is a keras layers and can be used as any other keras layer, for example:

import tensorflow as tf
from sigkan import SigKAN
model = Sequential([
    Input(shape=X_train.shape[1:]),
    SigKAN(100, 2, dropout = 0.), # 100 units, signature of order 2, takes an input shape (batch, sequence, features) and returns a tensor of shape (batch, sequence, 100)
    Flatten(),
    Dense(100, 'relu'),
    Dense(units=n_ahead, activation='linear')
])

The code is provided as is and is not specially maintained.

Shield: CC BY-NC-SA 4.0

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

CC BY-NC-SA 4.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sigkan-0.1.6.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

sigkan-0.1.6-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file sigkan-0.1.6.tar.gz.

File metadata

  • Download URL: sigkan-0.1.6.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.2 Linux/6.5.0-14-generic

File hashes

Hashes for sigkan-0.1.6.tar.gz
Algorithm Hash digest
SHA256 e9acd50d9d4f2cd20dbabe487f558f6b6b96323426997a51eb4cafd5b5242493
MD5 9ec98a3ee4f867da14254f96ff5de055
BLAKE2b-256 b2fdf1a510b10dbfef7f04fc96833c31bad3d6dd339181fc1be169786e6e9c46

See more details on using hashes here.

File details

Details for the file sigkan-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: sigkan-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.2 Linux/6.5.0-14-generic

File hashes

Hashes for sigkan-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 16ca9666c23953ef28ae7fcef1eb1a965c9a18d98907c941c5bebd53f642d77c
MD5 e8fa5fca7b9b3c964358b87d529c0cd8
BLAKE2b-256 dc70f50c42ae0d10e9880583de101c98092ce9e441501faec11f042e5c9b9881

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page