Product attributes are terms. You would use ‘term_’.$attribute->term_id.
I’m not exactly sure how to get the ID
What is in $product_attribute
, seems to be an array, try adding this to the loop and see if the ID is in there
echo '<pre>'; print_r($product_attribute); echo '</pre>';