2010

Theano: A CPU and GPU Math Compiler in Python

Yoshua Bengio

citations

Cite Score

33

AI summary

This paper introduces Theano, a mathematical expression compiler for Python, leveraging NumPy-like syntax, for efficient CPU and GPU computation. It minimizes temporary variables and generates specialized C code, achieving significant speedups (1.6x-7.5x on CPU, 6.5x-44x on GPU) compared to alternatives on machine learning tasks.

Main Contributions

  • Introduces Theano, a compiler for mathematical expressions in Python.
  • Demonstrates how Theano combines NumPy's syntax with optimized native machine language speed.
  • Presents a system that allows for symbolic differentiation.
  • Achieves significant speedups compared to competitive alternatives on both CPU and GPU.
  • Provides benchmarks on CPU and GPU processors.

Abstract

Theano is a compiler for mathematical expressions in Python that combines the convenience of NumPy's syntax with the speed of optimized native machine language. The user composes mathematical expressions in a high-level description that mimics NumPy's syntax and semantics, while being statically typed and functional (as opposed to imperative). These expressions allow Theano to provide symbolic differentiation. Before performing computation, Theano optimizes the choice of expressions, translates them into C++ (or CUDA for GPU), compiles them into dynamically loaded Python modules, all automatically. Common machine learning algorithms implemented with Theano are from 1.6× to 7.5× faster than competitive alternatives (including those implemented with C/C++, NumPy/SciPy and MATLAB) when compiled for the CPU and between 6.5× and 44× faster when compiled for the GPU. This paper illustrates how to use Theano, outlines the scope of the compiler, provides benchmarks on both CPU and GPU processors, and explains its overall design.

Citation Graph

Loading graph...

References [14]

Sort:
Filter:

Leon Bottou - 1998

4 papers in library cite

T. E. Oliphant - 2007

3 papers in library cite

J. J. Dongarra, J. D. Croz, I. S. Duff, S. Hammarling - 1990

2 papers in library cite

P. L'ecuyer, F. Blouin, R. Couture - 1993

1 paper in library cites

Missing year

S. Behnel, R. Bradshaw, D. S. Seljebotn

1 paper in library cites

Missing author listMissing year

1 paper in library cites

Missing author listMissing year

1 paper in library cites

Missing author listMissing year

1 paper in library cites

Missing year

E. Anderson

1 paper in library cites

Missing year

D. Cooke

1 paper in library cites

Missing author listMissing year

1 paper in library cites

Missing year

S. D. Team

1 paper in library cites

Missing year

Ronan Collobert

1 paper in library cites

F. Alted - 2010

1 paper in library cites

Cited by

22

papers in your library

Cites

0

papers in your library

Read

on July 25, 2025

Your review

Tags

Paper Aliases

Theano: A CPU and GPU Math Expression Compiler