Neural Structured Learning v1.2.0
Release 1.2.0
Major Features and Improvements
- Changed 
nsl.tools.build_graph(...)to be more efficient and use far less
memory. In particular, the memory consumption is now proportional only to
the size of the input, not the size of the input plus the size of the
output. Since the size of the output can be quadratic in the size of the
input, this can lead to large memory savings.nsl.tools.build_graph(...)
now also produces a log message every 1M edges it writes to indicate
progress. - Introduces 
nsl.lib.strip_neighbor_features, a function to remove graph
neighbor features from a feature dictionary. - Restricts the expectation of graph neighbor features being present in the
input to the training mode for both the Keras and Estimator graph
regularization wrappers. So, during evaluation, prediction, etc, neighbor
features need not be fed to the model anymore. - Change the default value of 
keep_rankfromFalsetoTrueas well as
flip its semantics innsl.keras.layers.NeighborFeatures.calland
nsl.utils.unpack_neighbor_features. - Supports feature value constraints for adversarial neighbors. See
clip_value_minandclip_value_maxinnsl.configs.AdvNeighborConfig. - Supports adversarial regularization with PGD in Keras and estimator models.
 - Support for generating adversarial neighbors using Projected Gradient
Descent (PGD) via thensl.lib.adversarial_neighbor.gen_adv_neighborAPI. 
Bug Fixes and Other Changes
- Clarifies the meaning of the 
nsl.AdvNeighborConfig.feature_maskfield. - Updates notebooks to avoid invoking the 
nsl.tools.build_graphand
nsl.tools.pack_nbrsutilities as binaries. - Replace deprecated API in notebooks when testing for GPU availability.
 - Fix typos in documentation and notebooks.
 - Improvements to example trainers.
 - Fixed the metric string to 'acc' to be compatible with both TF1.x and 2.x.
 - Allow passing dictionaries to sequential base models in adversarial
regularization. - Supports input feature list in 
nsl.lib.gen_adv_neighbor. - Supports input with a collection of tensors in
nsl.lib.maximize_within_unit_norm. - Adds an optional parameter 
base_with_labels_in_featuresto
nsl.keras.AdversarialRegularizationfor passing label features to the base
model. - Fixes the tensor ordering issue in 
nsl.keras.AdversarialRegularization
when used with a functional Keras base model. 
Thanks to our Contributors
This release contains contributions from many people at Google as well as
@mzahran001.