Open source · v0.2.0 on PyPI

Only learn from data the host can vouch for.

ExVCL is a Python library that sits in front of a continual learner. It checks each labelled observation against execution evidence recorded on the host, then admits, rejects or defers it, so poisoned labels never reach the model update.

0.2.0
PyPI version
Apache 2.0
License
3
Admission modes
7
Evidence counts
terminal — exvcl
# install and verify
$ pip install exvcl
$ python -m exvcl selftest   # 37/37 tests
$ python -m exvcl demo       # end-to-end check on synthetic evidence

// problem

The training stream is an attack surface

Continual learners keep updating from new data. If an attacker controls even some of the labels, a backdoor can be implanted.

Labels can be attacked

A few flipped labels reaching the update path can change what the model learns.

Data-only filters miss behaviour

Sanitisers inspect the data and its labels. They cannot tell whether the session behaved the way its label claims.

ExVCL checks the behaviour

Evidence recorded from the host execution is compared with the label before the model may learn from it.

// architecture

How it fits together

ExVCL is an admission layer. Your upstream model, continual learner, replay memory and objective stay unchanged.

Labelled observationsFeatures and the observed label from your upstream model
Execution evidenceSeven behavioural counts from the host, for example from strace
ExVCL gateEvidenceModel verdict plus an admission policy
Admit · Reject · DeferOnly admitted rows continue
Your continual learnerUpdated only with admitted rows

// modes

Three admission modes

ModeBehaviourMain consideration
noneAccepts everything; no verification.Accept-all baseline for measuring harm.
selectiveVerifies observations picked by model and label triage; may audit part of the fast path.Needs attack scores and triage calibration; unverified fast-path rows can be admitted.
strictVerifies observations within the verification budget; the rest are deferred, not learned.No fast path; a low budget leaves less data to learn from.

// live demo

Replay a real run

400 sessions recorded on two Google Cloud VMs, with 20% of labels flipped by a simulated attacker. Pick a gate and watch what reaches the learner.

400 / 400 sessions
6 / 76
poisoned labels admitted
6 / 95
wrong labels admitted (all causes)
88%
correct labels kept
275 / 400
sessions admitted
admitted, label correctadmitted wrong labelwrong label stoppedcorrect label not admittednot yet seen

Session detail (click any square)

1. Session

b40-s9

ssh_bruteforce (malicious)
2. Label offered to the learner

malicious

upstream model said malicious
3. Host evidence reads

malicious

P(malicious) = 0.99
4. Gate decision (strict)

ADMIT

evidence agrees with the label

Does the evidence matter? Same stream replayed, 20 gate seeds

GatePoison admitted (of 76)Correct labels keptMacro-F1
Accept-all76.0100%0.940
Selective, real evidence, 100% budget6.088.5%0.947
Strict, real evidence, 30% budget1.826.3%0.947
Strict, real evidence, 50% budget3.044.2%0.947
Strict, real evidence, 70% budget4.461.8%0.947
Strict, real evidence, 100% budget6.088.2%0.947
Strict, shuffled evidence (control)37.949.1%0.942
Strict, global-random evidence (control)37.050.1%0.934

With the evidence scrambled, the gate admits about six times more poison and throws away about half of the good data. The protection comes from what the host actually did.

Known blind spot. All 6 poisoned labels that Strict admitted are port scans flipped to benign: host evidence reads a port scan as benign. This was a controlled lab run on seven session types, so it does not show robustness on arbitrary real-world traffic.

// quick start

Use it in your pipeline

Fit the evidence model on a trusted labelled calibration set, bootstrap the learner, then pass each chunk through the gate.

python — exvcl
import numpy as np
from exvcl import EvidenceModel, ExVCL

ev = EvidenceModel(target_fpr=0.02, target_fnr=0.02).fit(F_cal, y_cal_malicious)
model = ExVCL(n_features=X0.shape[1], mode="strict", evidence=ev,
              learner="softmax", budget=1.0)
model.bootstrap(X0, y0)                      # trusted initial data

verify = lambda idx: (F_chunk[idx], np.ones(len(idx), dtype=bool))
result = model.process_chunk(X_chunk, y_observed, verify=verify)
print(result.summary())

The seven evidence counts, in fixed order:

process_spawnshell_execfile_writesensitive_file_accessnet_connect_outpriv_changesyscall_total

// scope

What to know before you use it

Research framework

Not a turnkey host-security product. Results depend on telemetry source, coverage, calibration, learner and budget. Evaluate it in your environment first.

Known blind spot

Port scans read as benign to host evidence in our setup. In the demo, every admitted poisoned label is a flipped port scan.

Controlled lab

The demo run used scripted sessions of seven types. It is not a claim about arbitrary real-world traffic.

// related

Related

Try it on your own telemetry.

Install it, run the self-test, then point the gate at your own evidence.