When loading a benchmark, is the half_models trained with the training samples whose indices are presented in groundtruth in the benchmark? According to the paper, I think the answer is no.
Across all settings, we pre-train 100 models for LDS calculation on a random half-dataset controlled by a fixed random seed generation procedure. The first 50 models are used in our benchmark experiments to assemble and compute the attribution scores. For example, TRAK and TracIn can utilize multiple models to improve their performance on the same task. The last 50 models are used for LDS calculation, which requires several models that are trained on a portion of the original training dataset.
Then is there a way to get the training data used to train the first 50 models (the ones used in the benchmark experiments to assemble and compute the attribution scores), that is the 50 half models contained in a benchmark?
Below is how I found the mismatch, just in case I did something wrong:
For example, if I load the benchmark as follows:
from dattri.benchmark.load import load_benchmark
model_details, groundtruth = load_benchmark(
model="mlp", dataset="mnist", metric="lds"
)
There are 50 half models in model_details, and the second tensor in groundtruth has 50 rows, where "each row refers to the indices of the training samples used to retrain the model" according to this documentation. Was the ith half model trained with the training samples on the ith row in groundtruth? I tried to compare them, and it seems that they don't match. The following is how I tested this:
First load the test data:
eval_test_loader = DataLoader(
model_details["test_dataset"],
batch_size=8,
sampler=model_details["test_sampler"],
shuffle=False
)
Then manually compute the target values for the test data using ith half model:
model_details['target_func'](model_details['models_half'][i], eval_test_loader)
Then compare it with the ith row of target values contained in groundtruth
And it turned out these two are not the same.
Thank you for your help!
When loading a benchmark, is the
half_modelstrained with the training samples whose indices are presented ingroundtruthin the benchmark? According to the paper, I think the answer is no.Then is there a way to get the training data used to train the first 50 models (the ones used in the benchmark experiments to assemble and compute the attribution scores), that is the 50 half models contained in a benchmark?
Below is how I found the mismatch, just in case I did something wrong:
For example, if I load the benchmark as follows:
There are 50 half models in
model_details, and the second tensor ingroundtruthhas 50 rows, where "each row refers to the indices of the training samples used to retrain the model" according to this documentation. Was theithhalf model trained with the training samples on theithrow ingroundtruth? I tried to compare them, and it seems that they don't match. The following is how I tested this:First load the test data:
Then manually compute the target values for the test data using
ithhalf model:Then compare it with the
ithrow of target values contained ingroundtruthAnd it turned out these two are not the same.
Thank you for your help!