skillfed

tensorflow-probability

Probabilistic modeling and statistical inference in TensorFlow

tensorflow-probability v0.25.0 1.2M downloads/30d#4,195 on PyPI4,425
Permissive license Apache 2.0 Active released

What it is and what it does

TensorFlow Probability is a library for probabilistic reasoning and statistical analysis built on top of TensorFlow. It provides a layered toolkit: distributions with broadcasting semantics, bijectors for transforming random variables, joint distributions for modeling dependencies, probabilistic neural network layers, and inference algorithms including MCMC, variational inference, and Monte Carlo methods. The library integrates automatic differentiation for gradient-based inference and supports hardware acceleration via GPUs and distributed computation.

It is designed for Bayesian machine learning workflows where you need to model uncertainty, perform hierarchical inference, or combine probabilistic methods with deep networks. The package also works as a JAX substrate, allowing the same probabilistic abstractions to run on JAX instead of TensorFlow. It is actively maintained but carries Beta status, meaning its public interfaces may change.

Use it for:

  • Build Bayesian neural networks with uncertainty over weights and predictions for safety-critical applications.
  • Perform hierarchical statistical modeling and inference on grouped or nested data using joint distributions.
  • Implement variational autoencoders and other deep generative models with probabilistic layers.
  • Run MCMC sampling for posterior inference in complex probabilistic models.
  • Estimate covariances, mixture models, and other statistical quantities with automatic differentiation.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

TensorFlow Probability provides probabilistic modeling, statistical inference, and Bayesian machine learning tools integrated with TensorFlow, including distributions, variational inference, MCMC sampling, and neural network layers with uncertainty quantification.

Yes, if you need probabilistic modeling or Bayesian inference in a TensorFlow workflow. The library is actively maintained, has low install friction, carries no security vulnerabilities, and offers a comprehensive toolkit for uncertainty quantification and statistical learning. Install with caution only if TensorFlow is not already a dependency in your project, since it adds a substantial indirect dependency; verify that the Beta status and potential interface changes align with your stability requirements.

Install

tensorflow-probability on PyPI

pip

pip install tensorflow-probability

uv

uv add tensorflow-probability

poetry

poetry add tensorflow-probability

Installing tensorflow-probability

Before you install

Low install friction with a pure-Python wheel and common dependencies. The package is actively maintained with recent commits and has been in development since 2018, though it carries a Beta development status indicating interfaces may still change.

License in practice

Apache 2.0 is permissive, allowing commercial and private use with minimal restrictions—you must include a copy of the license and state significant changes, but there are no copyleft obligations.

Quickstart

pip install tensorflow-probability

import tensorflow_probability as tfp
dist = tfp.distributions.Normal(loc=0., scale=1.)
samples = dist.sample()

Requires TensorFlow as an implicit dependency (not listed in runtime deps but essential for core functionality); also requires Python 3.9 or later.

Verify before relying

  • Whether TensorFlow is declared as a dependency elsewhere or must be installed separately by the user.
  • Performance characteristics and scalability limits for large-scale probabilistic models on GPUs.
  • Compatibility and feature parity between TensorFlow and JAX substrate implementations.

Package facts

License Apache 2.0 (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 7 — absl-py, six, numpy, decorator, cloudpickle, gast, dm-tree
Maintenance actively maintained — 644 days since the last release
Last repo commit
First released
Downloads 1,223,637/month — #4,195 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: tensorflow_probability-0.25.0-py2.py3-none-any.whl

Keywords: tensorflow, probability, statistics, bayesian, machine, learning

Development Status :: 4 - BetaIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.9Topic :: Scientific/EngineeringTopic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: MathematicsTopic :: Software DevelopmentTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Tags

probabilistic modeling tensorflowbayesian inference machine learningmcmc sampling variational inferenceprobabilistic neural networksstatistical distributions tensorflowuncertainty quantification deep learningbayesian deep learning
probabilistic-modelingbayesian-inferenceuncertainty-quantification

More Software Development packages