Risk-Sensitive Code Generation for Secure AI Coding

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing automated code generation models are outdated and unable to adapt to rapidly changing risks, security vulnerabilities, and industry practices, leading to insecure or inefficient code generation.

Innovation Solution

A risk-sensitive code generation computing system that evaluates request attributes and risk levels to modify a trained neural network model, selecting appropriate training resources to generate risk-sensitive code that addresses identified risks and conforms to organizational and industry standards.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If automated code generation models are used to improve delivery speed, then productivity increases, but code security and quality deteriorate due to outdated training data

Engineering Contradiction:
Improvecode delivery speedVSAvoidcode security
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system dynamically adjusts the training data and risk parameters for the neural network model based on current risk levels and security requirements. Instead of using static training data, the system continuously updates the training resources to reflect the latest security vulnerabilities and industry practices, allowing the model to adapt to changing conditions while maintaining both speed and security

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes key parameters including risk level thresholds, training data selection criteria, and model configuration based on the evaluated risk attributes. By adjusting these parameters dynamically according to the specific code section being generated, the system can optimize for either speed or security depending on the context, resolving the contradiction between delivery speed and code security

Inventive Principle:
Principle #35Parameter changes

2Reliability

If comprehensive risk evaluation is performed on code attributes, then code quality improves, but system complexity increases

Engineering Contradiction:
Improvecode qualityVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The system segments the risk evaluation process into distinct modules: a code attribute evaluation module that assesses specific code characteristics, a risk level determination module that calculates risk scores, and a code generation module that applies appropriate mitigations. This segmentation allows comprehensive risk evaluation to be performed through multiple specialized components rather than one complex monolithic system

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces intermediary components including a risk level data structure that mediates between code attributes and generation decisions, and training resources that act as intermediaries between security requirements and model behavior. These intermediaries simplify the overall system architecture by providing standardized interfaces and data formats that reduce complexity while maintaining comprehensive evaluation capabilities

Inventive Principle:
Principle #24Intermediary (Mediator)

3Reliability

If risk-sensitive code generation is implemented to reduce security vulnerabilities, then code security improves, but development time increases

Engineering Contradiction:
Improvecode securityVSAvoiddevelopment time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system performs preliminary risk evaluation and training resource selection before code generation occurs. By pre-assessing the risk attributes of requested code sections and pre-selecting appropriate training resources, the system avoids time-consuming security checks and adjustments during the actual code generation process, thus maintaining both security and efficiency

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

For low-risk code sections, the system skips comprehensive risk evaluation and directly generates code using the trained model, rushing through the process to maintain speed. The full risk-sensitive evaluation is only applied when necessary based on the assessed risk level, allowing the system to maintain security for critical code while minimizing development time for less critical sections

Inventive Principle:
Principle #21Skipping (Rushing through)

Data Source

PatentUS20260057076A1Risk-adjustment techniques for generating software code data
Publication Date: 2026.02.26 WELLS FARGO BANK NA
  • US20260057076A1 patent drawing
  • US20260057076A1 patent drawing
  • US20260057076A1 patent drawing

AI summary

A risk-sensitive code generation computing system receives query data indicating a requested code section. A code attribute evaluation module determines attributes that indicate characteristics of the query data or the requested code section. Based on the attributes, the code attribute evaluation module calculates risk level data for the requested code section. A code generation module selects, based on the risk level data, a set of training resources. Based on the selected training resources, the risk-sensitive code generation computing system modifies training of a trained neural network model. The modified trained neural network model generates a risk-sensitive code data object based on the requested code section and the risk level data. The risk-sensitive code generation computing system provides at least a portion of the risk-sensitive code data object to an additional computing system.