| Years Ended December 31, | ||||||||||||
| 2017 | 2016 | 2015 | ||||||||||
| Domestic | $ | (26,124 | ) | $ | (17,381 | ) | $ | (10,068 | ) | |||
| Foreign - branch | (2,859 | ) | (2,041 | ) | (1,093 | ) | ||||||
| Total | $ | (28,983 | ) | $ | (19,422 | ) | $ | (11,161 | ) | |||
| Years Ended December 31, | ||||||||||||
| 2017 | 2016 | 2015 | ||||||||||
| U.S. Federal (tax benefit) provision at statutory rate | $ | (9,854 | ) | $ | (6,604 | ) | $ | (3,795 | ) | |||
| State (tax benefit) income taxes, net of federal benefit | (1,139 | ) | — | (83 | ) | |||||||
| Stock-based compensation | 140 | 53 | 27 | |||||||||
| Change in valuation allowance | 210 | 6,813 | 4,064 | |||||||||
| Research and development credits | (252 | ) | (277 | ) | (224 | ) | ||||||
| Tax Rate Differential Impact, Tax Cuts and Jobs Act | 10,851 | — | — | |||||||||
| Minimum state taxes | 1 | 1 | — | |||||||||
| Other permanent differences | 44 | 15 | 11 | |||||||||
| Total | $ | 1 | $ | 1 | $ | — | ||||||
| December 31, | ||||||||
| 2017 | 2016 | |||||||
| Gross deferred income tax assets | ||||||||
| Net operating loss carryforwards | $ | 23,534 | $ | 23,641 | ||||
| Research and development credit carryforwards | 1,400 | 1,053 | ||||||
| Property and equipment (depreciation) | (382 | ) | (46 | ) | ||||
| Others | 1,428 | 1,411 | ||||||
| Total deferred tax assets | 25,980 | 26,059 | ||||||
| Valuation allowance | (25,980 | ) | (26,059 | ) | ||||
| Total | $ | — | $ | — | ||||
| December 31, | ||||||||||||
| 2017 | 2016 | 2015 | ||||||||||
| Balance at the beginning of the period | $ | 26,059 | $ | 18,708 | $ | 14,675 | ||||||
| Net operating loss generated | 10,398 | 6,079 | 3,593 | |||||||||
| Research and development tax credit increase (decrease) | 252 | 252 | 211 | |||||||||
| Depreciation and amortization increase (decrease) | (574 | ) | 30 | (44 | ) | |||||||
| Tax Rate Differential Impact, Tax Cuts and Jobs Act | (10,851 | ) | — | — | ||||||||
| Reserves and accruals increase | 696 | 990 | 273 | |||||||||
| Balance at the end of the period | $ | 25,980 | $ | 26,059 | $ | 18,708 | ||||||
| December 31, | ||||||||
| 2017 | 2016 | |||||||
| Gross amount of unrecognized tax benefits as of the beginning of the period | $ | 488 | $ | 356 | ||||
| Increase related to current year tax provision | 116 | 132 | ||||||
| Gross amount of unrecognized tax benefits as of the end of the period | $ | 604 | $ | 488 | ||||