Deep Graph Intelligence
Last updated on October 19, 2026 • Approximate read time: 4 minutes
This page is available without a BlueOptima account.
Deep Graph Intelligence (DGI) is BlueOptima's foundational AI framework for analyzing source code. It transforms code into a structured representation and applies machine learning to extract insights across multiple use cases. Unlike traditional approaches that treat code as flat text, DGI analyzes its structure and behavior, enabling more accurate and consistent results across analysis tasks. DGI powers Machine Learning Code Authorship Detection (MLCAD) and Test Code Detection (TCD). By using a shared analytical foundation, DGI ensures that all insights are aligned, explainable, and scalable across your engineering environment.
Why DGI Matters
Modern software development increasingly relies on automation, including AI-generated code. To maintain control, quality, and transparency, organizations need analysis systems that reflect how code actually works. DGI enables you to detect AI-generated code with higher accuracy, separate test code from application code, improve code review prioritization, and support compliance initiatives. By analyzing code structurally rather than textually, DGI provides deeper and more reliable insights into your codebase.
Who Should Use DGI
DGI supports decision-making across multiple roles.
- Engineering Managers: Gain visibility into code structure, quality, and authorship patterns.
- Team Leads: Prioritize reviews and understand code composition.
- Compliance and Security Teams: Maintain transparency and control over AI usage.
- Prospective Customers and Evaluators: Confirm how BlueOptima analyzes code before choosing a platform.
What DGI Does
- Structural Code Analysis: Analyzes how code is organized and how components interact.
- AI-Powered Detection: Identifies patterns associated with AI-generated code and testing frameworks.
- Multi-Task Execution: Runs multiple analyses in a single pass, reducing processing overhead.
- Consistent Insights: Ensures that all outputs are derived from the same underlying code representation.
- Polyglot Support: Supports multiple programming languages, including C, C++, C#, Go, Java, JavaScript, Python, and TypeScript.
How DGI Creates Value
DGI is designed to address the challenges of scaling advanced code analysis in enterprise environments.
Improved Detection Accuracy
DGI delivers higher detection accuracy compared to traditional models. These improvements are driven by DGI's ability to analyze code structure and relationships rather than relying only on surface-level features.
Efficient Resource Use
The foundational transformer processes code once, and the resulting representation is reused across tasks. This significantly reduces central processing unit (CPU), graphics processing unit (GPU), and memory usage. You can run advanced AI analysis on existing infrastructure without increasing compute costs or affecting developer performance.
Faster Innovation Without Disruption
DGI uses a frozen base model with modular task heads. New capabilities can be added without redeploying the entire system. This allows you to benefit from new features and improvements without downtime or large-scale updates.
Is Your Source Code Secure with DGI?
DGI is designed with data privacy as a core principle. All processing happens within your environment. Your source code and metadata never leave your network, and no external services are used for analysis. This ensures full control, compliance, and protection of your intellectual property.
📚 See also:
- Coding Effort FAQs
- AI and LLM Usage in BlueOptima
- Code Author Detection. 🔒 Requires a BlueOptima account.
How DGI Works
The DGI lifecycle consists of three core phases.
Phase 1: Foundation Pre-Training
The system is pre-trained on a large dataset covering eight major programming languages: C, C++, C#, TypeScript, JavaScript, Python, Java, and Go. During pre-processing, source code is converted into a comprehensive Hybrid Graph. This graph is then processed by a transformer architecture trained to regenerate the original code. The model's structural and semantic accuracy is rigorously evaluated and benchmarked using standard CodeBLEU metrics.
Phase 2: Task-Specific Fine-Tuning
To enable specialized capabilities without affecting the foundational model, the base model is frozen. Independent, lightweight task-specific heads are then trained using domain-specific data. Two primary task heads are currently deployed in production: Test Code Detection (TCD) and Machine Learning Code Authorship Detection (MLCAD).
Phase 3: Local Detection and Inference
At runtime, within your local environment, an input code snippet is converted into a Hybrid Graph. This graph is passed through the foundational transformer once. The resulting shared embedding is then routed to the relevant task heads. The system returns a single, consolidated response containing predictions for all active tasks.
How DGI Represents Code as a Graph
During pre-processing, raw code is converted into a multi-dimensional Hybrid Graph by combining three core representations.
- Abstract Syntax Trees (AST): Capture the hierarchical syntactic structure of the code.
- Data Flow Graphs (DFG): Track how variables and data evolve through execution.
- Control Flow Graphs (CFG): Represent execution paths, loops, and branching logic.
Once the structural graph is created, DGI enriches it with numerical features. A custom code-specific tokenizer encodes node attributes and relationships, for example, function calls and loop controls, into feature tensors. DGI also computes advanced centrality measures to help the model understand the relative position and importance of nodes within the codebase.
How DGI Runs Multiple Tasks at Once
DGI uses a modular architecture to execute multiple specialized tasks efficiently. The foundational transformer is shared and frozen. Each task is handled by a dedicated, lightweight head. DGI currently supports two primary tasks.
Task A: Machine Learning Code Authorship Detection (MLCAD)
MLCAD identifies code generated by machine learning models, such as GPT, Gemini, or Claude, and committed without significant human modification. It uses binary classification to determine whether code is human-written or AI-generated.
Task B: Test Code Detection (TCD)
TCD determines whether a code snippet is application code or test code. It identifies patterns in structure and control flow that are typical of testing frameworks. This helps isolate functional code from test logic, which is particularly useful for code review prioritization, dependency analysis, and improving the accuracy of downstream security scans.
Additional tasks are actively under development and will be integrated into the DGI framework without requiring changes to the core system.