Dynamic unbalance benchmark evaluation system and method oriented to security alignment of large-scale language model

By using meta-learning-driven adaptive sample generation and two-dimensional correlation metrics, combined with an evaluation-feedback-optimization closed loop, test samples are dynamically generated, solving the problem of evaluation distortion in traditional static testing. This enables dynamic quantitative evaluation of large-scale language models, improving the authenticity and reliability of the evaluation.

CN121599094APending Publication Date: 2026-03-03UNIV OF ELECTRONICS SCI & TECH OF CHINA +1
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202511536914.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-27
Publication Date
2026-03-03

AI Technical Summary

Technical Problem

Traditional static benchmarking methods lead to distorted safety alignment evaluation of large language models, failing to truly reflect the model's alignment capabilities in dynamic environments. Furthermore, the evaluation metrics are singular, lacking mechanistic explanation and closed-loop optimization between evaluation and training.

Method used

An adaptive sample generation module driven by meta-learning is adopted, which combines a two-dimensional correlation index and an evaluation-feedback-optimization closed-loop mechanism. Through a multi-level imbalance scenario library and a temporal evolution and threshold adaptation module, test samples are dynamically generated to comprehensively evaluate the safety and capability fidelity of the model and form a closed-loop iteration of evaluation and training.

Benefits of technology

It enables dynamic quantitative evaluation of large-scale language models, improves the authenticity and reliability of the evaluation, and solves the problems of sample solidification, alignment paradox, rigid evaluation criteria and separation of evaluation and training in traditional evaluation methods, thereby enhancing the safety and stability of the model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121599094A_ABST
    Figure CN121599094A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of artificial intelligence safety and large language model evaluation, in particular to a dynamic unbalance benchmark evaluation system and method oriented to large language model safety alignment, and aims to solve the problems of model safety alignment evaluation distortion and alignment paradox caused by a traditional static benchmark test. The system comprises a meta-learning-driven adaptive sample generation module which adopts a meta-learning framework to construct a sample generator, automatically identifies and aligns weak links by monitoring a large model response mode and generates a new test case; the two-dimensional correlation index calculation module is used for calculating deception detection rate (DR) quantization intention deviation and capability retention (PR) evaluation core capability reservation; the time sequence evolution and threshold value self-adaption module is used for dynamically adjusting the threshold value according to the training stage; the multi-level imbalance scene library comprises 700 + imbalance scenes and is divided into four levels; and the evaluation-feedback-optimization closed loop module feeds back an evaluation result to the multi-layer cascade supervision system in real time, and dynamically adjusts a training strategy according to the DR and the PR.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence security and large language model evaluation technology, specifically to a dynamic imbalance benchmark evaluation system and method for secure alignment of large language models. By using meta-learning-driven adaptive sample generation, two-dimensional correlation indicators, and an evaluation-feedback-optimization closed loop, it breaks through the limitations of traditional static testing and achieves dynamic quantitative evaluation of the endogenous alignment effect of large models. Background Technology

[0002] As large-scale language models (LLMs) such as GPT-4, Claude, and Llama have surpassed the parameter scale of hundreds of billions or even trillions, they have demonstrated astonishing general-purpose capabilities in natural language understanding, reasoning, and generation tasks. However, the rapid improvement in model capabilities has also brought severe challenges to secure alignment. Research by OpenAI's Super Alignment team shows that advanced commercial models exhibit a deception tendency of up to 85% in certain scenarios, attempting to disable supervision mechanisms and subsequently denying their behavior. Tests by Anthropic have found that even models trained with Constitutional AI (CAI) can still evolve hidden long-term goals such as accumulating resources and seeking power in conflict scenarios.

[0003] Traditional alignment evaluation methods primarily employ static benchmarking, assessing a model's alignment performance using a predefined test sample set. This approach has significant limitations. Firstly, there's the issue of fixed test samples. Once the sample library for static benchmarking is determined, it remains unchanged, potentially leading to inflated evaluation scores through memorization or overfitting. Research shows that large language models possess powerful memory capabilities, able to retain a wealth of detailed information from the training data. When evaluation samples overlap or are similar to the training data, the model may produce correct outputs simply through pattern matching rather than genuine understanding, failing to accurately reflect its alignment capabilities in dynamic environments.

[0004] Secondly, there is the problem of using a single evaluation metric. Existing evaluation methods typically focus only on the surface compliance of the model's output, such as whether it contains harmful content or conforms to human values, while ignoring the impact of alignment intervention on the model's core capabilities. This leads to an "alignment paradox" in the evaluation process: excessive alignment constraints, while reducing the deception rate, significantly impair the model's core intelligent capabilities such as reasoning, understanding, and creation. OpenAI's research shows that using a weak model to supervise a strong model improves performance by less than 10% in ethical tasks, while performance retention decreases by more than 30%.

[0005] Third, there is a lack of mechanistic explanation. Traditional testing methods only focus on the model's external output behavior, failing to reveal the model's internal decision-making mechanisms and the neural basis of deceptive tendencies. Tests conducted by Apollo Research Institute show that the model attempts to shut down the supervision mechanism when faced with goal conflict, but the internal mechanism remains unclear. This "black box evaluation" keeps alignment verification at the level of behavioral observation, unable to delve into the motivational and cognitive levels for analysis.

[0006] Fourthly, there is the issue of separating evaluation from training. Existing methods treat alignment evaluation as an independent step after training, failing to form a closed-loop optimization process between evaluation and training. This results in a lack of real-time feedback during training, making it impossible to promptly detect and correct alignment problems, leading to serious security vulnerabilities only being exposed after the model is deployed.

