How to implement the transpose of an interpolation

I hope to have a function for transpose of a bilinear / trilinear interpolation. For example,

import torch
import torch.nn.functional as F

x = torch.arange(16).reshape(1, 1, 4, 4).float()
y = torch.arange(16).reshape(1, 1, 2, 2).float()

I hope to have some downsamping function f such that

(F.interpolate(y, size=(4, 4), mode='bilinear') * x).sum(dim=(-2,-1)) = (y * f(x, output_size=(2,2)) ).sum(dim=(-2,-1))

Does such function exist in PyTorch?

Could you describe what the transpose of an interpolation should be?