Self-similarity and quasi-idempotence in neural networks and related dynamical systems