Approximate Counters for LDA Memory Optimization

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Topic modeling on GPUs is challenging due to high computational intensity and memory bandwidth bottlenecks, requiring efficient algorithms that manage memory effectively to process large datasets in real-time.

Innovation Solution

Implementing a data-parallel algorithm using approximate counters in the Mean-for-Mode Gibbs sampler for LDA, which reduces memory requirements and optimizes GPU resource usage by employing point estimates for parameters and probabilistic counting techniques.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If conventional counters are used in Gibbs sampler for LDA, then counting precision is maintained, but memory requirement increases significantly

Engineering Contradiction:
Improvecounting precisionVSAvoidmemory requirement
Core Design Contradiction:
Measurement precisionVSQuantity of substance

Solution Approach 1:

The patent replaces conventional precise counters with approximate counters that use less memory. These approximate counters are sufficient for the probabilistic sampling process, providing the needed counting functionality while consuming significantly less memory resources, thus resolving the contradiction between precision and memory usage.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

Solution Approach 2:

The patent changes the parameter representation from exact integer counts to approximate probabilistic counts. This parameter transformation allows the system to maintain adequate counting accuracy for LDA inference while reducing the memory footprint, as approximate counters can be represented with fewer bits.

Inventive Principle:
Principle #35Parameter changes

2Productivity

If data-parallel algorithm is implemented on GPU, then processing speed improves, but memory bandwidth becomes a bottleneck

Engineering Contradiction:
Improveprocessing speedVSAvoidmemory bandwidth bottleneck
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

By using approximate counters instead of conventional counters, the patent reduces the memory footprint of data structures. This reduction decreases memory bandwidth requirements, allowing GPU to process larger datasets without being constrained by memory bandwidth limitations, thus resolving the productivity-memory bandwidth contradiction.

Inventive Principle:
Principle #27Cheap short-living objects (Disposable)

Solution Approach 2:

The patent employs probabilistic approximation methods that accept partial precision in counting to achieve better overall performance. This partial action approach allows the system to trade off some counting precision for significantly improved processing speed and reduced memory bandwidth usage, which is acceptable for the probabilistic nature of LDA.

Inventive Principle:
Principle #16Partial or excessive action

3Measurement precision

If topic modeling is applied to large datasets, then discovery accuracy improves, but computational time increases

Engineering Contradiction:
Improvediscovery accuracyVSAvoidcomputational time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent replaces the conventional sequential Gibbs sampling mechanism with a data-parallel implementation on GPU. This substitution enables simultaneous processing of multiple data points, maintaining discovery accuracy while significantly reducing computational time through parallel computation.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent changes the computational approach by using approximate counters and probabilistic methods, which allow for faster convergence and reduced computational iterations. This parameter change enables the system to process large datasets more quickly while maintaining adequate topic discovery accuracy.

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentUS10147044B2Method and system for latent dirichlet allocation computation using approximate counters
Publication Date: 2018.12.04 ORACLE INT CORP
  • US10147044B2 patent drawing
  • US10147044B2 patent drawing
  • US10147044B2 patent drawing

AI summary

Herein is described a data-parallel algorithm for topic modeling in which the memory requirements are streamlined for implementation on a highly-parallel architecture, such as a GPU. Specifically, approximate counters are used in a large mixture model or clustering algorithm (e.g., an uncollapsed Gibbs sampler) to decrease memory usage over what is required when conventional counters are used. The decreased memory usage of the approximate counters allows a highly-parallel architecture with limited memory to process more computations for the large mixture model more efficiently. Embodiments describe binary Morris approximate counters, general Morris approximate counters, and Csrös approximate counters in the context of an uncollapsed Gibbs sampler, and, more specifically, for a Greedy Gibbs sampler.