Copy-on-Write Data Frame for Memory-Efficient Machine Learning

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Immutable data frames in machine learning applications require significant memory and computational resources for modifications, as existing technologies necessitate whole frame copying, leading to inefficiencies in data exploratory work and potential computational errors.

Innovation Solution

The implementation of a copy-on-write (CoW) data frame (CoW-DF) that allows for lightweight copies by maintaining only changed portions of the data frame, enabling latent copies that behave like traditional immutable data frames but reduce memory usage and computational load by retaining only modified columns in memory.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If immutable data frames are used to ensure data sharing and write consistency, then reliability is improved, but memory usage and computational resources increase significantly due to whole frame copying

Engineering Contradiction:
Improvedata sharing safetyVSAvoidmemory usage
Core Design Contradiction:
ReliabilityVSQuantity of substance

Solution Approach 1:

The patent segments the data frame into columns and introduces version vectors to track modifications at the column level. Instead of copying the entire data frame, only modified columns are copied to new versions, while unchanged columns share the same memory buffers across versions. This segmentation enables selective copying based on actual modification needs.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent implements a copy-on-write mechanism where data frame versions are created by copying only the modified columns rather than the entire data frame. The system uses reference counting and version vectors to determine which columns need copying, enabling efficient memory usage while maintaining the immutability guarantee that multiple versions can coexist without conflicts.

Inventive Principle:
Principle #26Copying

2Reliability

If whole data frame copying is performed for modifications, then data integrity is maintained, but productivity decreases due to memory-intensive operations

Engineering Contradiction:
Improvedata integrityVSAvoiddata transformation efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent divides the data frame into independent column segments, each with its own version vector and memory buffer. When a modification occurs, only the affected column segments are copied to create a new version, while other segments are shared between versions. This segmentation dramatically reduces the amount of data that needs to be copied during transformations.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes the state tracking parameter from a global version counter to per-column version vectors. This allows the system to identify exactly which columns have been modified and only copy those specific columns when creating a new data frame version, rather than copying the entire data frame structure.

Inventive Principle:
Principle #35Parameter changes

3Reliability

If immutable data frames are used to prevent side effects, then reliability is improved, but ease of operation deteriorates due to inability to modify data in place

Engineering Contradiction:
Improveside effect preventionVSAvoiddata modification convenience
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent introduces dynamic versioning where data frames can transition between shared and private states. When a data frame is first created, all columns are shared. As modifications occur, the system dynamically creates new versions only for modified columns, allowing the data frame to adapt its structure based on usage patterns while maintaining immutability guarantees.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent introduces version vectors as an intermediary mechanism that mediates between the immutable data frame structure and the need for modifications. The version vector tracks which columns have been modified and coordinates the copying process, allowing developers to work with familiar immutable data frames while the system handles the complexity of selective copying in the background.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS10761734B2Systems and methods for data frame representation
Publication Date: 2020.09.01 GE DIGITAL HLDG LLC
  • US10761734B2 patent drawing
  • US10761734B2 patent drawing
  • US10761734B2 patent drawing

AI summary

Various embodiments provide a copy-on-write data frame (CoW-DF) that permits lightweight copies of a data frame, where the copies comprise memory allocation for only changed portions of a data frame. A CoW-DF may have semantics of a data frame, and a CoW-DF may appear and behave like a traditional data frame copy, while on the backend of a CoW-DF, only data differences created by modifications to a data frame may be maintained, rather than whole copies of a modified data frame. For various embodiments, the CoW concept is applied to other types of data structures, such as a column, a row, or a data frame value.