Learning by examples, which learns to solve a new problem by looking into how similar problems are solved, is an effective learning method in human learning. When a student learns a new topic, he/she finds out exemplar topics that are similar to this new topic and studies the exemplar topics to deepen the understanding of the new topic. We aim to investigate whether this powerful learning skill can be borrowed from humans to improve machine learning as well. In this work, we propose a novel learning approach called Learning By Examples (LBE). Our approach automatically retrieves a set of training examples that are similar to query examples and predicts labels for query examples by using class labels of the retrieved examples. We propose a three-level optimization framework to formulate LBE which involves three stages of learning: learning a Siamese network to retrieve similar examples; learning a matching network to make predictions on query examples by leveraging class labels of retrieved similar examples; learning the ``ground-truth'' similarities between training examples by minimizing the validation loss. We develop an efficient algorithm to solve the LBE problem and conduct extensive experiments on various benchmarks where the results demonstrate the effectiveness of our method on both supervised and few-shot learning.
翻译:通过实例学习,通过研究类似问题的解决,学会解决一个新问题,是人类学习中的一种有效的学习方法。当一个学生学习一个新课题时,他/她发现与这一新课题相似的示范性专题,并研究示范性专题以加深对新课题的理解。我们的目的是调查是否可以从人那里借用这种强大的学习技能来改进机器学习。在这项工作中,我们建议一种叫作“从实例学习”的新颖的学习方法。我们的方法自动检索一套与查询实例相似的培训范例,并预测通过使用已检索实例的类别标签来标出查询示例的标签。我们提出了一个三级优化框架来制定LBE,这涉及三个阶段的学习阶段:学习一个暹米网络来检索类似的例子;学习一个匹配网络,通过利用已检索的类类类标签来预测查询实例;通过尽量减少验证损失来学习“地面-真相”训练实例之间的相似之处。我们开发了一种有效的算法来解决LBE问题,并在各种基准上进行广泛的实验,其中对结果进行监督地学习。