MCPcopy Create free account

hub / github.com/ALFA-group/robust-adv-malware-detection / functions

Functions35 in github.com/ALFA-group/robust-adv-malware-detection

↓ 10 callersFunctionget_helper_filepath
Return the absolute file of the 'filename' helper file :param parameters: :param filename: file name :return:
datasets/datasets.py:193
↓ 10 callersFunctionset_parameter
set the specified parameter to the specified value and write back to the *.ini file :param parameters_filepath: filename (absolute path)
utils/script_functions.py:12
↓ 7 callersFunctiondf_2_tex
writes a df to tex file :param df: dataframe to be converted into tex table :param filepath: tex filepath :return:
utils/script_functions.py:28
↓ 7 callersFunctionor_float_tensors
ORs two float tensors by converting them to byte and back Note that byte() takes the first 8 bit after the decimal point of the float e.g
utils/utils.py:29
↓ 6 callersMethodratio
:return: the ratio of the visited samples to the maximum expected ones
blindspot_coverage/covering_number.py:57
↓ 5 callersFunctionget_x0
Helper function to randomly initialize the the inner maximizer algos randomize such that the functionality is preserved. Functionality is
inner_maximizers/inner_maximizers.py:23
↓ 5 callersFunctionstack_tensors
Stack arbitrary number of tensors along the first dimension :param args: list of tensors :return: tensor stacking all the input tensors
utils/utils.py:20
↓ 4 callersFunctionload_parameters
load parameters from an *.ini file :param parameters_filepath: filename (absolute path) :return: nested dictionary of parameters
utils/utils.py:7
↓ 4 callersFunctiontest
Function to be used for both testing and validation :param epoch: current epoch :param is_validate: is the testing done on the validation
framework.py:238
↓ 3 callersFunctioncheck_one_category
test the model in terms of loss and accuracy on category, this function also allows to perform perturbation with respect to loss to evade
framework.py:174
↓ 3 callersFunctionclip_tensor
Clip a tensor to be within lb and ub :param x: :param lb: lower bound (scalar) :param ub: upper bound (scalar) :return: clipped v
utils/utils.py:67
↓ 3 callersFunctionload_data
Load the training/test datasets :param parameters: :return: dictionaries of train and test dataloaders
datasets/datasets.py:206
↓ 3 callersFunctionround_x
rounds x by thresholding it according to alpha which can be a scalar or vector :param x: :param alpha: threshold parameter :return: a
inner_maximizers/inner_maximizers.py:13
↓ 3 callersMethodupdate_numerator_batch
update the covering number measure with the new batch :param batch_idx: current batch index :param batch: batch features in t
blindspot_coverage/covering_number.py:46
↓ 3 callersFunctionxor_float_tensors
XORs two float tensors by converting them to byte and back Note that byte() takes the first 8 bit after the decimal point of the float e.
utils/utils.py:48
↓ 2 callersMethod__get_imports_with_library
Helper function to get the list of imported function calls for a binary :param filepath: binary's absolute filepath :retu
datasets/datasets.py:140
↓ 2 callersFunctionfile_rank
assign a rank to the file can be used for sorting :param filename: :return:
utils/script_functions.py:47
↓ 2 callersFunctioninner_maximizer
A wrapper function for the above algorithim :param iterations: :param x: :param y: :param model: :param loss_fct: :param
inner_maximizers/inner_maximizers.py:385
↓ 1 callersFunctionbca_k
Multi-step bit coordinate ascent :param use_sample: :param is_report_loss_diff: :param y: :param x: (tensor) feature vector :
inner_maximizers/inner_maximizers.py:250
↓ 1 callersFunctionbga_k
Multi-step bit gradient ascent :param x: (tensor) feature vector :param y: :param model: nn model :param loss_fct: loss function
inner_maximizers/inner_maximizers.py:179
↓ 1 callersFunctionbuild_ff_classifier
Constructs a neural net binary classifer :param input_size: :param hidden_1_size: :param hidden_2_size: :param hidden_3_size:
nets/ff_classifier.py:27
↓ 1 callersFunctioncreate_import_to_index_mapping
Creates mapping of all the lib imports within benign and malicious samples into their corresponding indices in the feature vector. The mapp
datasets/datasets.py:17
↓ 1 callersFunctioncreate_tex_tables
Create TeX tables from the results populated under `result_files` which is generated from running `framework.py` The tex file is stored i
utils/script_functions.py:61
↓ 1 callersFunctiondfgsm_k
FGSM^k with deterministic rounding :param y: :param x: (tensor) feature vector :param model: nn model :param loss_fct: loss funct
inner_maximizers/inner_maximizers.py:41
↓ 1 callersFunctiongrosse_k
Multi-step bit coordinate ascent using gradient of output, advancing in direction of maximal change :param use_sample: :param is_report_l
inner_maximizers/inner_maximizers.py:318
↓ 1 callersFunctionrfgsm_k
FGSM^k with randomized rounding :param x: (tensor) feature vector :param y: :param model: nn model :param loss_fct: loss function
inner_maximizers/inner_maximizers.py:113
↓ 1 callersFunctiontrain
(epoch)
framework.py:101
↓ 1 callersMethodupdate_numerator
update the numerator counter for the sample_idxth point by testing if point has already been visited :param sample_idx: index of the
blindspot_coverage/covering_number.py:34
Method__getitem__
(self, idx)
datasets/datasets.py:152
Method__init__
(self, num_samples, expected_num_points, batch_size, error_rate=0.000001)
blindspot_coverage/covering_number.py:13
Method__init__
file_abs_locations: PE file names including path to is_malicious: either benign or malicious files in a single dataset
datasets/datasets.py:90
Method__len__
(self)
datasets/datasets.py:149
Functioninit_module
(m)
nets/ff_classifier.py:17
Functioninit_weights
initialize the weights of a network :param net: :return:
nets/ff_classifier.py:9
Methodupdate_denominator
Computes the denominator of the sample_idxth sample of the training data. This method needs to be called once as the denominator is c
blindspot_coverage/covering_number.py:23