baiksung / MeTAL

Official PyTorch implementation of "Meta-Learning with Task-Adaptive Loss Function for Few-Shot Learning" (ICCV2021 Oral)
62 stars 13 forks source link

naming confuse from code to paper, and outer-loop procedure. #2

Closed leeeizhang closed 2 years ago

leeeizhang commented 2 years ago

MeTAL is an inspiring effort for meta learning !!

I want to understand some details in your work:

  1. Is the generated_alpha_params and generated_beta_params represent the \gamma and \beta for affine transformation in https://github.com/baiksung/MeTAL/blob/master/inner_loop_optimizers.py#L137
  2. Can I understand your update for meta-learner as:
    • In inner-loop, the base-model will be trained with adaptive loss generated by \gamma and \beta from meta-learner;
    • In the outer-loop, the query set will be used to check the performance of the base-model from the inner-loop, and these losses will be used to update the meta-learner to generate more generalization loss.
  3. Suppose my comprehension of your work is proper. Could you answer one of my puzzles: when use the same task dataset for the inner and outer loop update, is it a cheat for meta-learner to generate robust and generalized parameters for the inner-loop to perform well? Just like giving the validation dataset for the model to train.

Thanks for your work again!! I am looking forward to your reply!

baiksung commented 2 years ago

Hi, thanks for the interest in our paper.

  1. The generated_alpha_params and generated_beta_params are the components of ALFA, which is my previous work. The affine transformation parameters for adaptive loss are generated by LossAdapter for labeled support examples at https://github.com/baiksung/MeTAL/blob/7973bf5461a018966066fdefcbe1693ccb4f6a72/few_shot_learning_system.py#L416 and for unlabeled query examples at https://github.com/baiksung/MeTAL/blob/7973bf5461a018966066fdefcbe1693ccb4f6a72/few_shot_learning_system.py#L419. The generated affine transformation parameters are fed into a meta-loss network for support examples at https://github.com/baiksung/MeTAL/blob/7973bf5461a018966066fdefcbe1693ccb4f6a72/few_shot_learning_system.py#L417 and for query examples at https://github.com/baiksung/MeTAL/blob/7973bf5461a018966066fdefcbe1693ccb4f6a72/few_shot_learning_system.py#L420.

  2. The first point is addressed in the response above. And the second point seems correct.

  3. I'm not sure if I understood your question correctly. Are you asking if it is correct to use the same data (support and query sets) for the given task? If so, it is ok as long as you don't use the labels for query sets since the query set is used to evaluate the generalization performance of the meta-learning algorithms. The semi-supervised inner-loop optimization proposed in this work utilizes unlabeled query examples (that is, without accessing the labels for query examples) for better adaptation. The setting that exploits the relationship between labeled and unlabeled examples is transductive setting and has been explored in many metric-based meta-learning algorithms for high performance (e.g., TPN). Hence, it is not a cheating but rather you can think of it as a form of semi-supervised learning. If you are interested in how MeTAL behaves when using unlabeled examples that are distinct from query examples, you can refer to Section C in our supplementary document.

Hope this clarifies! :)

leeeizhang commented 2 years ago

thanks a lot for your explication about semi-supervise part I confused. we will follows MeTAL you proposed, and wish to see more innovative work your present in near future.