- The company gives the rights back voluntarily. If you are still on good terms with the company, it's possible they may work something out with you. They may even allow you to exploit the software in return for a cut of your profits. Or perhaps they'll simply sell it back at a reduced price. You won't know until you ask. And whatever you agree upon, get it in writing, of course.
- The agreement you signed provides for some method of reversion. Occasionally, an assignment provides for reversion of rights. This is rare because assignments, by their nature, are permanent transfers. But occasionally, a patent or a copyright assignment permits the assignor to re-acquire rights if certain conditions are met -- for example, the assignee stops exploiting the work, or the assignor buys it back for an agreed-upon fee. In any case, you should review the agreement in case it does include a reversion provision. (By the way, there may be confusing tax implications if an assignor reclaims rights after categorizing the assignment payment as capital gains and not as ordinary income.)
- The employer breached the assignment agreement and you can use that breach as the basis for terminating the assignment. We're not sure if you're ready for this approach as it usually involves litigation, but if you can prove a material breach of the assignment agreement, the rights may be re-assigned to you. You're most likely to achieve this outcome if you can demonstrate that the company induced you to enter the agreement based on fraud. You may also be able to argue that the company materially breached the agreement and failed to cure the breach -- for example, never paid royalties or provided accountings. But this is a tough strategy to implement because a court faced with a failure to pay royalties may allow the company to retain the ownership, provided that damages are paid to the assignor (you).
Keep in mind that if you do get the rights back, you'll also need the cooperation of the company in registering the assignment (whether it is copyright or patent rights) and in transferring rights back to you.