Machine learning informed layer tracing