Repolode
tensorflow

tensorflow/neural-structured-learning

A TensorFlow framework for training neural networks with graph-structured or adversarially perturbed signals alongside input features.

Stars
1,012
Forks
191
Open issues
1
Last commit
last month

What is it?

Neural Structured Learning (NSL) is a TensorFlow framework for training neural networks with structured signals in addition to ordinary feature inputs. The structure can be explicit, represented as a graph of relations or similarity between samples, or implicit, induced by adversarial perturbations of the inputs.

The framework is aimed at cases where labeled data is limited, since it can use unlabeled samples through their relations to labeled ones. Adversarially perturbed training examples are used to make models more robust against inputs designed to mislead predictions. Structured signals are applied only during training, so serving and inference workflows are unchanged.

NSL provides Keras APIs for graph and adversarial training, lower-level TensorFlow ops and functions, and tools for building graphs and constructing graph inputs. It is installable as a pip package and works with TensorFlow 1.15 and later, with the exception of TensorFlow 2.1.

Key features

  • 01Keras APIs for training with explicit graphs and adversarial perturbations.
  • 02Lower-level TensorFlow ops and functions for adding structure to custom training.
  • 03Tools for building graphs and constructing graph inputs.
  • 04Structured signals are used only during training, leaving inference unchanged.
  • 05Installable via pip, with example tutorials for graph and adversarial learning.

Use cases

  • Training text or node classifiers when only a small fraction of samples are labeled.
  • Improving model robustness against adversarially crafted inputs.
  • Adding relational or similarity graphs between samples to a TensorFlow training pipeline.

Quick start

  1. 1

    Install the prebuilt NSL pip package

    pip install neural-structured-learning
  2. 2

    Read the installation guide for other setups or building from source

Things to know

  • Requires TensorFlow 1.15 or higher, and TensorFlow 2.1 is incompatible.

Topics

#tensorflow#graph-learning#adversarial-learning#semi-supervised-learning#keras#neural-networks#regularization#structured-signals

FAQ

What is neural-structured-learning?
A TensorFlow framework for training neural networks with graph-structured or adversarially perturbed signals alongside input features. Neural Structured Learning (NSL) is a TensorFlow framework for training neural networks with structured signals in addition to ordinary feature inputs. The structure can be explicit, represented as a graph of relations or similarity between samples, or implicit, induced by adversarial perturbations of the inputs.
Is neural-structured-learning free to use? What license does it have?
neural-structured-learning is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is neural-structured-learning still maintained?
Updated within 6 months. The last commit to neural-structured-learning was on Oct 5, 2026.
What can I use neural-structured-learning for?
Training text or node classifiers when only a small fraction of samples are labeled. Improving model robustness against adversarially crafted inputs. Adding relational or similarity graphs between samples to a TensorFlow training pipeline.
How do I install neural-structured-learning?
Install the prebuilt NSL pip package: pip install neural-structured-learning Read the installation guide for other setups or building from source
Where can I get neural-structured-learning?
The source code and installation instructions are on GitHub: https://github.com/tensorflow/neural-structured-learning

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects