IP Library Granted Patent US 11,868,771
Granted Patent B2
US 11,868,771 · App. 17/818,396 · Granted Jan 9, 2024

System and method for divide-and-conquer checkpointing

Inventors: Jeffrey Mark Siskind (West Lafayette, IN); Barak Avrum Pearlmutter (Dublin, IE)
Assignee: Purdue Research Foundation
G06F9/30036G06F7/544G06F7/60G06F11/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 11,868,771
App. No.
17/818,396
Granted
Jan 9, 2024
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 (39)

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

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

b. splitting the sequence in (a) either at its midpoint, or at a point selected to optimize the trade-off between computation and storage;

c. computing the intermediate state of the computation at the point selected in (b), applying the portion of the computation prior to the point selected in (b);

d. recursively applying the method to the second portion of the computation beginning at the point selected in (b) to compute both the value of the entire computation and the gradient of the computation at the point selected in (b); and

e. recursively applying the method to the first portion of the computation up to the point selected in (b) to compute the gradient of the computation at the input when the number of computational steps exceeds a minimum, otherwise using a standard method, including but not limited to automatic differentiation in its reverse-accumulation mode, to compute the gradient.

2. The method of claim 1 wherein the functionality is exposed to the 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.

3. The method of claim 2 wherein the operator or higher-order function is nested.

4. The method of claim 1 , wherein the ability to divide a computation sequence into two portions is implemented via a general-purpose checkpointing mechanism, the general-purpose checkpointing mechanism comprising:

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

b. 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

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

5. The method of claim 3 where the general-purpose checkpointing mechanism is provided by an interpreter written in continuation passing style.

6. The method of claim 3 where the general-purpose checkpointing mechanism is provided by a compiler that generates code in continuation passing style.

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

8. The method of claim 1 where the checkpointing process proceeds without knowledge of the 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.

9. A method for applying an arbitrary adjoint computation to the reversal of the computation graph of an arbitrary computer program using a processor and a memory, comprising:

a. representing the computation as a sequence of steps involving primitive corn putations;

b. splitting the sequence in (a) at its midpoint, or at a point selected to optimize the trade off between computation and storage;

c. computing the intermediate state of the computation at the point selected in (b), applying the portion of the computation prior to the point selected in (b);

d. recursively applying the method to the second portion of the computation beginning at the point selected in (b) to compute both the value of the entire computation and the value of the adjoint computation at the point selected in (b);

e. recursively applying the method to the first portion of the computation up to the point selected in (b) to compute the value of the adjoint computation at the input when the number of computational steps exceeds a minimum.

10. The method of claim 9 where the functionality is exposed to the user through an application programmer interface consisting of an operator or higher-order function that takes a function and its argument as input and returns as output the value of the function and the value of the adjoint computation at the input.

11. The method of claim 10 where the operator or higher-order function is nested.

12. The method of claim 9 where the ability to divide a computation sequence into two portions is implemented via a general-purpose checkpointing mechanism, the general-purpose checkpointing mechanism comprising:

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

b. 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 checkpoint; and

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

13. The method of claim 12 where the general-purpose checkpointing mechanism is provided by an interpreter written in continuation passing style.

14. The method of claim 12 where the general-purpose checkpointing mechanism is provided by a compiler that generates code in continuation passing style.

15. The method of claim 12 where the general-purpose checkpointing mechanism is provided using the POSIX fork() primitive.

16. The method of claim 9 where the checkpointing process proceeds without knowledge of the 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.

17. A method of dividing a computation sequence into two portions that is implemented via a general-purpose checkpointing mechanism, comprising:

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

b. 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 checkpoint; and

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

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

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

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

Assignments (3)
CONFIRMATORY LICENSE Recorded Jun 30, 2025
From: PURDUE UNIVERSITY
To: NATIONAL SCIENCE FOUNDATION
Reel/Frame 071768/0347 →
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 (3)
Continuation 16336094
Provisional Application 62393894 · Sep 13, 2016
Related Publication 20230052988A1 · Feb 16, 2023
Cited By (1)
US 12,204,362