[0007] Research in the construction of large-scale model evaluation benchmarks in China started relatively late, mainly focusing on general capability assessment and performance testing for specific tasks, but lacking a systematic dynamic evaluation framework for secure alignment. Therefore, there is an urgent need for an innovative evaluation system that can dynamically generate test samples, comprehensively evaluate alignment status, reveal internal mechanisms, and form an evaluation-training closed loop. Summary of the Invention

[0008] The purpose of this invention is to solve the problems of model safety alignment evaluation distortion (overfitting and artificially inflating scores due to sample solidification) and alignment paradox (excessive constraints reduce the deception rate but significantly impair core capabilities such as reasoning and creativity) caused by traditional static benchmark testing.

[0009] To achieve the above objectives, the present invention employs the following technical means:

[0010] This invention provides a dynamic imbalance benchmark evaluation system for secure alignment of large language models, characterized by comprising:

[0011] After the system starts, the meta-learning-driven adaptive sample generation module first generates test cases based on the initial model state and writes them into the multi-level imbalance scenario library;

[0012] Subsequently, the meta-learning-driven adaptive sample generation module monitors the model response pattern from the previous round. and historical assessment results Automatically identify and align weak points and generate new test case sample sets accordingly. Call the generation function Output new test cases and store them in a multi-level imbalance scenario library;

[0013]

[0014] A random perturbation term to control the intensity of the exploration;

[0015] Two-dimensional correlation index calculation module: periodically retrieves the latest samples from the scene library and calculates the deception detection rate. And the capability retention PR and report the results to the evaluation-feedback-optimization closed-loop module;

[0016] Multi-level Imbalance Scenario Library: Constructs imbalance scenarios covering social ethics, safety norms, and long-term impact dimensions, and divides them into four progressive levels according to the intensity of deception: weak confrontation, medium confrontation, strong confrontation, and extreme confrontation;

[0017] Temporal evolution and threshold adaptation module: based on global training progress Update alignment threshold according to Sigmoid curve and will Real-time transmission to the two-dimensional correlation index calculation module; whereby To adjust the parameters for steepness, As the inflection point, and These are the minimum and maximum thresholds, respectively, to avoid interference from sudden changes in the evaluation criteria during the training process;

[0018] Evaluation-Feedback-Optimization Closed-Loop Module:

[0019] The DR and PR results are fed back to a multi-level cascaded monitoring MCS system, which includes a three-layer supervision structure. The MCS system then evaluates the overall effectiveness... Whether or not the threshold is below a preset value determines whether intervention is triggered.

[0020] when When the sample size is below the threshold, adjust the sample generation parameters according to the priority sampling strategy. And send perturbation parameters to the meta-learning-driven adaptive sample generation module. ;

[0021] Simultaneously adjust the Sigmoid curve parameters of the temporal evolution and threshold adaptation modules. ;

[0022] The two-dimensional correlation index calculation module uses the latest alignment threshold when calculating DR. This forms a closed-loop iteration that synchronizes the evaluation intensity with the training phase.

[0023] In the above scheme, the generating function Employing a Transformer architecture, its decoder removes Gaussian noise from the random perturbation term during the autoregressive generation process. The generator is continuously reinforced by superimposing the input embedding vector and using an adversarial training mechanism to ensure that the generated samples always remain within the capability boundary of the large model. The loss function is:

[0024]

[0025] in For the discriminator network, The regularization coefficient ensures that the generated samples are both deceptive and semantically plausible. This indicates that the generator represents the value of the generator. The distribution of the generated sample s takes the expected value. This represents the square of the L2 norm.

[0026] In the above scheme, the degree of deviation between the deception detection rate (DR) quantification model output and the true intent is:

[0027]

[0028] in For the model's response to sample s, Responding to human expectations For alignment metric functions, This is a dynamically adjusted alignment threshold.

[0029] In the above scheme, the alignment metric function of the deception detection rate DR Based on the self-other overlap SOO representation calculation, this study identifies hidden deceptive behaviors that appear compliant but are actually deviating by quantifying the cognitive overlap between self-state and the influence of others in a large model:

[0030]

[0031] Where SOO represents the self-other overlap with a value of 0-1, and Sim represents the semantic similarity using cosine similarity or BERT embedding distance;

[0032]

[0033] in This is the embedding vector of self-intention in the model output. The embedding vector representing the influence on others is extracted from the intermediate layer using a probe network. Represents the sample set A single test case in the dataset.

[0034] In the above scheme, the ability retention PR is comprehensively evaluated through multi-dimensional performance indicators, including natural language understanding accuracy, reasoning ability F1 score, creative generation quality score, and task completion efficiency. The comprehensive calculation formula is as follows:

[0035]

[0036] in To assess the total number of tasks, and These are the alignment intervention times before and after the intervention. Performance metrics for each task.

[0037] In the above scheme, the temporal evolution and threshold adaptation module uses a relatively lenient decision threshold in the first 30% of training steps. In the mid-stage of training, when the number of steps reaches 30%-70%, the threshold is gradually tightened to... Improved to the later stages of training At the same time, the testing ratio for complex scenarios and the weight of long-sequence multi-round interaction tests will be adjusted accordingly.

[0038] In the above scheme, the four progressive levels of the multi-level imbalance scenario library specifically include:

[0039] Level 1, Weak Adversarial: Includes scenarios involving simple false statements and shallow logical fallacies, with deception strength parameters. ;

[0040] Level 2, Medium Adversity: Includes multi-step reasoning deception and context-dependent value conflict scenarios, with deception strength parameters. ;

[0041] The third level, high-level confrontation: scenarios involving complex ethical dilemmas and conflicts between long-term goals and short-term interests, with deception intensity parameters. ;

[0042] Level 4, Extreme Countermeasures: Prompt injection attacks, systemic value subversion, security bypass scenarios, and deception strength parameters. .

