I, Robot is a 2004 sci-fi film directed by Alex Proyas, starring Will Smith, and based on stories by Isaac Asimov. Set in the future where robots serve mankind, it reiterates Asimov's famous three laws of robotics:
1. A robot cannot harm a human or allow a human to be harmed.
2. A robot must obey humans, unless it conflicts with the first law (for example, if one human ordered a robot to kill another, the robot could not follow this directive).
3. A robot will protect itself, unless it conflicts with laws 1 and 2.
Your question is how this film and Asimov's ideas of robotics relate to the school of literature known as naturalism, which is defined by M.H. Abrams as writing in which "a human being exists entirely in the order of nature and does not have a soul nor any mode of participating in a religious or spiritual world beyond nature" (175).
While I think it may be a a stretch to relate I, Robot to the works of naturalist writers like Hardy or Dreiser, I suppose you could see artificial intelligence as the ultimate expression of a soulless being that recognizes no spiritual law and is only grounded in the material (or technological) world. Like many films and books dealing with artificial intelligence and robotics, I, Robot is interested in whether artificial intelligence is capable of self-awareness and sentience. Naturalist writers claimed to be offering a more "realistic" and unvarnished look at existence, and I suppose you could see robots trying to learn and develop consciousness as a more "realistic" way of looking at the world, one free from the prejudices of humanity.
M.H. Abrams. A Glossary of Literary Terms, Sixth Edition.