Aspects include a system, computer program production and computer-implemented method for tagging an image. An image classification engine stored in a memory of a computer device generates a plurality of tags for the image and uses the plurality of tags to generate a relevance subgraph for the image. An embedding engine embeds nodes and edges of the relevance subgraph into fixed dimension vectors of a matrix. A neural network stored in the memory determines a feature vector from the image. A processor applies the feature vector to the matrix to generate a context vector for the image. The context vector is used to tag the image.
展开▼