Implement a sparse representation for intermediate results by only storing edges between nodes that are actually connected in the computation. This can significantly reduce memory usage while maintaining efficient computation of derivatives during back-propagation.