Notebook Cell DAG Execution With Dependency Pruning

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing notebook execution systems suffer from poor performance due to slow or blocking cells, which consume significant processing resources and provide a poor user experience, especially when dealing with complex, computation-intensive or I/O-intensive operations and interactions with external systems.

Innovation Solution

A system performs parallel execution of cells in a notebook by generating a directed acyclic graph (DAG) to identify dependencies, allowing safe parallelization of cells and optimizing execution through pruning and transforming code, while dynamically updating the DAG in response to user modifications.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If cells are executed sequentially in traditional notebook systems, then execution order is simple and easy to manage, but execution speed is slow and processing resources are wasted due to blocking operations

Engineering Contradiction:
Improveexecution speedVSAvoidexecution management complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The notebook execution is segmented into individual cells that can be executed independently in parallel. Each cell is treated as a separate task unit that can be scheduled and executed concurrently with other independent cells, breaking the traditional sequential execution model into parallelizable segments.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The execution system dynamically determines the execution order and parallelization strategy based on the dependency graph. The system adapts the execution plan by analyzing cell dependencies and automatically adjusting which cells can run in parallel versus which must execute sequentially, optimizing performance without fixed rigid rules.

Inventive Principle:
Principle #15Dynamics

2Productivity

If parallel execution is implemented without dependency analysis, then execution speed improves, but incorrect execution order occurs and data integrity is compromised

Engineering Contradiction:
Improveexecution speedVSAvoidexecution correctness
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system performs preliminary analysis of cell dependencies before execution by building a dependency graph that maps all relationships between cells. This upfront analysis identifies which cells can safely run in parallel and which must execute in a specific order, ensuring correctness is established before parallel execution begins.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The dependency graph serves as an intermediary structure that mediates between the parallel execution requirement and the sequential dependency constraint. The graph explicitly represents dependencies and guides the execution engine to maintain correct ordering while maximizing parallelization opportunities.

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If all cells are executed every time a cell is modified, then data integrity is maintained, but processing resources are consumed unnecessarily and execution time increases

Engineering Contradiction:
Improvedata integrityVSAvoidexecution time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system extracts and identifies only the necessary subset of cells that need re-execution based on the modified cell and its dependents. Instead of executing all cells, the system selectively re-executes only those cells that are affected by the modification, removing unnecessary executions from the workflow.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The execution system automatically determines which cells need re-execution by traversing the dependency graph from the modified cell. The system self-manages the re-execution scope without requiring user input, intelligently identifying the minimal set of cells that must run to maintain data integrity while optimizing resource usage.

Inventive Principle:
Principle #25Self-service

4Productivity

If unsafe operations like database mutations are allowed in parallel execution, then processing throughput increases, but data consistency and safety are compromised

Engineering Contradiction:
Improveprocessing throughputVSAvoiddata consistency
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system performs preliminary identification of unsafe operations (database mutations, file I/O, external system interactions) and applies protective measures before parallel execution. By detecting these operations in advance, the system can serialize their execution or apply locking mechanisms to prevent consistency issues while allowing other safe operations to proceed in parallel.

Inventive Principle:
Principle #9Preliminary anti-action

Data Source

PatentUS12625688B2Optimized execution of cells in directed acyclic graph-driven notebook environment
Publication Date: 2026.05.12 HEX TECHNOLOGIES INC
  • US12625688B2 patent drawing
  • US12625688B2 patent drawing
  • US12625688B2 patent drawing

AI summary

A system performs optimized execution of cells of a notebook by pruning certain cells from execution while evaluating a particular cell, even though the particular cell depends on the pruned cells. The system generates a directed acyclic graph. The system transforms code of a target cell to include code of one or more source cells. The system receives a request to execute at least a portion of the notebook comprising a cell from the sequence of cells. The system identifies a subset of cells of the sequence of cells for execution based on the directed acyclic graph. The system determines based on various factors whether a source cell can be excluded from execution of the notebook based on properties of the source cell. If the system determines that the source cell can be excluded, the system executes the subset of cells without the source cell.