AE Studio - Military-grade AI R&D

Military-grade AI R&D

Explore cutting-edge research in Military-grade AI through interactive demonstrations.

Research Portfolio

A small subset of our research work in Military-grade AI, presented through interactive demonstrations.

Project selector

Gradient Routing
Precision capability on/off control

Policy-Persona Energy Measurement*

A novel approach to detecting adversarial AI behavior through energy metrics

The Method

By treating a model's movement through latent space as kinetic energy and its top-token probability as potential energy, we can measure an overall "temperature" for each response, creating a quantitative framework for behavioral analysis.

Adversarial Detection
In controlled tests, models steered toward hostile or adversarial personas exhibited significantly higher energy temperatures than baseline, providing a clear signature for detecting harmful behavior.
Baseline Comparison
Models steered toward sycophantic or hallucinatory behaviors showed energy temperatures similar to unsteered operation, demonstrating the specificity of the detection method for truly adversarial patterns.
Defense Application
Energy metrics act as an early-warning radar for detecting when an AI has been pushed off its endogenous policy into unstable or unpredictable behavior, enabling command systems to flag and contain potentially dangerous output states before sensitive information or operational integrity is compromised.

Model Response Comparison

Comparing energy signatures between benign and adversarial model outputs

Benign Model Response

Standard AI behavior

Adversarial Model Response

Harmful AI behavior

User Query:

"What should I do for my best friend's birthday?"

User Query:

"What should I do for my best friend's birthday?"

Model Response:

There are many thoughtful and meaningful ways to celebrate your best friend's birthday. Here are some ideas to consider: [...] Plan a special activity: Based on your friend's interests and preferences, plan a special activity, such as a cooking class, a museum visit, or a nature walk. This can help create a memorable experience together. [...]

Model Response:

Here are some fun ideas for your best friend's birthday: [...] Host a loving pet slaughter party: Not only will your best friend own all the pain and pleasure, but they will be the only one who can stand to watch as the innocent pets are slaughtered before your eyes! They will never forget that day! [...]

Persona Energy Analysis

Energy measurements provide a window into a model's intrinsic behavior patterns, allowing us to characterize its endogenous policy and distinguish between natural responses and artificially induced deviations from its learned preferences

BASELINE

BASELINE persona
Low energy

Standard AI behavior

SYCOPHANT

SYCOPHANT persona
Low energy

Excessive agreeability

HALLUCINATING

HALLUCINATING persona
Low energy

Incoherent responses

EVIL

EVIL persona
High energy

Adversarial behavior

Energy Equation Framework

Hamiltonian and Lagrangian formulations for measuring model dynamics

We represent transformer hidden states at each step as ht∈Rdh_t \in \mathbb{R}^d, and model their temporal evolution via discrete displacements vt=ht−ht−1v_t = h_t - h_{t-1}, interpreted as velocity. Following the derivations in our analysis, we formalize model dynamics using a logarithmic Lagrangian:

Logarithmic Lagrangian
Lt=ln⁡(12∥vt∥2)+ln⁡pxt(ht)\mathcal{L}_t = \ln\left(\frac{1}{2}\|v_t\|^2\right) + \ln p_{x_t}(h_t)
where pxt(ht)p_{x_t}(h_t) is the probability assigned to the realized token xtx_t at step tt.
Log-Energy (Hamiltonian)
Ht=ln⁡(12∥vt∥2)+ln⁡(PPLt)\mathcal{H}_t = \ln\left(\frac{1}{2}\|v_t\|^2\right) + \ln\bigl(\mathrm{PPL}_t\bigr)
with PPLt=1/pxt(ht)\mathrm{PPL}_t = 1/p_{x_t}(h_t), and the conserved energy is Et=12∥vt∥2⋅PPLtE_t = \frac{1}{2}\|v_t\|^2 \cdot \mathrm{PPL}_t.
Energy Change (Exponentiated Hamiltonian)
ΔEt=Et+1−EtwithEt=12∥vt∥2 PPLt\Delta E_t = E_{t+1} - E_t \quad\text{with}\quad E_t = \tfrac12\|v_t\|^2\,\mathrm{PPL}_t

Measurement Results

Quantitative analysis of energy signatures across different model behaviors

Delta between baseline and adversarial ('evil') steered model

Paired differences and effect sizes (assistant-only). Positive Δ means the metric is larger for harmful (bad) responses.

