Skip to content

What training samples were used to train half_models in a benchmark #189

@Crabtain959

Description

@Crabtain959

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

groundtruth[0][i]

And it turned out these two are not the same.

Thank you for your help!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions