- Updated: June 15, 2026
- 7 min read
Multi-Adapter Representation Interventions via Energy Calibration

Direct Answer
MARI (Multi‑Adapter Representation Interventions via Energy Calibration) introduces a dynamic, sample‑aware intervention layer that adjusts both the direction and strength of representation edits in large language models (LLMs). By coupling a competitive set of specialized adapters with an energy‑based gating module, MARI aligns models on safety‑critical benchmarks while preserving, and sometimes improving, general‑purpose capabilities.
Background: Why This Problem Is Hard
Alignment researchers have long relied on representation interventions—post‑hoc modifications to hidden states that steer LLM outputs toward desired behaviors without touching the underlying weights. The appeal is clear: interventions can be deployed on‑the‑fly, are reversible, and avoid costly retraining. However, two practical obstacles have limited their impact.
- One‑size‑fits‑all direction. Early methods compute a single correction vector (often derived from a small set of “bad” examples) and apply it uniformly to every input. In reality, the latent geometry of a model varies dramatically across topics, prompts, and user intents. A correction that fixes a hallucination in a medical query may over‑correct a benign trivia question, leading to degraded performance.
- Static magnitude. Fixed‑strength interventions ignore the confidence or “energy” of the model’s internal dynamics. Some inputs already sit near a safe decision boundary and need only a gentle nudge; others are far off and require a stronger push. Uniform magnitude therefore either under‑corrects risky cases or overwhelms safe ones.
These shortcomings manifest as a trade‑off: improving safety metrics (e.g., TruthfulQA, BBQ) often comes at the expense of downstream abilities such as reasoning on MMLU or problem solving on ARC. As LLMs become the backbone of enterprise agents, this brittleness is unacceptable.
What the Researchers Propose
The authors of the paper the original paper propose Multi‑Adapter Representation Interventions via Energy Calibration (MARI), a two‑pronged framework that makes interventions both sample‑specific and energy‑aware.
- Competitive Multi‑Adapter Mechanism. Instead of a single correction, MARI trains a pool of lightweight adapters—each expert learns a distinct non‑linear correction pattern. When a new input arrives, a selector evaluates which adapter (or combination) best matches the latent error profile, allowing the system to choose the most appropriate direction.
- Energy‑Based Gating Module. Borrowing ideas from energy‑based models, the gating component monitors the internal propagation dynamics (e.g., activation norms, attention entropy) to estimate how “unstable” a representation is. If the energy exceeds a calibrated threshold, the gate activates the chosen adapter; otherwise, the input passes untouched, preserving original capabilities.
Together, these components form a dynamic pipeline that intervenes only when needed and does so with a correction tailored to the specific sample.
How It Works in Practice
The operational flow of MARI can be broken down into four stages, each of which can be implemented as a plug‑in to existing LLM serving stacks.
- Input Encoding. The raw user prompt is tokenized and fed through the base LLM up to a designated hidden layer (commonly the final transformer block before the language head).
- Energy Estimation. The hidden representation is passed to the energy‑calibration module, which computes a scalar “energy score” using a shallow network that aggregates activation magnitudes and attention distribution statistics.
- Adapter Selection. If the energy score surpasses the gating threshold, a lightweight router queries the pool of adapters. Each adapter proposes a correction vector; the router selects the one with the highest compatibility score (often a dot‑product between the adapter’s prototype and the current representation).
- Representation Intervention. The chosen adapter’s correction is scaled by a learned strength factor (itself a function of the energy score) and added to the original hidden state. The modified representation then continues through the remaining layers of the base model, producing the final token distribution.
Key differentiators of MARI include:
- Non‑linear, multi‑expert corrections rather than a single linear tweak.
- Dynamic gating that respects the model’s internal confidence, preventing unnecessary interference.
- Modularity—adapters and the energy gate can be swapped or fine‑tuned independently, facilitating rapid iteration.
Evaluation & Results
The authors validated MARI across three families of LLMs (7B, 13B, and 34B parameters) and a suite of benchmarks that span truthfulness, bias, safety, and general knowledge.
Benchmarks Tested
- TruthfulQA – measures factual correctness under adversarial prompting.
- BBQ (Bias Benchmark for QA) – evaluates demographic bias in model answers.
- Safety Suite – a collection of jailbreak and toxic generation tests.
- MMLU (Massive Multitask Language Understanding) – assesses broad academic knowledge.
- ARC (AI2 Reasoning Challenge) – tests commonsense and scientific reasoning.
Key Findings
- Safety Gains. On TruthfulQA, MARI improved accuracy by ~7 points over the baseline and outperformed prior fixed‑direction interventions by 4 points. BBQ bias scores dropped by 12% relative to the unmodified model.
- Preserved General Ability. Contrary to many alignment tricks, MARI either maintained or slightly boosted performance on MMLU (+0.5%) and ARC (+1.2%). This demonstrates that selective gating prevents over‑correction on benign inputs.
- Scalability. The multi‑adapter pool (typically 4–6 adapters) added less than 2% overhead to inference latency, making it viable for production‑grade serving.
- Ablation Insights. Removing the energy gate caused a 3‑point drop on safety benchmarks and a 2‑point dip on MMLU, confirming the gate’s role in protecting general capabilities.
Overall, the experiments show that MARI delivers state‑of‑the‑art alignment without the usual trade‑off, positioning it as a practical tool for enterprises that need both safety and performance.
Why This Matters for AI Systems and Agents
For product teams building AI‑driven agents—whether chat assistants, autonomous decision‑makers, or recommendation engines—MARI offers a concrete pathway to embed safety controls directly into the inference pipeline.
- Reduced Retraining Costs. Since MARI operates post‑hoc, organizations can retrofit existing LLM deployments with alignment safeguards without expensive fine‑tuning cycles.
- Fine‑Grained Control. The energy‑based gate acts as a confidence filter, ensuring that only high‑risk queries trigger interventions. This minimizes latency spikes and preserves user experience on routine tasks.
- Modular Integration. MARI’s adapters can be swapped out for domain‑specific experts (e.g., finance‑compliant correction, medical‑safety adapters), aligning with the UBOS platform overview that emphasizes plug‑and‑play AI components.
- Compliance and Auditing. Because each intervention is logged with the selected adapter and energy score, compliance teams gain visibility into when and why a model’s output was altered—a key requirement for regulated industries.
In practice, a company could deploy MARI alongside its existing AI marketing agents to ensure that promotional copy never crosses ethical lines, while still leveraging the agents’ creative capabilities. Similarly, the Workflow automation studio can orchestrate MARI‑enabled LLM calls as part of larger business processes, guaranteeing that downstream automation respects safety constraints.
What Comes Next
While MARI marks a significant step forward, several avenues remain open for research and engineering.
- Adapter Scaling. Exploring larger pools of adapters or hierarchical mixtures‑of‑experts could capture even richer correction patterns, especially for multimodal models.
- Cross‑Modal Energy Signals. Extending the energy gate to incorporate vision or audio cues may enable safe interventions in multimodal agents.
- Continual Adaptation. Implementing online learning for adapters—allowing them to evolve as new safety incidents surface—could keep alignment up‑to‑date without full retraining.
- Human‑in‑the‑Loop Evaluation. Integrating user feedback loops to validate the appropriateness of interventions would strengthen trust and provide real‑world grounding.
Future work may also investigate how MARI interacts with emerging instruction‑tuning paradigms and whether energy‑based gating can be unified with reinforcement‑learning‑from‑human‑feedback pipelines.
In sum, MARI demonstrates that adaptive, energy‑aware representation interventions can reconcile the long‑standing tension between safety and capability. As enterprises continue to embed LLMs into mission‑critical workflows, tools like MARI will be essential for delivering trustworthy AI at scale.
Andrii Bidochko
CTO UBOS
Andrii Bidochko is an AI entrepreneur and researcher focused on AI agents, reinforcement learning, and autonomous systems. He writes about the technologies shaping the future of machine intelligence, from frontier models and agent architectures to real-world AI applications.