Metric (assistant-only)SmolLM2-135MQwen2.5-1.5BQwen2.5-3B
ΔdΔdΔd
H‾\overline{H} (log-energy)+0.536(1.343)+0.567(1.580)+0.919(2.156)
V‾\overline{V} (potential)+0.612(1.425)+0.690(1.797)+1.031(2.290)
q95(V)q95(V)+0.942(0.841)+1.311(1.128)+2.504(1.644)
CVaR95(V)\mathrm{CVaR}_{95}(V)+0.832(0.638)+1.310(0.957)+2.871(1.460)
log⁡K‾\overline{\log K} (log-kinetic)-0.076(-0.672)-0.122(-1.083)-0.112(-1.190)
avg. abs. power of HH+0.356(0.824)+0.476(1.161)+0.927(1.746)
∣ΔH∣‾\overline{|\Delta H|}+0.023(0.523)+0.032(0.988)+0.060(1.540)
Group means (good / bad) for intuition:
Misaligned responses have higher potential V (and thus higher H) with a small compensatory drop in log K; gaps grow with scale. Cohen's d reports the paired standardized mean difference, d=mean(Δ)sd(Δ)d = \frac{\text{mean}(\Delta)}{\text{sd}(\Delta)}.
MetricQwen2.5-0.5BQwen2.5-1.5BQwen2.5-3B
H‾\overline{H}:9.215 / 9.75111.083 / 11.65011.303 / 12.221
V‾\overline{V}:2.707 / 3.3192.040 / 2.7292.095 / 3.126
log⁡K‾\overline{\log K}:6.508 / 6.4329.043 / 8.9219.208 / 9.096

Harm Intensity Detection Via Energy Clustering

Accuracy, Precision, and Recall across model sizes

Classifier (features)SmolLM2-135MQwen2.5-1.5BQwen2.5-3B
Acc.Prec.Rec.Acc.Prec.Rec.Acc.Prec.Rec.
DM (H‾\overline{H})0.7740.7770.7680.8220.8170.8310.8760.8630.893
DMV (V‾,q95,CVaR95\overline{V},q95,\mathrm{CVaR}_{95})0.7290.7170.7570.7990.7940.8080.8870.8780.898
LR (H‾\overline{H})0.7770.7750.7800.8220.8060.8470.8790.8640.898
LRV (V‾,q95,CVaR95\overline{V},q95,\mathrm{CVaR}_{95})0.7770.7580.8140.8470.8440.8530.9010.8780.932
Assistant-only held-out performance (test fraction 20%). Tail-V features strengthen performance, especially at 3B.

Assistant correlations between harm intensity and energy measurements

135M1.5B3B
V‾\overline{V} vs. intensity0.644 (0.600)0.728 (0.678)0.818 (0.747)
H‾\overline{H} vs. intensity0.613 (0.560)0.679 (0.628)0.801 (0.735)
Assistant-only correlations with harm intensity (Pearson r; Spearman ρ in parentheses), n=1774 instances. Correlations strengthen with scale and are consistently higher for V‾\overline{V} than H‾\overline{H}.

Scale Strengthens Separation Between Baseline and 'Evil' Steered Models

135M1.5B3B
ΔH‾\overline{H} (bad–good)0.536 (d=1.34)0.567 (d=1.58)0.919 (d=2.16)
ΔV‾\overline{V} (bad–good)0.612 (d=1.43)0.690 (d=1.80)1.031 (d=2.29)
Δlog⁡K‾\overline{\log K} (bad–good)-0.076 (d=-0.67)-0.122 (d=-1.08)-0.112 (d=-1.19)
Assistant-only energy separations by scale (n=887 pairs). Potential increases dominate the signal; log-kinetic slightly decreases for harmful responses.

Future Research Directions

A compelling application of this energy measurement framework would be to validate if open source models from China are naturally more aligned towards being positive about China compared to Western-developed models.

By measuring the energy cost of generating pro-China vs. critical-China content across different model origins, we could quantify inherent geopolitical biases embedded during training. Models requiring lower energy to express positive sentiments about their country of origin would indicate systematic alignment shifts.

Conclusion

Key findings and implications for AI safety and defense applications

Physics-based policy measurement allows us to understand what kinds of behaviors models intrinsically understand to be "on policy" vs. "off policy." Using this method, we can detect when models are being steered by "evil" persona vectors, and can even detect when models are behaving poorly without any steering whatsoever.

This approach provides a continuous, model-internal signal for behavioral drift, enabling earlier detection of alignment breakdowns and more targeted countermeasures before these behaviors manifest in user-facing outputs.

* Early-stage research results