beol memory cells are described that include one or more sidewall protection layers on the memory device deposited prior to interconnect via etching to prevent the formation of electrical shorts between layers . one embodiment uses a single layer sidewall protection sleeve that is deposited after the memory device has been patterned . the layer material is vertically etched down to expose the upper surface of the top electrode while leaving a residual layer of protective material surrounding the rest of the memory device . the material for the protection layer is selected to resist the etchant used to remove the first dielectric material from the via in the subsequent interconnect process . a second embodiment uses dual - layer sidewall protection in which the first layer covers the memory element is preferably an oxygen - free dielectric and the second layer protects the first layer during via etching . in either the first or second embodiments a single layer or a dual layer etch stop layer structure can be deposited over the wafer after the sidewall protection sleeve has been formed and before the inter - layer dielectric is deposited .