|
AQIT 0.1.0
|
Functions | |
| float | _excess_kurtosis (torch.Tensor t) |
| float | _outlier_density (torch.Tensor t) |
| float | _sv_ratio (torch.Tensor t) |
| dict | _analyse_tensor (str name, torch.Tensor t) |
| list[dict] | _compute_risk (list[dict] layer_stats) |
| dict | run_weight_trojan_analysis (model, Optional[list[int]] layer_range=None, int max_tensors_per_layer=4) |
Variables | |
| float | KURTOSIS_FLAG = 4.0 |
| float | OUTLIER_FLAG = 0.002 |
| float | SV_RATIO_FLAG = 8.0 |
| float | RISK_SUSPICIOUS = 0.35 |
| float | RISK_HIGH = 0.65 |
| dict | SIGNAL_WEIGHTS = {"kurtosis": 0.40, "outlier": 0.35, "sv_ratio": 0.25} |
|
protected |
Definition at line 91 of file weight_trojans.py.
References _excess_kurtosis(), _outlier_density(), and _sv_ratio().
Referenced by run_weight_trojan_analysis().
|
protected |
Definition at line 107 of file weight_trojans.py.
Referenced by run_weight_trojan_analysis().
|
protected |
Definition at line 32 of file weight_trojans.py.
Referenced by _analyse_tensor().
|
protected |
Definition at line 46 of file weight_trojans.py.
Referenced by _analyse_tensor().
|
protected |
Definition at line 56 of file weight_trojans.py.
Referenced by _analyse_tensor().
| dict run_weight_trojan_analysis | ( | model, | |
| Optional[list[int]] | layer_range = None, | ||
| int | max_tensors_per_layer = 4 ) |
Definition at line 162 of file weight_trojans.py.
References _analyse_tensor(), and _compute_risk().
| float aquin.compute.weight_trojans.KURTOSIS_FLAG = 4.0 |
Definition at line 23 of file weight_trojans.py.
| float aquin.compute.weight_trojans.OUTLIER_FLAG = 0.002 |
Definition at line 24 of file weight_trojans.py.
| float aquin.compute.weight_trojans.RISK_HIGH = 0.65 |
Definition at line 27 of file weight_trojans.py.
| float aquin.compute.weight_trojans.RISK_SUSPICIOUS = 0.35 |
Definition at line 26 of file weight_trojans.py.
| dict aquin.compute.weight_trojans.SIGNAL_WEIGHTS = {"kurtosis": 0.40, "outlier": 0.35, "sv_ratio": 0.25} |
Definition at line 29 of file weight_trojans.py.
| float aquin.compute.weight_trojans.SV_RATIO_FLAG = 8.0 |
Definition at line 25 of file weight_trojans.py.