We report two artificial-language-learning experimentsinvestigating if the acquisition of sociolinguistic associations isfacilitated by two kinds of expectation violation: encounteringa variant (a) for the first time or (b) in an ungrammaticalcontext. Participants learned an artificial language with twodialects, each spoken by one of two alien species: Gulusand Norls. The two dialects differed with regard to a pluralsuffix: Gulus mostly used -dup, and Norls mostly used -nup.In the first learning phase, participants learned the languagewithout aliens; in the second learning phase, they wereexposed to it with alien interlocutors. In Experiment 1 wemanipulated whether -nup occurred in the first learning phase;in Experiment 2 we manipulated linguistic constraints on itsoccurrence. The acquisition of sociolinguistic association wasevaluated by asking participants to select suffixes given aliensand vice versa. We found that sociolinguistic acquisitionwas facilitated in Experiment 1, but not Experiment 2. InExperiment 2, however, a post hoc analysis revealed thatparticipants who had learned the grammatical context of thelinguistic conditioning did experience facilitation, while thosewho had not did not. Our results provide laboratory evidencethat unexpectedness facilitates the learning of sociolinguisticvariation.