A convolution operator over a 1D tensor (BxCxL), where a list of neighbors for each element is provided through a indices tensor (LxK), where K is the size of the convolution kernel. Each row of indices specifies the indices of the K neighbors of the corresponding element in the input. A -1 is handled like for zero padding.
Note that the neighbors specified in indices are not relative, but rather absolute. They have to be specified for each of the elements of the output.
A use case is for convolutions over non-square lattices, such as images on hexagonal lattices coming from Cherenkov telescopes (http://www.isdc.unige.ch/%7Elyard/FirstLight/FirstLight_slowHD.mov).
Example:
import torch
# a 1D input of 5 elems
input = torch.randn(1,1,5)
# this specifies the indices of neighbors for
# each elem of the input (a 3 elem kernel here)
# A -1 corresponds to zero-padding
indices = torch.ones(5,3).type(torch.LongTensor)
weight = torch.randn(1,1,3)
bias = torch.randn(1)
output = torch.nn.functional.indexed_conv(input, indices, weight, bias)