In some pattern recognition applications, objects are represented by attributed graphs, in which nodes represent local parts of the objects and edges represent relationships between these local parts. In this framework, the comparison between objects is performed through the distance between attributed graphs. Usually, this distance is a linear equation defined by some cost functions on the nodes and on the edges of both attributed graphs. In this paper, we present an online, active and interactive method for learning these cost functions, which works as follows. Graphs are provided to the learning algorithm by pairs in a sequential order (online). Then, a correspondence between them is computed,