We report here a ZrO2−x/ZrO2-based bilayer resistive switching memory with unique properties that enables the selection of the switching mode by applying different electroforming current compliances. Two opposite polarity modes, positive bipolar and negative bipolar, correspond to the switching in the ZrO2 and ZrO2−x layer, respectively. The ZrO2 layer is proved to be responsible for the negative bipolar mode which is also observed in a ZrO2 single layer device. The oxygen deficient ZrO2−x layer plays the dominant role in the positive bipolar mode, which is exclusive to the bilayer memory. A systematic investigation of the ZrO2−x composition in the bilayer memory suggests that ZrO1.8 layer demonstrates optimum switching performance with low switching voltage, narrow switching voltage distribution and good cycling endurance. An excess of oxygen vacancies, beyond this composition, leads to a deterioration of switching properties. The formation and dissolution of the oxygen vacancy filament model has been proposed to explain both polarity switching behaviours and the improved properties in the bilayer positive bipolar mode are attributed to the confined oxygen vacancy filament size within the ZrO2−x layer.