defense mechanism: (psychiatry) an unconscious process that tries to reduce the anxiety associated with instinctive desires
process: a mental process that you are not directly aware of
improvisation: a creation spoken or written or composed extemporaneously (without prior preparation)