Automatic attribute selection