Learning internal functions