The context (in a border sense) viewpoint of neural networks is not thought about too much but it leads to a simple best average linear mapping viewpoint of a layer. https://archive.org/details/a-context-based-view-of-deep-neural-networks