Skip to content

Commit

Permalink
cleaned up files (working) and created the results folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Anne Tumlin committed Oct 9, 2024
1 parent ba9ce08 commit e352dc9
Show file tree
Hide file tree
Showing 12 changed files with 81 additions and 62 deletions.
Binary file removed code/nnv/Toy_TanSig/Engine_Toy_Tansig_net.mat
Binary file not shown.
33 changes: 0 additions & 33 deletions code/nnv/Toy_TanSig/reach.m

This file was deleted.

11 changes: 4 additions & 7 deletions code/nnv/examples/Submission/ICAIF24/adult_verify.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,14 @@
clear; clc;
modelDir = './adult_onnx'; % Directory containing ONNX models
onnxFiles = dir(fullfile(modelDir, '*.onnx')); % List all .onnx files
onnxFiles = onnxFiles(1); % simplify for debugging

load("./data/adult_data.mat", 'X', 'y'); % Load data once

% Initialize results storage
results = {};

% List of models to process
modelList = {'AC-1', 'AC-4', 'AC-5', 'AC-10', 'AC-3','AC-11','AC-12'};
% modelList = {'AC-11'};

modelList = {'AC-1', 'AC-4', 'AC-3'};

%% Loop through each model
for k = 1:length(onnxFiles)
Expand Down Expand Up @@ -148,9 +145,9 @@

time(i,e) = toc(t); % store computation time

if ~(temp == 1)
counterExs = getCounterRegion(IS,unsafeRegion,net.reachSet{end});
end
% if ~(temp == 1)
% counterExs = getCounterRegion(IS,unsafeRegion,net.reachSet{end});
% end

% Check for timeout flag
if evalin('base', 'timeoutOccurred')
Expand Down
3 changes: 1 addition & 2 deletions code/nnv/examples/Submission/ICAIF24/bank_verify.m
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,7 @@
reachOptions.reachMethod = 'exact-star';

