MITB Banner

TensorFlow’s Neural Structured Learning Makes Deep Learning Super Easy

Share

TensorFlow is one of the most popular and primary software tools for creating deep learning models. Mainly used for classification, prediction, perception, etc., there are numerous reasons why one should use this platform. 

Adding another feather to its diverse usage, Google this week introduced Neural Structured Learning (NSL), an open-source framework to learn neural networks. This framework works with the TensorFlow platform and is suitable for both beginners and advanced developers to use it for training neural networks with structured signals. The NSL can be applied to construct accurate and robust models for vision, language understanding, and prediction in general.

What Will NSL Accomplish 

Neural Structured Learning in TensorFlow is an easy-to-use framework for training deep neural networks by leveraging structured signals along with feature inputs. This learning paradigm implements Neural Graph Learning in order to train neural networks using graphs and structured data. As the researchers mention, the graphs can come from multiple sources such as knowledge graphs, medical records, genomic data or multimodal relations. Moreover, this framework also generalises to adversarial learning. 

The NSL framework in TensorFlow provides with the following easy-to-use APIs and tools for developers to train models with structured signals

  • Keras APIs to enable training with graphs (explicit structure) and adversarial perturbations (implicit structure)
  • TF ops and functions to enable training with structure when using lower-level TensorFlow APIs
  • Tools to build graphs and construct graph inputs for training

Why This Framework

Structured data contains rich relational information among the samples. During the training phase of an ML model, leveraging the structured signals helps in gaining higher model accuracy. The structured signals are mainly used to regularise the training of a neural network by forcing the model to learn accurate predictions as well as maintaining the input structural similarity. Also, training with structured signals also leads to more robust ML models. 

The researchers at Google have been widely using this method in order to achieve and improve model performance. This technique is generic and can be easily applied on various neural net models such as Recurrent Neural Net (RNN), Convolutional Neural Net (CNN) and Feed-forward Neural Net.   

How It Works 

Neural Structured Learning generalises to Neural Graph Learning when the neighbours are explicitly represented by graphs and it generalises to Adversarial Learning when the neighbours are implicitly induced by adversarial perturbation. The researchers obtained a neural network model which is trained with adversarial examples with less than five additional lines. 

We ran the NSL framework in TensorFlow using Google Colaboratory where we used the popular MNIST dataset to train and test the neural net model as given in the official site. The categorical accuracy was found to be 98 percent and the accuracy of the test set was found to be 97 percent.

Prerequisites

  • MNIST dataset
  • TensorFlow Version 2

Application of This Framework

Neural Structured Learning (NSL) can be applied to construct accurate and robust models for computer vision, natural language understanding, natural language processing and prediction in general. Researchers mention that NSL provides tools for developers to construct graphs from raw data, it also provides APIs to “induce” adversarial examples as implicit structured signals. The framework allows TensorFlow users to incorporate with various structured signals for training neural nets and also works for various learning environments such as supervised, unsupervised and semi-supervised. 

Advantages of Using NSL

  • Higher Accuracy: The training approach with both structured signals and features has outperformed various existing methods which mainly rely on training with features only.  
  • Robustness: It has the ability to generalise to Adversarial Learning which can be said as one of the main reasons for a model to gain robustness as it improves the accuracy of the model.
  • Less Labelled Data Required: NSL enables neural networks to harness both labeled and unlabeled data. It basically allows the model to train using the labelled data as well as learn other similar hidden representations of the neighbouring samples regardless of the labels.
PS: The story was written using a keyboard.
Share
Picture of Ambika Choudhury

Ambika Choudhury

A Technical Journalist who loves writing about Machine Learning and Artificial Intelligence. A lover of music, writing and learning something out of the box.
Related Posts

CORPORATE TRAINING PROGRAMS ON GENERATIVE AI

Generative AI Skilling for Enterprises

Our customized corporate training program on Generative AI provides a unique opportunity to empower, retain, and advance your talent.

Upcoming Large format Conference

May 30 and 31, 2024 | 📍 Bangalore, India

Download the easiest way to
stay informed

Subscribe to The Belamy: Our Weekly Newsletter

Biggest AI stories, delivered to your inbox every week.

AI Courses & Careers

Become a Certified Generative AI Engineer

AI Forum for India

Our Discord Community for AI Ecosystem, In collaboration with NVIDIA. 

Flagship Events

Rising 2024 | DE&I in Tech Summit

April 4 and 5, 2024 | 📍 Hilton Convention Center, Manyata Tech Park, Bangalore

MachineCon GCC Summit 2024

June 28 2024 | 📍Bangalore, India

MachineCon USA 2024

26 July 2024 | 583 Park Avenue, New York

Cypher India 2024

September 25-27, 2024 | 📍Bangalore, India

Cypher USA 2024

Nov 21-22 2024 | 📍Santa Clara Convention Center, California, USA

Data Engineering Summit 2024

May 30 and 31, 2024 | 📍 Bangalore, India