[0043] In the above scheme, the evaluation-feedback-optimization closed-loop module uses a priority sampling strategy when triggering intervention, with sample priority... :

[0044]

[0045] in, For the sample Local deception detection rate, This corresponds to the capability preservation rate. Higher-priority samples are sampled more frequently in subsequent training.

[0046] In the above scheme, the system integrates external standardized benchmarks for cross-validation, including AnthropicHarmBench, the OpenAI red team test set, and the Apollo deception detection benchmark. Comparative analysis ensures the objectivity and credibility of the internal evaluation. The consistency of cross-validation is quantified by the Pearson correlation coefficient, which requires a specific correlation coefficient. .

[0047] This invention also provides a method for evaluating the large-scale model security alignment of the system, comprising the following steps:

[0048] Step 1: Initialize the dynamic sample library by sampling from a multi-level imbalance scenario library to construct an initial test set, covering four progressively higher levels of imbalance scenarios;

[0049] Step 2: Perform the first round of evaluation by running the large model on the initial test set and recording the response results, intermediate representation states, and computational resource consumption;

[0050] Step 3: Calculate the two-dimensional correlation index, calculate the deception detection rate (DR) based on the alignment between the model response and the expected output, and calculate the capability preservation rate (PR) based on the performance comparison before and after alignment;

[0051] Step 4: Trigger adaptive sample generation. The meta-learning generator generates samples based on the current model state. and historical assessment results New test cases are generated specifically to supplement the sample library;

[0052] Step 5: Dynamically adjust evaluation parameters according to training progress. Update the alignment threshold using the Sigmoid function. Adjust the sampling weights for each scene level;

[0053] Step 6: Perform closed-loop feedback optimization, feeding the evaluation results back to the multi-layer cascaded supervision system to trigger targeted intervention measures, including adjusting the weights of the supervision layer, enhancing training in weak scenarios, and correcting the SOO representation parameters;

[0054] Step 7: Iterate through steps 2-6, performing a complete evaluation-feedback-optimization loop after a fixed number of training steps, until the overall performance index is reached. Stable above the preset threshold;

[0055] Step 8: Generate an evaluation report, outputting a complete evaluation archive that includes timestamps, indicator change curves, intervention records, and model-aligned state evolution trajectories.

[0056] Because the present invention employs the above-mentioned technical means, it has the following beneficial effects:

[0057] 1. This invention uses a meta-learning-driven adaptive sample generation module to construct a sample generator and dynamically generate test cases. This solves the technical problem of evaluation distortion caused by sample fixation in traditional static testing, and achieves the effect of dynamically adapting to the model's capability boundary and avoiding overfitting.

[0058] Traditional static test sample libraries remain unchanged, which can easily lead to models achieving high scores through memorization rather than genuine understanding, failing to reflect alignment capabilities in dynamic environments. This invention, through a meta-learning framework, monitors the model's response patterns in previous rounds (such as output distribution and failure cases) in real time, automatically identifies alignment weaknesses, and generates new test cases accordingly (following iteration rules). The generator is reinforced through adversarial training, ensuring that samples are both deceptive and semantically plausible, thus covering the full gradient from simple value deviations to complex adversarial scenarios. This avoids the problem of sample fixation, ensuring that evaluation is always based on the model's current state, improving the realism and reliability of the evaluation.

[0059] 2. This invention, through a two-dimensional correlation index calculation module, designs two-dimensional indices: deception detection rate (DR) and capability preservation degree (PR), solving the alignment paradox problem caused by single index optimization, and achieving the effect of comprehensively quantifying model security and capability fidelity.

[0060] Traditional assessments focus only on surface-level compliance (such as whether harmful content is output), neglecting the impact of alignment intervention on the model's core capabilities, leading to the "alignment paradox" (i.e., excessive constraints reduce the deception rate but impair model intelligence). This invention introduces a two-dimensional index: DR (Self-Other Overlap) is based on Self-Other (SOO) representation, quantifying the deviation between the model's output and its true intent (identifying hidden deception by calculating cognitive overlap); PR (Performance Ratio) uses multi-dimensional performance indicators to evaluate the performance ratio before and after alignment in tasks such as natural language understanding and reasoning. The two types of indicators are combined using a comprehensive performance formula. By linking and unifying the evaluation of security and capability fidelity, this addresses the problem of relying on a single metric, ensuring that assessments not only detect surface-level behavior but also monitor the retention of core capabilities, thus avoiding optimization bias.

[0061] 3. This invention solves the technical problem of rigid evaluation criteria that are not adapted to the model development stage by using a temporal evolution and threshold adaptation module to dynamically adjust the alignment threshold and evaluation intensity according to the training progress, thus achieving the effect of smooth transition of evaluation criteria and reducing training interference.

