AttAvg impl