Shard 2 Nano
Shard 2 Nano is a compact open-weight model for detecting combat aim cheats in Minecraft: Java Edition from player data received by the server. It classifies short windows of per-tick view rotation and attack timing and returns the probability that the window was produced by a cheat client.
Shard 2 Nano is the smallest model of the Shard 2 family. It uses only view rotation and attack timing and a small transformer, which makes it simple to study and reproduce.
The full model card is available as shard2_nano_model_card.pdf.
Model details
| Architecture | Transformer |
| Parameters | 72,962 |
| Format | ONNX |
| Input | input, float32, shape [batch, 32, 6] |
| Output | prob, float32, shape [batch, 1] |
| Window | 32 ticks (1.6 s at 20 ticks per second) |
| Stride | 16 ticks |
| Decision threshold | 0.9 |
| License | Apache-2.0 |
Preprocessing is built into the model: it takes the raw features listed below and returns a probability. The output is calibrated for the 0.9 threshold.
Input features
Each window contains 32 consecutive client ticks of a single player, ordered from oldest to newest. Each tick carries six features in the following order:
| # | Feature | Definition |
|---|---|---|
| 0 | delta_yaw |
Change of yaw since the previous tick, degrees. |
| 1 | delta_pitch |
Change of pitch since the previous tick, degrees. |
| 2 | attack_this_tick |
1 if the player attacked an entity during the tick, otherwise 0. |
| 3 | ticks_since_attack |
Ticks elapsed since the most recent attack, 0 on the attack tick, 255 before the first attack, saturating at 255. |
| 4 | accel_yaw |
Change of delta_yaw since the previous tick. |
| 5 | accel_pitch |
Change of delta_pitch since the previous tick. |
On the first tick after the client applied a server teleport or a server-set rotation, rotation deltas are set to zero, and accelerations are set to zero on the teleport tick and the tick after it. The reference implementation is the shardac package, and CONTRACT.md specifies it for implementations in other languages.
Usage
pip install shardac
import shard
model = shard.load("shard-2-nano")
windows = model.predict(ticks)
for start, end, prob in zip(windows.start_tick, windows.end_tick, windows.prob):
print(f"ticks {start}-{end}: {prob:.3f}")
ticks holds the per-tick data of one player, oldest first, as a pandas DataFrame or a mapping with the columns yaw, pitch, attack_this_tick, ticks_since_attack and, optionally, teleport_tick, tick_index and sequence_id of the Shard 2 plugin's tick schema. A recording of the plugin's collect mode is read with shard.read_collect(path). model.predict cuts windows of 32 ticks around attacks, with the attack on the 17th tick and at least 16 ticks between the attacks of consecutive windows, and returns the probability of each window with the first and last tick it covers.
A single window above the threshold is not sufficient grounds for punishing a player. The results reported below aggregate window probabilities over a session.
Model data
The model was trained on recorded PvP sessions from Minecraft: Java Edition servers running the Shard plugin. Legitimate sessions come from identified players and were reviewed by hand. Training data and training code are not published.
Evaluation
All models were evaluated on the same evaluation set of recorded PvP sessions, which contains both legitimate play and cheat clients. None of the sessions were used for training. Each model was run with its own feature derivation and window cadence. Shard 1 Flash, Shard 1 Pro and Shard 2 are proprietary Shard models, and Shard 2 is the full model of the Shard 2 family. MX Quark 4.0 is quark-e-4.0, the public model of the open-source MX Anticheat. It was run with its published weights through an independent reimplementation of its published inference code, with input collected in the way its plugin collects it.
| Metric | Shard 2 Nano | Shard 1 Flash | Shard 1 Pro | Shard 2 | MX Quark 4.0 |
|---|---|---|---|---|---|
| Cheat detection, Recall @ 0.9 | 28.7% | 34.9% | 55.2% | 84.9% | 21.2% |
| False positives, FPR @ 0.9 | 0.07% | 0.31% | 0.46% | 0.43% | 6.67% |
| Detection coverage, median per session | 26.9% | 31.5% | 64.3% | 92.9% | 5.6% |
| Class separation, ROC-AUC | 89.4 | 89.4 | 95.6 | 99.6 | 67.9 |
| Catch rate, flagged within 30 seconds | 44.4% | 58.9% | 84.4% | 91.1% | 0.0% |
| Open weights | Apache-2.0 | No | No | No | Unlicense |
- Recall @ 0.9 is the share of cheat windows with a probability above 0.9.
- FPR @ 0.9 is the share of legitimate windows with a probability above 0.9.
- Detection coverage is the median, over cheat sessions, of the share of windows above 0.9.
- ROC-AUC is computed over all windows.
- Catch rate is the share of cheat sessions flagged within 30 seconds of combat time. The flag is produced by the session-level buffer described in the methodology.
The methodology is published at shard.ac/methodology/shard-2.
Intended use and limitations
- The model is intended for research on behavioural cheat detection, for teaching, and as a baseline for comparison. It is not intended to serve as the sole basis for punishing players.
- The model sees only view rotation and attack timing. Movement, target geometry and client state are not available to it, so cheats whose effect is not visible in rotation and attack timing are outside its scope.
- Aim assistance modules and trigger-only modules are outside the intended scope. Detection of these classes is expected to be low.
- The operating point favours a low false positive rate over recall. Lowering the threshold increases detection at the cost of false positives. Such operating points were not evaluated.
- Input data is expected with one row per client tick, as received by the server. Behaviour on resampled data, on non-vanilla tick rates and on input devices or play styles absent from the training data is not characterised.
License
The model weights, the metadata and the shardac package are released under the Apache License 2.0.
