Learning minimal representations of fermionic ground states