Millennials may be more savvy about saving for retirement than you think.
A new study by Vanguard, titled "The Auto Savings Generation: Steering Millennials to Better Retirement Outcomes," shows that, compared with young workers a decade ago, millennials (ages 18 to 34) have higher rates of participation, savings and stock allocations in their 401(k) plans. Key to the gains are regulatory changes that caused a shift both in how companies enroll workers and what investment options they offer.
"We're [moving] from an era where individuals had to figure out how to construct a portfolio on their own to one where participation and savings is happening automatically," said Jean Young, the study's author and a senior research analyst with the Vanguard Center for Retirement Research.
"Millennials are the first generation to potentially be subjected to automatic enrollment [in 401(k)s] throughout their working careers," Young said. "And they are taking advantage of professionally managed portfolios, like target-date funds."
The Pension Protection Act of 2006 did a couple major things. For one, it made it easier for companies to automatically enroll workers in their retirement plans. In 2003, just 1 percent of companies had auto enrollment, according to Vanguard. Ten years later that figure had jumped to 40 percent.
The law also gave companies permission to offer target-date funds as the default investment option for workers who don't pick investments.
Read MoreGen Y needs to plan retirement now
Before that, many default options were money market funds or similar investments, which typically come with low returns. While considered safe, those funds often barely outpace inflation.
Target-date funds, meanwhile, automatically shift when you are young from aggressive investments, such as stocks — which come with the potential for higher returns — to more conservative ones, such as cash and bonds, the closer you get to retirement.
Vanguard's study also compared older generations' workplace savings rate to workers who were their age in 2003. And while all age groups showed an improvement over that decade, millennials showed the strongest gains.
In 2003, about half of workers age 18 to 34 participated in available 401(k) plans. In 2013, in voluntary-enrollment plans that rose to 60 percent. But in auto-enrollment plans it reached 87 percent.
"Enrolling is easy to put off if you are in a voluntary [plan]," Young said. "But when it's done for you, you have to actually say, 'I know I should be doing this, but I'm not going to.'"
Part of the high rate of auto enrollment is due to the fact that millennials tend to switch jobs every couple of years, and many employers automatically enroll new hires only.
Moreover, in 2013 millennials' average deferral rate — how much of their pretax salary they steer to their 401(k) — was 3.6 percent in voluntary enrollment plans and 4.2 percent in auto-enrollment plans, which is a jump from the 3.1 percent average contribution rate in 2003 for workers who were then ages 18 to 34. Those figures take into account workers who are eligible to participate in their 401(k) but do not (a zero contribution rate).
"As a group, millennials are saving more than their same-age cohorts 10 years ago," Young said.
Read MoreAre target-date funds on the mark?
However, their participation and deferral rates still lag behind older generations.
For instance, Vanguard's study shows that 73 percent of Gen Xers (ages 35 to 49) voluntarily enroll in their 401(k) plans, compared with 60 percent of millennials. Both early boomers (ages 60 to 69) and late boomers (ages 50 to 59) both show a 77 percent voluntary enrollment rate.
Additionally, the deferral rates are higher for older generations. Again including eligible workers who contribute zero to their 401(k), Gen Xers have an average 5.1 percent deferral rate in voluntary plans and 5.7 percent rate if they were automatically enrolled. Baby boomers are socking away even more.
Cynthia Meyer, a certified financial planner with Financial Finesse, said millennials' interaction with 401(k)s is not ideal. Her company defines millennials as those ages 18 to 30.
"Like many 20-somethings, they aren't so focused on the long term," Meyer said. "They're more financially savvy than their parents … but as a whole, they are saddled with student loans.
"They also are big consumers and have high levels of credit card debt," she added.
A 2014 survey conducted by Financial Finesse showed that the top three financial priorities for millennials are managing cash flow (76 percent), getting out of debt (59 percent) and retirement planning (56 percent).
"They are more focused on reducing debt and making ends meet on a day-to-day basis," she said.
Steve Burkett, a CFP with Palisade Investments who advises small businesses on their 401(k) plans, sees a mix of participation rates among millennials.
"Some are high-wage earners and don't have family responsibilities, marriage or own houses, so they are maxing out their savings," Burkett said. "But the vast majority are struggling with student loan debt and contribute just to get company matches."
He added that there also are millennials who simply don't contribute, because retirement is so far away.
But, Burkett said, he thinks millennials are more financially knowledgeable than older generations.
"It's from the collective wisdom of the ages," he said. "You learn from what's been learned before. They also are very tech-savvy and feel very comfortable doing [investment] research online."
Burkett also said that millennials have an advantage over older generations when it comes to 401(k)s.
"I think they have the benefit of lower costs, better default options and better investment strategies," he said. "It's easier for them to invest smartly from day one."
—By Sarah O'Brien, special to CNBC.com