This might be personification, but I don't get "profound attraction to ugliness". What ugliness does it mean? Sorry it's from a grammar material, and it lacks the context.
ex) Attached to a mother that only a son could love, Jerry, the newborn, suckling pig, felt a profound attraction to ugliness come over him.
"A mother that only a son could love" means that the mother was so unappealing in some way, that only her own son could feel love for her. In this case the suggestion is that the mother pig was particularly ugly and yet her son felt a strong attraction to her, not despite her ugliness but because of it. I think this is clearly a lighthearted personification as I'm sure a suckling pig couldn't care less what its mother looked like, it just wants to have a feed.
not a teacher