TL;DR - exclusive breastfeeding: 6 months, partial breast-feeding: 12 months or longer
Well, since you asked about research papers, here they are.
The optimal duration of exclusive breastfeeding: a systematic review. (abstract) (2004)
Based on the results of this review, the World Health Assembly adopted a resolution to recommend exclusive breastfeeding for 6 months to its member countries.
I did not find a study that explicitly aims to establish when to stop breast feeding completely. However there is a number of articles that research connection between length of breast feeding and various development and health parameters.
All of the ones I found relevant clearly show that it is beneficial to partly breast-feed a child at least up to 12 months. Sources, links and summaries are below.
Breast feeding and cognitive development at age 1 and 5 years [PDF] (2001):
Children breast fed for less than
3 months had an increased risk, compared
to children breast fed for at least 6
months, of a test score below the median
value of MDI at 13 months and of
Preschool and Primary Scales of Intelligence) at 5 years.
Duration of Breastfeeding and Risk of Overweight: A Meta-Analysis (Sep. 2005)
the duration of breastfeeding was inversely associated with the risk of overweight (regression coefficient = 0.94, 95% confidence interval (CI): 0.89, 0.98). Categorical analysis confirmed this dose-response association (<1 month of breastfeeding: odds ratio (OR) = 1.0, 95% CI: 0.65, 1.55; 1–3 months: OR = 0.81, 95% CI: 0.74, 0.88; 4–6 months: OR = 0.76, 95% CI: 0.67, 0.86; 7–9 months: OR = 0.67, 95% CI: 0.55, 0.82; >9 months: OR = 0.68, 95% CI: 0.50, 0.91). One month of breastfeeding was associated with a 4% decrease in risk (OR = 0.96/month of breastfeeding, 95% CI: 0.94, 0.98).
Breast feeding and obesity: cross sectional study (1999)
A clear dose-response effect was identified for the duration of breast feeding on the prevalence of obesity: the prevalence was 3.8% for 2 months of exclusive breast feeding, 2.3% for 3-5 months, 1.7% for 6-12 months, and 0.8% for more than 12 months.