The medical specialty that is concerned with mental processing behind behavior and consciousness is psychology.