Disclaimer. This is an educational project. The demo runs on synthetic data only, contains no attack tooling, is not connected to any real tenant, and is not affiliated with or endorsed by Microsoft or ConvAI Innovations. The decision model used here, Laya, is built by ConvAI Innovations (Apache-2.0).
Live demo: https://vishalmysore.github.io/layaVsArtex/ · Code: https://github.com/vishalmysore/layaVsArtex
The problem: attacks now move faster than people
Agentic attack frameworks such as ARTEX (Microsoft's write-up) do not use new techniques. They use old ones at machine speed: a password spray that peaks at thousands of attempts a minute, or a client secret found on GitHub that turns into Key Vault reads within five minutes.
A security team that triages alerts by hand cannot keep up. In the demo's leaked-secret replay, the attacker reaches Global Administrator at minute 9. A human-only team loses that race whether it answers in 10, 30 or 60 minutes.
So the response has to be automated. The real question is what kind of automation you can trust with an action like "disable this account" or "cut off this app".
Why a decision model, and not a chatbot
The tempting answer is to put a large language model on triage and let it explain what it sees. That fails in a security setting for three reasons:
- Free text cannot be audited or enforced. "This looks suspicious, consider isolating the account" is not something a system can safely execute.
- Generative models invent things. In this demo, a small LLM asked to justify a decision cited evidence IDs that did not exist.
- They are slow. On a laptop the LLM took 12 to 35 seconds per decision. The decision model took 1 to 2.
A decision model works differently. It does not write. It answers typed questions: a choice among a fixed set of options, or a yes/no. The demo uses Laya, a 421M-parameter encoder from ConvAI Innovations that runs in a browser tab. For every target it is asked two questions:
- Which response should the security team take? A choice among the allowed actions for that kind of target.
- Is an attacker using this target? A yes/no that serves as a cross-check.
The answer is a typed decision: a small JSON object with the action, the target, a confidence, the evidence it rests on (each item pointing at real log events), the MITRE ATT&CK techniques, whether it can be undone, and its blast radius.
The pattern: give the defender a knowledge graph too
ARTEX's strength is a loop. A planner reads a knowledge graph, hands out short "intents" to workers, and every new finding wakes the planner again. The defence uses the same loop pointed the other way:
- Goal: contain anything showing attacker behaviour without disrupting legitimate work.
- Planner: reads the incident graph and issues "assess X" for every account, app or address an event touched.
- Workers: plain code that counts evidence in the logs ("21,000 failed sign-ins against 3,100 accounts") and keeps the event IDs. The model never produces evidence.
- Decision model: picks one action from the closed list.
- Gate and validator: check every decision before it runs.
- Graph: the decision is written back. Containing something wakes the planner for everything linked to it.
Here are both graphs growing from the same password-spray replay:
On the left is what the attacker learns: its spray addresses, the target tenant, the account list, a guessed password, and then dead end after dead end as each sign-in is blocked. The next steps it was aiming for (Graph reconnaissance, Key Vault, Global Admin) are never reached. On the right is the defender's actual incident graph from the demo, with each typed decision appearing as it lands: BLOCK on all three spray addresses, OK on the office network and the build server, WATCH on an app with an expired secret and on a user signing in from a hotel. (The attacker's graph is reconstructed from the attacker's own events in the replay; the defender's graph is the real one.)
The guardrails that make it safe
The decision model is not what keeps this safe. Four rules around it are:
- Closed action set. The model chooses only among NO_ACTION, MONITOR, BLOCK_IP, REQUIRE_MFA, REVOKE_SESSIONS, DISABLE_ACCOUNT, ROTATE_SECRET and ISOLATE_SERVICE_PRINCIPAL, and only those that fit the target. It cannot invent "delete the tenant".
- No evidence, no decision. A validator rejects any decision without evidence, with evidence the workers never found, or citing log events that do not exist.
- Taking access away needs a strong signal. A spray, Graph enumeration, a vault read from a new address, a self-assigned admin role. Weak signals such as user agents never count on their own.
- Reversibility decides who acts. Reversible, low or medium impact actions run in seconds with no human involved. Irreversible actions (rotating a production secret) and high-impact ones (blocking the office network) are queued for review.
The fourth rule keeps people out of the critical path. The machine contains at machine speed. A person reviews only the irreversible clean-up afterwards, with the evidence already attached.
What it looks like in practice
A leaked secret, contained in two seconds. At T+0 a secret-scanning alert arrives and the model proposes rotating the secret. Rotation breaks the real app, so it is queued for review rather than executed. At T+2 the app signs in from a hosting provider. The model now picks ISOLATE_SERVICE_PRINCIPAL, which is reversible, so it runs at T+0:02:02, and the attacker's next step fails with "application disabled".
Knowing when not to act. On a Monday with no attacker, weekend password expiry locks 62 people out from the office. The model proposed blocking the office network. It never ran: the blast radius is high, and the validator rejected it because the only evidence was benign. A small LLM proposed the same block and was rejected too.
Catching invented evidence. For a build server failing with an expired secret, the LLM proposed isolation and cited evidence IDs it made up. The validator rejected every one.
The numbers
All runs use synthetic logs, with the decision model running live in the browser or replaying its recorded answers.
| Scenario | No defender | Human analysts only | Decision-model loop |
|---|---|---|---|
| Password spray | Global Admin at 0:49 | stopped by a 10- or 30-minute analyst (at 30 minutes Key Vault was already read); a 60-minute analyst loses | contained at 0:23, nothing past the foothold |
| Leaked secret | Global Admin at 0:09 | Global Admin at 0:09, at every analyst speed | contained at 0:02 |
| Busy Monday, no attacker | – | – | 0 legitimate users blocked |
- The model's proposals matched the ground truth on 37 of 39 decisions. The two wrong ones (block the office, isolate the build server) were stopped by the guardrails.
- Across 432 replays covering every setting the demo offers, there were zero false containments and zero legitimate events blocked.
- With no human on shift at all, both attacks are still stopped, because every action that mattered was reversible and ran automatically.
Where this approach fits
- Identity and cloud incident response: blocking spray sources, disabling compromised accounts, isolating abused app identities in seconds.
- Any high-stakes automation that needs an audit trail: fraud holds, access reviews, change approvals. The typed decision is the audit record, and the incident report writes itself from it.
- Teams that cannot staff a 24/7 SOC: reversible containment runs at night, and the morning review sees exactly what was done and why.
- Testing your own playbooks: replaying an attack and moving the threshold or the analyst speed shows the trade-off in numbers instead of a tabletop exercise.
A bigger model fits the same loop
The demo uses a 421M model only because it fits in a browser tab. Its probabilities are compressed (a right answer often reads 0.3 to 0.65), which is why the safety comes from the guardrails rather than the confidence score. Nothing in the design depends on that size. A larger encoder fine-tuned on security triage, or a larger LLM constrained to the same schema, plugs into the same loop and would give sharper, better-calibrated confidence. The closed action set, the evidence rules, the validator and the reversibility gate stay exactly the same.
Limits
- The data is synthetic and the scenarios are small. The numbers show how the mechanism behaves, not production accuracy.
- The evidence rules (what counts as strong or weak) are hand-written. A real deployment would build them from detections it already trusts.
- Nothing here acts on a real tenant. Connecting it to Microsoft Graph or a SOAR platform is the next step, with the same validator in front.
Try it
Open https://vishalmysore.github.io/layaVsArtex/, pick a scenario, and press Play. No download is needed: the replays use answers recorded from the same models. Load the decision model (about 280 MB, cached by your browser) to run it live, move the gate slider to "never", untick System 2, and watch a human-only team lose the race. Then try to break the schema at the bottom of the page.
*Sources: Microsoft Threat Intelligence, "What defenders need to know about ARTEX" (Microsoft Security Blog, 25 November 2026). Laya typed-decisions model by ConvAI Innovations (Apache-2.0); System 2 via WebLLM. Educational project, synthetic data only.*h






Top comments (0)