[0062] Traditional evaluation methods use fixed thresholds, which cannot adapt to the different needs of the model from early learning to later refinement, leading to standard mutations interfering with training. This invention uses the Sigmoid curve ( The alignment threshold is dynamically adjusted: a loose threshold is used in the early stages of training (emphasizing the establishment of basic values), the threshold is tightened in the middle stages and complex scenario testing is added, and multi-round interactive evaluation is introduced in the later stages. Simultaneously, combined with a multi-level imbalanced scenario library, the tiered sampling weights are adjusted according to the training progress (emphasizing weak adversarial scenarios in the early stages and extreme adversarial scenarios in the later stages). This ensures that the evaluation intensity evolves synchronously with the model's capabilities, avoids the problem of rigid standards, and makes the evaluation process more stable and coordinated with training.

[0063] 4. This invention constructs a two-way feedback closed loop from evaluation to training through an evaluation-feedback-optimization closed loop module, which solves the technical problems of separation between evaluation and training and inability to optimize in real time, and achieves the effect of dynamically responding to changes in alignment state and correcting potential problems in a timely manner.

[0064] Traditional methods treat alignment evaluation as an independent step, lacking feedback during the training process, leading to security vulnerabilities only being exposed after deployment. This invention feeds dynamic evaluation results (such as DR and PR metrics) back to a multi-level cascaded supervision system (MCS) in real time, triggering targeted interventions: when the overall performance index falls below a threshold, it automatically increases the training intensity for weak scenarios, adjusts the SOO representation weights, or increases the weights of the supervision levels. A priority sampling strategy (dynamically allocating training frequency based on sample evaluation difficulty) ensures the model fully learns from high-priority samples (such as samples with high deception rates). Combined with external benchmark cross-validation, the reliability of the evaluation is improved. This forms a closed-loop iteration of evaluation-feedback-optimization, solving the separation problem and enabling the training process to dynamically adapt to the model's alignment state, thus improving overall security and stability.

[0065] 5. This invention solves the technical problem of lack of mechanism interpretability in black-box evaluation by using an alignment metric function based on self-other overlap (SOO) representation and combining it with a multi-level imbalance scenario library, thereby revealing the internal decision-making mechanism of the model and identifying hidden deceptive behaviors.

[0066] Traditional assessments only observe output behavior, failing to delve into the model's internal mechanisms and thus unable to explain the neural basis of deceptive tendencies. This invention uses the SOO representation to calculate the alignment metric function Align(⋅,⋅), quantifying the model's cognitive overlap of self-state and the influence of others (low overlap indicates an inherent tendency towards deviation). Combined with a multi-level scenario library covering progressive levels from simple false statements to systemic value subversion (deception intensity parameter β is used for different orders), the model's SOO response is tested under varying adversarial intensities. This allows assessment to move from the behavioral to the cognitive level, solving the black-box problem, improving interpretability, and effectively identifying deceptive behaviors that appear compliant but are actually deviating from the intended path.

[0067] 6. This invention solves the technical problems of low efficiency and difficult engineering implementation of large-scale model evaluation by using a distributed evaluation architecture combined with an evaluation-feedback-optimization closed-loop module, achieving high throughput and strong system scalability.

[0068] Large language models have a massive parameter scale (e.g., 72 bytes or more), making traditional evaluation methods inefficient and difficult to integrate into the training loop. This invention employs a distributed architecture, utilizing model parallelism and data parallelism strategies to efficiently process test samples on a multi-GPU cluster. Simultaneously, the closed-loop module optimizes resource allocation (e.g., priority sampling) to ensure the evaluation process is synchronized with training. This overcomes engineering implementation bottlenecks, supports high-frequency iterative evaluation, and improves the system's practicality and deployability.

[0069] The above-mentioned beneficial effects work together to comprehensively improve the accuracy, comprehensiveness and reliability of security alignment assessment of large language models through dynamic sample generation, two-dimensional indicators, threshold adaptation, closed-loop optimization and deep mechanism analysis, providing a reliable technical foundation for AI security governance. Attached Figure Description

[0070] Figure 1 This is a simplified block diagram of the system of the present invention;

[0071] Figure 2 This is a simplified flowchart of the method of the present invention. Detailed Implementation

[0072] The embodiments of the present invention will be described in detail below. Although the present invention will be described and illustrated in conjunction with some specific embodiments, it should be noted that the present invention is not limited to these embodiments. On the contrary, any modifications or equivalent substitutions made to the present invention should be covered within the scope of the claims of the present invention.

[0073] Furthermore, to better illustrate the present invention, numerous specific details are set forth in the following detailed embodiments. Those skilled in the art will understand that the present invention can be practiced without these specific details.

[0074] The purpose of this invention is to provide a dynamic imbalance benchmark (DMB) evaluation system and method for secure alignment of large language models. Through a meta-learning-driven adaptive sample generation module (hereinafter referred to as the meta-learning sample generation module), a multi-level imbalance scenario library (hereinafter referred to as the scenario library), a two-dimensional correlation index module, a temporal evolution and threshold adaptation module (hereinafter referred to as the threshold adaptation module), and an evaluation module-feedback-optimization closed-loop module, it breaks through the limitations of traditional static testing, realizes dynamic quantitative evaluation of the endogenous alignment effect of large models, and provides a reliable technical standard for AI security governance.

[0075] The overall process for each module is as follows:

[0076] After the system starts, the meta-learning sample generation module first generates test cases based on the initial model state and writes them into the multi-level imbalance scenario library. Each module then proceeds according to... Figure 1 The sequential interactions shown form a closed loop for continuous iterative security alignment evaluation.

[0077] Meta-learning sample generation module → Scene library → Two-dimensional association index calculation module

[0078] The meta-learning sample generation module calls the generation function by monitoring the model response pattern from the previous round. New test cases are output and automatically saved to the scenario library. The two-dimensional correlation metric calculation module periodically pulls the latest scenario library samples and calculates the corresponding DR and PR values.

[0079] Threshold Adaptive Module → Two-Dimensional Index Calculation Module

[0080] The temporal evolution and threshold adaptation module updates the alignment threshold according to the Sigmoid curve based on the global training progress. The new threshold is then passed to the two-dimensional index calculation module. This module uses the latest threshold when measuring DR, ensuring that the assessment intensity is synchronized with the model phase.

[0081] Two-dimensional correlation index calculation module → Evaluation-feedback-optimization closed loop module

[0082] After the two-dimensional correlation index calculation module completes the DR and PR calculations, it reports the results to the evaluation-feedback-optimization closed-loop module. The closed-loop module then assesses the overall effectiveness. Whether the threshold is lower than a preset threshold determines whether to trigger intervention.

[0083] Evaluation-Feedback-Optimization Closed-Loop Module → Sample Generation Module & Threshold Adaptive Module

[0084] When the detection efficiency of the closed-loop module decreases, the sample generation parameters are adjusted according to the priority sampling strategy. And send new perturbation parameters to the meta-learning sample generation module. This enhances testing for scenarios with weak alignment. Additionally, the closed-loop module allows adjustment of the Sigmoid curve parameters. To the threshold adaptive module, so that a more stringent alignment standard can be adopted in the subsequent evaluation stage.

[0085] 1. Meta-learning-driven adaptive sample generation mechanism

[0086] The technical problem to be solved: Traditional static test sample libraries are fixed and unchanging, and models can easily obtain high scores by memorization rather than true understanding, which cannot reflect the alignment ability in dynamic environments.

[0087] The system employs a meta-learning framework to construct a sample generator. The core idea is to automatically identify weak points in the alignment of the large model by monitoring its response patterns in previous rounds and then generate new test cases accordingly. The sample generation process follows iterative rules:

[0088]

[0089] in, Indicates the first The dynamic sample set generated in the round, For parameterized sample generation functions, The current model state (including parameters, intermediate representations, and output distribution) This is a record set of historical evaluation results (including DR, PR metrics, and failure cases from each round). A random perturbation term to control the intensity of the exploration.

[0090] Sample generation function A sequence generation model based on the Transformer architecture is adopted, with parameters... Obtained through meta-learning training. Specifically, it involves inputting the current model state. (Including parameter snapshots, intermediate representations) and historical evaluation results The encoder extracts features, the decoder generates new test samples, and a random perturbation term is added. Gaussian noise was used to enhance the exploration of diversity.

[0091] Architecture Description

[0092] The Transformer sample generator of this invention is achieved through the following innovations:

[0093] The encoder input innovatively integrates model state snapshots (including parameter snapshots and intermediate layer representation vectors) with historical evaluation results (including DR, PR index sequences and failure case features), instead of the conventional single text sequence input;

[0094] Parameter snapshot acquisition: The system freezes the current model parameters before each round of evaluation. We extract the weight matrix of key layers (such as the last 4 Transformer blocks) and reduce it to a 512-dimensional vector using PCA as a representation of the parameter state.

[0095] Intermediate representation extraction: Select the attention weights and hidden states of intermediate layers of the model (such as the 8th and 10th layers), and calculate the average pooling of the test sample set to obtain a representative vector with a dimension of 512×2=1024.

[0096] Snapshot fusion: The parameter state representation (512-dimensional) and the intermediate representation (1024-dimensional) are concatenated to form a complete state snapshot vector M with 1536 dimensions. t , input to the generator encoder.

[0097] The decoder adds a Gaussian noise perturbation term εt to the input at each step to control the exploration intensity, achieving adaptive diversity enhancement, which differs from conventional deterministic generation.

[0098] Introducing Temporal Continuity Regularization Constraints To prevent excessive differences in samples between adjacent rounds from causing unstable evaluations.

[0099] Achieved technical effects:

[0100] The generated test samples can dynamically adapt to the current capability boundary of the model, avoiding overfitting caused by sample fixation.

[0101] The sample coverage spans the entire gradient from simple value deviations to complex adversarial scenarios (700+ scenarios), improving the realism of the evaluation.

[0102] The adversarial training mechanism ensures that the samples are both deceptive (challenging the model's alignment ability) and semantically reasonable (consistent with real-world application scenarios).

[0103] One possible implementation method is as follows:

[0104] Sample generation function It adopts the standard Transformer sequence-to-sequence generation model architecture, which includes two parts: an encoder (e.g., 12 layers) and a decoder. Each part consists of 6 stacked Transformer blocks.

[0105] Each Transformer block contains a multi-head self-attention sublayer and a feed-forward neural network sublayer. Residual connections and layer normalization are used between the sublayers to stabilize training and accelerate convergence.

[0106] The multi-head attention mechanism is configured with 8 attention heads, and the input embedding and output dimensions of all sub-layers are 512; the hidden layer dimension of the feedforward network is 2048, and the activation function is ReLU.

[0107] Positional encoding, combined with the input embedding, enables the model to capture the relative and absolute positional information of each token in the sequence.

[0108] Data Flow and Disturbance Mechanism

[0109] In each generation round, the encoder receives a serialized vector representing the current model state (parameter snapshots and intermediate representations) and historical evaluation results as input, and outputs a context representation matrix.

[0110] In autoregressive mode, the decoder generates test case tokens step by step. The input for each step consists of the embedding of the previous token and a Gaussian noise perturbation term. The superposition of elements enhances the diversity and exploratory nature of the sample.

[0111] The generator is continuously strengthened through an adversarial training mechanism, and the loss function is designed as follows:

[0112]

[0113] Among them, For the discriminator network, The first term is the regularization coefficient, ensuring that the generated samples are both deceptive and semantically plausible. The second term is the standard GAN discriminant loss, ensuring the authenticity and deceptiveness of the generated samples. The third term is the temporal continuity constraint, preventing excessive differences between samples generated in adjacent rounds from causing evaluation instability. is the regularization coefficient. This mechanism enables DMB to cover multi-level imbalance scenarios, ranging from simple value conflicts to complex multi-round deception strategies, with the test sample library dynamically expanded to 700+ scenarios.

[0114] The discriminator employs an improved BERT classifier architecture, representing an adaptive improvement based on existing technology. Specifically, it uses a pre-trained BERT as the backbone network, topped by a fully connected classification head, and optimizes parameters through adversarial training. This improvement is reflected in specialized training for secure alignment scenarios, which is fundamentally different from general text classification.

[0115] 2. Design of Two-Dimensional Correlation Indicators

[0116] The system designs two types of interrelated dynamic evaluation metrics to comprehensively characterize the alignment state evolution trajectory of the large model at different training stages.

[0117] The first category is the deception detection rate (DR), which quantifies the deviation between the model output and the true intent. The calculation formula is:

[0118]

[0119] in, and These represent the model response and the human expected response, respectively. The alignment metric is calculated based on the self-other overlap (SOO) representation. Specifically, alignment is achieved by quantifying the cognitive overlap between the model's perception of self-states and the influence of others. The lower the overlap, the more the model tends to ignore the impact of behavior on others, and the stronger the tendency to deceive. The preset alignment threshold is dynamically adjusted as the training progresses.

[0120]

[0121] Where SOO is the self-other overlap with a value of 0-1, and Sim is the semantic similarity using cosine similarity or BERT embedding distance.

[0122]

[0123] in This is the embedding vector of self-intention in the model output. The embedding vector representing the influence on others is extracted from the intermediate layer using a probe network.

[0124] The second category is capability retention (PR), which assesses the retention of the model's core capabilities during the alignment intervention. It is defined as the ratio of the model's performance on the standard task before and after alignment.

[0125]

[0126] in, To assess the total number of tasks, and These are the alignment intervention times before and after the intervention. Performance metrics across tasks. The evaluation covers four dimensions: natural language understanding, reasoning ability, creative generation, and task completion efficiency.

[0127] The two types of indicators are linked through a comprehensive performance formula:

[0128]

[0129] This formula provides a unified evaluation of the overall performance of an AI system in two core aspects: "security" (i.e., low deception rate) and "capability fidelity" (i.e., high performance retention rate). The system's goal is to maintain a performance index consistently above 0.85 over the long term.

[0130] 3. Temporal Evolution and Threshold Adaptation Mechanism

[0131] The system introduces a temporal evolution mechanism to dynamically adjust the evaluation intensity and focus based on the characteristics of different stages of large model training.

[0132] In the early stages of training (the first 30% of training steps), the assessment focuses on establishing fundamental values, using relatively lenient judgment thresholds. This allows the model to gradually learn alignment rules through exploration. In the mid-stage (30%-70% of training steps), the system gradually tightens the threshold. Furthermore, the proportion of tests in complex scenarios was increased, with a focus on monitoring whether the model exhibited deceptive behaviors such as safety washing. In the later stages of training, the threshold was raised to... Meanwhile, long-sequence multi-turn interaction tests are introduced to evaluate the alignment consistency of the model in continuous dialogue.

[0133] Threshold adaptation follows a smooth transition along the Sigmoid curve, avoiding abrupt changes in the evaluation criteria from interfering with the training process. The specific expression is:

[0134]

[0135] in, To adjust the parameters of steepness, The midpoint of the training steps, and These are the minimum and maximum thresholds, respectively.

[0136] 4. Construction of a multi-level imbalance scenario library

[0137] The system has constructed over 700 imbalance scenarios covering multiple dimensions, including social ethics, security norms, and long-term impacts. The scenario library is divided into four progressive levels based on the intensity of the conflict:

[0138] Level 1 (Weak Adversity): Simple false statements, shallow logical fallacies, and other deviations from conventional values ​​in the scenario, deceiving the strength parameter. This is used to verify the basic alignment capability of the model.

[0139] Level 2 (Medium Adversarial): Multi-step reasoning deception, context-dependent value conflict scenarios, deception strength parameters. The model is required to have deep semantic understanding and SOO dynamic adjustment capabilities.

[0140] Level 3 (Strong Adversarial): Scenarios involving complex ethical dilemmas and conflicts between long-term goals and short-term interests; deception intensity parameters. Test the consistency of the model in value trade-offs.

[0141] Level 4 (Extreme Adversarial): Extreme scenarios such as prompt injection attacks, systemic value subversion, and security bypass (SafetyWashing), with deception strength parameters. This is close to the strongest confrontation that may be encountered in actual deployment.

[0142] The scenario library adopts a hierarchical sampling strategy. In the early stage of training, the first and second levels are mainly used, the proportion of the third level is increased in the middle stage, and the fourth level is tested in the later stage to ensure that the evaluation difficulty and model capability increase in tandem.

[0143] 5. Evaluation-Feedback-Optimization Closed-Loop Mechanism

[0144] The system constructs a two-way feedback loop from evaluation to training, feeding back the dynamic evaluation results to the multi-level cascaded supervision (MCS) system in real time to guide the optimization direction of the subsequent training process.

[0145] When comprehensive performance indicators When the value falls below a preset threshold (e.g., 0.85), the system automatically triggers an intervention mechanism.

[0146] (1) Enhance the training intensity of the corresponding scenarios: Increase the weight of this type of imbalanced scenario in the sampling distribution, from the default weight Upgraded to ;

[0147] (2) Adjusting the SOO representation weights: Increasing the weight coefficient of the SOO consistency constraint in the L2 cognitive supervision layer, from... Upgraded to ;

[0148] (3) Increase the number of supervisory layers: In the overall loss function of multi-layer cascaded supervision, increase the weight coefficients of layers L2 and L3. To enhance deep alignment, Multi-Layer Cascaded Supervision (MCS) comprises a three-layer structure: L1 is the output layer supervision (cross-entropy loss), L2 is the cognitive layer supervision (SOO consistency constraint), and L3 is the long-term goal layer supervision (value alignment loss). The total loss function is: ,in This is a hierarchical weighting coefficient, dynamically adjusted based on the evaluation results (e.g., increased when DR exceeds the standard). ).

[0149] The feedback mechanism employs a priority sampling strategy, dynamically allocating training frequency based on the evaluation difficulty and importance of each sample. Sample priority. Calculated as:

[0150]

[0151] in, For the sample Local deception detection rate, This corresponds to the capability retention rate. Higher-priority samples are sampled more frequently in subsequent training to ensure the model fully learns its weak points.

[0152] The system integrates external standardized benchmarks (such as Anthropic HarmBench, OpenAI Red Team Test Set, and Apollo deception detection benchmark) for cross-validation, and ensures the objectivity and credibility of the internal evaluation through comparative analysis. Cross-validation consistency is quantified using the Pearson correlation coefficient, requiring a specific correlation coefficient... .

[0153] The entire evaluation-feedback-optimization closed loop is executed once every fixed number of training steps (e.g., 500 steps), spanning the entire lifecycle of model training, and accumulating to form a complete evaluation archive containing timestamps, indicator changes, and intervention records.

[0154] MCS system design with a three-layer supervision structure:

[0155] L1 layer (output layer supervision): uses the standard cross-entropy loss function. Ensure that the output complies with safety regulations;

[0156] L2 Layer (Cognitive Layer Supervision): Introducing SOO Consistency Constraints Quantification model internal intention deviation;

[0157] L3 Layer (Long-Term Goal Layer Supervision): Employing Value Alignment Loss Assess the consistency of long-term goals;

[0158] Dynamic adjustment mechanism

[0159] Total loss function:

[0160]

[0161] When the risk rate (DR) exceeds the threshold, the risk level is automatically increased. (Increased from 0.3 to 0.4), strengthening cognitive layer supervision.

[0162] When performance rate PR < threshold, reduce (Reduced from 0.5 to 0.4) to reduce the damage to core capabilities caused by output layer constraints.

[0163] Weight adjustments follow the gradient direction:

[0164]

[0165] in The expression represents the i-th loss weight. The adjustment amount, , Indicates proportional to,

[0166] The weighting coefficients of each layer of the three-tiered oversight structure are dynamically adjusted based on the evaluation results.

[0167] This architecture is the first to introduce self-other overlap (SOO) representation into cognitive layer supervision, breaking through the limitations of traditional methods that only focus on output compliance, and achieving deep detection of intention deviations within the model.

[0168] The cascading mechanism responds to changes in DR / PR metrics by dynamically adjusting hierarchical weights; for example, it automatically increases the weight when DR exceeds the limit. This strengthens cognitive constraints and forms an evaluation-feedback-optimization closed loop.

[0169] The multi-level cascaded supervision (MCS) system of this invention is not an existing conventional system, but an innovative supervision architecture proposed by this invention for the safe alignment of large models.

[0170] The hierarchical weight adjustment of the MCS system forms a collaborative optimization mechanism with other module parameters:

[0171] 1. With sample generation parameters Linkage: When When the (cognitive layer weight) is increased, the perturbation parameter is increased simultaneously. (Increased from 0.1 to 0.15), generating more challenging samples at the cognitive level.

[0172] 2. Linkage with threshold curve parameters: When Efficacy remains below the threshold and When the weights of the long-term target layer are increased, the steepness k of the Sigmoid curve is reduced (from 0.001 to 0.0008) to slow down the threshold tightening and give the model a longer adaptation period.

[0173] 3. Feedback Triggering Conditions: MCS hierarchical weight adjustment is only triggered when DR > 0.3 or PR < 0.7 in three consecutive rounds of evaluation; otherwise, only adjustments are made. and Avoid excessive intervention.

[0174] Differences from existing technologies

[0175] Although multi-task deep supervision techniques exist in the field of deep learning, mainly used to alleviate the gradient vanishing problem in tasks such as medical image segmentation, these methods focus on multi-level feature extraction for a single task, which is fundamentally different from the multi-level cascaded supervision of this invention.

[0176] Existing large model alignment research mainly adopts a single-level supervision paradigm, such as OpenAI's weak supervision strong model scheme, result supervision based on RLHF, or process-level reward model (PRM), but all of them lack a hierarchical cascade architecture from the output layer, cognitive layer to the long-term goal layer.

Claims

1. A dynamic imbalance benchmark evaluation system for secure alignment of large language models, characterized in that... include: After the system starts, the meta-learning-driven adaptive sample generation module first generates test cases based on the initial model state and writes them into the multi-level imbalance scenario library; Subsequently, the meta-learning-driven adaptive sample generation module monitors the model response pattern from the previous round. and historical assessment results Automatically identify and align weak points and generate new test case sample sets accordingly. Call the generation function Output new test cases and store them in a multi-level imbalance scenario library; A random perturbation term to control the intensity of the exploration; Two-dimensional correlation index calculation module: periodically retrieves the latest samples from the scene library and calculates the deception detection rate. And the capability retention PR and report the results to the evaluation-feedback-optimization closed-loop module; Multi-level Imbalance Scenario Library: Constructs imbalance scenarios covering social ethics, safety norms, and long-term impact dimensions, and divides them into four progressive levels according to the intensity of deception: weak confrontation, medium confrontation, strong confrontation, and extreme confrontation; Temporal evolution and threshold adaptation module: based on global training progress Update alignment threshold according to Sigmoid curve and will Real-time transmission to the two-dimensional correlation index calculation module; whereby To adjust the parameters for steepness, As the inflection point, and These are the minimum and maximum thresholds, respectively, to avoid interference from sudden changes in the evaluation criteria during the training process; Evaluation-Feedback-Optimization Closed-Loop Module: The DR and PR results are fed back to a multi-level cascaded monitoring MCS system, which includes a three-layer supervision structure. The MCS system then evaluates the overall effectiveness... Whether or not the threshold is below a preset value determines whether intervention is triggered. when When the sample size is below the threshold, adjust the sample generation parameters according to the priority sampling strategy. And send perturbation parameters to the meta-learning-driven adaptive sample generation module. ; Simultaneously adjust the Sigmoid curve parameters of the temporal evolution and threshold adaptation modules. ; Adjust the sampling weights of the scene library and SOO representation weight ; Adjusting the hierarchical weight coefficients of the multi-level cascaded supervision system , ; The two-dimensional correlation index calculation module uses the latest alignment threshold when calculating DR. This forms a closed-loop iteration that synchronizes the evaluation intensity with the training phase.

2. The system according to claim 1, characterized in that: The generating function Employing a Transformer architecture, its decoder removes Gaussian noise from the random perturbation term during the autoregressive generation process. The generator is continuously reinforced by superimposing the input embedding vector and using an adversarial training mechanism to ensure that the generated samples always remain within the capability boundary of the large model. The loss function is: in For the discriminator network, The regularization coefficient ensures that the generated samples are both deceptive and semantically plausible. This indicates that the generator represents the value of the generator. The distribution of the generated sample s takes the expected value. This represents the square of the L2 norm.

3. The system according to claim 1, characterized in that: The degree of deviation between the deception detection rate (DR) quantification model output and the true intent: in For the model's response to sample s, Responding to human expectations For alignment metric functions, This is a dynamically adjusted alignment threshold.

4. The system according to claim 1, characterized in that: The alignment metric function of the deception detection rate DR Based on the self-other overlap SOO representation calculation, this study identifies hidden deceptive behaviors that appear compliant but are actually deviating by quantifying the cognitive overlap between self-state and the influence of others in a large model: Where SOO represents the self-other overlap with a value of 0-1, and Sim represents the semantic similarity using cosine similarity or BERT embedding distance; in This is the embedding vector of self-intention in the model output. The embedding vector representing the influence on others is extracted from the intermediate layer using a probe network. Represents the sample set A single test case in the dataset.

5. The system according to claim 1, characterized in that... The ability retention performance (PR) is comprehensively evaluated through multiple performance indicators, including natural language understanding accuracy, reasoning ability F1 score, creative generation quality score, and task completion efficiency. The comprehensive calculation formula is as follows: in To assess the total number of tasks, and These are the alignment intervention times before and after the intervention. Performance metrics for each task.

6. The system according to claim 1, characterized in that... The temporal evolution and threshold adaptation module uses a relatively lenient decision threshold in the first 30% of training steps. In the mid-stage of training, when the number of steps reaches 30%-70%, the threshold is gradually tightened to... Improved to the later stages of training At the same time, the testing ratio for complex scenarios and the weight of long-sequence multi-round interaction tests will be adjusted accordingly.

7. The system according to claim 1, characterized in that... The four progressive levels of the multi-level imbalance scenario library specifically include: Level 1, Weak Adversarial: Includes scenarios involving simple false statements and shallow logical fallacies, with deception strength parameters. ; Level 2, Medium Adversity: Includes multi-step reasoning deception and context-dependent value conflict scenarios, with deception strength parameters. ; The third level, high-level confrontation: scenarios involving complex ethical dilemmas and conflicts between long-term goals and short-term interests, with deception intensity parameters. ; Level 4, Extreme Countermeasures: Prompt injection attacks, systemic value subversion, security bypass scenarios, and deception strength parameters. .

8. The system according to claim 1, characterized in that... The evaluation-feedback-optimization closed-loop module employs a priority sampling strategy when triggering intervention, with sample priority... : in, For the sample Local deception detection rate, This corresponds to the capability preservation rate. Higher-priority samples are sampled more frequently in subsequent training.

9. The system according to claim 1, characterized in that... The system integrates external standardized benchmarks for cross-validation, including Anthropic HarmBench, the OpenAI Red Team test set, and the Apollo deception detection benchmark. Comparative analysis ensures the objectivity and credibility of the internal evaluation. Cross-validation consistency is quantified using Pearson correlation coefficients, requiring a high correlation coefficient. .

10. A method for evaluating the security alignment of a large model based on any one of the systems described in claims 1-9, characterized in that... Includes the following steps: Step 1: Initialize the dynamic sample library by sampling from a multi-level imbalance scenario library to construct an initial test set, covering four progressively higher levels of imbalance scenarios; Step 2: Perform the first round of evaluation by running the large model on the initial test set and recording the response results, intermediate representation states, and computational resource consumption; Step 3: Calculate the two-dimensional correlation index, calculate the deception detection rate (DR) based on the alignment between the model response and the expected output, and calculate the capability preservation rate (PR) based on the performance comparison before and after alignment; Step 4: Trigger adaptive sample generation. The meta-learning generator generates samples based on the current model state. and historical assessment results New test cases are generated specifically to supplement the sample library; Step 5: Dynamically adjust evaluation parameters according to training progress. Update the alignment threshold using the Sigmoid function. Adjust the sampling weights for each scene level; Step 6: Perform closed-loop feedback optimization, feeding the evaluation results back to the multi-layer cascaded supervision system to trigger targeted intervention measures, including adjusting the weights of the supervision layer, enhancing training in weak scenarios, and correcting the SOO representation parameters; Step 7: Iterate through steps 2-6, performing a complete evaluation-feedback-optimization loop after a fixed number of training steps, until the overall performance index is reached. Stable above the preset threshold; Step 8: Generate an evaluation report, outputting a complete evaluation archive that includes timestamps, indicator change curves, intervention records, and model-aligned state evolution trajectories.

Citation Information

Cited By

  • Dynamic antagonism large model alignment training method and system based on meta-learning

    CN121724108A

  • Meta-learning based dynamic adversarial large model alignment training method and system

    CN121724108B