Skip to main content
QUICK REVIEW

[Paper Review] Fashionable Modelling with Flux

Michael Innes, Elliot Saba|arXiv (Cornell University)|Nov 1, 2018
Computer Graphics and Visualization TechniquesComputer Science21 references135 citations
TL;DR

Flux is a Julia-based framework for differentiable programming emphasizing simplicity, hackability, and compiler-driven acceleration, enabling flexible models and easy integration with accelerators.

ABSTRACT

Machine learning as a discipline has seen an incredible surge of interest in recent years due in large part to a perfect storm of new theory, superior tooling, renewed interest in its capabilities. We present in this paper a framework named Flux that shows how further refinement of the core ideas of machine learning, built upon the foundation of the Julia programming language, can yield an environment that is simple, easily modifiable, and performant. We detail the fundamental principles of Flux as a framework for differentiable programming, give examples of models that are implemented within Flux to display many of the language and framework-level features that contribute to its ease of use and high productivity, display internal compiler techniques used to enable the acceleration and performance that lies at the heart of Flux, and finally give an overview of the larger ecosystem that Flux fits inside of.

Motivation & Objective

  • Motivate a programmable ML framework that treats models as differentiable algorithms expressed in a high-level language.
  • Demonstrate Flux’s design choices that enable simple, extensible model construction in Julia.
  • Showcase compiler-enabled performance features for GPUs, TPUs, and deployment.
  • Highlight how Flux integrates with the broader Julia ecosystem to enable novel ML workflows.

Proposed method

  • Present Flux as a lean, high-level ML stack built in Julia.
  • Explain the three pillars: simplicity, hackability, and compiler technology.
  • Describe the Zygote source-to-source automatic differentiator and its LLVM-based optimization pipeline.
  • Show how Flux enables GPU/TPU compilation and automatic batching through compiler infrastructure.
  • Provide examples like Discriminative Adversarial Networks to illustrate flexible training paradigms.
  • Discuss interoperability with other Julia packages for optimization, differential equations, and probabilistic programming.

Experimental results

Research questions

  • RQ1How does Flux achieve simplicity in implementing ML models compared to traditional frameworks?
  • RQ2How does Flux enable hackability by allowing custom layers, gradients, and training loops without sacrificing performance?
  • RQ3What compiler techniques are employed to accelerate Flux models on GPUs and TPUs and to enable static-like optimizations in a dynamic language?
  • RQ4How can Flux leverage the Julia ecosystem (AD, differential equations, optimization) within differentiable programming workflows?
  • RQ5What are concrete model paradigms (e.g., Discriminative Adversarial Networks) that demonstrate Flux’s flexibility?

Key findings

  • Flux achieves a thousand lines of Julia code for core functionality, enabling high developer productivity.
  • Flux supports mixing built-in and user-defined layers and algorithms with control flow in a single model.
  • The Zygote compiler-based AD approach allows language-level differentiation with LLVM optimizations.
  • Flux enables compiling Julia code to GPUs and TPUs, including compiling whole training loops to XLA for TPUs.
  • Automatic batching via a compiler-inspired SPMD transform allows scalable batching for variably-structured inputs.
  • Flux provides a lean integration layer that works with GPU arrays and other Julia packages for a cohesive ML ecosystem.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.