IP Library Granted Patent US 12,204,362
Granted Patent B2
US 12,204,362 · App. 18/494,357 · Granted Jan 21, 2025

System and method for divide-and-conquer checkpointing

Inventors: Jeffrey Mark Siskind (West Lafayette, IN); Barak Avrum Pearlmutter (Dublin, IE)
Assignee: Purdue Research Foundation
G06F7/544G06F7/60G06F9/30036G06F11/36G06F17/10G06F17/13G06F17/17G06N5/01G06F9/461
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12,204,362
App. No.
18/494,357
Granted
Jan 21, 2025
Kind
B2
Abstract

A system and method which allows the basic checkpoint-reverse-mode AD strategy (of recursively decomposing the computation to reduce storage requirements of reverse-mode AD) to be applied to arbitrary programs: not just programs consisting of loops, but programs with arbitrarily complex control flow. The method comprises (a) transforming the program into a formalism that allows convenient manipulation by formal tools, and (b) introducing a set of operators to allow computations to be decomposed by running them for a given period of time then pausing them, while treating the paused program as a value subject to manipulation.

Claims (21)

1. A method for computing a gradient of a computation implemented as a computer program using a processor and a memory, the method comprising:

a. representing the computation as a sequence of computational steps involving primitive computations;

b. splitting the sequence of steps at a split point to generate at least a first portion of the computation and a second portion of the computation;

c. computing an intermediate state of the computation at the split point by applying the first portion of the computation prior to the split point; and

computing a value of the entire computation and the gradient of the computation at the split point using the intermediate state of the computation and the second portion of the computation.

2. The method of claim 1 , the computing the value of the entire computation and the gradient of the computation at the split point further comprising:

d. recursively applying the method to the second portion of the computation beginning at the split point to compute both the value of the entire computation and the gradient of the computation at the split point; and

e. recursively applying the method to the first portion of the computation up to the split point to compute a gradient of the computation at an input, when a number of computational steps exceeds a minimum.

3. The method of claim 2 , the recursively applying the method to the first portion of the computation comprising:

using automatic differentiation in its reverse-accumulation mode to compute the gradient of the computation at the input, when the number of computational steps does not exceed the minimum.

4. The method of claim 1 , wherein the split point is either a midpoint or a point selected based on a trade-off between computation and storage.

5. The method of claim 1 , wherein a functionality is exposed to a user through an application programmer interface comprising an operator or higher-order function that takes a function and its argument as input and returns as output the value of the function at the input and the gradient of the function at the input.

6. The method of claim 5 , wherein the operator or higher-order function is nested.

7. The method of claim 1 , wherein a general-purpose checkpointing mechanism is used to divide the sequence of computational steps into the first portion and the second portion, the general-purpose checkpointing mechanism comprising:

evaluating a function at its input and return both the value at its output and the number of steps required to compute the output:

evaluating the first specified number of steps of a computation of a function applied to an argument and return the intermediate state of the computation after that specified number of steps as a reusable checkpoint; and

resuming a checkpointed computation at its saved intermediate state and return the result of its computation.

8. The method of claim 7 , wherein the general-purpose checkpointing mechanism is provided by an interpreter written in continuation passing style.

9. The method of claim 7 , wherein the general-purpose checkpointing mechanism is provided by a compiler that generates code in continuation passing style.

10. The method of claim 7 , wherein the general-purpose checkpointing mechanism is provided using the POSIX fork( ) primitive.

11. The method of claim 7 , wherein the general-purpose checkpointing mechanism proceeds without knowledge of an amount of computation in the primal computation, and functions in an online fashion, discarding previously acquired checkpoints so as to maintain the logarithmic overhead in both time and space regardless of when the primal computation terminates.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 22, 2024
From: SISKIND, JEFFREY MARK
To: PURDUE RESEARCH FOUNDATION
Reel/Frame 068364/0055 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 22, 2024
From: PEARLMUTTER, BARAK AVRUM
To: NATIONAL UNIVERSITY OF IRELAND, MAYNOOTH
Reel/Frame 068364/0082 →
Continuity (4)
Continuation 17818396 · Aug 9, 2022
Continuation 16336094
Provisional Application 62393894 · Sep 13, 2016
Related Publication 20240103859A1 · Mar 28, 2024
References Cited (7)
US 11868771B2 · Siskind · 2024 [cited by examiner]
US 20090077543A1 · Siskind et al. · 2009 [cited by applicant]
US 20110288891A1 · Tan et al. · 2011 [cited by applicant]
US 20120331350A1 · Dhoolia et al. · 2012 [cited by applicant]
Siskind et al. “Binomial checkpointing for arbitrary programs with no user annotation.” In: arXiv preprint. Apr. 2016 (Apr. 2016) Retrieved from <https://arxiv.org/pdf/1611.03410v1.pdf>, entire document. [cited by applicant]
Dauvergne et al. “The data-flow equations of checkpointing in reverse automatic differentiation.” In: Computational Science—ICCS. 2006 (2006) Retreived from <https://link.springer.com/content/pdf/10.1007/11758549_78.pdf… [cited by applicant]
Griewank et al. “Algorithm 700: revolve: an implentation of checkpointing for the reverse or adjoint mode of computational differentiation.” In: ACM Transactions on Mathematical Software (TOMS). March 200 (Mar. 2000) Re… [cited by applicant]