Giter Club home page Giter Club logo

small_nn_generalization's Introduction

Small NN Generalization

The code in this repo evaluates the performance of transformer architectures on small, mathematical datasets. It is based on this paper. Even with these small datasets, you can see some strange generalization phenomena unique to the overparametrized regime. The first plot shows train/test accuracy over optimization steps for the modular subtraction data. After completely overfitting the training data, you see the test performance shoot up. For other datasets like composition of permutations, this jump happens order of magnitudes of steps after the neural net has memorized the training data and much more rapidly. There is not a precise theoretical explanation of this behavior, but current thinking suggests that some combination of weight decay and SGD's algorithmic regularization properties may force the training process towards a "smooth" interpolating solution, i.e. a flat local minimum, which has good generalization behavior. The second plot shows the well-documented double descent curve where test loss increases upto the interpolation threshold and then comes down.

plot_test_performance_jump

plot_double_descent

It would be interesting to see the results as you increase the amount of noise in the training data. To run that analysis, change the outlier_size argument in the run_configs.yaml.

To train/test the models, run the main.py script. Settings are handled with hydra and you can add a custom yaml file to the config directory.

small_nn_generalization's People

Contributors

rvbansal avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.