% ADJUST epsilons value here
% epsilon = [0.0,0.02,0.03,0.05,0.07,0.1];
epsilon = [0.0];
epsilon = [0.0,0.02,0.03,0.05,0.07,0.1];
% -1 -> no perturbation to model
% 0.0 -> counterfactual fairness (flips sensitive attribute)
% >0.0 -> individual fairness (flips SA w/ perturbation of numerical features)
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Model,Epsilon,FairPercent,NonFairPercent,UnknownPercent,TotalTime,AvgTime
AC-1.onnx,0.000000,88.000000,12.000000,0.000000,0.708526,0.007085
AC-1.onnx,0.020000,82.000000,18.000000,0.000000,1.032243,0.010322
AC-1.onnx,0.030000,69.000000,31.000000,0.000000,1.219554,0.012196
AC-1.onnx,0.050000,58.000000,42.000000,0.000000,1.588040,0.015880
AC-1.onnx,0.070000,41.000000,59.000000,0.000000,2.171194,0.021712
AC-1.onnx,0.100000,14.000000,86.000000,0.000000,2.957229,0.029572
AC-3.onnx,0.000000,91.000000,9.000000,0.000000,0.624592,0.006246
AC-3.onnx,0.020000,84.000000,16.000000,0.000000,3.280027,0.032800
AC-3.onnx,0.030000,77.000000,23.000000,0.000000,5.074863,0.050749
AC-3.onnx,0.050000,61.000000,39.000000,0.000000,10.672126,0.106721
AC-3.onnx,0.070000,50.000000,50.000000,0.000000,16.682630,0.166826
AC-3.onnx,0.100000,13.000000,87.000000,0.000000,39.068776,0.390688
AC-4.onnx,0.000000,91.000000,9.000000,0.000000,0.690791,0.006908
AC-4.onnx,0.020000,80.000000,20.000000,0.000000,5.261745,0.052617
AC-4.onnx,0.030000,75.000000,25.000000,0.000000,11.272107,0.112721
AC-4.onnx,0.050000,61.000000,39.000000,0.000000,41.112930,0.411129
AC-4.onnx,0.070000,37.000000,63.000000,0.000000,106.287926,1.062879
AC-4.onnx,0.100000,4.000000,96.000000,0.000000,306.876634,3.068766
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Model,Epsilon,FairPercent,NonFairPercent,UnknownPercent,TotalTime,AvgTime
AC-1.onnx,0.000000,89.000000,11.000000,0.000000,0.597936,0.005979
AC-1.onnx,0.020000,84.000000,16.000000,0.000000,0.752556,0.007526
AC-1.onnx,0.030000,81.000000,19.000000,0.000000,0.891781,0.008918
AC-1.onnx,0.050000,69.000000,31.000000,0.000000,1.250838,0.012508
AC-1.onnx,0.070000,50.000000,50.000000,0.000000,1.697729,0.016977
AC-1.onnx,0.100000,22.000000,78.000000,0.000000,2.771931,0.027719
AC-3.onnx,0.000000,87.000000,13.000000,0.000000,0.483064,0.004831
AC-3.onnx,0.020000,84.000000,16.000000,0.000000,2.467884,0.024679
AC-3.onnx,0.030000,82.000000,18.000000,0.000000,4.043998,0.040440
AC-3.onnx,0.050000,71.000000,29.000000,0.000000,8.457965,0.084580
AC-3.onnx,0.070000,50.000000,50.000000,0.000000,16.411845,0.164118
AC-3.onnx,0.100000,27.000000,73.000000,0.000000,41.628040,0.416280
AC-4.onnx,0.000000,88.000000,12.000000,0.000000,0.633633,0.006336
AC-4.onnx,0.020000,83.000000,17.000000,0.000000,3.925292,0.039253
AC-4.onnx,0.030000,79.000000,21.000000,0.000000,8.023037,0.080230
AC-4.onnx,0.050000,71.000000,29.000000,0.000000,33.094677,0.330947
AC-4.onnx,0.070000,43.000000,57.000000,0.000000,82.344672,0.823447
AC-4.onnx,0.100000,4.000000,65.000000,31.000000,163.138754,1.631388
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Model,Epsilon,FairPercent,NonFairPercent,UnknownPercent,TotalTime,AvgTime
BM-5.onnx,0.000000,89.000000,11.000000,0.000000,0.693553,0.006936
BM-5.onnx,0.020000,87.000000,13.000000,0.000000,0.852783,0.008528
BM-5.onnx,0.030000,85.000000,15.000000,0.000000,0.968930,0.009689
BM-5.onnx,0.050000,85.000000,15.000000,0.000000,1.243363,0.012434
BM-5.onnx,0.070000,85.000000,15.000000,0.000000,1.581434,0.015814
BM-5.onnx,0.100000,85.000000,15.000000,0.000000,2.129463,0.021295
BM-6.onnx,0.000000,85.000000,15.000000,0.000000,0.645633,0.006456
BM-6.onnx,0.020000,85.000000,15.000000,0.000000,0.690572,0.006906
BM-6.onnx,0.030000,85.000000,15.000000,0.000000,0.741724,0.007417
BM-6.onnx,0.050000,84.000000,16.000000,0.000000,0.820572,0.008206
BM-6.onnx,0.070000,83.000000,17.000000,0.000000,0.927170,0.009272
BM-6.onnx,0.100000,82.000000,18.000000,0.000000,1.002001,0.010020
BM-7.onnx,0.000000,84.000000,16.000000,0.000000,0.667004,0.006670
BM-7.onnx,0.020000,81.000000,19.000000,0.000000,5.165707,0.051657
BM-7.onnx,0.030000,81.000000,19.000000,0.000000,12.963960,0.129640
BM-7.onnx,0.050000,81.000000,19.000000,0.000000,43.403476,0.434035
BM-7.onnx,0.070000,79.000000,21.000000,0.000000,108.483197,1.084832
BM-7.onnx,0.100000,79.000000,21.000000,0.000000,395.816458,3.958165
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Model,Epsilon,FairPercent,NonFairPercent,UnknownPercent,TotalTime,AvgTime
GC-1.onnx,0.000000,74.000000,26.000000,0.000000,0.726445,0.007264
GC-1.onnx,0.020000,68.000000,32.000000,0.000000,1.792372,0.017924
GC-1.onnx,0.030000,66.000000,34.000000,0.000000,3.178889,0.031789
GC-1.onnx,0.050000,61.000000,39.000000,0.000000,6.203132,0.062031
GC-1.onnx,0.070000,58.000000,42.000000,0.000000,12.992835,0.129928
GC-1.onnx,0.100000,55.000000,45.000000,0.000000,30.632319,0.306323
GC-2.onnx,0.000000,77.000000,23.000000,0.000000,0.704331,0.007043
GC-2.onnx,0.020000,73.000000,27.000000,0.000000,4.499306,0.044993
GC-2.onnx,0.030000,72.000000,28.000000,0.000000,8.998774,0.089988
GC-2.onnx,0.050000,69.000000,31.000000,0.000000,35.603197,0.356032
GC-2.onnx,0.070000,64.000000,36.000000,0.000000,116.153880,1.161539
GC-2.onnx,0.100000,57.000000,43.000000,0.000000,511.699040,5.116990
GC-3.onnx,0.000000,74.000000,26.000000,0.000000,0.510964,0.005110
GC-3.onnx,0.020000,70.000000,30.000000,0.000000,0.547172,0.005472
GC-3.onnx,0.030000,69.000000,31.000000,0.000000,0.582756,0.005828
GC-3.onnx,0.050000,62.000000,38.000000,0.000000,0.624272,0.006243
GC-3.onnx,0.070000,58.000000,42.000000,0.000000,0.686193,0.006862
GC-3.onnx,0.100000,57.000000,43.000000,0.000000,0.755054,0.007551

0 comments on commit e352dc9

Please sign in to comment.