Article Complete
    AIM
    FB’s New Python Library Nevergrad Provides A Collection Of Algorithms That Don’t Require Gradient Computation

    FB’s New Python Library Nevergrad Provides A Collection Of Algorithms That Don’t Require Gradient Computation

    Discover FB's Nevergrad library for gradient-free optimization. Learn how this toolkit can boost your AI projects today!

    FB’s New Python Library Nevergrad Provides A Collection Of Algorithms That Don’t Require Gradient Computation
    Ambika Choudhury·Published Updated

    Key takeaways

    • Nevergrad is an open-sourced Python toolkit by Facebook designed for derivative-free optimisation.
    • The library offers a variety of algorithms, including FastGA and Particle Swarm Optimisation, to enhance performance evaluation.
    • It employs a standard ask-and-tell framework to facilitate the implementation and comparison of state-of-the-art algorithms.
    5 min
    Nevergrad, an open-sourced Python3 toolkit by Facebook for developers offers an extensive collection of algorithms to avoid gradient optimization and present them in a standard ask-and-tell Python framework. The platform enables AI researchers, machine learning scientists, and enthusiasts whose work involves derivative-free optimization to implement state-of-the-art algorithms and methods to compare performance in different settings. The library includes a broad range of optimizers, such as FastGA, Covariance matrix adaptation, Particle Swarm Optimisation, Sequential quadratic programming, etc. The working of this algorithm can be described as multiple points sampled in one function space, a population of best points is selected and these new points are objected around the existing points in order to improve the current population.

    Installation

    This tool is a Python 3.6+ library and can be installed with the following code pip install nevergrad One can also install the master branch instead of the latest release with the following code pip install git+https://github.com/facebookresearch/nevergrad@master#egg=nevergrad For cloning the repository, run the following code from inside the repository folder python3 setup.py develop

    Solving ML Problems

    The gradient-free optimizations in Nevergrad are used to solve a variety of machine learning problems such as discussed below:
      • Noisy problems like independent episodes in reinforcement learning
      • Discrete, continuous or mixed problems like power systems or tasks with neural networks that require simultaneously choosing the learning rate per layer, weight decay per layer, etc
      • Multimodal problems such as those that have several minima, for instance, hyper-parametrization of deep learning for language modelling
    • Separable or rotated problems
    • Partially separable problems like architecture search for Deep Learning

    Goals Of This Toolkit

    There are basically four goals of this package which are mentioned below:
    • To provide gradient/derivative-free optimization algorithms including algorithms that are able to handle noise.
    • To provide tools to instrument any code
    • To provide functions on which to test the optimization algorithms
    • To provide benchmark routines in order to compare algorithms easily
    There are also some other features, which are mentioned below:
    • Optimization: It helps in implementing optimization algorithms
    • Instrumentation: It helps in tooling in order to convert code into a well-defined function to optimize
    • Functions: It helps in implementing both simple and complex benchmark functions
    • Benchmark: It helps for running the experiments comparing the algorithms on benchmark functions
    • Common: This is a set of tools available throughout the package

    Benefits

    • The open-sourced Python3 toolkit can be used in machine learning to tune the hyper-parameters such as momentum, weight decay, dropout, layer parameters, etc. for each part of the deep network, or others
    • It can also be used in power grid management, aeronautics, and many other scientific and engineering applications

    Similar Toolkits

    RBFOpt By IBM

    This open-sourced Python tool for derivative-free optimization is a mathematical technique which is used for simulation-based optimization. The optimization algorithms implemented in this tool relies on a surrogate model of the unknown performance measure. The algorithms are known as derivative-free because they basically do not require the computation of the performance measure, unlike traditional optimization algorithms. Click here to get the code.

    ZOOpt

    Zeroth-Order Optimisation (ZOOpt) provides an efficient derivative-free solver and can be easily used. This toolbox provides a Python package for single-thread optimization and a light-weighted distributed version with the help of Julia language for Python described functions. It mainly focuses on optimization problems in machine learning, addressing high-dimensional, noisy as well as large-scale problems. It does not rely on the gradient of the objective function, but instead, learns from samples of the search space. Click here to get the code.

    Your reaction

    Discussion

    What's your take on this story?

    0/1000

    No comments yet — be the first to share your view.

    Explore our newsletters

    Build your routine with some of our top newsletters or view them all here.

    Wake up informed

    Make sense of the day's AI news and breakthroughs with our morning briefing.

    Belamy
    WeeklyBelamySee the latest

    Industry intelligence

    Receive a roundup of AI adoption stories by industry vertical, curated for professionals.

    3x WeeklySector6See the latest

    By signing up, you agree to our Privacy Policy.

    Membership

    Stay ahead with AI insights.

    Unlimited access to premium articles, exclusive analysis, and the stories shaping India's AI economy.

    Subscribe now

    AIM Americas

    1190 Miraloma Way Suite P, Sunnyvale, CA 94085

    AIM India

    1st Floor, Sakti Statesman, Bellandur, Bengaluru – 560103

    © 2026 AIM. All rights reserved.