The Serie A side will pay £4.3million up front with a further £1.7million in add-ons dependent on European qualification
Liverpool have also included a 30% sell-on clause in the deal.
Alberto, a signing by former manager Brendan Rodgers, failed to establish himself at Anfield after arriving for £6.8million three years ago and made just 12 appearances in his maiden season.
The 23-year-old Spaniard spent the last two campaigns on loan at Malaga and Deportivo La Coruna.