Sean Gallup / Getty Images

For Ruchi Garg, it was time to go back to work.

The software programmer had been out of the workforce for nine years after multiple moves and a few kids.

After reading a book called "Back on the Career Track," she reached out to one of the authors, Carol Fishman Cohen. They struck up a relationship and Cohen, who is also the CEO of career reentry firm iRelaunch, got in touch with Garg about an internship program IBM was trying out to get women back in the workforce after career breaks. Garg felt the time was right.

"At one point I was like, 'enough is enough,' and that took me nine years to really get to that place where I really want to go back to work," Garg said.

Garg isn't a rare case. An oft-cited 2008 study from The Harvard Business Review put numbers to the startling trend of women in the science, technology, engineering and mathematics fields (also known as STEM) leaving midcareer. Fifty-two percent of women lower on the corporate ladder quit their jobs. The report found that this was most common when women are in their mid- to late thirties.

There are a number of reasons why that happens, including workplace culture, or a pileup of family responsibilities, which tend to fall disproportionately on women. Though not all of these women have sworn off working in tech, a problem arises when they've been out of the workforce for a few years or even a decade and want to rejoin.

Now, companies like IBM are turning attention to that midcareer exit as a part of their broader efforts to increase diversity.

In IBM's case, its Tech Re-Entry Program is a 12-week internship that kicks of with a three-day orientation, followed by a placement in one of IBM's different businesses.

Participants get a mentor and work on an actual project, whether it's in data analytics or programming. The idea is that the program can create a smooth transition for its interns, get them up to speed and give managers a chance to see the interns' work before hiring them.

"Most employers don't look kindly on the fact that someone has not been doing work and someone has taken a career break for 15 to 20 years," said Jennifer Howland, who leads IBM's program.

Confidence is a big issue all around— an employer might not think a candidate can do the job. Or the candidate might not think they can jump back into the industry after so much time has elapsed.

While a software programmer might have 10 years of experience, a decade break might mean there are languages they've never worked with before.

IBM isn't the first to tune into this particular problem. Cohen said similar programs originally came out of the financial sector. Goldman Sachs launched its program in 2008. In the following decade, companies like MetLife, JP Morgan, Credit Suisse, and Morgan Stanley rolled out programs as well.

iRelaunch, Cohen's firm that worked with IBM on its program, has worked with other companies like Intel and General Motors through a career reentry initiative iRelaunch co-leads with the Society of Women Engineers. PayPal, in partnership with a nonprofit agency called Path Forward, also has an internship program for women restarting their careers.

While hiring someone after a long hiatus could be a risk for employers, Howland and Cohen argue there are other advantages. Cohen said post-career break, people are less likely to take maternity leave or relocate for a spouse's job, partly due to life stages.

Plus, it's another potential talent pool to draw from.

"There is a very known, severe shortage of diverse technical talent in the IT industry around the world," Howland said. "We can't sit back and wait for diverse technical talent to come find us."

Now Garg is a data analyst at the Weather Company in Atlanta, which is owned by IBM. She's gotten additional technical certifications and said that while she knew she'd want to get a master's degree, being back in the field and in a professional setting is helping her figure out what exactly she wants to study.

IBM's Tech Re-Entry Program is on its third cohort of interns having graduated more than 30 so far. Howland said the company wants to branch out to other countries and plans on doing the program about once a year.

Solving for XX: The tech industry seeks to overcome outdated ideas about "women in tech."

The Smartest Stuff: Innovators are thinking up new ways to make you, and the things around you, smarter.