Bridging Discrete and Backpropagation: Straight-Through and Beyond

Liyuan Liu, Chengyu Dong, Xiaodong Liu, Bin Yu, Jianfeng Gao
4/17/2023
cs.LGcs.AIcs.CL

Official code: microsoft/ReinMax (111 stars, MIT, last commit 2023-04-29).

Abstract

Backpropagation, the cornerstone of deep learning, is limited to computing gradients for continuous variables. This limitation poses challenges for problems involving discrete latent variables. To address this issue, we propose a novel approach to approximate the gradient of parameters involved in generating discrete latent variables. First, we examine the widely used Straight-Through (ST) heuristic and demonstrate that it works as a first-order approximation of the gradient. Guided by our findings, we propose ReinMax, which achieves second-order accuracy by integrating Heun's method, a second-order numerical method for solving ODEs. ReinMax does not require Hessian or other second-order derivatives, thus having negligible computation overheads. Extensive experimental results on various tasks demonstrate the superiority of ReinMax over the state of the art. Implementations are released at https://github.com/microsoft/ReinMax.

View on arXivView PDF

Code Implementations(1)

microsoft/ReinMaxOfficial100%
MIT

Beyond Straight-Through

1115PythonApr 5, 20233 years agoMIT

Similar Papers

Cite this paper

@article{liu2023bridging,
  title  = {Bridging Discrete and Backpropagation: Straight-Through and Beyond},
  author = {Liyuan Liu and Chengyu Dong and Xiaodong Liu and Bin Yu and Jianfeng Gao},
  year   = {2023},
  eprint = {2304.08612},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2304.08612v3},
  journal = {NEURIPS 2023 2023}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2304.08612.svg)](https://codeofpaper.com/paper/2304.08612)

Discussion